Functional test fixes & next-cube cleanup
Hi Peter!
The following changes since commit feef1866d1366d651e6a3cb8c9cf1a9aabb81395:
Merge tag 'pull-riscv-to-apply-20241107' of https://github.com/alistair23/qemu into staging (2024-11-07 15:08:05 +0000)
are available in the Git repository at:
https://gitlab.com/thuth/qemu.git tags/pull-request-2024-11-08
for you to fetch changes up to e7e76150a2e9642adf6763bcd8ca9a2a5d3b74b3:
ui/input-legacy.c: remove unused legacy qemu_add_kbd_event_handler() function (2024-11-08 11:06:42 +0100)
----------------------------------------------------------------
* Various fixes and improvements for the functional tests
* Refresh CI container files with the latest changes from libvirt-ci
* Clean up keyboard code of the next-cube machine to get rid of a legacy API (I know, the kbd patches are a little bit borderline for soft-freeze already, but since the next-cube machine is experimental anyway, I still opted for including them here)
----------------------------------------------------------------
Cédric Le Goater (1):
test/functional: Fix Aspeed buildroot tests
Daniel P. Berrangé (1):
tests: refresh package lists with latest libvirt-ci
Mark Cave-Ayland (2):
next-kbd: convert to use qemu_input_handler_register() ui/input-legacy.c: remove unused legacy qemu_add_kbd_event_handler() function
Phil Dennis-Jordan (1):
scripts/checkpatch.pl: Ignore ObjC #import lines for operator spacing
Thomas Huth (5):
tests/functional: Convert the riscv_opensbi avocado test into a standalone test tests/functional: Fix the ppc64_hv and the ppc_40p test for read-only assets tests/functional: Provide the user with hints where to find more log files tests/functional: Bump timeouts of functional tests tests/functional: Split the test_aarch64_sbsaref test
MAINTAINERS | 3 +- include/ui/console.h | 2 - hw/m68k/next-kbd.c | 158 +++++++++++++------- ui/input-legacy.c | 37 ----- .gitlab-ci.d/cirrus/freebsd-14.vars | 2 +- scripts/checkpatch.pl | 2 +- tests/avocado/riscv_opensbi.py | 63 -------- tests/docker/dockerfiles/debian-amd64-cross.docker | 8 +- tests/docker/dockerfiles/debian-arm64-cross.docker | 8 +- tests/docker/dockerfiles/debian-armhf-cross.docker | 8 +- tests/docker/dockerfiles/debian-i686-cross.docker | 8 +- .../dockerfiles/debian-mips64el-cross.docker | 7 +- .../docker/dockerfiles/debian-mipsel-cross.docker | 8 +- .../docker/dockerfiles/debian-ppc64el-cross.docker | 8 +- tests/docker/dockerfiles/debian-s390x-cross.docker | 8 +- tests/docker/dockerfiles/fedora-win64-cross.docker | 4 +- tests/functional/meson.build | 41 ++++-- tests/functional/qemu_test/testcase.py | 18 ++- tests/functional/test_aarch64_sbsaref.py | 159 +++++---------------- tests/functional/test_aarch64_sbsaref_alpine.py | 64 +++++++++ tests/functional/test_aarch64_sbsaref_freebsd.py | 66 +++++++++ tests/functional/test_arm_aspeed.py | 2 +- tests/functional/test_ppc64_hv.py | 3 +- tests/functional/test_ppc_40p.py | 3 +- tests/functional/test_riscv_opensbi.py | 36 +++++ tests/lcitool/libvirt-ci | 2 +- tests/lcitool/mappings.yml | 3 + tests/vm/generated/freebsd.json | 2 +- 28 files changed, 392 insertions(+), 341 deletions(-) delete mode 100644 tests/avocado/riscv_opensbi.py create mode 100755 tests/functional/test_aarch64_sbsaref_alpine.py create mode 100755 tests/functional/test_aarch64_sbsaref_freebsd.py mode change 100644 => 100755 tests/functional/test_arm_aspeed.py create mode 100755 tests/functional/test_riscv_opensbi.py
[PULL 04/10] tests/functional: Fix the ppc64_hv and the ppc_40p test for read-only assets
Since commit 786bc2255256, cached asset files are read-only, so now we've got to use "read-only=true" in tests that try to use these files directly.
Message-ID: <[email protected]>
--- tests/functional/test_ppc64_hv.py | 3 ++- tests/functional/test_ppc_40p.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
tests/functional/test_ppc64_hv.py +2 -1
@@ -99,7 +99,8 @@ def do_start_alpine(self): self.vm.add_args("-kernel", self.vmlinuz) self.vm.add_args("-initrd", self.initramfs) self.vm.add_args("-smp", "4", "-m", "2g") - self.vm.add_args("-drive", f"file={self.iso_path},format=raw,if=none,id=drive0") + self.vm.add_args("-drive", f"file={self.iso_path},format=raw,if=none," + "id=drive0,read-only=true") self.vm.launch() wait_for_console_pattern(self, 'Welcome to Alpine Linux 3.18')
tests/functional/test_ppc_40p.py +2 -1
@@ -46,7 +46,8 @@ def test_factory_firmware_and_netbsd(self): self.vm.set_console() self.vm.add_args('-bios', bios_path, - '-fda', drive_path) + '-drive', + f"file={drive_path},format=raw,if=floppy,read-only=true") self.vm.launch() os_banner = 'NetBSD 4.0 (GENERIC) #0: Sun Dec 16 00:49:40 PST 2007' wait_for_console_pattern(self, os_banner)
Signature · 1 line
2.47.0
[PULL 05/10] tests/functional: Provide the user with hints where to find more log files
In reply to Thomas HuthSince the base.log and console.log files are not referenced from the meson test logs yet, they might be hard to find for the casual users. Thus let's print some hints in case a test case failed. For this we have to run unittest.main() with exit=False to get the results of the testing. Then we can iterate through the failed test cases to print out the information accordingly.
Message-ID: <[email protected]>
--- tests/functional/qemu_test/testcase.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
tests/functional/qemu_test/testcase.py +13 -5
@@ -45,10 +45,10 @@ def setUp(self, bin_prefix): os.makedirs(self.workdir, exist_ok=True) self.logdir = self.workdir + self.log_filename = os.path.join(self.logdir, 'base.log') self.log = logging.getLogger('qemu-test') self.log.setLevel(logging.DEBUG) - self._log_fh = logging.FileHandler(os.path.join(self.logdir, - 'base.log'), mode='w') + self._log_fh = logging.FileHandler(self.log_filename, mode='w') self._log_fh.setLevel(logging.DEBUG) fileFormatter = logging.Formatter( '%(asctime)s - %(levelname)s: %(message)s')
@@ -68,7 +68,14 @@ def main(): tr = pycotap.TAPTestRunner(message_log = pycotap.LogMode.LogToError, test_output_log = pycotap.LogMode.LogToError) - unittest.main(module = None, testRunner = tr, argv=["__dummy__", path]) + res = unittest.main(module = None, testRunner = tr, exit = False, + argv=["__dummy__", path]) + for (test, message) in res.result.errors + res.result.failures: + print('More information on ' + test.id() + ' could be found here:' + '\n %s' % test.log_filename, file=sys.stderr) + if hasattr(test, 'console_log_name'): + print(' %s' % test.console_log_name, file=sys.stderr) + sys.exit(not res.result.wasSuccessful()) class QemuUserTest(QemuBaseTest):
@@ -101,8 +108,9 @@ def setUp(self): console_log = logging.getLogger('console') console_log.setLevel(logging.DEBUG) - self._console_log_fh = logging.FileHandler(os.path.join(self.workdir, - 'console.log'), mode='w') + self.console_log_name = os.path.join(self.workdir, 'console.log') + self._console_log_fh = logging.FileHandler(self.console_log_name, + mode='w') self._console_log_fh.setLevel(logging.DEBUG) fileFormatter = logging.Formatter('%(asctime)s: %(message)s') self._console_log_fh.setFormatter(fileFormatter)
Signature · 1 line
2.47.0
[PULL 03/10] test/functional: Fix Aspeed buildroot tests
In reply to Thomas HuthFrom: Cédric Le Goater <[email protected]>
Since commit 786bc2255256, cached asset files are read-only. Adjust the QEMU command line for buildroot tests to reflect the new constraint on the flash drive.
Message-ID: <[email protected]>
--- tests/functional/test_arm_aspeed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 tests/functional/test_arm_aspeed.py
tests/functional/test_arm_aspeed.py +1 -1
@@ -125,7 +125,7 @@ def test_arm_ast2500_romulus_openbmc_v2_9_0(self): def do_test_arm_aspeed_buildroot_start(self, image, cpu_id, pattern='Aspeed EVB'): self.require_netdev('user') self.vm.set_console() - self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw', + self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw,read-only=true', '-net', 'nic', '-net', 'user') self.vm.launch()
Signature · 1 line
2.47.0
[PULL 02/10] tests/functional: Convert the riscv_opensbi avocado test into a standalone test
In reply to Thomas HuthThe avocado test defined test functions for both, riscv32 and riscv64. Since we can run the whole file with multiple targets in the new framework, we can now consolidate the functions so we have to only define one function per machine now.
Message-ID: <[email protected]>
--- MAINTAINERS | 1 + tests/avocado/riscv_opensbi.py | 63 -------------------------- tests/functional/meson.build | 12 ++++- tests/functional/test_riscv_opensbi.py | 36 +++++++++++++++ 4 files changed, 47 insertions(+), 65 deletions(-) delete mode 100644 tests/avocado/riscv_opensbi.py create mode 100755 tests/functional/test_riscv_opensbi.py
MAINTAINERS +1 -0
@@ -329,6 +329,7 @@ F: hw/intc/riscv* F: include/hw/riscv/ F: linux-user/host/riscv32/ F: linux-user/host/riscv64/ +F: tests/functional/test_riscv* F: tests/tcg/riscv64/ RISC-V XThead* extensions
tests/avocado/riscv_opensbi.py deleted +0 -63
63 lines not on this page · raw message
tests/functional/meson.build +10 -2
@@ -146,18 +146,26 @@ tests_ppc64_system_thorough = [ 'ppc64_tuxrun', ] -tests_rx_system_thorough = [ - 'rx_gdbsim', +tests_riscv32_system_quick = [ + 'riscv_opensbi', ] tests_riscv32_system_thorough = [ 'riscv32_tuxrun', ] +tests_riscv64_system_quick = [ + 'riscv_opensbi', +] + tests_riscv64_system_thorough = [ 'riscv64_tuxrun', ] +tests_rx_system_thorough = [ + 'rx_gdbsim', +] + tests_s390x_system_thorough = [ 's390x_ccw_virtio', 's390x_topology',
tests/functional/test_riscv_opensbi.py new file +36 -0
@@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +# +# OpenSBI boot test for RISC-V machines +# +# Copyright (c) 2022, Ventana Micro +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +from qemu_test import QemuSystemTest +from qemu_test import wait_for_console_pattern + +class RiscvOpenSBI(QemuSystemTest): + + timeout = 5 + + def boot_opensbi(self): + self.vm.set_console() + self.vm.launch() + wait_for_console_pattern(self, 'Platform Name') + wait_for_console_pattern(self, 'Boot HART MEDELEG') + + def test_riscv_spike(self): + self.set_machine('spike') + self.boot_opensbi() + + def test_riscv_sifive_u(self): + self.set_machine('sifive_u') + self.boot_opensbi() + + def test_riscv_virt(self): + self.set_machine('virt') + self.boot_opensbi() + +if __name__ == '__main__': + QemuSystemTest.main()
Signature · 1 line
2.47.0
[PULL 01/10] scripts/checkpatch.pl: Ignore ObjC #import lines for operator spacing
In reply to Thomas HuthFrom: Phil Dennis-Jordan <[email protected]>
checkpatch.pl lints for spaces around operators including / (slash). Code lines starting with #include are ignored, as slashes in those represent path separators.
In Objective-C code, #import is often used in preference to #include, as preprocessor-based multiple-#include defenses are considered non-idiomatic in that language.
This change extends checkpatch.pl to treat #import lines in the same way as #include, avoiding false positives for "missing" spaces around path separators on those lines.
Message-ID: <[email protected]>
--- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/checkpatch.pl +1 -1
@@ -2246,7 +2246,7 @@ sub process { } } # Check operator spacing. - if (!($line=~/\#\s*include/)) { + if (!($line=~/\#\s*(include|import)/)) { my $ops = qr{ <<=|>>=|<=|>=|==|!=| \+=|-=|\*=|\/=|%=|\^=|\|=|&=|
Signature · 1 line
2.47.0
[PULL 09/10] next-kbd: convert to use qemu_input_handler_register()
In reply to Thomas HuthFrom: Mark Cave-Ayland <[email protected]>
Convert the next-kbd device from the legacy UI qemu_add_kbd_event_handler() function to use qemu_input_handler_register().
Message-ID: <[email protected]>
--- hw/m68k/next-kbd.c | 158 +++++++++++++++++++++++++++++---------------- 1 file changed, 103 insertions(+), 55 deletions(-)
hw/m68k/next-kbd.c +103 -55
@@ -68,7 +68,6 @@ struct NextKBDState {uint16_t shift; }; -static void queue_code (void *opaque,int code);/* lots of magic numbers here */ static uint32_t kbd_read_byte (void *opaque,hwaddr addr)
@@ -166,68 +165,70 @@ static const MemoryRegionOps kbd_ops = { .endianness = DEVICE_NATIVE_ENDIAN, }; -static void nextkbd_event (void *opaque,int ch) -{ -/* -* Will want to set vars for caps/num lock -* if (ch & 0x80) -> key release -* there's also e0 escaped scancodes that might need to be handled -*/ -queue_code (opaque, ch); -} - -static const unsigned char next_keycodes[128 ] = { -0x00 ,0x49 ,0x4A ,0x4B ,0x4C ,0x4D ,0x50 ,0x4F , -0x4E ,0x1E ,0x1F ,0x20 ,0x1D ,0x1C ,0x1B ,0x00 , -0x42 ,0x43 ,0x44 ,0x45 ,0x48 ,0x47 ,0x46 ,0x06 , -0x07 ,0x08 ,0x00 ,0x00 ,0x2A ,0x00 ,0x39 ,0x3A , -0x3B ,0x3C ,0x3D ,0x40 ,0x3F ,0x3E ,0x2D ,0x2C , -0x2B ,0x26 ,0x00 ,0x00 ,0x31 ,0x32 ,0x33 ,0x34 , -0x35 ,0x37 ,0x36 ,0x2e ,0x2f ,0x30 ,0x00 ,0x00 , -0x00 ,0x38 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , -0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , -0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , -0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , -0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 +static const int qcode_to_nextkbd_keycode[] = { + [Q_KEY_CODE_ESC ] =0x49 , + [Q_KEY_CODE_1 ] =0x4a , + [Q_KEY_CODE_2 ] =0x4b , + [Q_KEY_CODE_3 ] =0x4c , + [Q_KEY_CODE_4 ] =0x4d , + [Q_KEY_CODE_5 ] =0x50 , + [Q_KEY_CODE_6 ] =0x4f , + [Q_KEY_CODE_7 ] =0x4e , + [Q_KEY_CODE_8 ] =0x1e , + [Q_KEY_CODE_9 ] =0x1f , + [Q_KEY_CODE_0 ] =0x20 , + [Q_KEY_CODE_MINUS ] =0x1d , + [Q_KEY_CODE_EQUAL ] =0x1c , + [Q_KEY_CODE_BACKSPACE ] =0x1b , + + [Q_KEY_CODE_Q ] =0x42 , + [Q_KEY_CODE_W ] =0x43 , + [Q_KEY_CODE_E ] =0x44 , + [Q_KEY_CODE_R ] =0x45 , + [Q_KEY_CODE_T ] =0x48 , + [Q_KEY_CODE_Y ] =0x47 , + [Q_KEY_CODE_U ] =0x46 , + [Q_KEY_CODE_I ] =0x06 , + [Q_KEY_CODE_O ] =0x07 , + [Q_KEY_CODE_P ] =0x08 , + [Q_KEY_CODE_RET ] =0x2a , + [Q_KEY_CODE_A ] =0x39 , + [Q_KEY_CODE_S ] =0x3a , + + [Q_KEY_CODE_D ] =0x3b , + [Q_KEY_CODE_F ] =0x3c , + [Q_KEY_CODE_G ] =0x3d , + [Q_KEY_CODE_H ] =0x40 , + [Q_KEY_CODE_J ] =0x3f , + [Q_KEY_CODE_K ] =0x3e , + [Q_KEY_CODE_L ] =0x2d , + [Q_KEY_CODE_SEMICOLON ] =0x2c , + [Q_KEY_CODE_APOSTROPHE ] =0x2b , + [Q_KEY_CODE_GRAVE_ACCENT ] =0x26 , + [Q_KEY_CODE_Z ] =0x31 , + [Q_KEY_CODE_X ] =0x32 , + [Q_KEY_CODE_C ] =0x33 , + [Q_KEY_CODE_V ] =0x34 , + + [Q_KEY_CODE_B ] =0x35 , + [Q_KEY_CODE_N ] =0x37 , + [Q_KEY_CODE_M ] =0x36 , + [Q_KEY_CODE_COMMA ] =0x2e , + [Q_KEY_CODE_DOT ] =0x2f , + [Q_KEY_CODE_SLASH ] =0x30 , + + [Q_KEY_CODE_SPC ] =0x38 , }; -static void queue_code (void *opaque,int code) +static void nextkbd_put_keycode (NextKBDState *s,int keycode) { -NextKBDState *s =NEXTKBD (opaque);KBDQueue *q = &s->queue; -int key = code &KD_KEYMASK ; -int release = code &0x80 ; -static int ext; - -if (code ==0xE0 ) { - ext =1 ; - } - -if (code ==0x2A || code ==0x1D || code ==0x36 ) { -if (code ==0x2A ) { - s->shift =KD_LSHIFT ; - }else if (code ==0x36 ) { - s->shift =KD_RSHIFT ; - ext =0 ; - }else if (code ==0x1D && !ext) { - s->shift =KD_LCOMM ; - }else if (code ==0x1D && ext) { - ext =0 ; - s->shift =KD_RCOMM ; - } -return ; - }else if (code == (0x2A |0x80 ) || code == (0x1D |0x80 ) || - code == (0x36 |0x80 )) { - s->shift =0 ; -return ; - }if (q->count >=KBD_QUEUE_SIZE ) {return ; } - q->data[q->wptr] = next_keycodes[key] | release; - + q->data[q->wptr] = keycode;if (++q->wptr ==KBD_QUEUE_SIZE ) { q->wptr =0 ; }
@@ -241,6 +242,53 @@ static void queue_code(void *opaque, int code)/* s->update_irq(s->update_arg, 1); */ } +static void nextkbd_event (DeviceState *dev,QemuConsole *src,InputEvent *evt) +{ +NextKBDState *s =NEXTKBD (dev); +int qcode, keycode; +bool key_down = evt->u.key.data->down; + + qcode =qemu_input_key_value_to_qcode (evt->u.key.data->key); +if (qcode >=ARRAY_SIZE (qcode_to_nextkbd_keycode)) { +return ; + } + +/* Shift key currently has no keycode, so handle separately */ +if (qcode ==Q_KEY_CODE_SHIFT ) { +if (key_down) { + s->shift |=KD_LSHIFT ; + }else { + s->shift &= ~KD_LSHIFT ; + } + } + +if (qcode ==Q_KEY_CODE_SHIFT_R ) { +if (key_down) { + s->shift |=KD_RSHIFT ; + }else { + s->shift &= ~KD_RSHIFT ; + } + } + + keycode = qcode_to_nextkbd_keycode[qcode]; +if (!keycode) { +return ; + } + +/* If key release event, create keyboard break code */ +if (!key_down) { + keycode |=0x80 ; + } + +nextkbd_put_keycode (s, keycode); +} + +static const QemuInputHandler nextkbd_handler = { + .name ="QEMU NeXT Keyboard" , + .mask =INPUT_EVENT_MASK_KEY , + .event = nextkbd_event, +}; +static void nextkbd_reset (DeviceState *dev) {NextKBDState *nks =NEXTKBD (dev);
@@ -256,7 +304,7 @@ static void nextkbd_realize(DeviceState *dev, Error **errp)memory_region_init_io (&s->mr,OBJECT (dev), &kbd_ops, s,"next.kbd" ,0x1000 );sysbus_init_mmio (SYS_BUS_DEVICE (dev), &s->mr); -qemu_add_kbd_event_handler (nextkbd_event, s); +qemu_input_handler_register (dev, &nextkbd_handler); }static const VMStateDescription nextkbd_vmstate = {
Signature · 1 line
2.47.0
[PULL 10/10] ui/input-legacy.c: remove unused legacy qemu_add_kbd_event_handler() function
In reply to Thomas HuthFrom: Mark Cave-Ayland <[email protected]>
Since the last keyboard device has now been converted over to use qemu_input_handler_register(), the legacy qemu_add_kbd_event_handler() function is now unused and can be removed.
Message-ID: <[email protected]>
--- include/ui/console.h | 2 -- ui/input-legacy.c | 37 ------------------------------------- 2 files changed, 39 deletions(-)
include/ui/console.h +0 -2
@@ -70,8 +70,6 @@ typedef struct QEMUPutMouseEntry QEMUPutMouseEntry;typedef struct QEMUPutKbdEntry QEMUPutKbdEntry ;typedef struct QEMUPutLEDEntry QEMUPutLEDEntry ; -QEMUPutKbdEntry *qemu_add_kbd_event_handler (QEMUPutKBDEvent *func, -void *opaque);QEMUPutMouseEntry *qemu_add_mouse_event_handler (QEMUPutMouseEvent *func,void *opaque,int absolute,const char *name);
ui/input-legacy.c +0 -37
@@ -109,43 +109,6 @@ void qmp_send_key(KeyValueList *keys, bool has_hold_time, int64_t hold_time,g_free (up); } -static void legacy_kbd_event (DeviceState *dev,QemuConsole *src, -InputEvent *evt) -{ -QEMUPutKbdEntry *entry = (QEMUPutKbdEntry *)dev; -int scancodes[3 ], i, count; -InputKeyEvent *key = evt->u.key.data; - -if (!entry || !entry->put_kbd) { -return ; - } - count =qemu_input_key_value_to_scancode (key->key, - key->down, - scancodes); -for (i =0 ; i < count; i++) { - entry->put_kbd (entry->opaque, scancodes[i]); - } -} - -static const QemuInputHandler legacy_kbd_handler = { - .name ="legacy-kbd" , - .mask =INPUT_EVENT_MASK_KEY , - .event = legacy_kbd_event, -}; - -QEMUPutKbdEntry *qemu_add_kbd_event_handler (QEMUPutKBDEvent *func,void *opaque) -{ -QEMUPutKbdEntry *entry; - - entry =g_new0 (QEMUPutKbdEntry,1 ); - entry->put_kbd = func; - entry->opaque = opaque; - entry->s =qemu_input_handler_register ((DeviceState *)entry, - &legacy_kbd_handler); -qemu_input_handler_activate (entry->s); -return entry; -} -static void legacy_mouse_event (DeviceState *dev,QemuConsole *src,InputEvent *evt) {
Signature · 1 line
2.47.0
[PULL 06/10] tests/functional: Bump timeouts of functional tests
In reply to Thomas HuthWhen building QEMU with "--enable-debug" and running the tests in parallel with "make -j$(nproc) check-functional", many tests are still timing out due to our conservative timeout settings. Bump the timeouts of the problematic tests and also increase the default timeout to 90 seconds (from 60 seconds) to be on the safe side.
Message-ID: <[email protected]>
--- tests/functional/meson.build | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-)
tests/functional/meson.build +13 -11
@@ -11,24 +11,26 @@ endif # Timeouts for individual tests that can be slow e.g. with debugging enabled test_timeouts = { - 'aarch64_raspi4' : 120, + 'aarch64_raspi4' : 480, 'aarch64_sbsaref' : 600, - 'aarch64_virt' : 360, - 'acpi_bits' : 240, + 'aarch64_virt' : 720, + 'acpi_bits' : 420, 'arm_aspeed' : 600, - 'arm_bpim2u' : 360, + 'arm_bpim2u' : 500, + 'arm_collie' : 180, 'arm_orangepi' : 540, 'arm_raspi2' : 120, - 'arm_tuxrun' : 120, + 'arm_tuxrun' : 240, 'arm_sx1' : 360, 'mips_malta' : 120, 'netdev_ethtool' : 180, 'ppc_40p' : 240, 'ppc64_hv' : 1000, - 'ppc64_powernv' : 240, - 'ppc64_pseries' : 240, - 'ppc64_tuxrun' : 240, - 's390x_ccw_virtio' : 240, + 'ppc64_powernv' : 480, + 'ppc64_pseries' : 480, + 'ppc64_tuxrun' : 420, + 'riscv64_tuxrun' : 120, + 's390x_ccw_virtio' : 420, } tests_generic_system = [
@@ -281,8 +283,8 @@ foreach speed : ['quick', 'thorough'] env: test_env, args: [testpath], protocol: 'tap', - timeout: test_timeouts.get(test, 60), - priority: test_timeouts.get(test, 60), + timeout: test_timeouts.get(test, 90), + priority: test_timeouts.get(test, 90), suite: suites) endforeach endforeach
Signature · 1 line
2.47.0
[PULL 08/10] tests: refresh package lists with latest libvirt-ci
In reply to Thomas HuthFrom: Daniel P. Berrangé <[email protected]>
This updates the libvirt-ci submodule to pull in various fixes, the most notable reducing native package sets in cross builds. Some packages were mistakenly marked as native, rather than foreign, in libvirt-ci. Fixing this causes our dockerfiles to pick up the cross arch package instead of native one, thus improving our test coverage in a few areas.
Message-ID: <[email protected]>
--- .gitlab-ci.d/cirrus/freebsd-14.vars | 2 +- tests/docker/dockerfiles/debian-amd64-cross.docker | 8 ++++---- tests/docker/dockerfiles/debian-arm64-cross.docker | 8 ++++---- tests/docker/dockerfiles/debian-armhf-cross.docker | 8 ++++---- tests/docker/dockerfiles/debian-i686-cross.docker | 8 ++++---- tests/docker/dockerfiles/debian-mips64el-cross.docker | 7 +++---- tests/docker/dockerfiles/debian-mipsel-cross.docker | 8 ++++---- tests/docker/dockerfiles/debian-ppc64el-cross.docker | 8 ++++---- tests/docker/dockerfiles/debian-s390x-cross.docker | 8 ++++---- tests/docker/dockerfiles/fedora-win64-cross.docker | 4 +--- tests/lcitool/libvirt-ci | 2 +- tests/lcitool/mappings.yml | 3 +++ tests/vm/generated/freebsd.json | 2 +- 13 files changed, 38 insertions(+), 38 deletions(-)
.gitlab-ci.d/cirrus/freebsd-14.vars +1 -1
@@ -10,7 +10,7 @@ CROSS_PKGS='' MAKE='/usr/local/bin/gmake' NINJA='/usr/local/bin/ninja' PACKAGING_COMMAND='pkg' -PIP3='/usr/local/bin/pip-3.8' +PIP3='/usr/local/bin/pip' PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk-vnc gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson mtools ncurses nettle ninja opencv pixman pkgconf png py311-numpy py311-pillow py311-pip py311-pyyaml py311-sphinx py311-sphinx_rtd_theme py311-tomli python3 rpm2cpio rust rust-bindgen-cli sdl2 sdl2_image snappy sndio socat spice-protocol tesseract usbredir virglrenderer vte3 xorriso zstd' PYPI_PKGS='' PYTHON='/usr/local/bin/python3'
tests/docker/dockerfiles/debian-amd64-cross.docker +4 -4
@@ -31,10 +31,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ git \ hostname \ libglib2.0-dev \ - libgtk-vnc-2.0-dev \ - libpcre2-dev \ - libsndio-dev \ - libspice-protocol-dev \ llvm \ locales \ make \
@@ -109,6 +105,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libglusterfs-dev:amd64 \ libgnutls28-dev:amd64 \ libgtk-3-dev:amd64 \ + libgtk-vnc-2.0-dev:amd64 \ libibverbs-dev:amd64 \ libiscsi-dev:amd64 \ libjemalloc-dev:amd64 \
@@ -120,6 +117,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libnfs-dev:amd64 \ libnuma-dev:amd64 \ libpam0g-dev:amd64 \ + libpcre2-dev:amd64 \ libpipewire-0.3-dev:amd64 \ libpixman-1-dev:amd64 \ libpmem-dev:amd64 \
@@ -134,6 +132,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libselinux1-dev:amd64 \ libslirp-dev:amd64 \ libsnappy-dev:amd64 \ + libsndio-dev:amd64 \ + libspice-protocol-dev:amd64 \ libspice-server-dev:amd64 \ libssh-gcrypt-dev:amd64 \ libsystemd-dev:amd64 \
tests/docker/dockerfiles/debian-arm64-cross.docker +4 -4
@@ -31,10 +31,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ git \ hostname \ libglib2.0-dev \ - libgtk-vnc-2.0-dev \ - libpcre2-dev \ - libsndio-dev \ - libspice-protocol-dev \ llvm \ locales \ make \
@@ -109,6 +105,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libglusterfs-dev:arm64 \ libgnutls28-dev:arm64 \ libgtk-3-dev:arm64 \ + libgtk-vnc-2.0-dev:arm64 \ libibverbs-dev:arm64 \ libiscsi-dev:arm64 \ libjemalloc-dev:arm64 \
@@ -120,6 +117,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libnfs-dev:arm64 \ libnuma-dev:arm64 \ libpam0g-dev:arm64 \ + libpcre2-dev:arm64 \ libpipewire-0.3-dev:arm64 \ libpixman-1-dev:arm64 \ libpng-dev:arm64 \
@@ -133,6 +131,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libselinux1-dev:arm64 \ libslirp-dev:arm64 \ libsnappy-dev:arm64 \ + libsndio-dev:arm64 \ + libspice-protocol-dev:arm64 \ libspice-server-dev:arm64 \ libssh-gcrypt-dev:arm64 \ libsystemd-dev:arm64 \
tests/docker/dockerfiles/debian-armhf-cross.docker +4 -4
@@ -31,10 +31,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ git \ hostname \ libglib2.0-dev \ - libgtk-vnc-2.0-dev \ - libpcre2-dev \ - libsndio-dev \ - libspice-protocol-dev \ llvm \ locales \ make \
@@ -109,6 +105,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libglusterfs-dev:armhf \ libgnutls28-dev:armhf \ libgtk-3-dev:armhf \ + libgtk-vnc-2.0-dev:armhf \ libibverbs-dev:armhf \ libiscsi-dev:armhf \ libjemalloc-dev:armhf \
@@ -120,6 +117,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libnfs-dev:armhf \ libnuma-dev:armhf \ libpam0g-dev:armhf \ + libpcre2-dev:armhf \ libpipewire-0.3-dev:armhf \ libpixman-1-dev:armhf \ libpng-dev:armhf \
@@ -133,6 +131,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libselinux1-dev:armhf \ libslirp-dev:armhf \ libsnappy-dev:armhf \ + libsndio-dev:armhf \ + libspice-protocol-dev:armhf \ libspice-server-dev:armhf \ libssh-gcrypt-dev:armhf \ libsystemd-dev:armhf \
tests/docker/dockerfiles/debian-i686-cross.docker +4 -4
@@ -31,10 +31,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ git \ hostname \ libglib2.0-dev \ - libgtk-vnc-2.0-dev \ - libpcre2-dev \ - libsndio-dev \ - libspice-protocol-dev \ llvm \ locales \ make \
@@ -109,6 +105,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libglusterfs-dev:i386 \ libgnutls28-dev:i386 \ libgtk-3-dev:i386 \ + libgtk-vnc-2.0-dev:i386 \ libibverbs-dev:i386 \ libiscsi-dev:i386 \ libjemalloc-dev:i386 \
@@ -120,6 +117,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libnfs-dev:i386 \ libnuma-dev:i386 \ libpam0g-dev:i386 \ + libpcre2-dev:i386 \ libpipewire-0.3-dev:i386 \ libpixman-1-dev:i386 \ libpng-dev:i386 \
@@ -133,6 +131,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libselinux1-dev:i386 \ libslirp-dev:i386 \ libsnappy-dev:i386 \ + libsndio-dev:i386 \ + libspice-protocol-dev:i386 \ libspice-server-dev:i386 \ libssh-gcrypt-dev:i386 \ libsystemd-dev:i386 \
tests/docker/dockerfiles/debian-mips64el-cross.docker +3 -4
@@ -31,10 +31,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ git \ hostname \ libglib2.0-dev \ - libgtk-vnc-2.0-dev \ - libpcre2-dev \ - libsndio-dev \ - libspice-protocol-dev \ llvm \ locales \ make \
@@ -115,6 +111,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libnfs-dev:mips64el \ libnuma-dev:mips64el \ libpam0g-dev:mips64el \ + libpcre2-dev:mips64el \ libpipewire-0.3-dev:mips64el \ libpixman-1-dev:mips64el \ libpng-dev:mips64el \
@@ -126,6 +123,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libselinux1-dev:mips64el \ libslirp-dev:mips64el \ libsnappy-dev:mips64el \ + libsndio-dev:mips64el \ + libspice-protocol-dev:mips64el \ libspice-server-dev:mips64el \ libssh-gcrypt-dev:mips64el \ libsystemd-dev:mips64el \
tests/docker/dockerfiles/debian-mipsel-cross.docker +4 -4
@@ -31,10 +31,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ git \ hostname \ libglib2.0-dev \ - libgtk-vnc-2.0-dev \ - libpcre2-dev \ - libsndio-dev \ - libspice-protocol-dev \ llvm \ locales \ make \
@@ -108,6 +104,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libglusterfs-dev:mipsel \ libgnutls28-dev:mipsel \ libgtk-3-dev:mipsel \ + libgtk-vnc-2.0-dev:mipsel \ libibverbs-dev:mipsel \ libiscsi-dev:mipsel \ libjemalloc-dev:mipsel \
@@ -119,6 +116,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libnfs-dev:mipsel \ libnuma-dev:mipsel \ libpam0g-dev:mipsel \ + libpcre2-dev:mipsel \ libpipewire-0.3-dev:mipsel \ libpixman-1-dev:mipsel \ libpng-dev:mipsel \
@@ -132,6 +130,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libselinux1-dev:mipsel \ libslirp-dev:mipsel \ libsnappy-dev:mipsel \ + libsndio-dev:mipsel \ + libspice-protocol-dev:mipsel \ libspice-server-dev:mipsel \ libssh-gcrypt-dev:mipsel \ libsystemd-dev:mipsel \
tests/docker/dockerfiles/debian-ppc64el-cross.docker +4 -4
@@ -31,10 +31,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ git \ hostname \ libglib2.0-dev \ - libgtk-vnc-2.0-dev \ - libpcre2-dev \ - libsndio-dev \ - libspice-protocol-dev \ llvm \ locales \ make \
@@ -109,6 +105,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libglusterfs-dev:ppc64el \ libgnutls28-dev:ppc64el \ libgtk-3-dev:ppc64el \ + libgtk-vnc-2.0-dev:ppc64el \ libibverbs-dev:ppc64el \ libiscsi-dev:ppc64el \ libjemalloc-dev:ppc64el \
@@ -120,6 +117,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libnfs-dev:ppc64el \ libnuma-dev:ppc64el \ libpam0g-dev:ppc64el \ + libpcre2-dev:ppc64el \ libpipewire-0.3-dev:ppc64el \ libpixman-1-dev:ppc64el \ libpng-dev:ppc64el \
@@ -133,6 +131,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libselinux1-dev:ppc64el \ libslirp-dev:ppc64el \ libsnappy-dev:ppc64el \ + libsndio-dev:ppc64el \ + libspice-protocol-dev:ppc64el \ libspice-server-dev:ppc64el \ libssh-gcrypt-dev:ppc64el \ libsystemd-dev:ppc64el \
tests/docker/dockerfiles/debian-s390x-cross.docker +4 -4
@@ -31,10 +31,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ git \ hostname \ libglib2.0-dev \ - libgtk-vnc-2.0-dev \ - libpcre2-dev \ - libsndio-dev \ - libspice-protocol-dev \ llvm \ locales \ make \
@@ -109,6 +105,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libglusterfs-dev:s390x \ libgnutls28-dev:s390x \ libgtk-3-dev:s390x \ + libgtk-vnc-2.0-dev:s390x \ libibverbs-dev:s390x \ libiscsi-dev:s390x \ libjemalloc-dev:s390x \
@@ -120,6 +117,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libnfs-dev:s390x \ libnuma-dev:s390x \ libpam0g-dev:s390x \ + libpcre2-dev:s390x \ libpipewire-0.3-dev:s390x \ libpixman-1-dev:s390x \ libpng-dev:s390x \
@@ -133,6 +131,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libselinux1-dev:s390x \ libslirp-dev:s390x \ libsnappy-dev:s390x \ + libsndio-dev:s390x \ + libspice-protocol-dev:s390x \ libssh-gcrypt-dev:s390x \ libsystemd-dev:s390x \ libtasn1-6-dev:s390x \
tests/docker/dockerfiles/fedora-win64-cross.docker +1 -3
@@ -35,7 +35,6 @@ exec "$@"\n' > /usr/bin/nosync && \ git \ glib2-devel \ glibc-langpack-en \ - gtk-vnc2-devel \ hostname \ llvm \ make \
@@ -44,7 +43,6 @@ exec "$@"\n' > /usr/bin/nosync && \ ninja-build \ nmap-ncat \ openssh-clients \ - pcre-static \ python3 \ python3-PyYAML \ python3-numpy \
@@ -58,7 +56,6 @@ exec "$@"\n' > /usr/bin/nosync && \ sed \ socat \ sparse \ - spice-protocol \ swtpm \ tar \ tesseract \
@@ -89,6 +86,7 @@ RUN nosync dnf install -y \ mingw64-gettext \ mingw64-glib2 \ mingw64-gnutls \ + mingw64-gtk-vnc2 \ mingw64-gtk3 \ mingw64-libepoxy \ mingw64-libgcrypt \
tests/lcitool/libvirt-ci +1 -1
@@ -1 +1 @@ -Subproject commit 6b19006b2cbe01adea6a857c71860a8e7ba7ddd7 +Subproject commit 9ad3f70bde9865d5ad18f36d256d472e72b5cbf3
tests/lcitool/mappings.yml +3 -0
@@ -17,6 +17,9 @@ mappings: libepoxy: mips64el-deb: + gtk-vnc: + mips64el-deb: + mesa-libgbm: mips64el-deb:
tests/vm/generated/freebsd.json +1 -1
@@ -5,7 +5,7 @@ "make": "/usr/local/bin/gmake", "ninja": "/usr/local/bin/ninja", "packaging_command": "pkg", - "pip3": "/usr/local/bin/pip-3.8", + "pip3": "/usr/local/bin/pip", "pkgs": [ "alsa-lib", "bash",
Signature · 1 line
2.47.0
[PULL 07/10] tests/functional: Split the test_aarch64_sbsaref test
In reply to Thomas HuthThe test_aarch64_sbsaref test is the test with the longest runtime in our functional test suite. Split it into parts so that it can be run on multiple CPUs in parallel.
For this we have to move the fetch_firmware() function out of the class definition to be able to reuse it easily from the other tests (deriving the Aarch64SbsarefAlpine and Aarch64SbsarefFreeBSD directly from Aarch64SbsarefMachine does not work, unfortunately, since we'd inherit the test_sbsaref_edk2_firmware() function that way, causing it to be run multiple times - and keeping the fetch_firmware() in a separate class without the test_sbsaref_edk2_firmware() function also does not work since the "make precache-functional" won't work in that case ==> turning fetch_firmware() into a static function is the best option).
Message-ID: <[email protected]>
--- MAINTAINERS | 2 +- tests/functional/meson.build | 5 +- tests/functional/test_aarch64_sbsaref.py | 159 ++++-------------- .../functional/test_aarch64_sbsaref_alpine.py | 64 +++++++ .../test_aarch64_sbsaref_freebsd.py | 66 ++++++++ 5 files changed, 172 insertions(+), 124 deletions(-) create mode 100755 tests/functional/test_aarch64_sbsaref_alpine.py create mode 100755 tests/functional/test_aarch64_sbsaref_freebsd.py
MAINTAINERS +1 -1
@@ -924,7 +924,7 @@ F: hw/misc/sbsa_ec.c F: hw/watchdog/sbsa_gwdt.c F: include/hw/watchdog/sbsa_gwdt.h F: docs/system/arm/sbsa.rst -F: tests/functional/test_aarch64_sbsaref.py +F: tests/functional/test_aarch64_sbsaref*.py Sharp SL-5500 (Collie) PDA M: Peter Maydell <[email protected]>
tests/functional/meson.build +4 -1
@@ -12,7 +12,8 @@ endif # Timeouts for individual tests that can be slow e.g. with debugging enabled test_timeouts = { 'aarch64_raspi4' : 480, - 'aarch64_sbsaref' : 600, + 'aarch64_sbsaref_alpine' : 720, + 'aarch64_sbsaref_freebsd' : 720, 'aarch64_virt' : 720, 'acpi_bits' : 420, 'arm_aspeed' : 600,
@@ -49,6 +50,8 @@ tests_aarch64_system_thorough = [ 'aarch64_raspi3', 'aarch64_raspi4', 'aarch64_sbsaref', + 'aarch64_sbsaref_alpine', + 'aarch64_sbsaref_freebsd', 'aarch64_virt', 'multiprocess', ]
tests/functional/test_aarch64_sbsaref.py +37 -122
178 lines not on this page · raw message
tests/functional/test_aarch64_sbsaref_alpine.py new file +64 -0
64 lines not on this page · raw message
tests/functional/test_aarch64_sbsaref_freebsd.py new file +66 -0
66 lines not on this page · raw message
Signature · 1 line
2.47.0
Peter Maydell
AppliedQuoted 23 lines · Thomas Huth
Hi Peter!
The following changes since commit
feef1866d1366d651e6a3cb8c9cf1a9aabb81395:Merge tag 'pull-riscv-to-apply-20241107' of https://github.com/alistair23/qemu into staging (2024-11-07 15:08:05 +0000)
are available in the Git repository at:
https://gitlab.com/thuth/qemu.git tags/pull-request-2024-11-08
for you to fetch changes up to
e7e76150a2e9642adf6763bcd8ca9a2a5d3b74b3:
ui/input-legacy.c: remove unused legacyqemu_add_kbd_event_handler()function (2024-11-08 11:06:42 +0100)----------------------------------------------------------------
* Various fixes and improvements for the functional tests
* Refresh CI container files with the latest changes from libvirt-ci
* Clean up keyboard code of the next-cube machine to get rid of a legacy API (I know, the kbd patches are a little bit borderline for soft-freeze already, but since the next-cube machine is experimental anyway, I still opted for including them here)
Quoted 1 line
----------------------------------------------------------------
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/9.2
for any user-visible changes.
-- PMM