diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2022-10-01 20:52:24 +0100 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2022-10-11 17:25:50 +0200 |
commit | 0793fe014c4fc8649288044cd81024482b197cfc (patch) | |
tree | 57bf9df4e8a0c256ae35b8ef57cb8ef1100eff3f /tests/avocado | |
parent | 46d11f9d77b0c0f01fc6f78b2b8e5386abd03209 (diff) |
tests/avocado: Add missing require_netdev('user') checks
Some avocado tests fail if QEMU was built without libslirp. Add
require_netdev('user') checks where necessary:
These tests try to ping 10.0.2.2 and expect it to succeed:
boot_linux_console.py:BootLinuxConsole.test_arm_emcraft_sf2
boot_linux_console.py:BootLinuxConsole.test_arm_orangepi_sd
ppc_bamboo.py:BambooMachine.test_ppc_bamboo
These tests run a commandline that includes '-net user':
machine_aspeed.py:AST2x00Machine.test_arm_ast2500_evb_builroot
(and others that use the do_test_arm_aspeed_buidroot_start()
or do_test_arm_aspeed_sdk_start() helper functions)
These changes seem to be sufficient for 'make check-avocado'
to not fail on a --disable-slirp build.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20221001195224.2453581-1-peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/avocado')
-rw-r--r-- | tests/avocado/boot_linux_console.py | 4 | ||||
-rw-r--r-- | tests/avocado/machine_aspeed.py | 3 | ||||
-rw-r--r-- | tests/avocado/ppc_bamboo.py | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index f26e036ab5..ca9d09b0d7 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -381,6 +381,8 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=u-boot :avocado: tags=accel:tcg """ + self.require_netdev('user') + uboot_url = ('https://raw.githubusercontent.com/' 'Subbaraya-Sundeep/qemu-test-binaries/' 'fe371d32e50ca682391e1e70ab98c2942aeffb01/u-boot') @@ -779,6 +781,8 @@ class BootLinuxConsole(LinuxKernelTest): :avocado: tags=machine:orangepi-pc :avocado: tags=device:sd """ + self.require_netdev('user') + deb_url = ('https://apt.armbian.com/pool/main/l/' 'linux-5.10.16-sunxi/linux-image-current-sunxi_21.02.2_armhf.deb') deb_hash = '9fa84beda245cabf0b4fa84cf6eaa7738ead1da0' diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py index 0f64eb636c..124649a24b 100644 --- a/tests/avocado/machine_aspeed.py +++ b/tests/avocado/machine_aspeed.py @@ -93,6 +93,8 @@ class AST2x00Machine(QemuSystemTest): self.do_test_arm_aspeed(image_path) def do_test_arm_aspeed_buidroot_start(self, image, cpu_id): + self.require_netdev('user') + self.vm.set_console() self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw', '-net', 'nic', '-net', 'user') @@ -193,6 +195,7 @@ class AST2x00MachineSDK(QemuSystemTest): vm=vm) def do_test_arm_aspeed_sdk_start(self, image, cpu_id): + self.require_netdev('user') self.vm.set_console() self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw', '-net', 'nic', '-net', 'user') diff --git a/tests/avocado/ppc_bamboo.py b/tests/avocado/ppc_bamboo.py index 102ff252df..a81be3d608 100644 --- a/tests/avocado/ppc_bamboo.py +++ b/tests/avocado/ppc_bamboo.py @@ -23,6 +23,7 @@ class BambooMachine(QemuSystemTest): :avocado: tags=accel:tcg """ self.require_accelerator("tcg") + self.require_netdev('user') tar_url = ('http://landley.net/aboriginal/downloads/binaries/' 'system-image-powerpc-440fp.tar.gz') tar_hash = '53e5f16414b195b82d2c70272f81c2eedb39bad9' |