Skip to contentSkip to conversation

tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC

RFC PATCH In review Philippe Mathieu-Daudé 5 participants 18 messages Oct 23, 2020 – Oct 26, 2020

lore
Share & tools
lore
#0 lore raw

cover tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC

Series meant to help Bin Meng to debug the SD card issue reported by Michael Roth.

Philippe Mathieu-Daudé (4):
Revert "hw/sd: Fix incorrect populated function switch status data
structure"
tests/acceptance: Allow running Orange Pi test using cached artifacts tests/acceptance: Extract do_test_arm_orangepi_armbian_uboot() method tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC

 hw/sd/sd.c                             |  3 +-
 tests/acceptance/boot_linux_console.py | 68 +++++++++++++++++++-------
 2 files changed, 50 insertions(+), 21 deletions(-)
Signature · 1 line
2.26.2
#1 lore raw

RFC PATCH 1/4 Revert "hw/sd: Fix incorrect populated function switch status data structure"

This reverts commit b638627c723a8d0d2bb73489bc6bf9ff09b8d53a.

Currently booting U-Boot on the Orange Pi PC we get:

console: U-Boot SPL 2020.04-armbian (Sep 02 2020 - 10:16:13 +0200)
...
console: Autoboot in 1 seconds, press <Space> to stop
console: =>
console: => setenv extraargs 'printk.time=0 console=ttyS0,115200 loglevel=7 nosmp systemd.default_timeout_start_sec=9000 systemd.mask=armbian-zram-config.service systemd.mask=armbian-ramlog.service'
console: => boot
console: unable to select a mode
console: Device 0: unknown device
console: BOOTP broadcast 1
console: DHCP client bound to address 10.0.2.15 (12 ms)
console: *** Warning: no boot file name; using '0A00020F.img'
console: Using ethernet@1c30000 device
console: TFTP from server 10.0.2.2; our IP address is 10.0.2.15
console: Filename '0A00020F.img'.
console: Load address: 0x42000000
console: Loading: *
console: TFTP error: 'Access violation' (2)
console: Not retrying...
console: missing environment variable: pxeuuid
console: missing environment variable: bootfile
...

With commit b638627c723 reverted:

console: U-Boot SPL 2020.04-armbian (Sep 02 2020 - 10:16:13 +0200)
...
console: Autoboot in 1 seconds, press <Space> to stop
console: =>
console: => setenv extraargs 'printk.time=0 console=ttyS0,115200 loglevel=7 nosmp systemd.default_timeout_start_sec=9000 systemd.mask=armbian-zram-config.service systemd.mask=armbian-ramlog.service'
console: => boot
console: switch to partitions #0, OK
console: mmc0 is current device
console: Scanning mmc 0:1...
console: Found U-Boot script /boot/boot.scr
console: 3967 bytes read in 16 ms (241.2 KiB/s)
console: ## Executing script at 43100000
console: U-boot loaded from SD
console: Boot script loaded from mmc
console: 153 bytes read in 10 ms (14.6 KiB/s)
console: 11185760 bytes read in 6698 ms (1.6 MiB/s)
console: 7788240 bytes read in 2966 ms (2.5 MiB/s)
console: Found mainline kernel configuration
console: 32121 bytes read in 50 ms (627 KiB/s)
console: 4185 bytes read in 23 ms (176.8 KiB/s)
console: Applying kernel provided DT fixup script (sun8i-h3-fixup.scr)
console: ## Executing script at 45000000
console: ## Loading init Ramdisk from Legacy Image at 43300000 ...

  console: Image Name:   uInitrd
  console: Image Type:   ARM Linux RAMDisk Image (gzip compressed)
  console: Data Size:    11185696 Bytes = 10.7 MiB

console: Load Address: 00000000
console: Entry Point: 00000000
console: Verifying Checksum ... OK
console: ## Flattened Device Tree blob at 43000000
console: Booting using the fdt blob at 0x43000000
console: Loading Ramdisk to 49555000, end 49fffe20 ... OK
console: Loading Device Tree to 494e4000, end 49554fff ... OK
console: Starting kernel ...
console: Uncompressing Linux... done, booting the kernel.

Fixes b638627c723 ("hw/sd: Fix incorrect populated function switch status data structure")
---
 hw/sd/sd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
hw/sd/sd.c +1 -2
index c3febed2434..c17197785bc 100644
@@ -823,12 +823,11 @@ static void sd_function_switch(SDState *sd, uint32_t arg)
     sd->data[11] = 0x43;
     sd->data[12] = 0x80;	/* Supported group 1 functions */
     sd->data[13] = 0x03;
-
     for (i = 0; i < 6; i ++) {
         new_func = (arg >> (i * 4)) & 0x0f;
         if (mode && new_func != 0x0f)
             sd->function_group[i] = new_func;
-        sd->data[16 - (i >> 1)] |= new_func << ((i % 2) * 4);
+        sd->data[14 + (i >> 1)] = new_func << ((i * 4) & 4);
     }
     memset(&sd->data[17], 0, 47);
     stw_be_p(sd->data + 64, sd_crc16(sd->data, 64));
Signature · 1 line
2.26.2
Tested-by Reviewed-by on v1 1/4
#2 lore raw

Re: [RFC PATCH 1/4] Revert "hw/sd: Fix incorrect populated function switch status data structure"

Quoted 101 lines · Philippe Mathieu-Daudé

This reverts commit b638627c723a8d0d2bb73489bc6bf9ff09b8d53a.

Currently booting U-Boot on the Orange Pi PC we get:

console: U-Boot SPL 2020.04-armbian (Sep 02 2020 - 10:16:13 +0200)
...
console: Autoboot in 1 seconds, press <Space> to stop
console: =>
console: => setenv extraargs 'printk.time=0 console=ttyS0,115200
loglevel=7 nosmp systemd.default_timeout_start_sec=9000 systemd.mask=armbian-zram-config.service systemd.mask=armbian-ramlog.service'
console: => boot
console: unable to select a mode
console: Device 0: unknown device
console: BOOTP broadcast 1
console: DHCP client bound to address 10.0.2.15 (12 ms)
console: *** Warning: no boot file name; using '0A00020F.img'
console: Using ethernet@1c30000 device
console: TFTP from server 10.0.2.2; our IP address is 10.0.2.15
console: Filename '0A00020F.img'.
console: Load address: 0x42000000
console: Loading: *
console: TFTP error: 'Access violation' (2)
console: Not retrying...
console: missing environment variable: pxeuuid
console: missing environment variable: bootfile
...

With commit b638627c723 reverted:

console: U-Boot SPL 2020.04-armbian (Sep 02 2020 - 10:16:13 +0200)
...
console: Autoboot in 1 seconds, press <Space> to stop
console: =>
console: => setenv extraargs 'printk.time=0 console=ttyS0,115200
loglevel=7 nosmp systemd.default_timeout_start_sec=9000 systemd.mask=armbian-zram-config.service systemd.mask=armbian-ramlog.service'
console: => boot
console: switch to partitions #0, OK
console: mmc0 is current device
console: Scanning mmc 0:1...
console: Found U-Boot script /boot/boot.scr
console: 3967 bytes read in 16 ms (241.2 KiB/s)
console: ## Executing script at 43100000
console: U-boot loaded from SD
console: Boot script loaded from mmc
console: 153 bytes read in 10 ms (14.6 KiB/s)
console: 11185760 bytes read in 6698 ms (1.6 MiB/s)
console: 7788240 bytes read in 2966 ms (2.5 MiB/s)
console: Found mainline kernel configuration
console: 32121 bytes read in 50 ms (627 KiB/s)
console: 4185 bytes read in 23 ms (176.8 KiB/s)
console: Applying kernel provided DT fixup script (sun8i-h3-fixup.scr)
console: ## Executing script at 45000000
console: ## Loading init Ramdisk from Legacy Image at 43300000 ...

  console: Image Name:   uInitrd
  console: Image Type:   ARM Linux RAMDisk Image (gzip compressed)
  console: Data Size:    11185696 Bytes = 10.7 MiB

console: Load Address: 00000000
console: Entry Point: 00000000
console: Verifying Checksum ... OK
console: ## Flattened Device Tree blob at 43000000
console: Booting using the fdt blob at 0x43000000
console: Loading Ramdisk to 49555000, end 49fffe20 ... OK
console: Loading Device Tree to 494e4000, end 49554fff ... OK
console: Starting kernel ...
console: Uncompressing Linux... done, booting the kernel.

Fixes b638627c723 ("hw/sd: Fix incorrect populated function switch status

data structure")

---
 hw/sd/sd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
hw/sd/sd.c +1 -2
index c3febed2434..c17197785bc 100644
@@ -823,12 +823,11 @@ static void sd_function_switch(SDState *sd, uint32_t
 arg)
     sd->data[11] = 0x43;
     sd->data[12] = 0x80;       /* Supported group 1 functions */
     sd->data[13] = 0x03;
-
     for (i = 0; i < 6; i ++) {
         new_func = (arg >> (i * 4)) & 0x0f;
         if (mode && new_func != 0x0f)
             sd->function_group[i] = new_func;
-        sd->data[16 - (i >> 1)] |= new_func << ((i % 2) * 4);
+        sd->data[14 + (i >> 1)] = new_func << ((i * 4) & 4);
     }
     memset(&sd->data[17], 0, 47);
     stw_be_p(sd->data + 64, sd_crc16(sd->data, 64));

--
2.26.2

Signature · 1 line
Niek Linnenbank
#3 lore raw

RFC PATCH 2/4 tests/acceptance: Allow running Orange Pi test using cached artifacts

In reply to Philippe Mathieu-Daudé

Unfortunately the Armbian 19.11.3 image has been removed from the dl.armbian.com file server. Developers having the artifact cached can still run the test. Allow them to, until we find a proper solution to share binaries with the whole community.

This avoids (when file manually added to cache):

BootLinuxConsole.test_arm_orangepi_bionic_19_11: CANCEL: Missing asset https://dl.armbian.com/orangepipc/archive/Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.7z (1.06 s)

---
 tests/acceptance/boot_linux_console.py | 2 ++
 1 file changed, 2 insertions(+)
tests/acceptance/boot_linux_console.py +2 -0
index 0118ed59156..032ac85978c 100644
@@ -780,6 +780,8 @@ def test_arm_orangepi_sd(self):
         # Wait for VM to shut down gracefully
         self.vm.wait()
 
+    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
+                'Test artifacts fetched from unreliable dl.armbian.com')
     @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
     @skipUnless(P7ZIP_AVAILABLE, '7z not installed')
     def test_arm_orangepi_bionic(self):
Signature · 1 line
2.26.2
Reviewed-by on v1 2/4
#4 lore raw

Re: [RFC PATCH 2/4] tests/acceptance: Allow running Orange Pi test using cached artifacts

As a temporary solution this should be fine, until we have decided on which reliable storage location to use.

Quoted 36 lines · Philippe Mathieu-Daudé

Unfortunately the Armbian 19.11.3 image has been removed from the dl.armbian.com file server. Developers having the artifact cached can still run the test. Allow them to, until we find a proper solution to share binaries with the whole community.

This avoids (when file manually added to cache):

BootLinuxConsole.test_arm_orangepi_bionic_19_11: CANCEL: Missing asset
https://dl.armbian.com/orangepipc/archive/Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.7z
(1.06 s)

---
 tests/acceptance/boot_linux_console.py | 2 ++
 1 file changed, 2 insertions(+)
tests/acceptance/boot_linux_console.py +2 -0
index 0118ed59156..032ac85978c 100644
@@ -780,6 +780,8 @@ def test_arm_orangepi_sd(self):
         # Wait for VM to shut down gracefully
         self.vm.wait()
 
+    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
+                'Test artifacts fetched from unreliable dl.armbian.com')
     @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage
 limited')
     @skipUnless(P7ZIP_AVAILABLE, '7z not installed')

def test_arm_orangepi_bionic(self):
--
2.26.2

Signature · 1 line
Niek Linnenbank
#5 lore raw

RFC PATCH 3/4 tests/acceptance: Extract do_test_arm_orangepi_armbian_uboot() method

In reply to Philippe Mathieu-Daudé

As we want to reuse the same U-Boot test for multiple Armbian releases, extract the common part as do_test_arm_orangepi_armbian_uboot().

---
 tests/acceptance/boot_linux_console.py | 45 ++++++++++++++------------
 1 file changed, 24 insertions(+), 21 deletions(-)
tests/acceptance/boot_linux_console.py +24 -21
index 032ac85978c..803b4512a26 100644
@@ -780,27 +780,7 @@ def test_arm_orangepi_sd(self):
         # Wait for VM to shut down gracefully
         self.vm.wait()
 
-    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
-                'Test artifacts fetched from unreliable dl.armbian.com')
-    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
-    @skipUnless(P7ZIP_AVAILABLE, '7z not installed')
-    def test_arm_orangepi_bionic(self):
-        """
-        :avocado: tags=arch:arm
-        :avocado: tags=machine:orangepi-pc
-        :avocado: tags=device:sd
-        """
-
-        # This test download a 196MB compressed image and expand it to 1GB
-        image_url = ('https://dl.armbian.com/orangepipc/archive/'
-                     'Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.7z')
-        image_hash = '196a8ffb72b0123d92cea4a070894813d305c71e'
-        image_path_7z = self.fetch_asset(image_url, asset_hash=image_hash)
-        image_name = 'Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.img'
-        image_path = os.path.join(self.workdir, image_name)
-        process.run("7z e -o%s %s" % (self.workdir, image_path_7z))
-        image_pow2ceil_expand(image_path)
-
+    def do_test_arm_orangepi_uboot_armbian(self, image_path):
         self.vm.set_console()
         self.vm.add_args('-drive', 'file=' + image_path + ',if=sd,format=raw',
                          '-nic', 'user',
@@ -826,6 +806,29 @@ def test_arm_orangepi_bionic(self):
                                       'to <orangepipc>')
         self.wait_for_console_pattern('Starting Load Kernel Modules...')
 
+    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
+                'Test artifacts fetched from unreliable apt.armbian.com')
+    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
+    @skipUnless(P7ZIP_AVAILABLE, '7z not installed')
+    def test_arm_orangepi_bionic_19_11(self):
+        """
+        :avocado: tags=arch:arm
+        :avocado: tags=machine:orangepi-pc
+        :avocado: tags=device:sd
+        """
+
+        # This test download a 196MB compressed image and expand it to 1GB
+        image_url = ('https://dl.armbian.com/orangepipc/archive/'
+                     'Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.7z')
+        image_hash = '196a8ffb72b0123d92cea4a070894813d305c71e'
+        image_path_7z = self.fetch_asset(image_url, asset_hash=image_hash)
+        image_name = 'Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.img'
+        image_path = os.path.join(self.workdir, image_name)
+        process.run("7z e -o%s %s" % (self.workdir, image_path_7z))
+        image_pow2ceil_expand(image_path)
+
+        self.do_test_arm_orangepi_uboot_armbian(image_path)
+
     @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
     def test_arm_orangepi_uboot_netbsd9(self):
         """
Signature · 1 line
2.26.2
#6 lore raw

RFC PATCH 4/4 tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC

In reply to Philippe Mathieu-Daudé

Test U-Boot and Linux on the recent Armbian release 20.08.

---
 tests/acceptance/boot_linux_console.py | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
tests/acceptance/boot_linux_console.py +25 -0
index 803b4512a26..b604cfe7dab 100644
@@ -829,6 +829,31 @@ def test_arm_orangepi_bionic_19_11(self):
 
         self.do_test_arm_orangepi_uboot_armbian(image_path)
 
+    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
+                'Test artifacts fetched from unreliable apt.armbian.com')
+    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
+    def test_arm_orangepi_bionic_20_08(self):
+        """
+        :avocado: tags=arch:arm
+        :avocado: tags=machine:orangepi-pc
+        :avocado: tags=device:sd
+        """
+
+        # This test download a 275 MiB compressed image and expand it
+        # to 1036 MiB, but the underlying filesystem is 1552 MiB...
+        # As we expand it to 2 GiB we are safe.
+
+        image_url = ('https://dl.armbian.com/orangepipc/archive/'
+                     'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')
+        image_hash = ('b4d6775f5673486329e45a0586bf06b6'
+                      'dbe792199fd182ac6b9c7bb6c7d3e6dd')
+        image_path_xz = self.fetch_asset(image_url, asset_hash=image_hash,
+                                         algorithm='sha256')
+        image_path = archive.extract(image_path_xz, self.workdir)
+        image_pow2ceil_expand(image_path)
+
+        self.do_test_arm_orangepi_uboot_armbian(image_path)
+
     @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
     def test_arm_orangepi_uboot_netbsd9(self):
         """
Signature · 1 line
2.26.2
#7 lore raw

Hi Philippe,

I have ran this series with the new Armbian 20.08 test and noticed this failure:

-console: /dev/mmcblk0p1: The filesystem size (according to the
superrandom: fast init done
console: block) is 264192 blocks
console: The physical size of the device is 261120 blocks
console: Either the superblock or the partition table is likely to be corrupt!
console: /dev/mmcblk0p1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
console: (i.e., without -a or -p options)
console: fsck exited with status code 4
console: done.
console: Failure: File system check of the root filesystem failed
console: The root filesystem on /dev/mmcblk0p1 requires a manual fsck |console: BusyBox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3.2) built-in shell (ash)
console: Enter 'help' for a list of built-in commands.
INTERRUPTED: Test interrupted by SIGTERM\nRunner error occurred: Timeout reached\nOriginal status: ERROR\n{'name':
'5-tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi_bionic_20_08', 'logdir': '/home/fox/avocado/job-results/job-2020-10-24T22.25-39... (90.47
s)

When I run the image manually I get the same error, but only if I resize the 20.08 image to 2G. If resized to 4G, the
20.08 image boots fine.

Additionally, I noticed that the NetBSD 9.0 test has the same problem, even in current master (4c5b97bfd0dd54dc27717ae8d1cd10e14eef1430):

(5/5)
tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi_uboot_netbsd9:
|console: U-Boot SPL 2020.01+dfsg-1 (Jan 08 2020 - 08:19:44 +0000)
console: DRAM: 1024 MiB
console: Failed to set core voltage! Can't set CPU frequency
/console: Trying to boot from MMC1
console: U-Boot 2020.01+dfsg-1 (Jan 08 2020 - 08:19:44 +0000) Allwinner Technology
...
console: Starting kernel ...
console: [ 1.0000000] NetBSD/evbarm (fdt) booting ...
...
console: [ 1.3300167] sdmmc0: SD card status: 4-bit, C0
console: [ 1.3300167] ld0 at sdmmc0:
<0xaa:0x5859:QEMU!:0x01:0xdeadbeef:0x062>
console: [ 1.3430678] ld0: 1024 MB, 1040 cyl, 32 head, 63 sec, 512
bytes/sect x 2097152 sectors
console: [ 1.4102580] ld0: 4-bit width, High-Speed/SDR25, 50.000 MHz
console: [ 2.0674392] WARNING: 4 errors while detecting hardware; check
system log.
console: [ 2.0674392] boot device: ld0
console: [ 2.0775401] root on ld0a dumps on ld0b
console: [ 2.0977679] vfs_mountroot: can't open root device
console: [ 2.0977679] cannot mount root, error = 6
INTERRUPTED: Test interrupted by SIGTERM\nRunner error occurred: Timeout reached\nOriginal status: ERROR\n{'name':
'5-tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi_uboot_netbsd9', 'l>

To resolve this error, I made a small patch that expands the SD image in both tests to the next power-of-two multiplied by 2:

(quoted diff) +0 -0

b/tests/acceptance/boot_linux_console.py
index b604cfe7da..40835904bb 100644

tests/acceptance/boot_linux_console.py +5 -5
@@ -35,11 +35,11 @@ def pow2ceil(x):
     return 1 if x == 0 else 2**(x - 1).bit_length()
 
 """
-Expand file size to next power of 2
+Expand file size to next power of 2 or higher
 """
-def image_pow2ceil_expand(path):
+def image_pow2ceil_expand(path, multiply_factor = 1):
         size = os.path.getsize(path)
-        size_aligned = pow2ceil(size)
+        size_aligned = pow2ceil(size) * multiply_factor
         if size != size_aligned:
             with open(path, 'ab+') as fd:
                 fd.truncate(size_aligned)
@@ -850,7 +850,7 @@ class BootLinuxConsole(LinuxKernelTest):
         image_path_xz = self.fetch_asset(image_url, asset_hash=image_hash,
                                          algorithm='sha256')
         image_path = archive.extract(image_path_xz, self.workdir)
-        image_pow2ceil_expand(image_path)
+        image_pow2ceil_expand(image_path, 2)
 
         self.do_test_arm_orangepi_uboot_armbian(image_path)
 
@@ -879,7 +879,7 @@ class BootLinuxConsole(LinuxKernelTest):
         image_path_gz = self.fetch_asset(image_url, asset_hash=image_hash)
         image_path = os.path.join(self.workdir, 'armv7.img')
         archive.gzip_uncompress(image_path_gz, image_path)
-        image_pow2ceil_expand(image_path)
+        image_pow2ceil_expand(image_path, 2)
         image_drive_args = 'if=sd,format=raw,snapshot=on,file=' +

image_path

         # dd if=u-boot-sunxi-with-spl.bin of=armv7.img bs=1K seek=8
conv=notrunc

After applying that change, all Orange Pi tests run successfully:

$ AVOCADO_ALLOW_LARGE_STORAGE=yes ARMBIAN_ARTIFACTS_CACHED=yes avocado
--show=app,console run -t machine:orangepi-pc
tests/acceptance/boot_linux_console.py
...
RESULTS    : PASS 6 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 |
CANCEL 0
JOB TIME   : 161.69 s

I will send this as a separate patch to the list shortly, so you can consider adding it to the series (feel free to modify it where needed).

Regards,
Niek

Quoted 52 lines · Philippe Mathieu-Daudé

Test U-Boot and Linux on the recent Armbian release 20.08.

---
 tests/acceptance/boot_linux_console.py | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
tests/acceptance/boot_linux_console.py +25 -0
index 803b4512a26..b604cfe7dab 100644
@@ -829,6 +829,31 @@ def test_arm_orangepi_bionic_19_11(self):
 
         self.do_test_arm_orangepi_uboot_armbian(image_path)
 
+    @skipUnless(os.getenv('ARMBIAN_ARTIFACTS_CACHED'),
+                'Test artifacts fetched from unreliable apt.armbian.com')
+    @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage
 limited')
+    def test_arm_orangepi_bionic_20_08(self):
+        """
+        :avocado: tags=arch:arm
+        :avocado: tags=machine:orangepi-pc
+        :avocado: tags=device:sd
+        """
+
+        # This test download a 275 MiB compressed image and expand it
+        # to 1036 MiB, but the underlying filesystem is 1552 MiB...
+        # As we expand it to 2 GiB we are safe.
+
+        image_url = ('https://dl.armbian.com/orangepipc/archive/'
+
 'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')
+        image_hash = ('b4d6775f5673486329e45a0586bf06b6'
+                      'dbe792199fd182ac6b9c7bb6c7d3e6dd')
+        image_path_xz = self.fetch_asset(image_url, asset_hash=image_hash,
+                                         algorithm='sha256')
+        image_path = archive.extract(image_path_xz, self.workdir)
+        image_pow2ceil_expand(image_path)
+
+        self.do_test_arm_orangepi_uboot_armbian(image_path)
+
     @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage

limited')

     def test_arm_orangepi_uboot_netbsd9(self):
         """

--
2.26.2

Signature · 1 line
Niek Linnenbank
#8 lore raw

Hi Niek,

Quoted 84 lines · Niek Linnenbank

Hi Philippe,

I have ran this series with the new Armbian 20.08 test and noticed this failure:

-console: /dev/mmcblk0p1: The filesystem size (according to the superrandom: fast init done
console: block) is 264192 blocks
console: The physical size of the device is 261120 blocks
console: Either the superblock or the partition table is likely to be corrupt!
console: /dev/mmcblk0p1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
console: (i.e., without -a or -p options)
console: fsck exited with status code 4
console: done.
console: Failure: File system check of the root filesystem failed
console: The root filesystem on /dev/mmcblk0p1 requires a manual fsck
|console: BusyBox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3.2) built-in shell (ash)
console: Enter 'help' for a list of built-in commands.
INTERRUPTED: Test interrupted by SIGTERM\nRunner error occurred: Timeout reached\nOriginal status: ERROR\n{'name': '5-tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi_bionic_20_08', 'logdir': '/home/fox/avocado/job-results/job-2020-10-24T22.25-39... (90.47 s)

When I run the image manually I get the same error, but only if I resize the 20.08 image to 2G. If resized to 4G, the 20.08 image boots fine.

Additionally, I noticed that the NetBSD 9.0 test has the same problem, even in current master (4c5b97bfd0dd54dc27717ae8d1cd10e14eef1430):

   (5/5) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi_uboot_netbsd9: |console: U-Boot SPL 2020.01+dfsg-1 (Jan 08 2020 - 08:19:44 +0000)

console: DRAM: 1024 MiB
console: Failed to set core voltage! Can't set CPU frequency
/console: Trying to boot from MMC1
console: U-Boot 2020.01+dfsg-1 (Jan 08 2020 - 08:19:44 +0000) Allwinner Technology
...
console: Starting kernel ...
console: [ 1.0000000] NetBSD/evbarm (fdt) booting ...
...
console: [ 1.3300167] sdmmc0: SD card status: 4-bit, C0
console: [ 1.3300167] ld0 at sdmmc0: <0xaa:0x5859:QEMU!:0x01:0xdeadbeef:0x062>
console: [ 1.3430678] ld0: 1024 MB, 1040 cyl, 32 head, 63 sec, 512 bytes/sect x 2097152 sectors
console: [ 1.4102580] ld0: 4-bit width, High-Speed/SDR25, 50.000 MHz
console: [ 2.0674392] WARNING: 4 errors while detecting hardware; check system log.
console: [ 2.0674392] boot device: ld0
console: [ 2.0775401] root on ld0a dumps on ld0b
console: [ 2.0977679] vfs_mountroot: can't open root device
console: [ 2.0977679] cannot mount root, error = 6
INTERRUPTED: Test interrupted by SIGTERM\nRunner error occurred: Timeout reached\nOriginal status: ERROR\n{'name': '5-tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi_uboot_netbsd9', 'l>

To resolve this error, I made a small patch that expands the SD image in both tests to the next power-of-two multiplied by 2:

tests/acceptance/boot_linux_console.py +5 -5
index b604cfe7da..40835904bb 100644
@@ -35,11 +35,11 @@ def pow2ceil(x):
     return 1 if x == 0 else 2**(x - 1).bit_length()
 
 """
-Expand file size to next power of 2
+Expand file size to next power of 2 or higher
 """
-def image_pow2ceil_expand(path):
+def image_pow2ceil_expand(path, multiply_factor = 1):
         size = os.path.getsize(path)
-        size_aligned = pow2ceil(size)
+        size_aligned = pow2ceil(size) * multiply_factor
         if size != size_aligned:
             with open(path, 'ab+') as fd:
                 fd.truncate(size_aligned)
@@ -850,7 +850,7 @@ class BootLinuxConsole(LinuxKernelTest):
         image_path_xz = self.fetch_asset(image_url, asset_hash=image_hash,
                                          algorithm='sha256')
         image_path = archive.extract(image_path_xz, self.workdir)
-        image_pow2ceil_expand(image_path)
+        image_pow2ceil_expand(image_path, 2)
 
         self.do_test_arm_orangepi_uboot_armbian(image_path)
 
@@ -879,7 +879,7 @@ class BootLinuxConsole(LinuxKernelTest):
         image_path_gz = self.fetch_asset(image_url, asset_hash=image_hash)
         image_path = os.path.join(self.workdir, 'armv7.img')
         archive.gzip_uncompress(image_path_gz, image_path)
-        image_pow2ceil_expand(image_path)
+        image_pow2ceil_expand(image_path, 2)
         image_drive_args = 'if=sd,format=raw,snapshot=on,file=' + image_path
 
         # dd if=u-boot-sunxi-with-spl.bin of=armv7.img bs=1K seek=8 conv=notrunc
Quoted 3 lines

After applying that change, all Orange Pi tests run successfully:

$ AVOCADO_ALLOW_LARGE_STORAGE=yes ARMBIAN_ARTIFACTS_CACHED=yes avocado --show=app,console run -t machine:orangepi-pc tests/acceptance/boot_linux_console.py

This command does not work for me.

Traceback (most recent call last):
File "/usr/local/bin/avocado", line 5, in <module>
from avocado.core.main import main
File "/usr/local/lib/python3.8/dist-packages/avocado/core/main.py",
line 22, in <module>
from avocado.core import data_dir
File "/usr/local/lib/python3.8/dist-packages/avocado/core/data_dir.py",
line 39, in <module>
from .output import LOG_JOB, LOG_UI
File "/usr/local/lib/python3.8/dist-packages/avocado/core/output.py",
line 27, in <module>
from .settings import settings
File "/usr/local/lib/python3.8/dist-packages/avocado/core/settings.py",
line 625, in <module>
settings = Settings() # pylint: disable-msg=invalid-name
File "/usr/local/lib/python3.8/dist-packages/avocado/core/settings.py",
line 274, in __init__
self._prepare_base_dirs()
File "/usr/local/lib/python3.8/dist-packages/avocado/core/settings.py",
line 315, in _prepare_base_dirs
self._config_path_pkg = resource_filename('avocado', config_pkg_base)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py",
line 1145, in resource_filename

    return get_provider(package_or_requirement).get_resource_filename(

File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py",
line 365, in get_provider
return _find_adapter(_provider_factories, loader)(module)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py",
line 1393, in __init__

    self.module_path = os.path.dirname(getattr(module, '__file__', ''))

File "/usr/lib/python3.8/posixpath.py", line 152, in dirname
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

I haven't got a command to work on testing only a single target. Any hint? Thanks!

Quoted 6 lines

...
RESULTS : PASS 6 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB TIME : 161.69 s

I will send this as a separate patch to the list shortly, so you can consider adding it to the series (feel free to modify it where needed).

Regards,
Bin

#9 lore raw

Hi Bin,

Quoted 150 lines · Bin Meng

Hi Niek,

Quoted 4 lines · Niek Linnenbank

Hi Philippe,

I have ran this series with the new Armbian 20.08 test and noticed this

failure:

Quoted 2 lines

-console: /dev/mmcblk0p1: The filesystem size (according to the

superrandom: fast init done

Quoted 3 lines

console: block) is 264192 blocks
console: The physical size of the device is 261120 blocks
console: Either the superblock or the partition table is likely to be

corrupt!

Quoted 7 lines

console: /dev/mmcblk0p1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
console: (i.e., without -a or -p options)
console: fsck exited with status code 4
console: done.
console: Failure: File system check of the root filesystem failed
console: The root filesystem on /dev/mmcblk0p1 requires a manual fsck |console: BusyBox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3.2) built-in shell

(ash)

Quoted 2 lines

console: Enter 'help' for a list of built-in commands.
INTERRUPTED: Test interrupted by SIGTERM\nRunner error occurred: Timeout

reached\nOriginal status: ERROR\n{'name':
'5-tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi_bionic_20_08', 'logdir': '/home/fox/avocado/job-results/job-2020-10-24T22.25-39... (90.47
s)

Quoted 2 lines

When I run the image manually I get the same error, but only if I resize

the 20.08 image to 2G. If resized to 4G, the

Quoted 3 lines

20.08 image boots fine.

Additionally, I noticed that the NetBSD 9.0 test has the same problem,

even in current master (4c5b97bfd0dd54dc27717ae8d1cd10e14eef1430):

Quoted 2 lines
   (5/5)

tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi_uboot_netbsd9:
|console: U-Boot SPL 2020.01+dfsg-1 (Jan 08 2020 - 08:19:44 +0000)

Quoted 4 lines

console: DRAM: 1024 MiB
console: Failed to set core voltage! Can't set CPU frequency /console: Trying to boot from MMC1
console: U-Boot 2020.01+dfsg-1 (Jan 08 2020 - 08:19:44 +0000) Allwinner

Technology

Quoted 6 lines

...
console: Starting kernel ...
console: [ 1.0000000] NetBSD/evbarm (fdt) booting ...
...
console: [ 1.3300167] sdmmc0: SD card status: 4-bit, C0
console: [ 1.3300167] ld0 at sdmmc0:

<0xaa:0x5859:QEMU!:0x01:0xdeadbeef:0x062>

Quoted 1 line

console: [ 1.3430678] ld0: 1024 MB, 1040 cyl, 32 head, 63 sec, 512

bytes/sect x 2097152 sectors

Quoted 2 lines

console: [ 1.4102580] ld0: 4-bit width, High-Speed/SDR25, 50.000 MHz
console: [ 2.0674392] WARNING: 4 errors while detecting hardware;

check system log.

Quoted 5 lines

console: [ 2.0674392] boot device: ld0
console: [ 2.0775401] root on ld0a dumps on ld0b
console: [ 2.0977679] vfs_mountroot: can't open root device
console: [ 2.0977679] cannot mount root, error = 6
INTERRUPTED: Test interrupted by SIGTERM\nRunner error occurred: Timeout

reached\nOriginal status: ERROR\n{'name':
'5-tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi_uboot_netbsd9', 'l>

Quoted 2 lines

To resolve this error, I made a small patch that expands the SD image in

both tests to the next power-of-two multiplied by 2:

Review

Quoted 2 lines
(quoted diff) +0 -0

b/tests/acceptance/boot_linux_console.py

Quoted 19 lines

index b604cfe7da..40835904bb 100644

tests/acceptance/boot_linux_console.py +3 -3
@@ -35,11 +35,11 @@ def pow2ceil(x):
     return 1 if x == 0 else 2**(x - 1).bit_length()
 
 """
-Expand file size to next power of 2
+Expand file size to next power of 2 or higher
 """
-def image_pow2ceil_expand(path):
+def image_pow2ceil_expand(path, multiply_factor = 1):
         size = os.path.getsize(path)
-        size_aligned = pow2ceil(size)
+        size_aligned = pow2ceil(size) * multiply_factor
         if size != size_aligned:
             with open(path, 'ab+') as fd:
                 fd.truncate(size_aligned)

tests/acceptance/boot_linux_console.py class BootLinuxConsole(LinuxKernelTest): · line 850

Quoted 1 line
tests/acceptance/boot_linux_console.py +0 -0
@@ -850,7 +850,7 @@ class BootLinuxConsole(LinuxKernelTest):
         image_path_xz = self.fetch_asset(image_url,

asset_hash=image_hash,

tests/acceptance/boot_linux_console.py class BootLinuxConsole(LinuxKernelTest): · line 879

Quoted 9 lines
tests/acceptance/boot_linux_console.py +1 -1
                                          algorithm='sha256')
         image_path = archive.extract(image_path_xz, self.workdir)
-        image_pow2ceil_expand(image_path)
+        image_pow2ceil_expand(image_path, 2)
 
         self.do_test_arm_orangepi_uboot_armbian(image_path)
 
@@ -879,7 +879,7 @@ class BootLinuxConsole(LinuxKernelTest):
         image_path_gz = self.fetch_asset(image_url,

asset_hash=image_hash)

tests/acceptance/boot_linux_console.py class BootLinuxConsole(LinuxKernelTest): · line 883

Quoted 5 lines
tests/acceptance/boot_linux_console.py +1 -1
         image_path = os.path.join(self.workdir, 'armv7.img')
         archive.gzip_uncompress(image_path_gz, image_path)
-        image_pow2ceil_expand(image_path)
+        image_pow2ceil_expand(image_path, 2)
         image_drive_args = 'if=sd,format=raw,snapshot=on,file=' +

image_path

tests/acceptance/boot_linux_console.py class BootLinuxConsole(LinuxKernelTest): · line 884

Quoted 2 lines
tests/acceptance/boot_linux_console.py +0 -0
         # dd if=u-boot-sunxi-with-spl.bin of=armv7.img bs=1K seek=8

conv=notrunc

Quoted 4 lines

After applying that change, all Orange Pi tests run successfully:

$ AVOCADO_ALLOW_LARGE_STORAGE=yes ARMBIAN_ARTIFACTS_CACHED=yes avocado

--show=app,console run -t machine:orangepi-pc
tests/acceptance/boot_linux_console.py

This command does not work for me.

Traceback (most recent call last):
File "/usr/local/bin/avocado", line 5, in <module>
from avocado.core.main import main
File "/usr/local/lib/python3.8/dist-packages/avocado/core/main.py",
line 22, in <module>
from avocado.core import data_dir
File "/usr/local/lib/python3.8/dist-packages/avocado/core/data_dir.py",
line 39, in <module>
from .output import LOG_JOB, LOG_UI
File "/usr/local/lib/python3.8/dist-packages/avocado/core/output.py",
line 27, in <module>
from .settings import settings
File "/usr/local/lib/python3.8/dist-packages/avocado/core/settings.py",
line 625, in <module>
settings = Settings() # pylint: disable-msg=invalid-name
File "/usr/local/lib/python3.8/dist-packages/avocado/core/settings.py",
line 274, in __init__
self._prepare_base_dirs()
File "/usr/local/lib/python3.8/dist-packages/avocado/core/settings.py",
line 315, in _prepare_base_dirs
self._config_path_pkg = resource_filename('avocado', config_pkg_base)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py",
line 1145, in resource_filename

    return get_provider(package_or_requirement).get_resource_filename(

File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py",
line 365, in get_provider
return _find_adapter(_provider_factories, loader)(module)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py",
line 1393, in __init__

Quoted 8 lines
    self.module_path = os.path.dirname(getattr(module, '__file__', ''))

File "/usr/lib/python3.8/posixpath.py", line 152, in dirname
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

I haven't got a command to work on testing only a single target. Any hint? Thanks!

That error is new to me, I have not seen it before. From the stacktrace, it looks like that avocado is trying to read its own configuration / settings file (from settings.py).
Later on there is a type conversion error for NoneType. Perhaps the avocado files for your user have somehow got corrupted?
You could try to remove them from your home directory and/or re-install avocado as well and start out fresh.
I assume that at least 'avocado --help' should work without generating this error.

Also it may be useful to know that it looks like you need to run avocado from within the new 'build' directory that the new meson build system now creates.
If not running from the 'build' directory, I'm getting this printed on my machine:
CANCEL: No QEMU binary defined or found in the build tree

So once your avocado is working without the type error you could try this:

1) cd build
2) AVOCADO_ALLOW_LARGE_STORAGE=yes ARMBIAN_ARTIFACTS_CACHED=yes avocado --show=app,console run -t machine:orangepi-pc tests/acceptance/boot_linux_console.py

Alternatively, if you can't get avocado to run anything, you could also just run the Armbian image (or any other image) directly via qemu-system-arm:

  $ build/arm-softmmu/qemu-system-arm -M orangepi-pc -nographic -nic user
-sd Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img
  U-Boot SPL 2020.04-armbian (Sep 02 2020 - 10:16:13 +0200)
  DRAM: 1024 MiB
  ...
  Autoboot in 1 seconds, press <Space> to stop
  => setenv extraargs 'console=ttyS0,115200'
  => boot
  ...
  Uncompressing Linux... done, booting the kernel.
  Loading, please wait...
  starting version 237

Also see the file docs/system/arm/orangepi.rst with some additional information and documentation.

Hope this helps & regards,

Niek

Quoted 13 lines
Quoted 3 lines

...
RESULTS : PASS 6 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 |

CANCEL 0

Quoted 3 lines

JOB TIME : 161.69 s

I will send this as a separate patch to the list shortly, so you can

consider adding it to the series (feel free to modify it where needed).

Quoted 1 line

Regards,
Bin

Signature · 1 line
Niek Linnenbank
#10 lore raw

Cc'ing avocado-devel@

Quoted 3 lines · Niek Linnenbank

On Sun, Oct 25, 2020 at 3:17 AM Bin Meng <[email protected] <mailto:[email protected]>> wrote:
On Sun, Oct 25, 2020 at 5:01 AM Niek Linnenbank
<[email protected] <mailto:[email protected]>> wrote:

...

Quoted 87 lines

> After applying that change, all Orange Pi tests run successfully:
>
> $ AVOCADO_ALLOW_LARGE_STORAGE=yes ARMBIAN_ARTIFACTS_CACHED=yes
avocado --show=app,console run -t machine:orangepi-pc tests/acceptance/boot_linux_console.py

This command does not work for me.

Traceback (most recent call last):
  File "/usr/local/bin/avocado", line 5, in <module>
    from avocado.core.main import main
  File "/usr/local/lib/python3.8/dist-packages/avocado/core/main.py",
line 22, in <module>
    from avocado.core import data_dir
  File
"/usr/local/lib/python3.8/dist-packages/avocado/core/data_dir.py", line 39, in <module>
    from .output import LOG_JOB, LOG_UI
  File "/usr/local/lib/python3.8/dist-packages/avocado/core/output.py",
line 27, in <module>
    from .settings import settings
  File
"/usr/local/lib/python3.8/dist-packages/avocado/core/settings.py", line 625, in <module>
    settings = Settings()  # pylint: disable-msg=invalid-name File
"/usr/local/lib/python3.8/dist-packages/avocado/core/settings.py", line 274, in __init__
    self._prepare_base_dirs()
  File
"/usr/local/lib/python3.8/dist-packages/avocado/core/settings.py", line 315, in _prepare_base_dirs
    self._config_path_pkg = resource_filename('avocado',
config_pkg_base)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py",
line 1145, in resource_filename
    return get_provider(package_or_requirement).get_resource_filename( File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py",
line 365, in get_provider
    return _find_adapter(_provider_factories, loader)(module) File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py",
line 1393, in __init__
    self.module_path = os.path.dirname(getattr(module, '__file__', '')) File "/usr/lib/python3.8/posixpath.py", line 152, in dirname p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

I haven't got a command to work on testing only a single target. Any hint? Thanks!

That error is new to me, I have not seen it before. From the stacktrace, it looks like that avocado is trying to read its own configuration / settings file (from settings.py). Later on there is a type conversion error for NoneType. Perhaps the avocado files for your user have somehow got corrupted?
You could try to remove them from your home directory and/or re-install avocado as well and start out fresh.
I assume that at least 'avocado --help'  should work without generating this error.

Also it may be useful to know that it looks like you need to run avocado from within the new 'build' directory that the new meson build system now creates. If not running from the 'build' directory, I'm getting this printed on my machine:
  CANCEL: No QEMU binary defined or found in the build tree

So once your avocado is working without the type error you could try this:

1) cd build
2) AVOCADO_ALLOW_LARGE_STORAGE=yes ARMBIAN_ARTIFACTS_CACHED=yes avocado --show=app,console run -t machine:orangepi-pc tests/acceptance/boot_linux_console.py

Alternatively, if you can't get avocado to run anything, you could also just run the Armbian image (or any other image) directly via qemu-system-arm:

   $ build/arm-softmmu/qemu-system-arm -M orangepi-pc -nographic -nic 
user -sd Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img
   U-Boot SPL 2020.04-armbian (Sep 02 2020 - 10:16:13 +0200)
   DRAM: 1024 MiB
   ...
   Autoboot in 1 seconds, press <Space> to stop
   => setenv extraargs 'console=ttyS0,115200'
   => boot
   ...
   Uncompressing Linux... done, booting the kernel.
   Loading, please wait...
   starting version 237

Also see the file docs/system/arm/orangepi.rst with some additional information and documentation.

Hope this helps & regards,

Niek

#11 lore raw
In reply to Philippe Mathieu-Daudé

Hi Philippe,

Quoted 3 lines · Philippe Mathieu-Daudé

Series meant to help Bin Meng to debug the SD card issue reported by Michael Roth.

Thank you for the patches.

Quoted 11 lines

Philippe Mathieu-Daudé (4):
Revert "hw/sd: Fix incorrect populated function switch status data
structure"
tests/acceptance: Allow running Orange Pi test using cached artifacts tests/acceptance: Extract do_test_arm_orangepi_armbian_uboot() method tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC

 hw/sd/sd.c                             |  3 +-
 tests/acceptance/boot_linux_console.py | 68 +++++++++++++++++++-------
 2 files changed, 50 insertions(+), 21 deletions(-)

With this series, I used:

$ ARMBIAN_ARTIFACTS_CACHED=1 AVOCADO_ALLOW_LARGE_STORAGE=1 make check-acceptance

It looks that the failure still exists? Log below:

13-tests_acceptance_boot_linux_console.py_BootLinuxConsole.test_arm_orangepi_bionic_20_08/debug.log:

01:11:27 DEBUG| => boot
01:11:27 DEBUG| unable to select a mode
01:11:27 DEBUG| Device 0: unknown device
01:11:27 DEBUG| BOOTP broadcast 1
01:11:27 DEBUG| DHCP client bound to address 10.0.2.15 (1 ms)
01:11:27 DEBUG| *** Warning: no boot file name; using '0A00020F.img'
01:11:27 DEBUG| Using ethernet@1c30000 device
01:11:27 DEBUG| TFTP from server 10.0.2.2; our IP address is 10.0.2.15
01:11:27 DEBUG| Filename '0A00020F.img'.
01:11:27 DEBUG| Load address: 0x42000000
01:11:27 DEBUG| Loading: *^H
01:11:27 DEBUG| TFTP error: 'Access violation' (2)
01:11:27 DEBUG| Not retrying...

Regards,
Bin

#12 lore raw
Quoted 29 lines · Bin Meng

Hi Philippe,

Quoted 3 lines · Philippe Mathieu-Daudé

Series meant to help Bin Meng to debug the SD card issue reported by Michael Roth.

Thank you for the patches.

Quoted 11 lines

Philippe Mathieu-Daudé (4):
Revert "hw/sd: Fix incorrect populated function switch status data
structure"
tests/acceptance: Allow running Orange Pi test using cached artifacts tests/acceptance: Extract do_test_arm_orangepi_armbian_uboot() method tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC

  hw/sd/sd.c                             |  3 +-
  tests/acceptance/boot_linux_console.py | 68 +++++++++++++++++++-------
  2 files changed, 50 insertions(+), 21 deletions(-)

With this series, I used:

$ ARMBIAN_ARTIFACTS_CACHED=1 AVOCADO_ALLOW_LARGE_STORAGE=1 make check-acceptance

It looks that the failure still exists? Log below:

13-tests_acceptance_boot_linux_console.py_BootLinuxConsole.test_arm_orangepi_bionic_20_08/debug.log:

Quoted 13 lines
01:11:27 DEBUG| => boot
01:11:27 DEBUG| unable to select a mode
01:11:27 DEBUG| Device 0: unknown device
01:11:27 DEBUG| BOOTP broadcast 1
01:11:27 DEBUG| DHCP client bound to address 10.0.2.15 (1 ms)
01:11:27 DEBUG| *** Warning: no boot file name; using '0A00020F.img'
01:11:27 DEBUG| Using ethernet@1c30000 device
01:11:27 DEBUG| TFTP from server 10.0.2.2; our IP address is 10.0.2.15
01:11:27 DEBUG| Filename '0A00020F.img'.
01:11:27 DEBUG| Load address: 0x42000000
01:11:27 DEBUG| Loading: *^H
01:11:27 DEBUG| TFTP error: 'Access violation' (2)
01:11:27 DEBUG| Not retrying...

Have you rebuilt qemu-system-arm with the reverted patch included?

Quoted 4 lines

Regards,
Bin

#13 lore raw

Hi Philippe,

Quoted 45 lines · Philippe Mathieu-Daudé
Quoted 29 lines · Bin Meng

Hi Philippe,

Quoted 3 lines · Philippe Mathieu-Daudé

Series meant to help Bin Meng to debug the SD card issue reported by Michael Roth.

Thank you for the patches.

Quoted 11 lines

Philippe Mathieu-Daudé (4):
Revert "hw/sd: Fix incorrect populated function switch status data
structure"
tests/acceptance: Allow running Orange Pi test using cached artifacts tests/acceptance: Extract do_test_arm_orangepi_armbian_uboot() method tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC

  hw/sd/sd.c                             |  3 +-
  tests/acceptance/boot_linux_console.py | 68 +++++++++++++++++++-------
  2 files changed, 50 insertions(+), 21 deletions(-)

With this series, I used:

$ ARMBIAN_ARTIFACTS_CACHED=1 AVOCADO_ALLOW_LARGE_STORAGE=1 make check-acceptance

It looks that the failure still exists? Log below:

13-tests_acceptance_boot_linux_console.py_BootLinuxConsole.test_arm_orangepi_bionic_20_08/debug.log:

Quoted 13 lines
01:11:27 DEBUG| => boot
01:11:27 DEBUG| unable to select a mode
01:11:27 DEBUG| Device 0: unknown device
01:11:27 DEBUG| BOOTP broadcast 1
01:11:27 DEBUG| DHCP client bound to address 10.0.2.15 (1 ms)
01:11:27 DEBUG| *** Warning: no boot file name; using '0A00020F.img'
01:11:27 DEBUG| Using ethernet@1c30000 device
01:11:27 DEBUG| TFTP from server 10.0.2.2; our IP address is 10.0.2.15
01:11:27 DEBUG| Filename '0A00020F.img'.
01:11:27 DEBUG| Load address: 0x42000000
01:11:27 DEBUG| Loading: *^H
01:11:27 DEBUG| TFTP error: 'Access violation' (2)
01:11:27 DEBUG| Not retrying...
Quoted 1 line

Have you rebuilt qemu-system-arm with the reverted patch included?

Oops, I took it for granted that the make check-acceptance will automatically rebuild the QEMU binary, which is not the case. Should we enforce the rebuild before testing in Makefiles?

Regards,
Bin

#14 lore raw
Quoted 48 lines · Bin Meng

Hi Philippe,

Quoted 45 lines · Philippe Mathieu-Daudé
Quoted 42 lines · Bin Meng

Hi Philippe,

Quoted 3 lines · Philippe Mathieu-Daudé

Series meant to help Bin Meng to debug the SD card issue reported by Michael Roth.

Thank you for the patches.

Quoted 11 lines

Philippe Mathieu-Daudé (4):
Revert "hw/sd: Fix incorrect populated function switch status data
structure"
tests/acceptance: Allow running Orange Pi test using cached artifacts tests/acceptance: Extract do_test_arm_orangepi_armbian_uboot() method tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC

   hw/sd/sd.c                             |  3 +-
   tests/acceptance/boot_linux_console.py | 68 +++++++++++++++++++-------
   2 files changed, 50 insertions(+), 21 deletions(-)

With this series, I used:

$ ARMBIAN_ARTIFACTS_CACHED=1 AVOCADO_ALLOW_LARGE_STORAGE=1 make check-acceptance

It looks that the failure still exists? Log below:

13-tests_acceptance_boot_linux_console.py_BootLinuxConsole.test_arm_orangepi_bionic_20_08/debug.log:

01:11:27 DEBUG| => boot
01:11:27 DEBUG| unable to select a mode
01:11:27 DEBUG| Device 0: unknown device
01:11:27 DEBUG| BOOTP broadcast 1
01:11:27 DEBUG| DHCP client bound to address 10.0.2.15 (1 ms)
01:11:27 DEBUG| *** Warning: no boot file name; using '0A00020F.img'
01:11:27 DEBUG| Using ethernet@1c30000 device
01:11:27 DEBUG| TFTP from server 10.0.2.2; our IP address is 10.0.2.15
01:11:27 DEBUG| Filename '0A00020F.img'.
01:11:27 DEBUG| Load address: 0x42000000
01:11:27 DEBUG| Loading: *^H
01:11:27 DEBUG| TFTP error: 'Access violation' (2)
01:11:27 DEBUG| Not retrying...
Quoted 5 lines
Quoted 1 line

Have you rebuilt qemu-system-arm with the reverted patch included?

Oops, I took it for granted that the make check-acceptance will automatically rebuild the QEMU binary, which is not the case. Should we enforce the rebuild before testing in Makefiles?

Well I'm not sure, because I don't want to have to rebuild all targets before rerunning a single test, but this is a Meson issue that could be fixed soon. I'll let Cleber/Paolo decide.

Does that mean I can add your "Tested-by: Bin Meng <[email protected]>" to the test patches btw?

Quoted 4 lines

Regards,
Bin

#15 lore raw
Quoted 8 lines · Philippe Mathieu-Daudé
Quoted 4 lines

Oops, I took it for granted that the make check-acceptance will automatically rebuild the QEMU binary, which is not the case. Should we enforce the rebuild before testing in Makefiles?

Well I'm not sure, because I don't want to have to rebuild all targets before rerunning a single test, but this is a Meson issue that could be fixed soon. I'll let Cleber/Paolo decide.

It's actually Makefile since check-acceptance is not meson-ified. If you want to add the dependency just write

                $(filter qemu-system-%, $(ninja-targets))

Paolo

Quoted 2 lines

Does that mean I can add your "Tested-by: Bin Meng <[email protected]>" to the test patches btw?

#16 lore raw
In reply to Philippe Mathieu-Daudé

Hi Philippe,

Quoted 56 lines · Philippe Mathieu-Daudé
Quoted 48 lines · Bin Meng

Hi Philippe,

Quoted 45 lines · Philippe Mathieu-Daudé
Quoted 42 lines · Bin Meng

Hi Philippe,

Quoted 3 lines · Philippe Mathieu-Daudé

Series meant to help Bin Meng to debug the SD card issue reported by Michael Roth.

Thank you for the patches.

Quoted 11 lines

Philippe Mathieu-Daudé (4):
Revert "hw/sd: Fix incorrect populated function switch status data
structure"
tests/acceptance: Allow running Orange Pi test using cached artifacts tests/acceptance: Extract do_test_arm_orangepi_armbian_uboot() method tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC

   hw/sd/sd.c                             |  3 +-
   tests/acceptance/boot_linux_console.py | 68 +++++++++++++++++++-------
   2 files changed, 50 insertions(+), 21 deletions(-)

With this series, I used:

$ ARMBIAN_ARTIFACTS_CACHED=1 AVOCADO_ALLOW_LARGE_STORAGE=1 make check-acceptance

It looks that the failure still exists? Log below:

13-tests_acceptance_boot_linux_console.py_BootLinuxConsole.test_arm_orangepi_bionic_20_08/debug.log:

01:11:27 DEBUG| => boot
01:11:27 DEBUG| unable to select a mode
01:11:27 DEBUG| Device 0: unknown device
01:11:27 DEBUG| BOOTP broadcast 1
01:11:27 DEBUG| DHCP client bound to address 10.0.2.15 (1 ms)
01:11:27 DEBUG| *** Warning: no boot file name; using '0A00020F.img'
01:11:27 DEBUG| Using ethernet@1c30000 device
01:11:27 DEBUG| TFTP from server 10.0.2.2; our IP address is 10.0.2.15
01:11:27 DEBUG| Filename '0A00020F.img'.
01:11:27 DEBUG| Load address: 0x42000000
01:11:27 DEBUG| Loading: *^H
01:11:27 DEBUG| TFTP error: 'Access violation' (2)
01:11:27 DEBUG| Not retrying...
Quoted 5 lines
Quoted 1 line

Have you rebuilt qemu-system-arm with the reverted patch included?

Oops, I took it for granted that the make check-acceptance will automatically rebuild the QEMU binary, which is not the case. Should we enforce the rebuild before testing in Makefiles?

Quoted 6 lines

Well I'm not sure, because I don't want to have to rebuild all targets before rerunning a single test, but this is a Meson issue that could be fixed soon. I'll let Cleber/Paolo decide.

Does that mean I can add your "Tested-by: Bin Meng <[email protected]>" to the test patches btw?

Sure.

Regards,
Bin

#17 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 10 lines · Philippe Mathieu-Daudé

Series meant to help Bin Meng to debug the SD card issue reported by Michael Roth.

Philippe Mathieu-Daudé (4):
Revert "hw/sd: Fix incorrect populated function switch status data
structure"
tests/acceptance: Allow running Orange Pi test using cached artifacts tests/acceptance: Extract do_test_arm_orangepi_armbian_uboot() method tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC

Quoted 3 lines
  hw/sd/sd.c                             |  3 +-
  tests/acceptance/boot_linux_console.py | 68 +++++++++++++++++++-------
  2 files changed, 50 insertions(+), 21 deletions(-)

Thanks, patch #2 applied to my acceptance-testing tree.