Acceptance Tests: update assets location and cancel tests if missing
cover Acceptance Tests: update assets location and cancel tests if missing
This updates a couple of asset locations, because their locations on their origin distributions are not permanently stable.
To minimize the inconvenciente caused by test and job failures in the future, an option is enabled that will cancel (AKA skip) tests early when those assets are not available.
Cleber Rosa (3):
Acceptance tests: use an available kernel image package for arm boot linux test: update arm bionic URL
Acceptance tests: cancel tests on missing assets
Pavel Dovgaluk (1):
tests: bump avocado version
tests/Makefile.include | 2 +- tests/acceptance/boot_linux_console.py | 164 +++++++++++-------- tests/acceptance/linux_initrd.py | 6 +- tests/acceptance/linux_ssh_mips_malta.py | 6 +- tests/acceptance/machine_arm_canona1100.py | 3 +- tests/acceptance/machine_arm_integratorcp.py | 9 +- tests/acceptance/machine_arm_n8x0.py | 3 +- tests/acceptance/machine_avr6.py | 3 +- tests/acceptance/machine_m68k_nextcube.py | 3 +- tests/acceptance/machine_mips_malta.py | 6 +- tests/acceptance/machine_rx_gdbsim.py | 9 +- tests/acceptance/machine_sparc64_sun4u.py | 3 +- tests/acceptance/machine_sparc_leon3.py | 3 +- tests/acceptance/ppc_prep_40p.py | 8 +- tests/acceptance/replay_kernel.py | 51 ++++-- tests/requirements.txt | 2 +- 16 files changed, 171 insertions(+), 110 deletions(-)
Signature · 1 line
2.25.4
PATCH 1/4 Acceptance tests: use an available kernel image package for arm
Which means a newer kernel version. Expected output was changed to match the new kernel too.
--- tests/acceptance/boot_linux_console.py | 44 +++++++++++++------------- tests/acceptance/replay_kernel.py | 8 ++--- 2 files changed, 26 insertions(+), 26 deletions(-)
tests/acceptance/boot_linux_console.py +22 -22
@@ -490,12 +490,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:cubieboard """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) initrd_url = ('https://github.com/groeck/linux-build-test/raw/'
@@ -522,7 +522,7 @@ class BootLinuxConsole(LinuxKernelTest): exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', 'Allwinner sun4i/sun5i') exec_command_and_wait_for_pattern(self, 'cat /proc/iomem', - 'system-control@1c00000') + '1c00000.system-control') # cubieboard's reboot is not functioning; omit reboot test. def test_arm_cubieboard_sata(self):
@@ -530,12 +530,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:cubieboard """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) rootfs_url = ('https://github.com/groeck/linux-build-test/raw/'
@@ -573,12 +573,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:orangepi-pc """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path)
@@ -598,12 +598,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:orangepi-pc """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) initrd_url = ('https://github.com/groeck/linux-build-test/raw/'
@@ -629,7 +629,7 @@ class BootLinuxConsole(LinuxKernelTest): exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', 'Allwinner sun8i Family') exec_command_and_wait_for_pattern(self, 'cat /proc/iomem', - 'system-control@1c00000') + '1c00000.system-control') exec_command_and_wait_for_pattern(self, 'reboot', 'reboot: Restarting system') # Wait for VM to shut down gracefully
@@ -641,12 +641,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=machine:orangepi-pc :avocado: tags=device:sd """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) rootfs_url = ('http://storage.kernelci.org/images/rootfs/buildroot/'
tests/acceptance/replay_kernel.py +4 -4
@@ -132,12 +132,12 @@ class ReplayKernel(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:cubieboard """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) initrd_url = ('https://github.com/groeck/linux-build-test/raw/'
Signature · 1 line
2.25.4
Re: [PATCH 1/4] Acceptance tests: use an available kernel image package for arm
[Cc'ing Daniel who usually have good ideas for that kind if project-wide problem]
Quoted 2 lines · Cleber Rosa
Which means a newer kernel version. Expected output was changed to match the new kernel too.
Nack.
Acceptance tests are not to test the latest Linux kernel, they aim to assert a specific kernel tested by some developer still works while QEMU evolves.
QEMU doesn't have to adapt to the latest kernel; QEMU should keep boot an old kernel.
Testing new kernels is good, you are adding coverage. But this break the acceptance testing contract "keep testing the same thing over time".
The problem you are trying to fix is the "where to keep assets from public locations where they are being removed?" one. Two years ago [*] you suggested to use some storage on the avocado-project.org:
For Avocado-VT, there are the JeOS images[1], which we keep on a test "assets" directory. We have a lot of storage/bandwidth availability, so it can be used for other assets proven to be necessary for tests.
As long as distribution rights and licensing are not issues, we can definitely use the same server for kernels, u-boot images and what not.
[1] - https://avocado-project.org/data/assets/
It is time to have QEMU assets managed the same way.
[*] https://www.mail-archive.com/[email protected]/msg00860.html
Quoted 136 lines
Signed-off-by Cleber Rosa <[email protected]>--- tests/acceptance/boot_linux_console.py | 44 +++++++++++++------------- tests/acceptance/replay_kernel.py | 8 ++--- 2 files changed, 26 insertions(+), 26 deletions(-)tests/acceptance/boot_linux_console.py +22
-22@@ -490,12 +490,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:cubieboard """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) initrd_url = ('https://github.com/groeck/linux-build-test/raw/'@@ -522,7 +522,7 @@ class BootLinuxConsole(LinuxKernelTest): exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', 'Allwinner sun4i/sun5i') exec_command_and_wait_for_pattern(self, 'cat /proc/iomem', - 'system-control@1c00000') + '1c00000.system-control') # cubieboard's reboot is not functioning; omit reboot test. def test_arm_cubieboard_sata(self):@@ -530,12 +530,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:cubieboard """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) rootfs_url = ('https://github.com/groeck/linux-build-test/raw/'@@ -573,12 +573,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:orangepi-pc """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path)@@ -598,12 +598,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:orangepi-pc """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) initrd_url = ('https://github.com/groeck/linux-build-test/raw/'@@ -629,7 +629,7 @@ class BootLinuxConsole(LinuxKernelTest): exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', 'Allwinner sun8i Family') exec_command_and_wait_for_pattern(self, 'cat /proc/iomem', - 'system-control@1c00000') + '1c00000.system-control') exec_command_and_wait_for_pattern(self, 'reboot', 'reboot: Restarting system') # Wait for VM to shut down gracefully@@ -641,12 +641,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=machine:orangepi-pc :avocado: tags=device:sd """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) rootfs_url = ('http://storage.kernelci.org/images/rootfs/buildroot/'tests/acceptance/replay_kernel.py +4
-4@@ -132,12 +132,12 @@ class ReplayKernel(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:cubieboard """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) initrd_url = ('https://github.com/groeck/linux-build-test/raw/'
Re: [PATCH 1/4] Acceptance tests: use an available kernel image package for arm
Quoted 29 lines · Philippe Mathieu-Daudé
[Cc'ing Daniel who usually have good ideas for that kind if project-wide problem]
Quoted 2 lines · Cleber Rosa
Which means a newer kernel version. Expected output was changed to match the new kernel too.
Nack.
Acceptance tests are not to test the latest Linux kernel, they aim to assert a specific kernel tested by some developer still works while QEMU evolves.
QEMU doesn't have to adapt to the latest kernel; QEMU should keep boot an old kernel.Testing new kernels is good, you are adding coverage. But this break the acceptance testing contract "keep testing the same thing over time".
The problem you are trying to fix is the "where to keep assets from public locations where they are being removed?" one. Two years ago [*] you suggested to use some storage on the avocado-project.org:
For Avocado-VT, there are the JeOS images[1], which we keep on a test "assets" directory. We have a lot of storage/bandwidth availability, so it can be used for other assets proven to be necessary for tests.
Quoted 5 lines
As long as distribution rights and licensing are not issues, we can definitely use the same server for kernels, u-boot images and what not.
If I look at stuff under that directory I see a bunch of "Jeos" qcow2 images, and zero information about the corresponding source for the images, nor any information about the licenses of software included. IOW what is stored their right now does not appear to comply with the GPL licensing requirements for providing full and corresponding source.
Quoted 1 line
It is time to have QEMU assets managed the same way.
I'd rather we didn't do anything relying on binary blobs with no info about how they were built. Pointing to the 3rd party download URLs was the easy way to ensure we don't have to worry about licensing problems.
IIUC, the majority of our acceptance tests needs should be satisfied with a combination of a Linux kernel and busybox tools. We already use cross-compilers to build TCG test cases.
I'd like to see us provide a minimal "config" file for each Linux kernel combo we need to test. We should be able to define a fairly simple script that do the Linux build, busybox build and then puts the combination of them into a disk image. Something 100% automated and reviewable.
Even a minimal linux build takes some time, so we would need to cache the binary result in some suitable manner. At least this way we have a clear record of what we're building & how and can thus satisfy the license rules.
Quoted 131 lines
[*] https://www.mail-archive.com/[email protected]/msg00860.html
Quoted 128 lines
Signed-off-by Cleber Rosa <[email protected]>--- tests/acceptance/boot_linux_console.py | 44 +++++++++++++------------- tests/acceptance/replay_kernel.py | 8 ++--- 2 files changed, 26 insertions(+), 26 deletions(-)tests/acceptance/boot_linux_console.py +22
-22@@ -490,12 +490,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:cubieboard """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) initrd_url = ('https://github.com/groeck/linux-build-test/raw/'@@ -522,7 +522,7 @@ class BootLinuxConsole(LinuxKernelTest): exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', 'Allwinner sun4i/sun5i') exec_command_and_wait_for_pattern(self, 'cat /proc/iomem', - 'system-control@1c00000') + '1c00000.system-control') # cubieboard's reboot is not functioning; omit reboot test. def test_arm_cubieboard_sata(self):@@ -530,12 +530,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:cubieboard """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) rootfs_url = ('https://github.com/groeck/linux-build-test/raw/'@@ -573,12 +573,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:orangepi-pc """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path)@@ -598,12 +598,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:orangepi-pc """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) initrd_url = ('https://github.com/groeck/linux-build-test/raw/'@@ -629,7 +629,7 @@ class BootLinuxConsole(LinuxKernelTest): exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', 'Allwinner sun8i Family') exec_command_and_wait_for_pattern(self, 'cat /proc/iomem', - 'system-control@1c00000') + '1c00000.system-control') exec_command_and_wait_for_pattern(self, 'reboot', 'reboot: Restarting system') # Wait for VM to shut down gracefully@@ -641,12 +641,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=machine:orangepi-pc :avocado: tags=device:sd """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) rootfs_url = ('http://storage.kernelci.org/images/rootfs/buildroot/'tests/acceptance/replay_kernel.py +3
-3@@ -132,12 +132,12 @@ class ReplayKernel(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:cubieboard """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89'
Quoted 10 lines
tests/acceptance/replay_kernel.py class ReplayKernel(LinuxKernelTest): · line 143
Quoted 8 lines
tests/acceptance/replay_kernel.py +1
-1deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) initrd_url = ('https://github.com/groeck/linux-build-test/raw/'
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Re: [PATCH 1/4] Acceptance tests: use an available kernel image package for arm
Quoted 42 lines · Daniel P. Berrangé
Quoted 29 lines · Philippe Mathieu-Daudé
[Cc'ing Daniel who usually have good ideas for that kind if project-wide problem]
Quoted 2 lines · Cleber Rosa
Which means a newer kernel version. Expected output was changed to match the new kernel too.
Nack.
Acceptance tests are not to test the latest Linux kernel, they aim to assert a specific kernel tested by some developer still works while QEMU evolves.
QEMU doesn't have to adapt to the latest kernel; QEMU should keep boot an old kernel.Testing new kernels is good, you are adding coverage. But this break the acceptance testing contract "keep testing the same thing over time".
The problem you are trying to fix is the "where to keep assets from public locations where they are being removed?" one. Two years ago [*] you suggested to use some storage on the avocado-project.org:
For Avocado-VT, there are the JeOS images[1], which we keep on a test "assets" directory. We have a lot of storage/bandwidth availability, so it can be used for other assets proven to be necessary for tests.
Quoted 5 lines
As long as distribution rights and licensing are not issues, we can definitely use the same server for kernels, u-boot images and what not.
If I look at stuff under that directory I see a bunch of "Jeos" qcow2 images, and zero information about the corresponding source for the images, nor any information about the licenses of software included. IOW what is stored their right now does not appear to comply with the GPL licensing requirements for providing full and corresponding source.
Quoted 6 lines
Quoted 1 line
It is time to have QEMU assets managed the same way.
I'd rather we didn't do anything relying on binary blobs with no info about how they were built. Pointing to the 3rd party download URLs was the easy way to ensure we don't have to worry about licensing problems.
I tried to be very strict including the recipe about how to rebuild and description of the source (for licensing) in each commits (Alex Bennée once said Debian/Fedora based was OK):
commit 784b8796380532351737d753a6a092ed4e1ffebf
Author: Philippe Mathieu-Daudé <[email protected]> Date: Wed Mar 11 23:18:52 2020 +0100
tests/boot_linux_console: Add a SLOW test booting Ubuntu on OrangePi PC
This test boots Ubuntu Bionic on a OrangePi PC board.
As it requires 1GB of storage, and is slow, this test is disabled on automatic CI testing.
It is useful for workstation testing. Currently Avocado timeouts too quickly, so we can't run userland commands.
The kernel image and DeviceTree blob are built by the Armbian project (based on Debian):
https://www.armbian.com/orange-pi-pc/
The Ubuntu image is downloaded from:
https://dl.armbian.com/orangepipc/Bionic_current
commit de2749bcb2459d0722022fb70c70310a04413fc1
Author: Philippe Mathieu-Daudé <[email protected]> Date: Wed Mar 11 23:18:51 2020 +0100
tests/boot_linux_console: Add a SD card test for the OrangePi PC board
The kernel image and DeviceTree blob are built by the Armbian project (based on Debian):
https://www.armbian.com/orange-pi-pc/
The SD image is from the kernelci.org project:
https://kernelci.org/faq/#the-code
commit c40b1ded0af6ee5b26e4b2eb5e0ce68c308e8de3
Author: Philippe Mathieu-Daudé <[email protected]> Date: Wed Mar 11 23:18:50 2020 +0100
tests/boot_linux_console: Add initrd test for the Orange Pi PC board
This test boots a Linux kernel on a OrangePi PC board and verify the serial output is working.
The kernel image and DeviceTree blob are built by the Armbian project (based on Debian):
https://www.armbian.com/orange-pi-pc/
The cpio image used comes from the linux-build-test project:
https://github.com/groeck/linux-build-test
commit e33ee3097f705bd7d3ae14a177e12a4b16055970
Author: Philippe Mathieu-Daudé <[email protected]> Date: Fri Jan 17 14:09:30 2020 +0000
tests/boot_linux_console: Add a SD card test for the CubieBoard
The kernel image and DeviceTree blob are built by the Armbian project (based on Debian):
https://docs.armbian.com/Developer-Guide_Build-Preparation/
The cpio image used comes from the linux-build-test project:
https://github.com/groeck/linux-build-test
commit efdb45bfd72745038909dfd1e970a827cb8d5d7e
Author: Philippe Mathieu-Daudé <[email protected]> Date: Mon Oct 28 19:04:04 2019 -0400
tests/boot_linux_console: Run BusyBox on 5KEc 64-bit cpu
This tests boots a Linux kernel on a Malta machine up to a busybox shell on the serial console. Few commands are executed before halting the machine (via reboot).
We use the Fedora 24 kernel extracted from the image at:
https://fedoraproject.org/wiki/Architectures/MIPS
and the initrd cpio image from the kerneltests project:
https://kerneltests.org/
commit 92d9361255a0862379866f156686180902bb63d2
Author: Philippe Mathieu-Daudé <[email protected]> Date: Mon Oct 28 19:04:04 2019 -0400
tests/boot_linux_console: Add a test for the Raspberry Pi 2
Similar to the x86_64/pc test, it boots a Linux kernel on a raspi2 board and verify the serial is working.
The kernel image and DeviceTree blob are built by the Raspbian project (based on Debian):
https://www.raspbian.org/RaspbianImages
as recommended by the Raspberry Pi project:
https://www.raspberrypi.org/downloads/raspbian/
Quoted 10 lines
IIUC, the majority of our acceptance tests needs should be satisfied with a combination of a Linux kernel and busybox tools. We already use cross-compilers to build TCG test cases.
I'd like to see us provide a minimal "config" file for each Linux kernel combo we need to test. We should be able to define a fairly simple script that do the Linux build, busybox build and then puts the combination of them into a disk image. Something 100% automated and reviewable.
For Debian/Fedora this config is available in their package (or source package).
Quoted 5 lines
Even a minimal linux build takes some time, so we would need to cache the binary result in some suitable manner. At least this way we have a clear record of what we're building & how and can thus satisfy the license rules.
Yes, but if the Debian/Fedora build farms already build/published their packages, it is easier to use it directly.
QEMU developers are very reluctant to add tests. I suppose we prefer to develop or fix bugs rather than write tests. If we ask full build recipe for each tests, I doubt we'll have much testing.
Quoted 146 lines
Quoted 132 lines
[*] https://www.mail-archive.com/[email protected]/msg00860.html
Quoted 128 lines
Signed-off-by Cleber Rosa <[email protected]>--- tests/acceptance/boot_linux_console.py | 44 +++++++++++++------------- tests/acceptance/replay_kernel.py | 8 ++--- 2 files changed, 26 insertions(+), 26 deletions(-)tests/acceptance/boot_linux_console.py +22
-22@@ -490,12 +490,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:cubieboard """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) initrd_url = ('https://github.com/groeck/linux-build-test/raw/'@@ -522,7 +522,7 @@ class BootLinuxConsole(LinuxKernelTest): exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', 'Allwinner sun4i/sun5i') exec_command_and_wait_for_pattern(self, 'cat /proc/iomem', - 'system-control@1c00000') + '1c00000.system-control') # cubieboard's reboot is not functioning; omit reboot test. def test_arm_cubieboard_sata(self):@@ -530,12 +530,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:cubieboard """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) rootfs_url = ('https://github.com/groeck/linux-build-test/raw/'@@ -573,12 +573,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:orangepi-pc """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path)@@ -598,12 +598,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:orangepi-pc """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) initrd_url = ('https://github.com/groeck/linux-build-test/raw/'@@ -629,7 +629,7 @@ class BootLinuxConsole(LinuxKernelTest): exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', 'Allwinner sun8i Family') exec_command_and_wait_for_pattern(self, 'cat /proc/iomem', - 'system-control@1c00000') + '1c00000.system-control') exec_command_and_wait_for_pattern(self, 'reboot', 'reboot: Restarting system') # Wait for VM to shut down gracefully@@ -641,12 +641,12 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=machine:orangepi-pc :avocado: tags=device:sd """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) rootfs_url = ('http://storage.kernelci.org/images/rootfs/buildroot/'tests/acceptance/replay_kernel.py +3
-3@@ -132,12 +132,12 @@ class ReplayKernel(LinuxKernelTest): :avocado: tags=arch:arm :avocado: tags=machine:cubieboard """ - deb_url = ('https://apt.armbian.com/pool/main/l/' - 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb') - deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' + 'linux-image-dev-sunxi_20.08_armhf.deb') + deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89'Quoted 10 lines
tests/acceptance/replay_kernel.py class ReplayKernel(LinuxKernelTest): · line 143
Quoted 8 lines
tests/acceptance/replay_kernel.py +1
-1deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) kernel_path = self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.20.7-sunxi') + '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb' dtb_path = self.extract_from_deb(deb_path, dtb_path) initrd_url = ('https://github.com/groeck/linux-build-test/raw/'Regards,
Daniel
Re: [PATCH 1/4] Acceptance tests: use an available kernel image package for arm
Quoted 45 lines · Philippe Mathieu-Daudé
Quoted 44 lines · Daniel P. Berrangé
Quoted 29 lines · Philippe Mathieu-Daudé
[Cc'ing Daniel who usually have good ideas for that kind if project-wide problem]
Quoted 2 lines · Cleber Rosa
Which means a newer kernel version. Expected output was changed to match the new kernel too.
Nack.
Acceptance tests are not to test the latest Linux kernel, they aim to assert a specific kernel tested by some developer still works while QEMU evolves.
QEMU doesn't have to adapt to the latest kernel; QEMU should keep boot an old kernel.Testing new kernels is good, you are adding coverage. But this break the acceptance testing contract "keep testing the same thing over time".
The problem you are trying to fix is the "where to keep assets from public locations where they are being removed?" one. Two years ago [*] you suggested to use some storage on the avocado-project.org:
For Avocado-VT, there are the JeOS images[1], which we keep on a test "assets" directory. We have a lot of storage/bandwidth availability, so it can be used for other assets proven to be necessary for tests.
Quoted 5 lines
As long as distribution rights and licensing are not issues, we can definitely use the same server for kernels, u-boot images and what not.
If I look at stuff under that directory I see a bunch of "Jeos" qcow2 images, and zero information about the corresponding source for the images, nor any information about the licenses of software included. IOW what is stored their right now does not appear to comply with the GPL licensing requirements for providing full and corresponding source.
Quoted 1 line
It is time to have QEMU assets managed the same way.
Quoted 8 lines
Quoted 4 lines
I'd rather we didn't do anything relying on binary blobs with no info about how they were built. Pointing to the 3rd party download URLs was the easy way to ensure we don't have to worry about licensing problems.
I tried to be very strict including the recipe about how to rebuild and description of the source (for licensing) in each commits (Alex Bennée once said Debian/Fedora based was OK):
..snip...
Well that looks better than what is done for the JEOS images currently on avocado-project.org, as I can't tell what distro those came from at all.
If we're hosting images built by some 3rd party, and we intend to rely on the 3rd party to satisfy source availability, then we need to be sure that the 3rd party is themselves still distributing the same images.
IIUC, from Cleber's commit here the original images we're pointing to are now 404s. If the URLs moved, we just need to update to fix the URLs to point the new location. If the content was entirely removed though, we shouldn't mirror it ourselves, because we can't rely on the original vendor to be providing the source at that point.
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Re: [PATCH 1/4] Acceptance tests: use an available kernel image package for arm
Quoted 65 lines · Daniel P. Berrangé
Quoted 45 lines · Philippe Mathieu-Daudé
Quoted 44 lines · Daniel P. Berrangé
Quoted 29 lines · Philippe Mathieu-Daudé
[Cc'ing Daniel who usually have good ideas for that kind if project-wide problem]
Quoted 2 lines · Cleber Rosa
Which means a newer kernel version. Expected output was changed to match the new kernel too.
Nack.
Acceptance tests are not to test the latest Linux kernel, they aim to assert a specific kernel tested by some developer still works while QEMU evolves.
QEMU doesn't have to adapt to the latest kernel; QEMU should keep boot an old kernel.Testing new kernels is good, you are adding coverage. But this break the acceptance testing contract "keep testing the same thing over time".
The problem you are trying to fix is the "where to keep assets from public locations where they are being removed?" one. Two years ago [*] you suggested to use some storage on the avocado-project.org:
For Avocado-VT, there are the JeOS images[1], which we keep on a test "assets" directory. We have a lot of storage/bandwidth availability, so it can be used for other assets proven to be necessary for tests.
Quoted 5 lines
As long as distribution rights and licensing are not issues, we can definitely use the same server for kernels, u-boot images and what not.
If I look at stuff under that directory I see a bunch of "Jeos" qcow2 images, and zero information about the corresponding source for the images, nor any information about the licenses of software included. IOW what is stored their right now does not appear to comply with the GPL licensing requirements for providing full and corresponding source.
Quoted 1 line
It is time to have QEMU assets managed the same way.
Quoted 8 lines
Quoted 4 lines
I'd rather we didn't do anything relying on binary blobs with no info about how they were built. Pointing to the 3rd party download URLs was the easy way to ensure we don't have to worry about licensing problems.
I tried to be very strict including the recipe about how to rebuild and description of the source (for licensing) in each commits (Alex Bennée once said Debian/Fedora based was OK):
..snip...
Well that looks better than what is done for the JEOS images currently on avocado-project.org, as I can't tell what distro those came from at all.
If we're hosting images built by some 3rd party, and we intend to rely on the 3rd party to satisfy source availability, then we need to be sure that the 3rd party is themselves still distributing the same images.
Quoted 5 lines
IIUC, from Cleber's commit here the original images we're pointing to are now 404s. If the URLs moved, we just need to update to fix the URLs to point the new location. If the content was entirely removed though, we shouldn't mirror it ourselves, because we can't rely on the original vendor to be providing the source at that point.
Having backups and the SHA1 of the files already commited in our repository, this is the outcome I prefer.
Let see what other think on this topic.
Thanks for your insights :)
Quoted 4 lines
Regards,
Daniel
Re: [PATCH 1/4] Acceptance tests: use an available kernel image package for arm
In reply to Philippe Mathieu-DaudéQuoted 45 lines · Philippe Mathieu-Daudé
Quoted 44 lines · Daniel P. Berrangé
Quoted 29 lines · Philippe Mathieu-Daudé
[Cc'ing Daniel who usually have good ideas for that kind if project-wide problem]
Quoted 2 lines · Cleber Rosa
Which means a newer kernel version. Expected output was changed to match the new kernel too.
Nack.
Acceptance tests are not to test the latest Linux kernel, they aim to assert a specific kernel tested by some developer still works while QEMU evolves.
QEMU doesn't have to adapt to the latest kernel; QEMU should keep boot an old kernel.Testing new kernels is good, you are adding coverage. But this break the acceptance testing contract "keep testing the same thing over time".
The problem you are trying to fix is the "where to keep assets from public locations where they are being removed?" one. Two years ago [*] you suggested to use some storage on the avocado-project.org:
For Avocado-VT, there are the JeOS images[1], which we keep on a test "assets" directory. We have a lot of storage/bandwidth availability, so it can be used for other assets proven to be necessary for tests.
Quoted 5 lines
As long as distribution rights and licensing are not issues, we can definitely use the same server for kernels, u-boot images and what not.
If I look at stuff under that directory I see a bunch of "Jeos" qcow2 images, and zero information about the corresponding source for the images, nor any information about the licenses of software included. IOW what is stored their right now does not appear to comply with the GPL licensing requirements for providing full and corresponding source.
Quoted 1 line
It is time to have QEMU assets managed the same way.
Quoted 8 lines
Quoted 4 lines
I'd rather we didn't do anything relying on binary blobs with no info about how they were built. Pointing to the 3rd party download URLs was the easy way to ensure we don't have to worry about licensing problems.
I tried to be very strict including the recipe about how to rebuild and description of the source (for licensing) in each commits (Alex Bennée once said Debian/Fedora based was OK):
Debian and Fedora both have good project hygiene for tracking sources for their binary packages and extensive archives which we can work with. These other projects seem to be more of a moving feast which I think is proving we can't rely on them as a CI test and at best best efforts for developer testing.
It seems Armbian do document their build process but it's not quite as easy as just downloading the source deb.
Quoted 1 line
<snip>
Quoted 21 lines
Quoted 11 lines
IIUC, the majority of our acceptance tests needs should be satisfied with a combination of a Linux kernel and busybox tools. We already use cross-compilers to build TCG test cases.
I'd like to see us provide a minimal "config" file for each Linux kernel combo we need to test. We should be able to define a fairly simple script that do the Linux build, busybox build and then puts the combination of them into a disk image. Something 100% automated and reviewable.
For Debian/Fedora this config is available in their package (or source package).
Quoted 5 lines
Even a minimal linux build takes some time, so we would need to cache the binary result in some suitable manner. At least this way we have a clear record of what we're building & how and can thus satisfy the license rules.
Quoted 6 lines
Yes, but if the Debian/Fedora build farms already build/published their packages, it is easier to use it directly.
QEMU developers are very reluctant to add tests. I suppose we prefer to develop or fix bugs rather than write tests. If we ask full build recipe for each tests, I doubt we'll have much testing.
I've pondered this before and while it might have a place for random weird machines with no mainline distro support it's not a path I'm keen to go down. This goes especially for some of the more esoteric ARM hardware where you start relying on hacked up vendor trees with very specific toolchain requirements.
<snip>
Signature · 1 line
Alex Bennée
Re: [PATCH 1/4] Acceptance tests: use an available kernel image package for arm
Quoted 57 lines · Alex Bennée
Quoted 45 lines · Philippe Mathieu-Daudé
Quoted 44 lines · Daniel P. Berrangé
Quoted 29 lines · Philippe Mathieu-Daudé
[Cc'ing Daniel who usually have good ideas for that kind if project-wide problem]
Quoted 2 lines · Cleber Rosa
Which means a newer kernel version. Expected output was changed to match the new kernel too.
Nack.
Acceptance tests are not to test the latest Linux kernel, they aim to assert a specific kernel tested by some developer still works while QEMU evolves.
QEMU doesn't have to adapt to the latest kernel; QEMU should keep boot an old kernel.Testing new kernels is good, you are adding coverage. But this break the acceptance testing contract "keep testing the same thing over time".
The problem you are trying to fix is the "where to keep assets from public locations where they are being removed?" one. Two years ago [*] you suggested to use some storage on the avocado-project.org:
For Avocado-VT, there are the JeOS images[1], which we keep on a test "assets" directory. We have a lot of storage/bandwidth availability, so it can be used for other assets proven to be necessary for tests.
Quoted 5 lines
As long as distribution rights and licensing are not issues, we can definitely use the same server for kernels, u-boot images and what not.
If I look at stuff under that directory I see a bunch of "Jeos" qcow2 images, and zero information about the corresponding source for the images, nor any information about the licenses of software included. IOW what is stored their right now does not appear to comply with the GPL licensing requirements for providing full and corresponding source.
Quoted 1 line
It is time to have QEMU assets managed the same way.
Quoted 8 lines
Quoted 4 lines
I'd rather we didn't do anything relying on binary blobs with no info about how they were built. Pointing to the 3rd party download URLs was the easy way to ensure we don't have to worry about licensing problems.
I tried to be very strict including the recipe about how to rebuild and description of the source (for licensing) in each commits (Alex Bennée once said Debian/Fedora based was OK):
Quoted 8 lines
Debian and Fedora both have good project hygiene for tracking sources for their binary packages and extensive archives which we can work with. These other projects seem to be more of a moving feast which I think is proving we can't rely on them as a CI test and at best best efforts for developer testing.
It seems Armbian do document their build process but it's not quite as easy as just downloading the source deb.
Should we remove the Armbian based tests? I don't have any problem, as long as the requisites for adding a test are clearly documented (as there are not obvious to all).
Quoted 29 lines
<snip>
Quoted 21 lines
Quoted 11 lines
IIUC, the majority of our acceptance tests needs should be satisfied with a combination of a Linux kernel and busybox tools. We already use cross-compilers to build TCG test cases.
I'd like to see us provide a minimal "config" file for each Linux kernel combo we need to test. We should be able to define a fairly simple script that do the Linux build, busybox build and then puts the combination of them into a disk image. Something 100% automated and reviewable.
For Debian/Fedora this config is available in their package (or source package).
Quoted 5 lines
Even a minimal linux build takes some time, so we would need to cache the binary result in some suitable manner. At least this way we have a clear record of what we're building & how and can thus satisfy the license rules.
Quoted 6 lines
Yes, but if the Debian/Fedora build farms already build/published their packages, it is easier to use it directly.
QEMU developers are very reluctant to add tests. I suppose we prefer to develop or fix bugs rather than write tests. If we ask full build recipe for each tests, I doubt we'll have much testing.
Quoted 5 lines
I've pondered this before and while it might have a place for random weird machines with no mainline distro support it's not a path I'm keen to go down. This goes especially for some of the more esoteric ARM hardware where you start relying on hacked up vendor trees with very specific toolchain requirements.
What I'd really like is to have the test logic in mainstream (not the test artifacts). That way maintainers can "pass" their tests when passing maintenance, or if one stop contributing, the tests are still usable by anyone in the community.
Some closed-source binaries are available publicly, and we can verify their hash.
Is it acceptable to add test + hash in mainstream, so any developer in possession of such binaries is free to run the tests? There should not be any licensing issue.
I would like to avoid "black box" devices we are afraid to modify because very few people can test them.
Example of tests I'd like to add:
https://www.mail-archive.com/[email protected]/msg41162.html
Thanks,
Phil.
PATCH 2/4 boot linux test: update arm bionic URL
In reply to Cleber RosaWhich uses an xz compressed file, which has builtin support for decompression on avocado.utils.archive. So the check for P7ZIP can be dropped, and extraction logic simplified.
--- tests/acceptance/boot_linux_console.py | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-)
tests/acceptance/boot_linux_console.py +6 -14
@@ -22,12 +22,6 @@ from avocado.utils import process from avocado.utils import archive from avocado.utils.path import find_command, CmdNotFoundError -P7ZIP_AVAILABLE = True -try: - find_command('7z') -except CmdNotFoundError: - P7ZIP_AVAILABLE = False - """ Round up to next power of 2 """
@@ -687,7 +681,6 @@ class BootLinuxConsole(LinuxKernelTest): self.vm.wait() @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
@@ -695,14 +688,13 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=device:sd """ - # This test download a 196MB compressed image and expand it to 1GB + # This test download a 275MB compressed image and expand it to 1.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)) + 'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz') + image_hash = 'b4d6775f5673486329e45a0586bf06b6dbe792199fd182ac6b9c7bb6c7d3e6dd' + 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.vm.set_console()
Signature · 1 line
2.25.4
Re: [PATCH 2/4] boot linux test: update arm bionic URL
Hi Cleber,
Quoted 2 lines · Cleber Rosa
Which uses an xz compressed file, which has builtin support for decompression on avocado.utils.archive.
This line doesn't make sense without the patch subject prepended "Update arm bionic URL". To make commit descriptions coherent, please copy the subject.
Not all email clients display email subject right
before the email content.
Quoted 42 lines
So the check for P7ZIP can be
dropped, and extraction logic simplified.Signed-off-by Cleber Rosa <[email protected]>--- tests/acceptance/boot_linux_console.py | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-)tests/acceptance/boot_linux_console.py +1
-10@@ -22,12 +22,6 @@ from avocado.utils import process from avocado.utils import archive from avocado.utils.path import find_command, CmdNotFoundError -P7ZIP_AVAILABLE = True -try: - find_command('7z') -except CmdNotFoundError: - P7ZIP_AVAILABLE = False - """ Round up to next power of 2 """@@ -687,7 +681,6 @@ class BootLinuxConsole(LinuxKernelTest): self.vm.wait() @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@@ -695,14 +688,13 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=device:sd """ - # This test download a 196MB compressed image and expand it to 1GB + # This test download a 275MB compressed image and expand it to 1.1GB image_url = ('https://dl.armbian.com/orangepipc/archive/' - 'Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.7z') - image_hash = '196a8ffb72b0123d92cea4a070894813d305c71e'
tests/acceptance/boot_linux_console.py class BootLinuxConsole(LinuxKernelTest): · line 698
Quoted 10 lines
tests/acceptance/boot_linux_console.py +5
-4- 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)) + 'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz') + image_hash = 'b4d6775f5673486329e45a0586bf06b6dbe792199fd182ac6b9c7bb6c7d3e6dd' + 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)
Nack, this is not the same test. You might be lucky it test the same things, but this is not what the developer tested. This is not how acceptance tests are supposed to work IMHO.
Quoted 3 lines
tests/acceptance/boot_linux_console.py +0
-0self.vm.set_console()
Re: [PATCH 2/4] boot linux test: update arm bionic URL
In reply to Cleber RosaQuoted 39 lines · Cleber Rosa
Which uses an xz compressed file, which has builtin support for decompression on avocado.utils.archive. So the check for P7ZIP can be dropped, and extraction logic simplified.
Signed-off-by Cleber Rosa <[email protected]>--- tests/acceptance/boot_linux_console.py | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-)tests/acceptance/boot_linux_console.py +0
-7@@ -22,12 +22,6 @@ from avocado.utils import process from avocado.utils import archive from avocado.utils.path import find_command, CmdNotFoundError -P7ZIP_AVAILABLE = True -try: - find_command('7z') -except CmdNotFoundError: - P7ZIP_AVAILABLE = False - """ Round up to next power of 2 """@@ -687,7 +681,6 @@ class BootLinuxConsole(LinuxKernelTest): self.vm.wait() @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@@ -695,14 +688,13 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=device:sd """
tests/acceptance/boot_linux_console.py class BootLinuxConsole(LinuxKernelTest): · line 693
Quoted 10 lines
tests/acceptance/boot_linux_console.py +2
-7- # This test download a 196MB compressed image and expand it to 1GB + # This test download a 275MB compressed image and expand it to 1.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)) + 'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')
I see you bumped the version here because version 19 is not available in the URL anymore, so it is fine for me.
Quoted 10 lines
tests/acceptance/boot_linux_console.py +4
-1+ image_hash = 'b4d6775f5673486329e45a0586bf06b6dbe792199fd182ac6b9c7bb6c7d3e6dd' + 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.vm.set_console() --2.25.4
Except for the subject and description seaming a bit confusing as pointed by Philippe, the changes look good to me.
PATCH 3/4 tests: bump avocado version
In reply to Cleber RosaFrom: Pavel Dovgalyuk <[email protected]>
Reverse debugging test uses gdb remote client of avocado framework. This client was fixed since the currently used version 76. Therefore this patch bumps the version to 81 and fixes command line version compatibility issue.
Message-Id: <159903462803.28509.16851113546106095750.stgit@pasha-ThinkPad-X280>
--- tests/Makefile.include | 2 +- tests/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tests/Makefile.include +1 -1
@@ -517,7 +517,7 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) get-vm-images --show=$(AVOCADO_SHOW) run --job-results-dir=$(TESTS_RESULTS_DIR) \ --filter-by-tags-include-empty --filter-by-tags-include-empty-key \ $(AVOCADO_TAGS) \ - $(if $(GITLAB_CI),,--failfast=on) tests/acceptance, \ + $(if $(GITLAB_CI),,--failfast) tests/acceptance, \ "AVOCADO", "tests/acceptance") # Consolidated targets
tests/requirements.txt +1 -1
@@ -1,5 +1,5 @@ # Add Python module requirements, one per line, to be installed # in the tests/venv Python virtual environment. For more info, # refer to: https://pip.pypa.io/en/stable/user_guide/#id1 -avocado-framework==76.0 +avocado-framework==81.0 pycdlib==1.9.0
Signature · 1 line
2.25.4
Re: [PATCH 3/4] tests: bump avocado version
Quoted 36 lines · Cleber Rosa
From: Pavel Dovgalyuk <[email protected]>
Reverse debugging test uses gdb remote client of avocado framework. This client was fixed since the currently used version 76. Therefore this patch bumps the version to 81 and fixes command line version compatibility issue.
Signed-off-by Pavel Dovgalyuk <[email protected]>Message-Id: <159903462803.28509.16851113546106095750.stgit@pasha-ThinkPad-X280>
Reviewed-by Willian Rampazzo <[email protected]>Reviewed-by Cleber Rosa <[email protected]>Tested-by Cleber Rosa <[email protected]>--- tests/Makefile.include | 2 +- tests/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)tests/Makefile.include +1
-1@@ -517,7 +517,7 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) get-vm-images --show=$(AVOCADO_SHOW) run --job-results-dir=$(TESTS_RESULTS_DIR) \ --filter-by-tags-include-empty --filter-by-tags-include-empty-key \ $(AVOCADO_TAGS) \ - $(if $(GITLAB_CI),,--failfast=on) tests/acceptance, \ + $(if $(GITLAB_CI),,--failfast) tests/acceptance, \ "AVOCADO", "tests/acceptance") # Consolidated targetstests/requirements.txt +0
-0
tests/requirements.txt line 5
Quoted 6 lines
tests/requirements.txt +1
-1@@ -1,5 +1,5 @@ # Add Python module requirements, one per line, to be installed # in the tests/venv Python virtual environment. For more info, # refer to: https://pip.pypa.io/en/stable/user_guide/#id1 -avocado-framework==76.0 +avocado-framework==81.0 pycdlib==1.9.0
PATCH 4/4 Acceptance tests: cancel tests on missing assets
In reply to Cleber RosaAsset files used on the acceptance tests (kernel, initrd images) unfortunately are not guaranteed to always be available at the same location.
Let's cancel (kind of like a skip) the test, when the asset is missing. This should prevent false positives, when failure are not caused by changes in QEMU itself.
Reference: https://avocado-framework.readthedocs.io/en/81.0/api/test/avocado.html#avocado.Test.fetch_asset
--- tests/acceptance/boot_linux_console.py | 102 ++++++++++++------- tests/acceptance/linux_initrd.py | 6 +- tests/acceptance/linux_ssh_mips_malta.py | 6 +- tests/acceptance/machine_arm_canona1100.py | 3 +- tests/acceptance/machine_arm_integratorcp.py | 9 +- tests/acceptance/machine_arm_n8x0.py | 3 +- tests/acceptance/machine_avr6.py | 3 +- tests/acceptance/machine_m68k_nextcube.py | 3 +- tests/acceptance/machine_mips_malta.py | 6 +- tests/acceptance/machine_rx_gdbsim.py | 9 +- tests/acceptance/machine_sparc64_sun4u.py | 3 +- tests/acceptance/machine_sparc_leon3.py | 3 +- tests/acceptance/ppc_prep_40p.py | 8 +- tests/acceptance/replay_kernel.py | 43 +++++--- 14 files changed, 138 insertions(+), 69 deletions(-)
tests/acceptance/boot_linux_console.py +68 -34
@@ -99,7 +99,8 @@ class BootLinuxConsole(LinuxKernelTest): '/linux/releases/29/Everything/x86_64/os/images/pxeboot' '/vmlinuz') kernel_hash = '23bebd2680757891cf7adedb033532163a792495' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) self.vm.set_console() kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
@@ -119,7 +120,8 @@ class BootLinuxConsole(LinuxKernelTest): '20130217T032700Z/pool/main/l/linux-2.6/' 'linux-image-2.6.32-5-4kc-malta_2.6.32-48_mips.deb') deb_hash = 'a8cfc28ad8f45f54811fc6cf74fc43ffcfe0ba04' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinux-2.6.32-5-4kc-malta')
@@ -151,7 +153,8 @@ class BootLinuxConsole(LinuxKernelTest): '20130217T032700Z/pool/main/l/linux-2.6/' 'linux-image-2.6.32-5-5kc-malta_2.6.32-48_mipsel.deb') deb_hash = '1aaec92083bf22fda31e0d27fa8d9a388e5fc3d5' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinux-2.6.32-5-5kc-malta')
@@ -173,14 +176,16 @@ class BootLinuxConsole(LinuxKernelTest): '20160601T041800Z/pool/main/l/linux/' 'linux-image-4.5.0-2-4kc-malta_4.5.5-1_mips.deb') deb_hash = 'a3c84f3e88b54e06107d65a410d1d1e8e0f340f8' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinux-4.5.0-2-4kc-malta') initrd_url = ('https://github.com/groeck/linux-build-test/raw/' '8584a59ed9e5eb5ee7ca91f6d74bbb06619205b8/rootfs/' 'mips/rootfs.cpio.gz') initrd_hash = 'bf806e17009360a866bf537f6de66590de349a99' - initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash) + initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash, + cancel_on_missing=True) initrd_path = self.workdir + "rootfs.cpio" archive.gzip_uncompress(initrd_path_gz, initrd_path)
@@ -215,13 +220,15 @@ class BootLinuxConsole(LinuxKernelTest): 'raw/9ad2df38/mips/malta/mips64el/' 'vmlinux-3.19.3.mtoman.20150408') kernel_hash = '00d1d268fb9f7d8beda1de6bebcc46e884d71754' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) initrd_url = ('https://github.com/groeck/linux-build-test/' 'raw/8584a59e/rootfs/' 'mipsel64/rootfs.mipsel64r1.cpio.gz') initrd_hash = '1dbb8a396e916847325284dbe2151167' initrd_path_gz = self.fetch_asset(initrd_url, algorithm='md5', - asset_hash=initrd_hash) + asset_hash=initrd_hash, + cancel_on_missing=True) initrd_path = self.workdir + "rootfs.cpio" archive.gzip_uncompress(initrd_path_gz, initrd_path)
@@ -247,7 +254,8 @@ class BootLinuxConsole(LinuxKernelTest): self.vm.wait() def do_test_mips_malta32el_nanomips(self, kernel_url, kernel_hash): - kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) kernel_path = self.workdir + "kernel" with lzma.open(kernel_path_xz, 'rb') as f_in: with open(kernel_path, 'wb') as f_out:
@@ -310,7 +318,8 @@ class BootLinuxConsole(LinuxKernelTest): '/linux/releases/29/Everything/aarch64/os/images/pxeboot' '/vmlinuz') kernel_hash = '8c73e469fc6ea06a58dc83a628fc695b693b8493' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) self.vm.set_console() kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
@@ -334,11 +343,13 @@ class BootLinuxConsole(LinuxKernelTest): '20101020ubuntu543.15/images/') kernel_url = images_url + 'netboot/ubuntu-installer/arm64/linux' kernel_hash = '5bfc54cf7ed8157d93f6e5b0241e727b6dc22c50' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) initrd_url = images_url + 'netboot/ubuntu-installer/arm64/initrd.gz' initrd_hash = 'd385d3e88d53e2004c5d43cbe668b458a094f772' - initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash) + initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash, + cancel_on_missing=True) self.vm.set_console() self.vm.add_args('-m', '2G',
@@ -356,7 +367,8 @@ class BootLinuxConsole(LinuxKernelTest): '/linux/releases/29/Everything/armhfp/os/images/pxeboot' '/vmlinuz') kernel_hash = 'e9826d741b4fb04cadba8d4824d1ed3b7fb8b4d4' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) self.vm.set_console() kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
@@ -378,12 +390,14 @@ class BootLinuxConsole(LinuxKernelTest): 'Subbaraya-Sundeep/qemu-test-binaries/' 'fe371d32e50ca682391e1e70ab98c2942aeffb01/u-boot') uboot_hash = 'cbb8cbab970f594bf6523b9855be209c08374ae2' - uboot_path = self.fetch_asset(uboot_url, asset_hash=uboot_hash) + uboot_path = self.fetch_asset(uboot_url, asset_hash=uboot_hash, + cancel_on_missing=True) spi_url = ('https://raw.githubusercontent.com/' 'Subbaraya-Sundeep/qemu-test-binaries/' 'fe371d32e50ca682391e1e70ab98c2942aeffb01/spi.bin') spi_hash = '65523a1835949b6f4553be96dec1b6a38fb05501' - spi_path = self.fetch_asset(spi_url, asset_hash=spi_hash) + spi_path = self.fetch_asset(spi_url, asset_hash=spi_hash, + cancel_on_missing=True) self.vm.set_console() kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE
@@ -412,7 +426,8 @@ class BootLinuxConsole(LinuxKernelTest): 'pool/main/r/raspberrypi-firmware/' 'raspberrypi-kernel_1.20190215-1_armhf.deb') deb_hash = 'cd284220b32128c5084037553db3c482426f3972' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/kernel7.img') dtb_path = self.extract_from_deb(deb_path, '/boot/bcm2709-rpi-2-b.dtb')
@@ -448,7 +463,8 @@ class BootLinuxConsole(LinuxKernelTest): '20190928T224601Z/pool/main/l/linux/' 'linux-image-4.19.0-6-armmp_4.19.67-2+deb10u1_armhf.deb') deb_hash = 'fa9df4a0d38936cb50084838f2cb933f570d7d82' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinuz-4.19.0-6-armmp') dtb_path = '/usr/lib/linux-image-4.19.0-6-armmp/exynos4210-smdkv310.dtb'
@@ -458,7 +474,8 @@ class BootLinuxConsole(LinuxKernelTest): '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' 'arm/rootfs-armv5.cpio.gz') initrd_hash = '2b50f1873e113523967806f4da2afe385462ff9b' - initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash) + initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash, + cancel_on_missing=True) initrd_path = os.path.join(self.workdir, 'rootfs.cpio') archive.gzip_uncompress(initrd_path_gz, initrd_path)
@@ -487,7 +504,8 @@ class BootLinuxConsole(LinuxKernelTest): deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' 'linux-image-dev-sunxi_20.08_armhf.deb') deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb'
@@ -496,7 +514,8 @@ class BootLinuxConsole(LinuxKernelTest): '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' 'arm/rootfs-armv5.cpio.gz') initrd_hash = '2b50f1873e113523967806f4da2afe385462ff9b' - initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash) + initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash, + cancel_on_missing=True) initrd_path = os.path.join(self.workdir, 'rootfs.cpio') archive.gzip_uncompress(initrd_path_gz, initrd_path)
@@ -527,7 +546,8 @@ class BootLinuxConsole(LinuxKernelTest): deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' 'linux-image-dev-sunxi_20.08_armhf.deb') deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb'
@@ -536,7 +556,8 @@ class BootLinuxConsole(LinuxKernelTest): '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' 'arm/rootfs-armv5.ext2.gz') rootfs_hash = '093e89d2b4d982234bf528bc9fb2f2f17a9d1f93' - rootfs_path_gz = self.fetch_asset(rootfs_url, asset_hash=rootfs_hash) + rootfs_path_gz = self.fetch_asset(rootfs_url, asset_hash=rootfs_hash, + cancel_on_missing=True) rootfs_path = os.path.join(self.workdir, 'rootfs.cpio') archive.gzip_uncompress(rootfs_path_gz, rootfs_path)
@@ -570,7 +591,8 @@ class BootLinuxConsole(LinuxKernelTest): deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' 'linux-image-dev-sunxi_20.08_armhf.deb') deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
@@ -595,7 +617,8 @@ class BootLinuxConsole(LinuxKernelTest): deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' 'linux-image-dev-sunxi_20.08_armhf.deb') deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
@@ -604,7 +627,8 @@ class BootLinuxConsole(LinuxKernelTest): '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' 'arm/rootfs-armv7a.cpio.gz') initrd_hash = '604b2e45cdf35045846b8bbfbf2129b1891bdc9c' - initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash) + initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash, + cancel_on_missing=True) initrd_path = os.path.join(self.workdir, 'rootfs.cpio') archive.gzip_uncompress(initrd_path_gz, initrd_path)
@@ -638,7 +662,8 @@ class BootLinuxConsole(LinuxKernelTest): deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' 'linux-image-dev-sunxi_20.08_armhf.deb') deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
@@ -646,7 +671,8 @@ class BootLinuxConsole(LinuxKernelTest): rootfs_url = ('http://storage.kernelci.org/images/rootfs/buildroot/' 'kci-2019.02/armel/base/rootfs.ext2.xz') rootfs_hash = '692510cb625efda31640d1de0a8d60e26040f061' - rootfs_path_xz = self.fetch_asset(rootfs_url, asset_hash=rootfs_hash) + rootfs_path_xz = self.fetch_asset(rootfs_url, asset_hash=rootfs_hash, + cancel_on_missing=True) rootfs_path = os.path.join(self.workdir, 'rootfs.cpio') archive.lzma_uncompress(rootfs_path_xz, rootfs_path) image_pow2ceil_expand(rootfs_path)
@@ -693,7 +719,8 @@ class BootLinuxConsole(LinuxKernelTest): 'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz') image_hash = 'b4d6775f5673486329e45a0586bf06b6dbe792199fd182ac6b9c7bb6c7d3e6dd' image_path_xz = self.fetch_asset(image_url, asset_hash=image_hash, - algorithm='sha256') + algorithm='sha256', + cancel_on_missing=True) image_path = archive.extract(image_path_xz, self.workdir) image_pow2ceil_expand(image_path)
@@ -734,7 +761,8 @@ class BootLinuxConsole(LinuxKernelTest): '20200108T145233Z/pool/main/u/u-boot/' 'u-boot-sunxi_2020.01%2Bdfsg-1_armhf.deb') deb_hash = 'f67f404a80753ca3d1258f13e38f2b060e13db99' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) # We use the common OrangePi PC 'plus' build of U-Boot for our secondary # program loader (SPL). We will then set the path to the more specific # OrangePi "PC" device tree blob with 'setenv fdtfile' in U-Boot prompt,
@@ -744,7 +772,8 @@ class BootLinuxConsole(LinuxKernelTest): image_url = ('https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.0/' 'evbarm-earmv7hf/binary/gzimg/armv7.img.gz') image_hash = '2babb29d36d8360adcb39c09e31060945259917a' - image_path_gz = self.fetch_asset(image_url, asset_hash=image_hash) + image_path_gz = self.fetch_asset(image_url, asset_hash=image_hash, + cancel_on_missing=True) image_path = os.path.join(self.workdir, 'armv7.img') archive.gzip_uncompress(image_path_gz, image_path) image_pow2ceil_expand(image_path)
@@ -796,7 +825,8 @@ class BootLinuxConsole(LinuxKernelTest): '/fedora-secondary/releases/29/Everything/s390x/os/images' '/kernel.img') kernel_hash = 'e8e8439103ef8053418ef062644ffd46a7919313' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) self.vm.set_console() kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=sclp0'
@@ -815,7 +845,8 @@ class BootLinuxConsole(LinuxKernelTest): kernel_url = ('http://archive.debian.org/debian/dists/lenny/main/' 'installer-alpha/20090123lenny10/images/cdrom/vmlinuz') kernel_hash = '3a943149335529e2ed3e74d0d787b85fb5671ba3' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) uncompressed_kernel = archive.uncompress(kernel_path, self.workdir)
@@ -837,7 +868,8 @@ class BootLinuxConsole(LinuxKernelTest): '/fedora-secondary/releases/29/Everything/ppc64le/os' '/ppc/ppc64/vmlinuz') kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) self.vm.set_console() kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=hvc0'
@@ -856,7 +888,8 @@ class BootLinuxConsole(LinuxKernelTest): '/20191021T083923Z/pool-m68k/main' '/l/linux/kernel-image-5.3.0-1-m68k-di_5.3.7-1_m68k.udeb') deb_hash = '044954bb9be4160a3ce81f8bc1b5e856b75cccd1' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinux-5.3.0-1-m68k')
@@ -874,7 +907,8 @@ class BootLinuxConsole(LinuxKernelTest): def do_test_advcal_2018(self, day, tar_hash, kernel_name, console=0): tar_url = ('https://www.qemu-advent-calendar.org' '/2018/download/day' + day + '.tar.xz') - file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) + file_path = self.fetch_asset(tar_url, asset_hash=tar_hash, + cancel_on_missing=True) archive.extract(file_path, self.workdir) self.vm.set_console(console_index=console) self.vm.add_args('-kernel',
tests/acceptance/linux_initrd.py +4 -2
@@ -36,7 +36,8 @@ class LinuxInitrd(Test): kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora/li' 'nux/releases/18/Fedora/x86_64/os/images/pxeboot/vmlinuz') kernel_hash = '41464f68efe42b9991250bed86c7081d2ccdbb21' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) max_size = 2 * (1024 ** 3) - 1 with tempfile.NamedTemporaryFile() as initrd:
@@ -63,7 +64,8 @@ class LinuxInitrd(Test): '/linux/releases/28/Everything/x86_64/os/images/pxeboot/' 'vmlinuz') kernel_hash = '238e083e114c48200f80d889f7e32eeb2793e02a' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) max_size = 2 * (1024 ** 3) + 1 with tempfile.NamedTemporaryFile() as initrd:
tests/acceptance/linux_ssh_mips_malta.py +4 -2
@@ -111,7 +111,8 @@ class LinuxSSH(Test): def boot_debian_wheezy_image_and_ssh_login(self, endianess, kernel_path): image_url, image_hash = self.get_image_info(endianess) - image_path = self.fetch_asset(image_url, asset_hash=image_hash) + image_path = self.fetch_asset(image_url, asset_hash=image_hash, + cancel_on_missing=True) self.vm.set_console() kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE
@@ -204,7 +205,8 @@ class LinuxSSH(Test): def check_mips_malta(self, uname_m, endianess): wordsize = 64 if '64' in uname_m else 32 kernel_url, kernel_hash = self.get_kernel_info(endianess, wordsize) - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) self.boot_debian_wheezy_image_and_ssh_login(endianess, kernel_path) stdout, _ = self.ssh_command('uname -a')
tests/acceptance/machine_arm_canona1100.py +2 -1
@@ -26,7 +26,8 @@ class CanonA1100Machine(Test): tar_url = ('https://www.qemu-advent-calendar.org' '/2018/download/day18.tar.xz') tar_hash = '068b5fc4242b29381acee94713509f8a876e9db6' - file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) + file_path = self.fetch_asset(tar_url, asset_hash=tar_hash + cancel_on_missing=True) archive.extract(file_path, self.workdir) self.vm.set_console() self.vm.add_args('-bios',
tests/acceptance/machine_arm_integratorcp.py +6 -3
@@ -37,12 +37,14 @@ class IntegratorMachine(Test): kernel_url = ('https://github.com/zayac/qemu-arm/raw/master/' 'arm-test/kernel/zImage.integrator') kernel_hash = '0d7adba893c503267c946a3cbdc63b4b54f25468' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) initrd_url = ('https://github.com/zayac/qemu-arm/raw/master/' 'arm-test/kernel/arm_root.img') initrd_hash = 'b51e4154285bf784e017a37586428332d8c7bd8b' - initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash) + initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash, + cancel_on_missing=True) self.vm.set_console() self.vm.add_args('-kernel', kernel_path,
@@ -76,7 +78,8 @@ class IntegratorMachine(Test): tuxlogo_url = ('https://github.com/torvalds/linux/raw/v2.6.12/' 'drivers/video/logo/logo_linux_vga16.ppm') tuxlogo_hash = '3991c2ddbd1ddaecda7601f8aafbcf5b02dc86af' - tuxlogo_path = self.fetch_asset(tuxlogo_url, asset_hash=tuxlogo_hash) + tuxlogo_path = self.fetch_asset(tuxlogo_url, asset_hash=tuxlogo_hash, + cancel_on_missing=True) self.boot_integratorcp() framebuffer_ready = 'Console: switching to colour frame buffer device'
tests/acceptance/machine_arm_n8x0.py +2 -1
@@ -24,7 +24,8 @@ class N8x0Machine(Test): 'meego-arm-n8x0-1.0.80.20100712.1431-' 'vmlinuz-2.6.35~rc4-129.1-n8x0') kernel_hash = 'e9d5ab8d7548923a0061b6fbf601465e479ed269' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) self.vm.set_console(console_index=1) self.vm.add_args('-kernel', kernel_path,
tests/acceptance/machine_avr6.py +2 -1
@@ -37,7 +37,8 @@ class AVR6Machine(Test): '/raw/36c3e67b8755dcf/free-rtos/Demo' '/AVR_ATMega2560_GCC/demo.elf') rom_hash = '7eb521f511ca8f2622e0a3c5e8dd686efbb911d4' - rom_path = self.fetch_asset(rom_url, asset_hash=rom_hash) + rom_path = self.fetch_asset(rom_url, asset_hash=rom_hash, + cancel_on_missing=True) self.vm.add_args('-bios', rom_path) self.vm.add_args('-nographic')
tests/acceptance/machine_m68k_nextcube.py +2 -1
@@ -55,7 +55,8 @@ class NextCubeMachine(Test): rom_url = ('http://www.nextcomputers.org/NeXTfiles/Software/ROM_Files/' '68040_Non-Turbo_Chipset/Rev_2.5_v66.BIN') rom_hash = 'b3534796abae238a0111299fc406a9349f7fee24' - rom_path = self.fetch_asset(rom_url, asset_hash=rom_hash) + rom_path = self.fetch_asset(rom_url, asset_hash=rom_hash, + cancel_on_missing=True) self.vm.add_args('-bios', rom_path) self.vm.launch()
tests/acceptance/machine_mips_malta.py +4 -2
@@ -49,14 +49,16 @@ class MaltaMachineFramebuffer(Test): 'a5966ca4b5/mips/malta/mips64el/' 'vmlinux-4.7.0-rc1.I6400.gz') kernel_hash = '096f50c377ec5072e6a366943324622c312045f6' - kernel_path_gz = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path_gz = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) kernel_path = self.workdir + "vmlinux" archive.gzip_uncompress(kernel_path_gz, kernel_path) tuxlogo_url = ('https://github.com/torvalds/linux/raw/v2.6.12/' 'drivers/video/logo/logo_linux_vga16.ppm') tuxlogo_hash = '3991c2ddbd1ddaecda7601f8aafbcf5b02dc86af' - tuxlogo_path = self.fetch_asset(tuxlogo_url, asset_hash=tuxlogo_hash) + tuxlogo_path = self.fetch_asset(tuxlogo_url, asset_hash=tuxlogo_hash, + cancel_on_missing=True) self.vm.set_console() kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
tests/acceptance/machine_rx_gdbsim.py +6 -3
@@ -32,7 +32,8 @@ class RxGdbSimMachine(Test): """ uboot_url = ('https://acc.dl.osdn.jp/users/23/23888/u-boot.bin.gz') uboot_hash = '9b78dbd43b40b2526848c0b1ce9de02c24f4dcdb' - uboot_path = self.fetch_asset(uboot_url, asset_hash=uboot_hash) + uboot_path = self.fetch_asset(uboot_url, asset_hash=uboot_hash, + cancel_on_missing=True) uboot_path = archive.uncompress(uboot_path, self.workdir) self.vm.set_console()
@@ -56,10 +57,12 @@ class RxGdbSimMachine(Test): """ dtb_url = ('https://acc.dl.osdn.jp/users/23/23887/rx-virt.dtb') dtb_hash = '7b4e4e2c71905da44e86ce47adee2210b026ac18' - dtb_path = self.fetch_asset(dtb_url, asset_hash=dtb_hash) + dtb_path = self.fetch_asset(dtb_url, asset_hash=dtb_hash, + cancel_on_missing=True) kernel_url = ('http://acc.dl.osdn.jp/users/23/23845/zImage') kernel_hash = '39a81067f8d72faad90866ddfefa19165d68fc99' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) self.vm.set_console() kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'earlycon'
tests/acceptance/machine_sparc64_sun4u.py +2 -1
@@ -27,7 +27,8 @@ class Sun4uMachine(LinuxKernelTest): tar_url = ('https://www.qemu-advent-calendar.org' '/2018/download/day23.tar.xz') tar_hash = '142db83cd974ffadc4f75c8a5cad5bcc5722c240' - file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) + file_path = self.fetch_asset(tar_url, asset_hash=tar_hash, + cancel_on_missing=True) archive.extract(file_path, self.workdir) self.vm.set_console() self.vm.add_args('-kernel', self.workdir + '/day23/vmlinux',
tests/acceptance/machine_sparc_leon3.py +2 -1
@@ -26,7 +26,8 @@ class Leon3Machine(Test): kernel_url = ('http://www.helenos.org/releases/' 'HelenOS-0.6.0-sparc32-leon3.bin') kernel_hash = 'a88c9cfdb8430c66650e5290a08765f9bf049a30' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) self.vm.set_console() self.vm.add_args('-kernel', kernel_path)
tests/acceptance/ppc_prep_40p.py +5 -3
@@ -34,11 +34,13 @@ class IbmPrep40pMachine(Test): 'ftp.software.ibm.com/rs6000/firmware/' '7020-40p/P12H0456.IMG') bios_hash = '1775face4e6dc27f3a6ed955ef6eb331bf817f03' - bios_path = self.fetch_asset(bios_url, asset_hash=bios_hash) + bios_path = self.fetch_asset(bios_url, asset_hash=bios_hash, + cancel_on_missing=True) drive_url = ('https://cdn.netbsd.org/pub/NetBSD/NetBSD-archive/' 'NetBSD-4.0/prep/installation/floppy/generic_com0.fs') drive_hash = 'dbcfc09912e71bd5f0d82c7c1ee43082fb596ceb' - drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash) + drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash, + cancel_on_missing=True) self.vm.set_console() self.vm.add_args('-bios', bios_path,
@@ -71,7 +73,7 @@ class IbmPrep40pMachine(Test): 'NetBSD-7.1.2-prep.iso') drive_hash = 'ac6fa2707d888b36d6fa64de6e7fe48e' drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash, - algorithm='md5') + algorithm='md5', cancel_on_missing=True) self.vm.set_console() self.vm.add_args('-cdrom', drive_path, '-boot', 'd')
tests/acceptance/replay_kernel.py +29 -14
132 lines not on this page · raw message
Signature · 1 line
2.25.4
Re: [PATCH 4/4] Acceptance tests: cancel tests on missing assets
Quoted 758 lines · Cleber Rosa
Asset files used on the acceptance tests (kernel, initrd images) unfortunately are not guaranteed to always be available at the same location.
Let's cancel (kind of like a skip) the test, when the asset is missing. This should prevent false positives, when failure are not caused by changes in QEMU itself.
Reference: https://avocado-framework.readthedocs.io/en/81.0/api/test/avocado.html#avocado.Test.fetch_asset
Signed-off-by Cleber Rosa <[email protected]>--- tests/acceptance/boot_linux_console.py | 102 ++++++++++++------- tests/acceptance/linux_initrd.py | 6 +- tests/acceptance/linux_ssh_mips_malta.py | 6 +- tests/acceptance/machine_arm_canona1100.py | 3 +- tests/acceptance/machine_arm_integratorcp.py | 9 +- tests/acceptance/machine_arm_n8x0.py | 3 +- tests/acceptance/machine_avr6.py | 3 +- tests/acceptance/machine_m68k_nextcube.py | 3 +- tests/acceptance/machine_mips_malta.py | 6 +- tests/acceptance/machine_rx_gdbsim.py | 9 +- tests/acceptance/machine_sparc64_sun4u.py | 3 +- tests/acceptance/machine_sparc_leon3.py | 3 +- tests/acceptance/ppc_prep_40p.py | 8 +- tests/acceptance/replay_kernel.py | 43 +++++--- 14 files changed, 138 insertions(+), 69 deletions(-)tests/acceptance/boot_linux_console.py +68
-34@@ -99,7 +99,8 @@ class BootLinuxConsole(LinuxKernelTest): '/linux/releases/29/Everything/x86_64/os/images/pxeboot' '/vmlinuz') kernel_hash = '23bebd2680757891cf7adedb033532163a792495' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) self.vm.set_console() kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'@@ -119,7 +120,8 @@ class BootLinuxConsole(LinuxKernelTest): '20130217T032700Z/pool/main/l/linux-2.6/' 'linux-image-2.6.32-5-4kc-malta_2.6.32-48_mips.deb') deb_hash = 'a8cfc28ad8f45f54811fc6cf74fc43ffcfe0ba04' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinux-2.6.32-5-4kc-malta')@@ -151,7 +153,8 @@ class BootLinuxConsole(LinuxKernelTest): '20130217T032700Z/pool/main/l/linux-2.6/' 'linux-image-2.6.32-5-5kc-malta_2.6.32-48_mipsel.deb') deb_hash = '1aaec92083bf22fda31e0d27fa8d9a388e5fc3d5' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinux-2.6.32-5-5kc-malta')@@ -173,14 +176,16 @@ class BootLinuxConsole(LinuxKernelTest): '20160601T041800Z/pool/main/l/linux/' 'linux-image-4.5.0-2-4kc-malta_4.5.5-1_mips.deb') deb_hash = 'a3c84f3e88b54e06107d65a410d1d1e8e0f340f8' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinux-4.5.0-2-4kc-malta') initrd_url = ('https://github.com/groeck/linux-build-test/raw/' '8584a59ed9e5eb5ee7ca91f6d74bbb06619205b8/rootfs/' 'mips/rootfs.cpio.gz') initrd_hash = 'bf806e17009360a866bf537f6de66590de349a99' - initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash) + initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash, + cancel_on_missing=True) initrd_path = self.workdir + "rootfs.cpio" archive.gzip_uncompress(initrd_path_gz, initrd_path)@@ -215,13 +220,15 @@ class BootLinuxConsole(LinuxKernelTest): 'raw/9ad2df38/mips/malta/mips64el/' 'vmlinux-3.19.3.mtoman.20150408') kernel_hash = '00d1d268fb9f7d8beda1de6bebcc46e884d71754' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) initrd_url = ('https://github.com/groeck/linux-build-test/' 'raw/8584a59e/rootfs/' 'mipsel64/rootfs.mipsel64r1.cpio.gz') initrd_hash = '1dbb8a396e916847325284dbe2151167' initrd_path_gz = self.fetch_asset(initrd_url, algorithm='md5', - asset_hash=initrd_hash) + asset_hash=initrd_hash, + cancel_on_missing=True) initrd_path = self.workdir + "rootfs.cpio" archive.gzip_uncompress(initrd_path_gz, initrd_path)@@ -247,7 +254,8 @@ class BootLinuxConsole(LinuxKernelTest): self.vm.wait() def do_test_mips_malta32el_nanomips(self, kernel_url, kernel_hash): - kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) kernel_path = self.workdir + "kernel" with lzma.open(kernel_path_xz, 'rb') as f_in: with open(kernel_path, 'wb') as f_out:@@ -310,7 +318,8 @@ class BootLinuxConsole(LinuxKernelTest): '/linux/releases/29/Everything/aarch64/os/images/pxeboot' '/vmlinuz') kernel_hash = '8c73e469fc6ea06a58dc83a628fc695b693b8493' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) self.vm.set_console() kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +@@ -334,11 +343,13 @@ class BootLinuxConsole(LinuxKernelTest): '20101020ubuntu543.15/images/') kernel_url = images_url + 'netboot/ubuntu-installer/arm64/linux' kernel_hash = '5bfc54cf7ed8157d93f6e5b0241e727b6dc22c50' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) initrd_url = images_url + 'netboot/ubuntu-installer/arm64/initrd.gz' initrd_hash = 'd385d3e88d53e2004c5d43cbe668b458a094f772' - initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash) + initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash, + cancel_on_missing=True) self.vm.set_console() self.vm.add_args('-m', '2G',@@ -356,7 +367,8 @@ class BootLinuxConsole(LinuxKernelTest): '/linux/releases/29/Everything/armhfp/os/images/pxeboot' '/vmlinuz') kernel_hash = 'e9826d741b4fb04cadba8d4824d1ed3b7fb8b4d4' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) self.vm.set_console() kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +@@ -378,12 +390,14 @@ class BootLinuxConsole(LinuxKernelTest): 'Subbaraya-Sundeep/qemu-test-binaries/' 'fe371d32e50ca682391e1e70ab98c2942aeffb01/u-boot') uboot_hash = 'cbb8cbab970f594bf6523b9855be209c08374ae2' - uboot_path = self.fetch_asset(uboot_url, asset_hash=uboot_hash) + uboot_path = self.fetch_asset(uboot_url, asset_hash=uboot_hash, + cancel_on_missing=True) spi_url = ('https://raw.githubusercontent.com/' 'Subbaraya-Sundeep/qemu-test-binaries/' 'fe371d32e50ca682391e1e70ab98c2942aeffb01/spi.bin') spi_hash = '65523a1835949b6f4553be96dec1b6a38fb05501' - spi_path = self.fetch_asset(spi_url, asset_hash=spi_hash) + spi_path = self.fetch_asset(spi_url, asset_hash=spi_hash, + cancel_on_missing=True) self.vm.set_console() kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE@@ -412,7 +426,8 @@ class BootLinuxConsole(LinuxKernelTest): 'pool/main/r/raspberrypi-firmware/' 'raspberrypi-kernel_1.20190215-1_armhf.deb') deb_hash = 'cd284220b32128c5084037553db3c482426f3972' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/kernel7.img') dtb_path = self.extract_from_deb(deb_path, '/boot/bcm2709-rpi-2-b.dtb')@@ -448,7 +463,8 @@ class BootLinuxConsole(LinuxKernelTest): '20190928T224601Z/pool/main/l/linux/' 'linux-image-4.19.0-6-armmp_4.19.67-2+deb10u1_armhf.deb') deb_hash = 'fa9df4a0d38936cb50084838f2cb933f570d7d82' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinuz-4.19.0-6-armmp') dtb_path = '/usr/lib/linux-image-4.19.0-6-armmp/exynos4210-smdkv310.dtb'@@ -458,7 +474,8 @@ class BootLinuxConsole(LinuxKernelTest): '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' 'arm/rootfs-armv5.cpio.gz') initrd_hash = '2b50f1873e113523967806f4da2afe385462ff9b' - initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash) + initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash, + cancel_on_missing=True) initrd_path = os.path.join(self.workdir, 'rootfs.cpio') archive.gzip_uncompress(initrd_path_gz, initrd_path)@@ -487,7 +504,8 @@ class BootLinuxConsole(LinuxKernelTest): deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' 'linux-image-dev-sunxi_20.08_armhf.deb') deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb'@@ -496,7 +514,8 @@ class BootLinuxConsole(LinuxKernelTest): '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' 'arm/rootfs-armv5.cpio.gz') initrd_hash = '2b50f1873e113523967806f4da2afe385462ff9b' - initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash) + initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash, + cancel_on_missing=True) initrd_path = os.path.join(self.workdir, 'rootfs.cpio') archive.gzip_uncompress(initrd_path_gz, initrd_path)@@ -527,7 +546,8 @@ class BootLinuxConsole(LinuxKernelTest): deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' 'linux-image-dev-sunxi_20.08_armhf.deb') deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb'@@ -536,7 +556,8 @@ class BootLinuxConsole(LinuxKernelTest): '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' 'arm/rootfs-armv5.ext2.gz') rootfs_hash = '093e89d2b4d982234bf528bc9fb2f2f17a9d1f93' - rootfs_path_gz = self.fetch_asset(rootfs_url, asset_hash=rootfs_hash) + rootfs_path_gz = self.fetch_asset(rootfs_url, asset_hash=rootfs_hash, + cancel_on_missing=True) rootfs_path = os.path.join(self.workdir, 'rootfs.cpio') archive.gzip_uncompress(rootfs_path_gz, rootfs_path)@@ -570,7 +591,8 @@ class BootLinuxConsole(LinuxKernelTest): deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' 'linux-image-dev-sunxi_20.08_armhf.deb') deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'@@ -595,7 +617,8 @@ class BootLinuxConsole(LinuxKernelTest): deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' 'linux-image-dev-sunxi_20.08_armhf.deb') deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'@@ -604,7 +627,8 @@ class BootLinuxConsole(LinuxKernelTest): '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' 'arm/rootfs-armv7a.cpio.gz') initrd_hash = '604b2e45cdf35045846b8bbfbf2129b1891bdc9c' - initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash) + initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash, + cancel_on_missing=True) initrd_path = os.path.join(self.workdir, 'rootfs.cpio') archive.gzip_uncompress(initrd_path_gz, initrd_path)@@ -638,7 +662,8 @@ class BootLinuxConsole(LinuxKernelTest): deb_url = ('https://apt.armbian.com/pool/main/l/linux-5.8.0-sunxi/' 'linux-image-dev-sunxi_20.08_armhf.deb') deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'@@ -646,7 +671,8 @@ class BootLinuxConsole(LinuxKernelTest): rootfs_url = ('http://storage.kernelci.org/images/rootfs/buildroot/' 'kci-2019.02/armel/base/rootfs.ext2.xz') rootfs_hash = '692510cb625efda31640d1de0a8d60e26040f061' - rootfs_path_xz = self.fetch_asset(rootfs_url, asset_hash=rootfs_hash) + rootfs_path_xz = self.fetch_asset(rootfs_url, asset_hash=rootfs_hash, + cancel_on_missing=True) rootfs_path = os.path.join(self.workdir, 'rootfs.cpio') archive.lzma_uncompress(rootfs_path_xz, rootfs_path) image_pow2ceil_expand(rootfs_path)@@ -693,7 +719,8 @@ class BootLinuxConsole(LinuxKernelTest): 'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz') image_hash = 'b4d6775f5673486329e45a0586bf06b6dbe792199fd182ac6b9c7bb6c7d3e6dd' image_path_xz = self.fetch_asset(image_url, asset_hash=image_hash, - algorithm='sha256') + algorithm='sha256', + cancel_on_missing=True) image_path = archive.extract(image_path_xz, self.workdir) image_pow2ceil_expand(image_path)@@ -734,7 +761,8 @@ class BootLinuxConsole(LinuxKernelTest): '20200108T145233Z/pool/main/u/u-boot/' 'u-boot-sunxi_2020.01%2Bdfsg-1_armhf.deb') deb_hash = 'f67f404a80753ca3d1258f13e38f2b060e13db99' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) # We use the common OrangePi PC 'plus' build of U-Boot for our secondary # program loader (SPL). We will then set the path to the more specific # OrangePi "PC" device tree blob with 'setenv fdtfile' in U-Boot prompt,@@ -744,7 +772,8 @@ class BootLinuxConsole(LinuxKernelTest): image_url = ('https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.0/' 'evbarm-earmv7hf/binary/gzimg/armv7.img.gz') image_hash = '2babb29d36d8360adcb39c09e31060945259917a' - image_path_gz = self.fetch_asset(image_url, asset_hash=image_hash) + image_path_gz = self.fetch_asset(image_url, asset_hash=image_hash, + cancel_on_missing=True) image_path = os.path.join(self.workdir, 'armv7.img') archive.gzip_uncompress(image_path_gz, image_path) image_pow2ceil_expand(image_path)@@ -796,7 +825,8 @@ class BootLinuxConsole(LinuxKernelTest): '/fedora-secondary/releases/29/Everything/s390x/os/images' '/kernel.img') kernel_hash = 'e8e8439103ef8053418ef062644ffd46a7919313' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) self.vm.set_console() kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=sclp0'@@ -815,7 +845,8 @@ class BootLinuxConsole(LinuxKernelTest): kernel_url = ('http://archive.debian.org/debian/dists/lenny/main/' 'installer-alpha/20090123lenny10/images/cdrom/vmlinuz') kernel_hash = '3a943149335529e2ed3e74d0d787b85fb5671ba3' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) uncompressed_kernel = archive.uncompress(kernel_path, self.workdir)@@ -837,7 +868,8 @@ class BootLinuxConsole(LinuxKernelTest): '/fedora-secondary/releases/29/Everything/ppc64le/os' '/ppc/ppc64/vmlinuz') kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) self.vm.set_console() kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=hvc0'@@ -856,7 +888,8 @@ class BootLinuxConsole(LinuxKernelTest): '/20191021T083923Z/pool-m68k/main' '/l/linux/kernel-image-5.3.0-1-m68k-di_5.3.7-1_m68k.udeb') deb_hash = '044954bb9be4160a3ce81f8bc1b5e856b75cccd1' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinux-5.3.0-1-m68k')@@ -874,7 +907,8 @@ class BootLinuxConsole(LinuxKernelTest): def do_test_advcal_2018(self, day, tar_hash, kernel_name, console=0): tar_url = ('https://www.qemu-advent-calendar.org' '/2018/download/day' + day + '.tar.xz') - file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) + file_path = self.fetch_asset(tar_url, asset_hash=tar_hash, + cancel_on_missing=True) archive.extract(file_path, self.workdir) self.vm.set_console(console_index=console) self.vm.add_args('-kernel',tests/acceptance/linux_initrd.py +4
-2@@ -36,7 +36,8 @@ class LinuxInitrd(Test): kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora/li' 'nux/releases/18/Fedora/x86_64/os/images/pxeboot/vmlinuz') kernel_hash = '41464f68efe42b9991250bed86c7081d2ccdbb21' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) max_size = 2 * (1024 ** 3) - 1 with tempfile.NamedTemporaryFile() as initrd:@@ -63,7 +64,8 @@ class LinuxInitrd(Test): '/linux/releases/28/Everything/x86_64/os/images/pxeboot/' 'vmlinuz') kernel_hash = '238e083e114c48200f80d889f7e32eeb2793e02a' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) max_size = 2 * (1024 ** 3) + 1 with tempfile.NamedTemporaryFile() as initrd:tests/acceptance/linux_ssh_mips_malta.py +4
-2@@ -111,7 +111,8 @@ class LinuxSSH(Test): def boot_debian_wheezy_image_and_ssh_login(self, endianess, kernel_path): image_url, image_hash = self.get_image_info(endianess) - image_path = self.fetch_asset(image_url, asset_hash=image_hash) + image_path = self.fetch_asset(image_url, asset_hash=image_hash, + cancel_on_missing=True) self.vm.set_console() kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE@@ -204,7 +205,8 @@ class LinuxSSH(Test): def check_mips_malta(self, uname_m, endianess): wordsize = 64 if '64' in uname_m else 32 kernel_url, kernel_hash = self.get_kernel_info(endianess, wordsize) - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) self.boot_debian_wheezy_image_and_ssh_login(endianess, kernel_path) stdout, _ = self.ssh_command('uname -a')tests/acceptance/machine_arm_canona1100.py +2
-1@@ -26,7 +26,8 @@ class CanonA1100Machine(Test): tar_url = ('https://www.qemu-advent-calendar.org' '/2018/download/day18.tar.xz') tar_hash = '068b5fc4242b29381acee94713509f8a876e9db6' - file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) + file_path = self.fetch_asset(tar_url, asset_hash=tar_hash + cancel_on_missing=True) archive.extract(file_path, self.workdir) self.vm.set_console() self.vm.add_args('-bios',tests/acceptance/machine_arm_integratorcp.py +6
-3@@ -37,12 +37,14 @@ class IntegratorMachine(Test): kernel_url = ('https://github.com/zayac/qemu-arm/raw/master/' 'arm-test/kernel/zImage.integrator') kernel_hash = '0d7adba893c503267c946a3cbdc63b4b54f25468' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) initrd_url = ('https://github.com/zayac/qemu-arm/raw/master/' 'arm-test/kernel/arm_root.img') initrd_hash = 'b51e4154285bf784e017a37586428332d8c7bd8b' - initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash) + initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash, + cancel_on_missing=True) self.vm.set_console() self.vm.add_args('-kernel', kernel_path,@@ -76,7 +78,8 @@ class IntegratorMachine(Test): tuxlogo_url = ('https://github.com/torvalds/linux/raw/v2.6.12/' 'drivers/video/logo/logo_linux_vga16.ppm') tuxlogo_hash = '3991c2ddbd1ddaecda7601f8aafbcf5b02dc86af' - tuxlogo_path = self.fetch_asset(tuxlogo_url, asset_hash=tuxlogo_hash) + tuxlogo_path = self.fetch_asset(tuxlogo_url, asset_hash=tuxlogo_hash, + cancel_on_missing=True) self.boot_integratorcp() framebuffer_ready = 'Console: switching to colour frame buffer device'tests/acceptance/machine_arm_n8x0.py +2
-1@@ -24,7 +24,8 @@ class N8x0Machine(Test): 'meego-arm-n8x0-1.0.80.20100712.1431-' 'vmlinuz-2.6.35~rc4-129.1-n8x0') kernel_hash = 'e9d5ab8d7548923a0061b6fbf601465e479ed269' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) self.vm.set_console(console_index=1) self.vm.add_args('-kernel', kernel_path,tests/acceptance/machine_avr6.py +2
-1@@ -37,7 +37,8 @@ class AVR6Machine(Test): '/raw/36c3e67b8755dcf/free-rtos/Demo' '/AVR_ATMega2560_GCC/demo.elf') rom_hash = '7eb521f511ca8f2622e0a3c5e8dd686efbb911d4' - rom_path = self.fetch_asset(rom_url, asset_hash=rom_hash) + rom_path = self.fetch_asset(rom_url, asset_hash=rom_hash, + cancel_on_missing=True) self.vm.add_args('-bios', rom_path) self.vm.add_args('-nographic')tests/acceptance/machine_m68k_nextcube.py +2
-1@@ -55,7 +55,8 @@ class NextCubeMachine(Test): rom_url = ('http://www.nextcomputers.org/NeXTfiles/Software/ROM_Files/' '68040_Non-Turbo_Chipset/Rev_2.5_v66.BIN') rom_hash = 'b3534796abae238a0111299fc406a9349f7fee24' - rom_path = self.fetch_asset(rom_url, asset_hash=rom_hash) + rom_path = self.fetch_asset(rom_url, asset_hash=rom_hash, + cancel_on_missing=True) self.vm.add_args('-bios', rom_path) self.vm.launch()tests/acceptance/machine_mips_malta.py +4
-2@@ -49,14 +49,16 @@ class MaltaMachineFramebuffer(Test): 'a5966ca4b5/mips/malta/mips64el/' 'vmlinux-4.7.0-rc1.I6400.gz') kernel_hash = '096f50c377ec5072e6a366943324622c312045f6' - kernel_path_gz = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path_gz = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) kernel_path = self.workdir + "vmlinux" archive.gzip_uncompress(kernel_path_gz, kernel_path) tuxlogo_url = ('https://github.com/torvalds/linux/raw/v2.6.12/' 'drivers/video/logo/logo_linux_vga16.ppm') tuxlogo_hash = '3991c2ddbd1ddaecda7601f8aafbcf5b02dc86af' - tuxlogo_path = self.fetch_asset(tuxlogo_url, asset_hash=tuxlogo_hash) + tuxlogo_path = self.fetch_asset(tuxlogo_url, asset_hash=tuxlogo_hash, + cancel_on_missing=True) self.vm.set_console() kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +tests/acceptance/machine_rx_gdbsim.py +6
-3@@ -32,7 +32,8 @@ class RxGdbSimMachine(Test): """ uboot_url = ('https://acc.dl.osdn.jp/users/23/23888/u-boot.bin.gz') uboot_hash = '9b78dbd43b40b2526848c0b1ce9de02c24f4dcdb' - uboot_path = self.fetch_asset(uboot_url, asset_hash=uboot_hash) + uboot_path = self.fetch_asset(uboot_url, asset_hash=uboot_hash, + cancel_on_missing=True) uboot_path = archive.uncompress(uboot_path, self.workdir) self.vm.set_console()@@ -56,10 +57,12 @@ class RxGdbSimMachine(Test): """ dtb_url = ('https://acc.dl.osdn.jp/users/23/23887/rx-virt.dtb') dtb_hash = '7b4e4e2c71905da44e86ce47adee2210b026ac18' - dtb_path = self.fetch_asset(dtb_url, asset_hash=dtb_hash) + dtb_path = self.fetch_asset(dtb_url, asset_hash=dtb_hash, + cancel_on_missing=True) kernel_url = ('http://acc.dl.osdn.jp/users/23/23845/zImage') kernel_hash = '39a81067f8d72faad90866ddfefa19165d68fc99' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) self.vm.set_console() kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'earlycon'tests/acceptance/machine_sparc64_sun4u.py +2
-1@@ -27,7 +27,8 @@ class Sun4uMachine(LinuxKernelTest): tar_url = ('https://www.qemu-advent-calendar.org' '/2018/download/day23.tar.xz') tar_hash = '142db83cd974ffadc4f75c8a5cad5bcc5722c240' - file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) + file_path = self.fetch_asset(tar_url, asset_hash=tar_hash, + cancel_on_missing=True) archive.extract(file_path, self.workdir) self.vm.set_console() self.vm.add_args('-kernel', self.workdir + '/day23/vmlinux',tests/acceptance/machine_sparc_leon3.py +2
-1@@ -26,7 +26,8 @@ class Leon3Machine(Test): kernel_url = ('http://www.helenos.org/releases/' 'HelenOS-0.6.0-sparc32-leon3.bin') kernel_hash = 'a88c9cfdb8430c66650e5290a08765f9bf049a30' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) self.vm.set_console() self.vm.add_args('-kernel', kernel_path)tests/acceptance/ppc_prep_40p.py +5
-3@@ -34,11 +34,13 @@ class IbmPrep40pMachine(Test): 'ftp.software.ibm.com/rs6000/firmware/' '7020-40p/P12H0456.IMG') bios_hash = '1775face4e6dc27f3a6ed955ef6eb331bf817f03' - bios_path = self.fetch_asset(bios_url, asset_hash=bios_hash) + bios_path = self.fetch_asset(bios_url, asset_hash=bios_hash, + cancel_on_missing=True) drive_url = ('https://cdn.netbsd.org/pub/NetBSD/NetBSD-archive/' 'NetBSD-4.0/prep/installation/floppy/generic_com0.fs') drive_hash = 'dbcfc09912e71bd5f0d82c7c1ee43082fb596ceb' - drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash) + drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash, + cancel_on_missing=True) self.vm.set_console() self.vm.add_args('-bios', bios_path,@@ -71,7 +73,7 @@ class IbmPrep40pMachine(Test): 'NetBSD-7.1.2-prep.iso') drive_hash = 'ac6fa2707d888b36d6fa64de6e7fe48e' drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash, - algorithm='md5') + algorithm='md5', cancel_on_missing=True) self.vm.set_console() self.vm.add_args('-cdrom', drive_path, '-boot', 'd')tests/acceptance/replay_kernel.py +29
-15@@ -83,7 +83,8 @@ class ReplayKernel(LinuxKernelTest): '/linux/releases/29/Everything/x86_64/os/images/pxeboot' '/vmlinuz') kernel_hash = '23bebd2680757891cf7adedb033532163a792495' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0' console_pattern = 'VFS: Cannot open root device'@@ -100,7 +101,8 @@ class ReplayKernel(LinuxKernelTest): '/linux/releases/29/Everything/aarch64/os/images/pxeboot' '/vmlinuz') kernel_hash = '8c73e469fc6ea06a58dc83a628fc695b693b8493' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyAMA0')@@ -118,7 +120,8 @@ class ReplayKernel(LinuxKernelTest): '/linux/releases/29/Everything/armhfp/os/images/pxeboot' '/vmlinuz') kernel_hash = 'e9826d741b4fb04cadba8d4824d1ed3b7fb8b4d4' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyAMA0')@@ -136,6 +139,7 @@ class ReplayKernel(LinuxKernelTest): 'linux-image-dev-sunxi_20.08_armhf.deb') deb_hash = 'ae553a9f7d43b18abfa8f3e64bf2d31878b9be89' deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinuz-5.8.0-sunxi') dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb'@@ -144,7 +148,8 @@ class ReplayKernel(LinuxKernelTest): '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' 'arm/rootfs-armv5.cpio.gz') initrd_hash = '2b50f1873e113523967806f4da2afe385462ff9b' - initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash) + initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash, + cancel_on_missing=True) initrd_path = os.path.join(self.workdir, 'rootfs.cpio') archive.gzip_uncompress(initrd_path_gz, initrd_path)@@ -167,7 +172,8 @@ class ReplayKernel(LinuxKernelTest): '/fedora-secondary/releases/29/Everything/ppc64le/os' '/ppc/ppc64/vmlinuz') kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash, + cancel_on_missing=True) kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=hvc0' # icount is not good enough for PPC64 for complete boot yet@@ -183,7 +189,8 @@ class ReplayKernel(LinuxKernelTest): '/20191021T083923Z/pool-m68k/main' '/l/linux/kernel-image-5.3.0-1-m68k-di_5.3.7-1_m68k.udeb') deb_hash = '044954bb9be4160a3ce81f8bc1b5e856b75cccd1' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, + cancel_on_missing=True) kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinux-5.3.0-1-m68k')@@ -213,7 +220,8 @@ class ReplayKernel(LinuxKernelTest): tar_hash = '32b7677ce8b6f1471fb0059865f451169934245b' tar_url = ('https://www.qemu-advent-calendar.org' '/2018/download/day16.tar.xz') - file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) + file_path = self.fetch_asset(tar_url, asset_hash=tar_hash, + cancel_on_missing=True) dtb_path = self.workdir + '/day16/vexpress-v2p-ca9.dtb' self.do_test_advcal_2018(file_path, 'winter.zImage', args=('-dtb', dtb_path))@@ -226,7 +234,8 @@ class ReplayKernel(LinuxKernelTest): tar_hash = 'ac688fd00561a2b6ce1359f9ff6aa2b98c9a570c' tar_url = ('https://www.qemu-advent-calendar.org' '/2018/download/day07.tar.xz') - file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) + file_path = self.fetch_asset(tar_url, asset_hash=tar_hash, + cancel_on_missing=True) self.do_test_advcal_2018(file_path, 'sanity-clause.elf') def test_microblaze_s3adsp1800(self):@@ -237,7 +246,8 @@ class ReplayKernel(LinuxKernelTest): tar_hash = '08bf3e3bfb6b6c7ce1e54ab65d54e189f2caf13f' tar_url = ('https://www.qemu-advent-calendar.org' '/2018/download/day17.tar.xz') - file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) + file_path = self.fetch_asset(tar_url, asset_hash=tar_hash, + cancel_on_missing=True) self.do_test_advcal_2018(file_path, 'ballerina.bin') def test_ppc64_e500(self):@@ -249,7 +259,8 @@ class ReplayKernel(LinuxKernelTest): tar_hash = '6951d86d644b302898da2fd701739c9406527fe1' tar_url = ('https://www.qemu-advent-calendar.org' '/2018/download/day19.tar.xz') - file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) + file_path = self.fetch_asset(tar_url, asset_hash=tar_hash, + cancel_on_missing=True) self.do_test_advcal_2018(file_path, 'uImage', ('-cpu', 'e5500')) def test_ppc_g3beige(self):@@ -260,7 +271,8 @@ class ReplayKernel(LinuxKernelTest): tar_hash = 'e0b872a5eb8fdc5bed19bd43ffe863900ebcedfc' tar_url = ('https://www.qemu-advent-calendar.org' '/2018/download/day15.tar.xz') - file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) + file_path = self.fetch_asset(tar_url, asset_hash=tar_hash, + cancel_on_missing=True) self.do_test_advcal_2018(file_path, 'invaders.elf', args=('-M', 'graphics=off'))@@ -272,7 +284,8 @@ class ReplayKernel(LinuxKernelTest): tar_hash = 'e0b872a5eb8fdc5bed19bd43ffe863900ebcedfc' tar_url = ('https://www.qemu-advent-calendar.org' '/2018/download/day15.tar.xz') - file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) + file_path = self.fetch_asset(tar_url, asset_hash=tar_hash, + cancel_on_missing=True) self.do_test_advcal_2018(file_path, 'invaders.elf', args=('-M', 'graphics=off'))@@ -284,7 +297,8 @@ class ReplayKernel(LinuxKernelTest): tar_hash = 'b18550d5d61c7615d989a06edace051017726a9f' tar_url = ('https://www.qemu-advent-calendar.org' '/2018/download/day11.tar.xz') - file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) + file_path = self.fetch_asset(tar_url, asset_hash=tar_hash, + cancel_on_missing=True) self.do_test_advcal_2018(file_path, 'zImage.elf') def test_xtensa_lx60(self):@@ -296,6 +310,7 @@ class ReplayKernel(LinuxKernelTest): tar_hash = '49e88d9933742f0164b60839886c9739cb7a0d34' tar_url = ('https://www.qemu-advent-calendar.org' '/2018/download/day02.tar.xz') - file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) + file_path = self.fetch_asset(tar_url, asset_hash=tar_hash, + cancel_on_missing=True) self.do_test_advcal_2018(file_path, 'santas-sleigh-ride.elf', args=('-cpu', 'dc233c')) --
Quoted 2 lines
2.25.4
Hi Cleber,
Quoted 7 lines · Cleber Rosa
This updates a couple of asset locations, because their locations on their origin distributions are not permanently stable.
To minimize the inconvenciente caused by test and job failures in the future, an option is enabled that will cancel (AKA skip) tests early when those assets are not available.
Quoted 7 lines
Cleber Rosa (3):
Acceptance tests: use an available kernel image package for arm boot linux test: update arm bionic URL
Acceptance tests: cancel tests on missing assetsPavel Dovgaluk (1):
tests: bump avocado version
I value your patches but I prefer to consider them as new tests added, and not tests fixed (as discussed elsewhere in this series). Therefore I'll post another simpler approach until the discussion gets a consensus.
Regards,
Phil.