testing/next: functional tests, qtest clocks, vm and keymaps (pre-PR-FINAL)
Subsystems (2)
v4 cover testing/next: functional tests, qtest clocks, vm and keymaps (pre-PR-FINAL)
There are number of parts to this series.
The first is the updated images for all the guests that didn't make it into 9.2. There are also some new functional tests for virtio-gpu along with some other clean-ups.
The qtest patches focus on ensuring things calling clock_step and clock_set actually pay attention to return values. The virtio tests needed a little little re-jigging as they don't need timeout loops at all (v2).
We bump libvirt-ci so we can move the riscv64 cross container to testing/trixie which will hopefully make the image less prone to sid breakages.
Finally we make a few tweaks to tests/vm which were helpful when chasing the keymap issue. I still think there is a race condition in there somewhere as I can't reliably build the FreeBSD VMs from scratch.
The pc-bios dependency fixup I think addresses the failure but I'm a little unsure about the meason stuff.
I did a v4 re-spin because I split apart some unrelated changes. I still plan to send the PR at the end of the week.
For v2
- add test/vm and lcitool updates
- don't move clock_step, remove them for virtio tests
For v3
- review comments and checkpatch fixes
- MAINTAINERS updates
- add zstd uncompress function and use it
For v4
- split unrelated changes from vulkan tests
- use utility functions for tuxruntest
The following still need review:
tests/functional: update tuxruntest to use uncompress utility
pc-bios: ensure keymaps dependencies set vnc tests tests/vm: allow interactive login as root
tests/vm: partially un-tabify help output tests/docker: move riscv64 cross container from sid to trixie tests/functional: extend test_aarch64_virt with vulkan test tests/functional: bail aarch64_virt tests early if missing TCG tests/functional: remove unused kernel_command_line tests/functional: add zstd support to uncompress utility
Alex.
Alex Bennée (28):
tests/functional: update the arm tuxrun tests tests/functional: update the i386 tuxrun tests tests/functional: add a m68k tuxrun tests tests/functional: update the mips32 tuxrun tests tests/functional: update the mips32el tuxrun tests tests/functional: update the mips64 tuxrun tests tests/functional: update the mips64el tuxrun tests tests/functional: update the ppc32 tuxrun tests tests/functional: update the ppc64 tuxrun tests tests/functional: update the riscv32 tuxrun tests tests/functional: update the riscv64 tuxrun tests tests/functional: update the s390x tuxrun tests tests/functional: update the sparc64 tuxrun tests tests/functional: update the x86_64 tuxrun tests tests/qtest: remove clock_steps from virtio tests system/qtest: properly feedback results of clock_[step|set] tests/functional: remove hacky sleep from the tests tests/functional: add zstd support to uncompress utility tests/functional: update tuxruntest to use uncompress utility tests/functional: remove unused kernel_command_line tests/functional: bail aarch64_virt tests early if missing TCG tests/functional: extend test_aarch64_virt with vulkan test tests/lcitool: bump to latest version of libvirt-ci tests/docker: move riscv64 cross container from sid to trixie tests/vm: fix build_path based path
tests/vm: partially un-tabify help output
tests/vm: allow interactive login as root
pc-bios: ensure keymaps dependencies set vnc tests
Daniel P. Berrangé (1):
tests/lcitool: remove temp workaround for debian mips64el
Philippe Mathieu-Daudé (1):
dockerfiles: Remove 'MAINTAINER' entry in debian-tricore-cross.docker
Pierrick Bouvier (1):
tests/functional/aarch64: add tests for FEAT_RME
Wainer dos Santos Moschetta (1):
MAINTAINERS: Remove myself from reviewers
MAINTAINERS | 3 +- system/qtest.c | 23 ++-- tests/qtest/libqos/virtio.c | 4 - .gitlab-ci.d/cirrus/freebsd-14.vars | 2 +- pc-bios/keymaps/meson.build | 17 ++- .../dockerfiles/debian-mips64el-cross.docker | 9 ++ .../dockerfiles/debian-riscv64-cross.docker | 4 +- .../dockerfiles/debian-tricore-cross.docker | 2 - tests/functional/meson.build | 5 + tests/functional/qemu_test/tuxruntest.py | 12 +- tests/functional/qemu_test/uncompress.py | 26 ++++ tests/functional/test_aarch64_rme_sbsaref.py | 69 +++++++++++ tests/functional/test_aarch64_rme_virt.py | 98 +++++++++++++++ tests/functional/test_aarch64_virt.py | 117 ++++++++++++++---- tests/functional/test_arm_tuxrun.py | 28 ++--- tests/functional/test_i386_tuxrun.py | 8 +- tests/functional/test_m68k_tuxrun.py | 34 +++++ tests/functional/test_mips64_tuxrun.py | 8 +- tests/functional/test_mips64el_tuxrun.py | 8 +- tests/functional/test_mips_tuxrun.py | 8 +- tests/functional/test_mipsel_tuxrun.py | 8 +- tests/functional/test_ppc64_tuxrun.py | 16 +-- tests/functional/test_ppc_tuxrun.py | 8 +- tests/functional/test_riscv32_tuxrun.py | 8 +- tests/functional/test_riscv64_tuxrun.py | 16 +-- tests/functional/test_s390x_tuxrun.py | 8 +- tests/functional/test_sparc64_tuxrun.py | 8 +- tests/functional/test_x86_64_tuxrun.py | 8 +- tests/lcitool/libvirt-ci | 2 +- tests/lcitool/mappings.yml | 29 ----- tests/lcitool/refresh | 4 +- tests/qtest/meson.build | 2 +- tests/vm/Makefile.include | 29 ++--- tests/vm/basevm.py | 12 +- tests/vm/generated/freebsd.json | 2 +- 35 files changed, 463 insertions(+), 182 deletions(-) create mode 100755 tests/functional/test_aarch64_rme_sbsaref.py create mode 100755 tests/functional/test_aarch64_rme_virt.py create mode 100644 tests/functional/test_m68k_tuxrun.py
Signature · 1 line
2.39.5
PATCH v4 1/32 tests/functional: update the arm tuxrun tests
Now there are new up to date images available we should update to them.
Message-Id: <[email protected]>
--- tests/functional/test_arm_tuxrun.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
tests/functional/test_arm_tuxrun.py +14 -14
@@ -17,14 +17,14 @@ class TuxRunArmTest(TuxRunBaselineTest): ASSET_ARMV5_KERNEL = Asset( - 'https://storage.tuxboot.com/20230331/armv5/zImage', - 'c95af2f27647c12265d75e9df44c22ff5228c59855f54aaa70f41ec2842e3a4d') + 'https://storage.tuxboot.com/buildroot/20241119/armv5/zImage', + '3931a3908dbcf0ec0fe292d035ffc4dfed95f797dedd4a59ccfcf7a46e6f92d4') ASSET_ARMV5_ROOTFS = Asset( - 'https://storage.tuxboot.com/20230331/armv5/rootfs.ext4.zst', - '17177afa74e7294da0642861f08c88ca3c836764299a54bf6d1ce276cb9712a5') + 'https://storage.tuxboot.com/buildroot/20241119/armv5/rootfs.ext4.zst', + '60ff78b68c7021df378e4fc2d66d3b016484d1acc7e07fb8920c1d8e30f4571f') ASSET_ARMV5_DTB = Asset( - 'https://storage.tuxboot.com/20230331/armv5/versatile-pb.dtb', - '0bc0c0b0858cefd3c32b385c0d66d97142ded29472a496f4f490e42fc7615b25') + 'https://storage.tuxboot.com/buildroot/20241119/armv5/versatile-pb.dtb', + '50988e69ef3f3b08bfb9146e8fe414129990029e8dfbed444953b7e14809530a') def test_armv5(self): self.set_machine('versatilepb')
@@ -37,11 +37,11 @@ def test_armv5(self): drive="virtio-blk-pci") ASSET_ARMV7_KERNEL = Asset( - 'https://storage.tuxboot.com/20230331/armv7/zImage', - '4c7a22e9f15875bec06bd2a29d822496571eb297d4f22694099ffcdb19077572') + 'https://storage.tuxboot.com/buildroot/20241119/armv7/zImage', + '1377bc3d90de5ce57ab17cd67429fe8b15c2e9964248c775c682b67e6299b991') ASSET_ARMV7_ROOTFS = Asset( - 'https://storage.tuxboot.com/20230331/armv7/rootfs.ext4.zst', - 'ab1fbbeaddda1ffdd45c9405a28cd5370c20f23a7cbc809cc90dc9f243a8eb5a') + 'https://storage.tuxboot.com/buildroot/20241119/armv7/rootfs.ext4.zst', + 'ed2cbc69bd6b3fbd5cafb5ee961393c7cfbe726446f14301c67d6b1f28bfdb51') def test_armv7(self): self.set_machine('virt')
@@ -52,11 +52,11 @@ def test_armv7(self): rootfs_asset=self.ASSET_ARMV7_ROOTFS) ASSET_ARMV7BE_KERNEL = Asset( - 'https://storage.tuxboot.com/20230331/armv7be/zImage', - '7facc62082b57af12015b08f7fdbaf2f123ba07a478367853ae12b219afc9f2f') + 'https://storage.tuxboot.com/buildroot/20241119/armv7be/zImage', + 'a244e6da99f1bbd254827ec7681bd4aac9eb1aa05aaebc6b15e5d289ebb683f3') ASSET_ARMV7BE_ROOTFS = Asset( - 'https://storage.tuxboot.com/20230331/armv7be/rootfs.ext4.zst', - '42ed46dd2d59986206c5b1f6cf35eab58fe3fd20c96b41aaa16b32f3f90a9835') + 'https://storage.tuxboot.com/buildroot/20241119/armv7be/rootfs.ext4.zst', + 'd4f9c57860a512163f30ecc69b2174d1a1bdeb853a43dc49a09cfcfe84e428ea') def test_armv7be(self): self.set_machine('virt')
Signature · 1 line
2.39.5
PATCH v4 2/32 tests/functional: update the i386 tuxrun tests
In reply to Alex BennéeNow there are new up to date images available we should update to them.
Message-Id: <[email protected]>
--- tests/functional/test_i386_tuxrun.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tests/functional/test_i386_tuxrun.py +4 -4
@@ -17,11 +17,11 @@ class TuxRunI386Test(TuxRunBaselineTest): ASSET_I386_KERNEL = Asset( - 'https://storage.tuxboot.com/20230331/i386/bzImage', - 'a3e5b32a354729e65910f5a1ffcda7c14a6c12a55e8213fb86e277f1b76ed956') + 'https://storage.tuxboot.com/buildroot/20241119/i386/bzImage', + '47fb44e38e34101eb0f71a2a01742b959d40ed5fd67cefb5608a39be11d3b74e') ASSET_I386_ROOTFS = Asset( - 'https://storage.tuxboot.com/20230331/i386/rootfs.ext4.zst', - 'f15e66b2bf673a210ec2a4b2e744a80530b36289e04f5388aab812b97f69754a') + 'https://storage.tuxboot.com/buildroot/20241119/i386/rootfs.ext4.zst', + 'a1a3b3b4c9dccd6475b58db95c107b468b736b700f6620985a8ed050a73d51c8') def test_i386(self): self.set_machine('q35')
Signature · 1 line
2.39.5
PATCH v4 3/32 tests/functional: add a m68k tuxrun tests
In reply to Alex BennéeWe didn't have this before and as it exercises the m68k virt platform it seems worth adding. We don't wait for the shutdown because QEMU will auto-exit on the shutdown.
Message-Id: <[email protected]>
---
v2
- add to MAINTAINERS
--- MAINTAINERS | 1 + tests/functional/meson.build | 1 + tests/functional/test_m68k_tuxrun.py | 34 ++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 tests/functional/test_m68k_tuxrun.py
MAINTAINERS +1 -0
@@ -1288,6 +1288,7 @@ F: include/hw/intc/goldfish_pic.h F: include/hw/intc/m68k_irqc.h F: include/hw/misc/virt_ctrl.h F: docs/specs/virt-ctlr.rst +F: tests/functional/test_m68k_tuxrun.py MicroBlaze Machines -------------------
tests/functional/meson.build +1 -0
@@ -116,6 +116,7 @@ tests_m68k_system_thorough = [ 'm68k_mcf5208evb', 'm68k_nextcube', 'm68k_q800', + 'm68k_tuxrun', ] tests_microblaze_system_thorough = [
tests/functional/test_m68k_tuxrun.py new file +34 -0
@@ -0,0 +1,34 @@ +#!/usr/bin/env python3 +# +# Functional test that boots known good tuxboot images the same way +# that tuxrun (www.tuxrun.org) does. This tool is used by things like +# the LKFT project to run regression tests on kernels. +# +# Copyright (c) 2024 Linaro Ltd. +# +# Author: +# Alex Bennée <[email protected]> +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from qemu_test.tuxruntest import TuxRunBaselineTest + +class TuxRunM68KTest(TuxRunBaselineTest): + + ASSET_M68K_KERNEL = Asset( + 'https://storage.tuxboot.com/buildroot/20241119/m68k/vmlinux', + '7754e1d5cec753ccf1dc6894729a7f54c1a4965631ebf56df8e4ce1163ad19d8') + ASSET_M68K_ROOTFS = Asset( + 'https://storage.tuxboot.com/buildroot/20241119/m68k/rootfs.ext4.zst', + '557962ffff265607912e82232cf21adbe0e4e5a88e1e1d411ce848c37f0213e9') + + def test_m68k(self): + self.set_machine('virt') + self.cpu="m68040" + self.common_tuxrun(kernel_asset=self.ASSET_M68K_KERNEL, + rootfs_asset=self.ASSET_M68K_ROOTFS, + drive="virtio-blk-device") + +if __name__ == '__main__': + TuxRunBaselineTest.main()
Signature · 1 line
2.39.5
Re: [PATCH v4 03/32] tests/functional: add a m68k tuxrun tests
tests/functional/test_m68k_tuxrun.py
Quoted 22 lines · Alex Bennée
We didn't have this before and as it exercises the m68k virt platform it seems worth adding. We don't wait for the shutdown because QEMU will auto-exit on the shutdown.
Cc Laurent Vivier <[email protected]>Cc Anders Roxell <[email protected]>Reviewed-by Thomas Huth <[email protected]>Signed-off-by Alex Bennée <[email protected]>Message-Id: <[email protected]>
---
v2
- add toMAINTAINERS--- MAINTAINERS | 1 + tests/functional/meson.build | 1 + tests/functional/test_m68k_tuxrun.py | 34 ++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 tests/functional/test_m68k_tuxrun.pytests/functional/test_m68k_tuxrun.py new file +0
-0
This (and any other new functional tests) should be mode 0755 to enable direct execution
tests/functional/test_m68k_tuxrun.py
Quoted 3 lines
index 0000000000..7eacba135f
tests/functional/test_m68k_tuxrun.py new file +0
-0
With 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 :|
PATCH v4 4/32 tests/functional: update the mips32 tuxrun tests
In reply to Alex BennéeNow there are new up to date images available we should update to them.
Message-Id: <[email protected]>
--- tests/functional/test_mips_tuxrun.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tests/functional/test_mips_tuxrun.py +4 -4
@@ -17,11 +17,11 @@ class TuxRunMipsTest(TuxRunBaselineTest): ASSET_MIPS_KERNEL = Asset( - 'https://storage.tuxboot.com/20230331/mips32/vmlinux', - 'bfd2172f8b17fb32970ca0c8c58f59c5a4ca38aa5855d920be3a69b5d16e52f0') + 'https://storage.tuxboot.com/buildroot/20241119/mips32/vmlinux', + 'b6f97fc698ae8c96456ad8c996c7454228074df0d7520dedd0a15e2913700a19') ASSET_MIPS_ROOTFS = Asset( - 'https://storage.tuxboot.com/20230331/mips32/rootfs.ext4.zst', - 'fc3da0b4c2f38d74c6d705123bb0f633c76ed953128f9d0859378c328a6d11a0') + 'https://storage.tuxboot.com/buildroot/20241119/mips32/rootfs.ext4.zst', + '87055cf3cbde3fd134e5039e7b87feb03231d8c4b21ee712b8ba3308dfa72f50') def test_mips32(self): self.set_machine('malta')
Signature · 1 line
2.39.5
PATCH v4 5/32 tests/functional: update the mips32el tuxrun tests
In reply to Alex BennéeNow there are new up to date images available we should update to them.
Message-Id: <[email protected]>
--- tests/functional/test_mipsel_tuxrun.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tests/functional/test_mipsel_tuxrun.py +4 -4
@@ -17,11 +17,11 @@ class TuxRunMipsELTest(TuxRunBaselineTest): ASSET_MIPSEL_KERNEL = Asset( - 'https://storage.tuxboot.com/20230331/mips32el/vmlinux', - '8573867c68a8443db8de6d08bb33fb291c189ca2ca671471d3973a3e712096a3') + 'https://storage.tuxboot.com/buildroot/20241119/mips32el/vmlinux', + '660dd8c7a6ca7a32d37b4e6348865532ab0edb66802e8cc07869338444cf4929') ASSET_MIPSEL_ROOTFS = Asset( - 'https://storage.tuxboot.com/20230331/mips32el/rootfs.ext4.zst', - 'e799768e289fd69209c21f4dacffa11baea7543d5db101e8ce27e3bc2c41d90e') + 'https://storage.tuxboot.com/buildroot/20241119/mips32el/rootfs.ext4.zst', + 'c5d69542bcaed54a4f34671671eb4be5c608ee02671d4d0436544367816a73b1') def test_mips32el(self): self.set_machine('malta')
Signature · 1 line
2.39.5
PATCH v4 6/32 tests/functional: update the mips64 tuxrun tests
In reply to Alex BennéeNow there are new up to date images available we should update to them.
Message-Id: <[email protected]>
--- tests/functional/test_mips64_tuxrun.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tests/functional/test_mips64_tuxrun.py +4 -4
@@ -17,11 +17,11 @@ class TuxRunMips64Test(TuxRunBaselineTest): ASSET_MIPS64_KERNEL = Asset( - 'https://storage.tuxboot.com/20230331/mips64/vmlinux', - '09010e51e4b8bcbbd2494786ffb48eca78f228e96e5c5438344b0eac4029dc61') + 'https://storage.tuxboot.com/buildroot/20241119/mips64/vmlinux', + 'fe2882d216898ba2c56b49ba59f46ad392f36871f7fe325373cd926848b9dbdc') ASSET_MIPS64_ROOTFS = Asset( - 'https://storage.tuxboot.com/20230331/mips64/rootfs.ext4.zst', - '69d91eeb04df3d8d172922c6993bb37d4deeb6496def75d8580f6f9de3e431da') + 'https://storage.tuxboot.com/buildroot/20241119/mips64/rootfs.ext4.zst', + 'b8c98400216b6d4fb3b3ff05e9929aa015948b596cf0b82234813c84a4f7f4d5') def test_mips64(self): self.set_machine('malta')
Signature · 1 line
2.39.5
PATCH v4 7/32 tests/functional: update the mips64el tuxrun tests
In reply to Alex BennéeNow there are new up to date images available we should update to them.
Message-Id: <[email protected]>
--- tests/functional/test_mips64el_tuxrun.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tests/functional/test_mips64el_tuxrun.py +4 -4
@@ -17,11 +17,11 @@ class TuxRunMips64ELTest(TuxRunBaselineTest): ASSET_MIPS64EL_KERNEL = Asset( - 'https://storage.tuxboot.com/20230331/mips64el/vmlinux', - 'd4e08965e2155c4cccce7c5f34d18fe34c636cda2f2c9844387d614950155266') + 'https://storage.tuxboot.com/buildroot/20241119/mips64el/vmlinux', + '0d2829a96f005229839c4cd586d4d8a136ea4b488d29821611c8e97f2266bfa9') ASSET_MIPS64EL_ROOTFS = Asset( - 'https://storage.tuxboot.com/20230331/mips64el/rootfs.ext4.zst', - 'fba585368f5915b1498ed081863474b2d7ec4e97cdd46d21bdcb2f9698f83de4') + 'https://storage.tuxboot.com/buildroot/20241119/mips64el/rootfs.ext4.zst', + '69c8b69a4f1582ce4c6f01a994968f5d73bffb2fc99cbeeeb26c8b5a28eaeb84') def test_mips64el(self): self.set_machine('malta')
Signature · 1 line
2.39.5
PATCH v4 8/32 tests/functional: update the ppc32 tuxrun tests
In reply to Alex BennéeNow there are new up to date images available we should update to them.
Message-Id: <[email protected]>
--- tests/functional/test_ppc_tuxrun.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tests/functional/test_ppc_tuxrun.py +4 -4
@@ -17,11 +17,11 @@ class TuxRunPPC32Test(TuxRunBaselineTest): ASSET_PPC32_KERNEL = Asset( - 'https://storage.tuxboot.com/20230331/ppc32/uImage', - '1a68f74b860fda022fb12e03c5efece8c2b8b590d96cca37a8481a3ae0b3f81f') + 'https://storage.tuxboot.com/buildroot/20241119/ppc32/uImage', + 'aa5d81deabdb255a318c4bc5ffd6fdd2b5da1ef39f1955dcc35b671d258b68e9') ASSET_PPC32_ROOTFS = Asset( - 'https://storage.tuxboot.com/20230331/ppc32/rootfs.ext4.zst', - '8885b9d999cc24d679542a02e9b6aaf48f718f2050ece6b8347074b6ee41dd09') + 'https://storage.tuxboot.com/buildroot/20241119/ppc32/rootfs.ext4.zst', + '67554f830269d6bf53b67c7dd206bcc821e463993d526b1644066fea8117019b') def test_ppc32(self): self.set_machine('ppce500')
Signature · 1 line
2.39.5
PATCH v4 9/32 tests/functional: update the ppc64 tuxrun tests
In reply to Alex BennéeNow there are new up to date images available we should update to them.
Message-Id: <[email protected]>
--- tests/functional/test_ppc64_tuxrun.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
tests/functional/test_ppc64_tuxrun.py +8 -8
@@ -85,11 +85,11 @@ def ppc64_common_tuxrun(self, kernel_asset, rootfs_asset, prefix): drive="scsi-hd") ASSET_PPC64_KERNEL = Asset( - 'https://storage.tuxboot.com/20230331/ppc64/vmlinux', - 'f22a9b9e924174a4c199f4c7e5d91a2339fcfe51c6eafd0907dc3e09b64ab728') + 'https://storage.tuxboot.com/buildroot/20241119/ppc64/vmlinux', + '8219d5cb26e7654ad7826fe8aee6290f7c01eef44f2cd6d26c15fe8f99e1c17c') ASSET_PPC64_ROOTFS = Asset( - 'https://storage.tuxboot.com/20230331/ppc64/rootfs.ext4.zst', - '1d953e81a4379e537fc8e41e05a0a59d9b453eef97aa03d47866c6c45b00bdff') + 'https://storage.tuxboot.com/buildroot/20241119/ppc64/rootfs.ext4.zst', + 'b68e12314303c5dd0fef37ae98021299a206085ae591893e73557af99a02d373') def test_ppc64(self): self.ppc64_common_tuxrun(kernel_asset=self.ASSET_PPC64_KERNEL,
@@ -97,11 +97,11 @@ def test_ppc64(self): prefix='tuxrun_ppc64_') ASSET_PPC64LE_KERNEL = Asset( - 'https://storage.tuxboot.com/20230331/ppc64le/vmlinux', - '979eb61b445a010fb13e2b927126991f8ceef9c590fa2be0996c00e293e80cf2') + 'https://storage.tuxboot.com/buildroot/20241119/ppc64le/vmlinux', + '21aea1fbc18bf6fa7d8ca4ea48d4940b2c8363c077acd564eb47d769b7495279') ASSET_PPC64LE_ROOTFS = Asset( - 'https://storage.tuxboot.com/20230331/ppc64le/rootfs.ext4.zst', - 'b442678c93fb8abe1f7d3bfa20556488de6b475c22c8fed363f42cf81a0a3906') + 'https://storage.tuxboot.com/buildroot/20241119/ppc64le/rootfs.ext4.zst', + '67d36a3f9597b738e8b7359bdf04500f4d9bb82fc35eaa65aa439d888b2392f4') def test_ppc64le(self): self.ppc64_common_tuxrun(kernel_asset=self.ASSET_PPC64LE_KERNEL,
Signature · 1 line
2.39.5
PATCH v4 10/32 tests/functional: update the riscv32 tuxrun tests
In reply to Alex BennéeNow there are new up to date images available we should update to them.
Message-Id: <[email protected]>
--- tests/functional/test_riscv32_tuxrun.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tests/functional/test_riscv32_tuxrun.py +4 -4
@@ -17,11 +17,11 @@ class TuxRunRiscV32Test(TuxRunBaselineTest): ASSET_RISCV32_KERNEL = Asset( - 'https://storage.tuxboot.com/20230331/riscv32/Image', - '89599407d7334de629a40e7ad6503c73670359eb5f5ae9d686353a3d6deccbd5') + 'https://storage.tuxboot.com/buildroot/20241119/riscv32/Image', + '872bc8f8e0d4661825d5f47f7bec64988e9d0a8bd5db8917d57e16f66d83b329') ASSET_RISCV32_ROOTFS = Asset( - 'https://storage.tuxboot.com/20230331/riscv32/rootfs.ext4.zst', - '7168d296d0283238ea73cd5a775b3dd608e55e04c7b92b76ecce31bb13108cba') + 'https://storage.tuxboot.com/buildroot/20241119/riscv32/rootfs.ext4.zst', + '511ad34e63222db08d6c1da16fad224970de36517a784110956ba6a24a0ee5f6') def test_riscv32(self): self.set_machine('virt')
Signature · 1 line
2.39.5
PATCH v4 11/32 tests/functional: update the riscv64 tuxrun tests
In reply to Alex BennéeNow there are new up to date images available we should update to them. Note we re-use the riscv32 kernel and rootfs for test_riscv64_rv32.
Message-Id: <[email protected]>
--- tests/functional/test_riscv64_tuxrun.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
tests/functional/test_riscv64_tuxrun.py +8 -8
@@ -17,18 +17,18 @@ class TuxRunRiscV64Test(TuxRunBaselineTest): ASSET_RISCV64_KERNEL = Asset( - 'https://storage.tuxboot.com/20230331/riscv64/Image', - 'cd634badc65e52fb63465ec99e309c0de0369f0841b7d9486f9729e119bac25e') + 'https://storage.tuxboot.com/buildroot/20241119/riscv64/Image', + '2bd8132a3bf21570290042324fff48c987f42f2a00c08de979f43f0662ebadba') ASSET_RISCV64_ROOTFS = Asset( - 'https://storage.tuxboot.com/20230331/riscv64/rootfs.ext4.zst', - 'b18e3a3bdf27be03da0b285e84cb71bf09eca071c3a087b42884b6982ed679eb') + 'https://storage.tuxboot.com/buildroot/20241119/riscv64/rootfs.ext4.zst', + 'aa4736a9872651dfc0d95e709465eedf1134fd19d42b8cb305bfd776f9801004') ASSET_RISCV32_KERNEL = Asset( - 'https://storage.tuxboot.com/20230331/riscv32/Image', - '89599407d7334de629a40e7ad6503c73670359eb5f5ae9d686353a3d6deccbd5') + 'https://storage.tuxboot.com/buildroot/20241119/riscv32/Image', + '872bc8f8e0d4661825d5f47f7bec64988e9d0a8bd5db8917d57e16f66d83b329') ASSET_RISCV32_ROOTFS = Asset( - 'https://storage.tuxboot.com/20230331/riscv32/rootfs.ext4.zst', - '7168d296d0283238ea73cd5a775b3dd608e55e04c7b92b76ecce31bb13108cba') + 'https://storage.tuxboot.com/buildroot/20241119/riscv32/rootfs.ext4.zst', + '511ad34e63222db08d6c1da16fad224970de36517a784110956ba6a24a0ee5f6') def test_riscv64(self): self.set_machine('virt')
Signature · 1 line
2.39.5
PATCH v4 12/32 tests/functional: update the s390x tuxrun tests
In reply to Alex BennéeNow there are new up to date images available we should update to them.
Message-Id: <[email protected]>
--- tests/functional/test_s390x_tuxrun.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tests/functional/test_s390x_tuxrun.py +4 -4
@@ -17,11 +17,11 @@ class TuxRunS390xTest(TuxRunBaselineTest): ASSET_S390X_KERNEL = Asset( - 'https://storage.tuxboot.com/20230331/s390/bzImage', - '0414e98dd1c3dafff8496c9cd9c28a5f8d04553bb5ba37e906a812b48d442ef0') + 'https://storage.tuxboot.com/buildroot/20241119/s390/bzImage', + 'ee67e91db52a2aed104a7c72b2a08987c678f8179c029626789c35d6dd0fedf1') ASSET_S390X_ROOTFS = Asset( - 'https://storage.tuxboot.com/20230331/s390/rootfs.ext4.zst', - '88c37c32276677f873a25ab9ec6247895b8e3e6f8259134de2a616080b8ab3fc') + 'https://storage.tuxboot.com/buildroot/20241119/s390/rootfs.ext4.zst', + 'bff7971fc2fef56372d98afe4557b82fd0a785a241e44c29b058e577ad1bbb44') def test_s390(self): self.wait_for_shutdown=False
Signature · 1 line
2.39.5
PATCH v4 13/32 tests/functional: update the sparc64 tuxrun tests
In reply to Alex BennéeNow there are new up to date images available we should update to them.
Message-Id: <[email protected]>
--- tests/functional/test_sparc64_tuxrun.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tests/functional/test_sparc64_tuxrun.py +4 -4
@@ -17,11 +17,11 @@ class TuxRunSparc64Test(TuxRunBaselineTest): ASSET_SPARC64_KERNEL = Asset( - 'https://storage.tuxboot.com/20230331/sparc64/vmlinux', - 'e34313e4325ff21deaa3d38a502aa09a373ef62b9bd4d7f8f29388b688225c55') + 'https://storage.tuxboot.com/buildroot/20241119/sparc64/vmlinux', + 'a04cfb2e70a264051d161fdd93aabf4b2a9472f2e435c14ed18c5848c5fed261') ASSET_SPARC64_ROOTFS = Asset( - 'https://storage.tuxboot.com/20230331/sparc64/rootfs.ext4.zst', - 'ad2f1dc436ab51583543d25d2c210cab478645d47078d30d129a66ab0e281d76') + 'https://storage.tuxboot.com/buildroot/20241119/sparc64/rootfs.ext4.zst', + '479c3dc104c82b68be55e2c0c5c38cd473d0b37ad4badccde4775bb88ce34611') def test_sparc64(self): self.root='sda'
Signature · 1 line
2.39.5
PATCH v4 14/32 tests/functional: update the x86_64 tuxrun tests
In reply to Alex BennéeNow there are new up to date images available we should update to them.
Message-Id: <[email protected]>
--- tests/functional/test_x86_64_tuxrun.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tests/functional/test_x86_64_tuxrun.py +4 -4
@@ -17,11 +17,11 @@ class TuxRunX86Test(TuxRunBaselineTest): ASSET_X86_64_KERNEL = Asset( - 'https://storage.tuxboot.com/20230331/x86_64/bzImage', - '2bc7480a669ee9b6b82500a236aba0c54233debe98cb968268fa230f52f03461') + 'https://storage.tuxboot.com/buildroot/20241119/x86_64/bzImage', + 'f57bfc6553bcd6e0a54aab86095bf642b33b5571d14e3af1731b18c87ed5aef8') ASSET_X86_64_ROOTFS = Asset( - 'https://storage.tuxboot.com/20230331/x86_64/rootfs.ext4.zst', - 'b72ac729769b8f51c6dffb221113c9a063c774dbe1d66af30eb593c4e9999b4b') + 'https://storage.tuxboot.com/buildroot/20241119/x86_64/rootfs.ext4.zst', + '4b8b2a99117519c5290e1202cb36eb6c7aaba92b357b5160f5970cf5fb78a751') def test_x86_64(self): self.set_machine('q35')
Signature · 1 line
2.39.5
PATCH v4 15/32 tests/functional/aarch64: add tests for FEAT_RME
In reply to Alex BennéeFrom: Pierrick Bouvier <[email protected]>
This boot an OP-TEE environment, and launch a nested guest VM inside it using the Realms feature. We do it for virt and sbsa-ref platforms.
Message-Id: <[email protected]>
-----
v2:
- move test to its own file
- add sbsa test
- check output of cca-workload-attestation report
v3:
- build and run test with cca-v4 images
- factorize nested guest test between both tests
- remove accel tcg option as it is the default when running tests
Note: It's a long test and there is a work in progress to understand why debug build is so slow (x12 vs optimized).
v4:
- use pauth-impdef=on to speed up build time execution (x2.5 faster)
- increase timeout value
v5:
- migrate test to new archive_extract helper
v6:
- archive_extract helper needs explicit format for .tar.gz archives
- move set_machine/require_accel to the front
--- tests/functional/meson.build | 4 + tests/functional/test_aarch64_rme_sbsaref.py | 69 ++++++++++++++ tests/functional/test_aarch64_rme_virt.py | 98 ++++++++++++++++++++ 3 files changed, 171 insertions(+) create mode 100755 tests/functional/test_aarch64_rme_sbsaref.py create mode 100755 tests/functional/test_aarch64_rme_virt.py
tests/functional/meson.build +4 -0
@@ -13,6 +13,8 @@ endif test_timeouts = { 'aarch64_aspeed' : 600, 'aarch64_raspi4' : 480, + 'aarch64_rme_virt' : 1200, + 'aarch64_rme_sbsaref' : 1200, 'aarch64_sbsaref_alpine' : 720, 'aarch64_sbsaref_freebsd' : 720, 'aarch64_tuxrun' : 240,
@@ -60,6 +62,8 @@ tests_aarch64_system_thorough = [ 'aarch64_aspeed', 'aarch64_raspi3', 'aarch64_raspi4', + 'aarch64_rme_virt', + 'aarch64_rme_sbsaref', 'aarch64_sbsaref', 'aarch64_sbsaref_alpine', 'aarch64_sbsaref_freebsd',
tests/functional/test_aarch64_rme_sbsaref.py new file +69 -0
69 lines not on this page · raw message
tests/functional/test_aarch64_rme_virt.py new file +98 -0
98 lines not on this page · raw message
Signature · 1 line
2.39.5
PATCH v4 16/32 tests/qtest: remove clock_steps from virtio tests
In reply to Alex BennéeIn the qtest environment time will not step forward if the system is paused (timers disabled) or we have no timer events to fire. As a result VirtIO events are responded to directly and we don't need to step time forward.
We still do timeout processing to handle the fact the target QEMU may not be ready to respond right away. This will usually be due to a slow CI system or if QEMU is running under something like rr.
Future qtest patches will assert that time actually changes when a step is requested.
---
v2
- s/with/when/
- drop clock_step entirely
--- tests/qtest/libqos/virtio.c | 4 ---- 1 file changed, 4 deletions(-)
tests/qtest/libqos/virtio.c +0 -4
@@ -170,7 +170,6 @@ void qvirtio_wait_queue_isr(QTestState *qts, QVirtioDevice *d,gint64 start_time =g_get_monotonic_time ();for (;;) { -qtest_clock_step (qts,100 );if (d->bus->get_queue_isr_status (d, vq)) {return ; }
@@ -192,7 +191,6 @@ uint8_t qvirtio_wait_status_byte_no_isr(QTestState *qts, QVirtioDevice *d,uint8_t val;while ((val =qtest_readb (qts, addr)) ==0xff ) { -qtest_clock_step (qts,100 );g_assert (!d->bus->get_queue_isr_status (d, vq));g_assert (g_get_monotonic_time () - start_time <= timeout_us); }
@@ -219,14 +217,12 @@ void qvirtio_wait_used_elem(QTestState *qts, QVirtioDevice *d,for (;;) {uint32_t got_desc_idx; -qtest_clock_step (qts,100 );if (d->bus->get_queue_isr_status (d, vq) &&qvirtqueue_get_buf (qts, vq, &got_desc_idx, len)) { g_assert_cmpint(got_desc_idx, ==, desc_idx);return ; } -g_assert (g_get_monotonic_time () - start_time <= timeout_us); } }
Signature · 1 line
2.39.5
PATCH v4 17/32 system/qtest: properly feedback results of clock_[step|set]
In reply to Alex BennéeTime will not advance if the system is paused or there are no timer events set for the future. In absence of pending timer events advancing time would make no difference the system state. Attempting to do so would be a bug and the test or device under test would need fixing.
Tighten up the result reporting to FAIL if time was not advanced.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2687
--- system/qtest.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)
system/qtest.c +14 -9
@@ -78,6 +78,11 @@ static void *qtest_server_send_opaque;* let you adjust the value of the clock (monotonically). All the commands * return the current value of the clock in nanoseconds. * +* If the commands FAIL then time wasn't advanced which is likely +* because the machine was in a paused state or no timer events exist +* in the future. This will cause qtest to abort and the test will +* need to check its assumptions. +* * .. code-block:: none * * > clock_step
@@ -710,7 +715,8 @@ static void qtest_process_command(CharBackend *chr, gchar **words)qtest_sendf (chr,"OK little\n" ); } }else if (qtest_enabled () &&strcmp (words[0 ],"clock_step" ) ==0 ) { -int64_t ns; +int64_t old_ns =qemu_clock_get_ns (QEMU_CLOCK_VIRTUAL ); +int64_t ns, new_ns;if (words[1 ]) {int ret =qemu_strtoi64 (words[1 ],NULL ,0 , &ns);
@@ -719,11 +725,10 @@ static void qtest_process_command(CharBackend *chr, gchar **words) ns =qemu_clock_deadline_ns_all (QEMU_CLOCK_VIRTUAL ,QEMU_TIMER_ATTR_ALL ); } -qemu_clock_advance_virtual_time ( -qemu_clock_get_ns (QEMU_CLOCK_VIRTUAL ) + ns); + new_ns =qemu_clock_advance_virtual_time (old_ns + ns);qtest_send_prefix (chr); -qtest_sendf (chr,"OK %" PRIi64"\n" , - (int64_t )qemu_clock_get_ns (QEMU_CLOCK_VIRTUAL )); +qtest_sendf (chr,"%s %" PRIi64"\n" , + new_ns > old_ns ?"OK" :"FAIL" , new_ns); }else if (strcmp (words[0 ],"module_load" ) ==0 ) {Error *local_err =NULL ;int rv;
@@ -740,16 +745,16 @@ static void qtest_process_command(CharBackend *chr, gchar **words)qtest_sendf (chr,"FAIL\n" ); } }else if (qtest_enabled () &&strcmp (words[0 ],"clock_set" ) ==0 ) { -int64_t ns; +int64_t ns, new_ns;int ret;g_assert (words[1 ]); ret =qemu_strtoi64 (words[1 ],NULL ,0 , &ns);g_assert (ret ==0 ); -qemu_clock_advance_virtual_time (ns); + new_ns =qemu_clock_advance_virtual_time (ns);qtest_send_prefix (chr); -qtest_sendf (chr,"OK %" PRIi64"\n" , - (int64_t )qemu_clock_get_ns (QEMU_CLOCK_VIRTUAL )); +qtest_sendf (chr,"%s %" PRIi64"\n" , + new_ns == ns ?"OK" :"FAIL" , new_ns); }else if (process_command_cb &&process_command_cb (chr, words)) {/* Command got consumed by the callback handler */ }else {
Signature · 1 line
2.39.5
Re: [PATCH v4 17/32] system/qtest: properly feedback results of clock_[step|set]
Ghrm. 46 recipients seems to be quite a bit too aggressive..
Quoted 7 lines · Alex Bennée
Time will not advance if the system is paused or there are no timer events set for the future. In absence of pending timer events advancing time would make no difference the system state. Attempting to do so would be a bug and the test or device under test would need fixing.
Tighten up the result reporting to
FAILif time was not advanced.
Is this qemu-stable material?
Thanks,
/mjt
Re: [PATCH v4 17/32] system/qtest: properly feedback results of clock_[step|set]
Quoted 1 line · Michael Tokarev
Ghrm. 46 recipients seems to be quite a bit too aggressive..
I think git-publish just accumulates Cc's from each run for a given branch. While I can reset the version counter I'm not sure where I can reset the Cc list from.
Quoted 9 lines
Quoted 6 lines · Alex Bennée
Time will not advance if the system is paused or there are no timer events set for the future. In absence of pending timer events advancing time would make no difference the system state. Attempting to do so would be a bug and the test or device under test would need fixing.
Tighten up the result reporting toFAILif time was not advanced.Is this qemu-stable material?
Probably not - I guess that was a Cc from a previous series that stuck?
Quoted 4 lines
Thanks,
/mjt
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
Re: [PATCH v4 17/32] system/qtest: properly feedback results of clock_[step|set]
Quoted 7 lines · Alex Bennée
Quoted 1 line · Michael Tokarev
Ghrm. 46 recipients seems to be quite a bit too aggressive..
I think git-publish just accumulates Cc's from each run for a given branch. While I can reset the version counter I'm not sure where I can reset the Cc list from.
I never used git-publish. It's fun to know which other tools do people use :)
Quoted 11 lines
Quoted 9 lines
Quoted 6 lines · Alex Bennée
Time will not advance if the system is paused or there are no timer events set for the future. In absence of pending timer events advancing time would make no difference the system state. Attempting to do so would be a bug and the test or device under test would need fixing.
Tighten up the result reporting toFAILif time was not advanced.Is this qemu-stable material?
Probably not - I guess that was a Cc from a previous series that stuck?
No, it's just that it fixes an issue reported on gitlab (!2687), which apparently weren't fixed in time for 9.2, - that's why :)
Thanks,
/mjt
Re: [PATCH v4 17/32] system/qtest: properly feedback results of clock_[step|set]
In reply to Alex BennéeQuoted 67 lines · Alex Bennée
Time will not advance if the system is paused or there are no timer events set for the future. In absence of pending timer events advancing time would make no difference the system state. Attempting to do so would be a bug and the test or device under test would need fixing.
Tighten up the result reporting to
FAILif time was not advanced.Signed-off-by Alex Bennée <[email protected]>Reviewed-by Fabiano Rosas <[email protected]>Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2687
--- system/qtest.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)system/qtest.c +11
-6@@ -78,6 +78,11 @@ static void *qtest_server_send_opaque;* let you adjust the value of the clock (monotonically). All the commands * return the current value of the clock in nanoseconds. * +* If the commands FAIL then time wasn't advanced which is likely +* because the machine was in a paused state or no timer events exist +* in the future. This will cause qtest to abort and the test will +* need to check its assumptions. +* * .. code-block:: none * * > clock_step @@ -710,7 +715,8 @@ static void qtest_process_command(CharBackend *chr, gchar **words)qtest_sendf (chr,"OK little\n" ); } }else if (qtest_enabled () &&strcmp (words[0 ],"clock_step" ) ==0 ) { -int64_t ns; +int64_t old_ns =qemu_clock_get_ns (QEMU_CLOCK_VIRTUAL ); +int64_t ns, new_ns;if (words[1 ]) {int ret =qemu_strtoi64 (words[1 ],NULL ,0 , &ns);@@ -719,11 +725,10 @@ static void qtest_process_command(CharBackend *chr, gchar **words) ns =qemu_clock_deadline_ns_all (QEMU_CLOCK_VIRTUAL ,QEMU_TIMER_ATTR_ALL ); } -qemu_clock_advance_virtual_time ( -qemu_clock_get_ns (QEMU_CLOCK_VIRTUAL ) + ns); + new_ns =qemu_clock_advance_virtual_time (old_ns + ns);qtest_send_prefix (chr); -qtest_sendf (chr,"OK %" PRIi64"\n" , - (int64_t )qemu_clock_get_ns (QEMU_CLOCK_VIRTUAL )); +qtest_sendf (chr,"%s %" PRIi64"\n" , + new_ns > old_ns ?"OK" :"FAIL" , new_ns); }else if (strcmp (words[0 ],"module_load" ) ==0 ) {Error *local_err =NULL ;int rv;@@ -740,16 +745,16 @@ static void qtest_process_command(CharBackend *chr, gchar **words)qtest_sendf (chr,"FAIL\n" ); } }else if (qtest_enabled () &&strcmp (words[0 ],"clock_set" ) ==0 ) { -int64_t ns; +int64_t ns, new_ns;int ret;g_assert (words[1 ]); ret =qemu_strtoi64 (words[1 ],NULL ,0 , &ns);g_assert (ret ==0 );
system/qtest.c static void qtest_process_command(CharBackend *chr, gchar **words) · line 760
Quoted 10 lines
system/qtest.c +3
-3-qemu_clock_advance_virtual_time (ns); + new_ns =qemu_clock_advance_virtual_time (ns);qtest_send_prefix (chr); -qtest_sendf (chr,"OK %" PRIi64"\n" , - (int64_t )qemu_clock_get_ns (QEMU_CLOCK_VIRTUAL )); +qtest_sendf (chr,"%s %" PRIi64"\n" , + new_ns == ns ?"OK" :"FAIL" , new_ns); }else if (process_command_cb &&process_command_cb (chr, words)) {/* Command got consumed by the callback handler */ }else {
Hi Alex,
this patch broke the check-cfi-ppc64-s390x and check-cfi-aarch64 tests in the gitlab CI:
https://gitlab.com/thuth/qemu/-/jobs/8896718604#L78
https://gitlab.com/thuth/qemu/-/jobs/8896718599#L72
Though it does not seem to be related to CFI, but rather to --disable-slirp, I can reproduce it locally like this:
.../configure --target-list=ppc64-softmmu --disable-slirp --disable-docs
make -j$(nproc)
make tests/qtest/qos-test
QTEST_QEMU_BINARY=./qemu-system-ppc64 tests/qtest/qos-test \
-p
/ppc64/pseries/spapr-pci-host-bridge/pci-bus-spapr/pci-bus/virtio-blk-pci/virtio-blk/virtio-blk-tests/config
**
ERROR:../qemu/tests/qtest/libqtest.c:719:qtest_rsp_args: assertion failed
(words[0] == "OK"): ("FAIL" == "OK")
not ok
/ppc64/pseries/spapr-pci-host-bridge/pci-bus-spapr/pci-bus/virtio-blk-pci/virtio-blk/virtio-blk-tests/config - ERROR:../qemu/tests/qtest/libqtest.c:719:qtest_rsp_args: assertion failed (words[0] == "OK"): ("FAIL" == "OK")
Bail out!
Aborted (core dumped)
Bisecting the problem pointed me to your patch ... if you've got some spare time, could you please have a look?
Thanks,
Thomas
Re: [PATCH v4 17/32] system/qtest: properly feedback results of clock_[step|set]
Quoted 85 lines · Thomas Huth
Quoted 62 lines · Alex Bennée
Time will not advance if the system is paused or there are no timer events set for the future. In absence of pending timer events advancing time would make no difference the system state. Attempting to do so would be a bug and the test or device under test would need fixing.
Tighten up the result reporting toFAILif time was not advanced.Signed-off-by Alex Bennée <[email protected]>Reviewed-by Fabiano Rosas <[email protected]>Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2687
--- system/qtest.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)system/qtest.c +11
-6@@ -78,6 +78,11 @@ static void *qtest_server_send_opaque;* let you adjust the value of the clock (monotonically). All the commands * return the current value of the clock in nanoseconds. * +* If the commands FAIL then time wasn't advanced which is likely +* because the machine was in a paused state or no timer events exist +* in the future. This will cause qtest to abort and the test will +* need to check its assumptions. +* * .. code-block:: none * * > clock_step @@ -710,7 +715,8 @@ static void qtest_process_command(CharBackend *chr, gchar **words)qtest_sendf (chr,"OK little\n" ); } }else if (qtest_enabled () &&strcmp (words[0 ],"clock_step" ) ==0 ) { -int64_t ns; +int64_t old_ns =qemu_clock_get_ns (QEMU_CLOCK_VIRTUAL ); +int64_t ns, new_ns;if (words[1 ]) {int ret =qemu_strtoi64 (words[1 ],NULL ,0 , &ns);@@ -719,11 +725,10 @@ static void qtest_process_command(CharBackend *chr, gchar **words) ns =qemu_clock_deadline_ns_all (QEMU_CLOCK_VIRTUAL ,QEMU_TIMER_ATTR_ALL ); } -qemu_clock_advance_virtual_time ( -qemu_clock_get_ns (QEMU_CLOCK_VIRTUAL ) + ns); + new_ns =qemu_clock_advance_virtual_time (old_ns + ns);qtest_send_prefix (chr); -qtest_sendf (chr,"OK %" PRIi64"\n" , - (int64_t )qemu_clock_get_ns (QEMU_CLOCK_VIRTUAL )); +qtest_sendf (chr,"%s %" PRIi64"\n" , + new_ns > old_ns ?"OK" :"FAIL" , new_ns); }else if (strcmp (words[0 ],"module_load" ) ==0 ) {Error *local_err =NULL ;int rv;@@ -740,16 +745,16 @@ static void qtest_process_command(CharBackend *chr, gchar **words)qtest_sendf (chr,"FAIL\n" ); } }else if (qtest_enabled () &&strcmp (words[0 ],"clock_set" ) ==0 ) { -int64_t ns; +int64_t ns, new_ns;int ret;g_assert (words[1 ]); ret =qemu_strtoi64 (words[1 ],NULL ,0 , &ns);g_assert (ret ==0 );system/qtest.c static void qtest_process_command(CharBackend *chr, gchar **words) · line 759
Quoted 10 lines
system/qtest.c +3
-3-qemu_clock_advance_virtual_time (ns); + new_ns =qemu_clock_advance_virtual_time (ns);qtest_send_prefix (chr); -qtest_sendf (chr,"OK %" PRIi64"\n" , - (int64_t )qemu_clock_get_ns (QEMU_CLOCK_VIRTUAL )); +qtest_sendf (chr,"%s %" PRIi64"\n" , + new_ns == ns ?"OK" :"FAIL" , new_ns); }else if (process_command_cb &&process_command_cb (chr, words)) {/* Command got consumed by the callback handler */ }else {Hi Alex,
this patch broke the check-cfi-ppc64-s390x and check-cfi-aarch64 tests in the gitlab CI:
https://gitlab.com/thuth/qemu/-/jobs/8896718604#L78
https://gitlab.com/thuth/qemu/-/jobs/8896718599#L72Though it does not seem to be related to CFI, but rather to --disable-slirp, I can reproduce it locally like this:
Quoted 15 lines
.../configure --target-list=ppc64-softmmu --disable-slirp --disable-docs
make -j$(nproc)
make tests/qtest/qos-test
QTEST_QEMU_BINARY=./qemu-system-ppc64 tests/qtest/qos-test \
-p
/ppc64/pseries/spapr-pci-host-bridge/pci-bus-spapr/pci-bus/virtio-blk-pci/virtio-blk/virtio-blk-tests/config
**
ERROR:../qemu/tests/qtest/libqtest.c:719:qtest_rsp_args: assertion
failed (words[0] == "OK"): ("FAIL" == "OK")
not ok /ppc64/pseries/spapr-pci-host-bridge/pci-bus-spapr/pci-bus/virtio-blk-pci/virtio-blk/virtio-blk-tests/config
- ERROR:../qemu/tests/qtest/libqtest.c:719:qtest_rsp_args: assertion
failed (words[0] == "OK"): ("FAIL" == "OK")
Bail out!
Aborted (core dumped)
Hmm not sure why I didn't see these in the normal testing. I guess we weren't exercising virtio-pci in anything other than the CFI tests?
Quoted 3 lines
Bisecting the problem pointed me to your patch ... if you've got some spare time, could you please have a look?
The change in similar to tests/qtest: remove clock_steps from virtio tests. This basically avoids the step at the start and it will complete straight away.
--8<---------------cut here---------------start------------->8---
modified tests/qtest/libqos/virtio-pci-modern.c
@@ -176,10 +176,10 @@ static void wait_config_isr_status(QVirtioDevice *d, gint64 timeout_us)
QVirtioPCIDevice *dev = container_of(d, QVirtioPCIDevice, vdev);
gint64 start_time = g_get_monotonic_time();- do {
+ while (!get_config_isr_status(d)) {
g_assert(g_get_monotonic_time() - start_time <= timeout_us);
qtest_clock_step(dev->pdev->bus->qts, 100);- } while (!get_config_isr_status(d));
+ };
}
static void queue_select(QVirtioDevice *d, uint16_t index)
modified tests/qtest/libqos/virtio-pci.c
@@ -174,10 +174,10 @@ static void qvirtio_pci_wait_config_isr_status(QVirtioDevice *d,
QVirtioPCIDevice *dev = container_of(d, QVirtioPCIDevice, vdev);
gint64 start_time = g_get_monotonic_time();- do {
+ while (!qvirtio_pci_get_config_isr_status(d)) {
g_assert(g_get_monotonic_time() - start_time <= timeout_us);
qtest_clock_step(dev->pdev->bus->qts, 100);- } while (!qvirtio_pci_get_config_isr_status(d));
+ }
}
static void qvirtio_pci_queue_select(QVirtioDevice *d, uint16_t index)
--8<---------------cut here---------------end--------------->8---
As time has no meaning for the virtio tests (no processing is deferred) we could we could just as easily simplify to:
--8<---------------cut here---------------start------------->8---
modified tests/qtest/libqos/virtio-pci-modern.c
@@ -173,13 +173,7 @@ static bool get_config_isr_status(QVirtioDevice *d)
static void wait_config_isr_status(QVirtioDevice *d, gint64 timeout_us) {
- QVirtioPCIDevice *dev = container_of(d, QVirtioPCIDevice, vdev);
- gint64 start_time = g_get_monotonic_time();
-
- do {
- g_assert(g_get_monotonic_time() - start_time <= timeout_us);
- qtest_clock_step(dev->pdev->bus->qts, 100);
- } while (!get_config_isr_status(d));
+ g_assert(get_config_isr_status(d));
}
static void queue_select(QVirtioDevice *d, uint16_t index)
modified tests/qtest/libqos/virtio-pci.c
@@ -171,13 +171,7 @@ static bool qvirtio_pci_get_config_isr_status(QVirtioDevice *d)
static void qvirtio_pci_wait_config_isr_status(QVirtioDevice *d,
gint64 timeout_us)
{
- QVirtioPCIDevice *dev = container_of(d, QVirtioPCIDevice, vdev);
- gint64 start_time = g_get_monotonic_time();
-
- do {
- g_assert(g_get_monotonic_time() - start_time <= timeout_us);
- qtest_clock_step(dev->pdev->bus->qts, 100);
- } while (!qvirtio_pci_get_config_isr_status(d));
+ g_assert(qvirtio_pci_get_config_isr_status(d));
}
--8<---------------cut here---------------end--------------->8---
Quoted 3 lines
Thanks,
Thomas
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
PATCH v4 18/32 tests/functional: remove hacky sleep from the tests
In reply to Alex BennéeWe have proper detection of prompts now so we don't need to guess with sleep() sprinkled through the test. The extra step of calling halt is just to flush the final bits of the log (although the last line is still missed).
---
v2
- avoid long lines by iterating through an array
- drop time import
v3
- fix up on re-base
- drop stray import os that had sneaked in
--- tests/functional/test_aarch64_virt.py | 32 +++++++++++++++------------ 1 file changed, 18 insertions(+), 14 deletions(-)
tests/functional/test_aarch64_virt.py +18 -14
@@ -10,12 +10,12 @@ # # SPDX-License-Identifier: GPL-2.0-or-later -import time import logging from subprocess import check_call, DEVNULL from qemu_test import QemuSystemTest, Asset -from qemu_test import exec_command, wait_for_console_pattern +from qemu_test import exec_command_and_wait_for_pattern +from qemu_test import wait_for_console_pattern from qemu_test import get_qemu_img
@@ -107,18 +107,22 @@ def common_aarch64_virt(self, machine): 'virtio-blk-device,drive=scratch') self.vm.launch() - self.wait_for_console_pattern('Welcome to Buildroot') - time.sleep(0.1) - exec_command(self, 'root') - time.sleep(0.1) - exec_command(self, 'dd if=/dev/hwrng of=/dev/vda bs=512 count=4') - time.sleep(0.1) - exec_command(self, 'md5sum /dev/vda') - time.sleep(0.1) - exec_command(self, 'cat /proc/interrupts') - time.sleep(0.1) - exec_command(self, 'cat /proc/self/maps') - time.sleep(0.1) + + ps1='#' + self.wait_for_console_pattern('login:') + + commands = [ + ('root', ps1), + ('cat /proc/interrupts', ps1), + ('cat /proc/self/maps', ps1), + ('uname -a', ps1), + ('dd if=/dev/hwrng of=/dev/vda bs=512 count=4', ps1), + ('md5sum /dev/vda', ps1), + ('halt -n', 'reboot: System halted') + ] + + for cmd, pattern in commands: + exec_command_and_wait_for_pattern(self, cmd, pattern) def test_aarch64_virt_gicv3(self): self.common_aarch64_virt("virt,gic_version=3")
Signature · 1 line
2.39.5
PATCH v4 19/32 tests/functional: add zstd support to uncompress utility
In reply to Alex BennéeRather than using the python library (which has a different API anyway) lets just call the binary. zstdtools is already in out qemu.yml so all test containers should have it around. Tests should still use @skipIfMissingCommands('zstd') to gracefully handle when only minimal dependencies have been installed.
---
v4
- add chmod step to helper
- also handle .zst extension
--- tests/functional/qemu_test/uncompress.py | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
tests/functional/qemu_test/uncompress.py +26 -0
@@ -10,8 +10,10 @@ import gzip import lzma import os +import stat import shutil from urllib.parse import urlparse +from subprocess import check_call, CalledProcessError from .asset import Asset
@@ -38,6 +40,24 @@ def lzma_uncompress(xz_path, output_path): os.remove(output_path) raise + +def zstd_uncompress(zstd_path, output_path): + if os.path.exists(output_path): + return + + try: + check_call(['zstd', "-f", "-d", zstd_path, + "-o", output_path]) + except CalledProcessError as e: + os.remove(output_path) + raise Exception( + f"Unable to decompress zstd file {zstd_path} with {e}") from e + + # zstd copies source archive permissions for the output + # file, so must make this writable for QEMU + os.chmod(output_path, stat.S_IRUSR | stat.S_IWUSR) + + ''' @params compressed: filename, Asset, or file-like object to uncompress @params uncompressed: filename to uncompress into
@@ -59,6 +79,8 @@ def uncompress(compressed, uncompressed, format=None): lzma_uncompress(str(compressed), uncompressed) elif format == "gz": gzip_uncompress(str(compressed), uncompressed) + elif format == "zstd": + zstd_uncompress(str(compressed), uncompressed) else: raise Exception(f"Unknown compression format {format}")
@@ -79,5 +101,9 @@ def guess_uncompress_format(compressed): return "xz" elif ext == ".gz": return "gz" + elif ext == ".zstd": + return "zstd" + elif ext == ".zst": + return "zstd" else: raise Exception(f"Unknown compression format for {compressed}")
Signature · 1 line
2.39.5
Re: [PATCH v4 19/32] tests/functional: add zstd support to uncompress utility
Quoted 8 lines · Alex Bennée
Rather than using the python library (which has a different API anyway) lets just call the binary. zstdtools is already in out qemu.yml so all test containers should have it around. Tests should still use @skipIfMissingCommands('zstd') to gracefully handle when only minimal dependencies have been installed.
Signed-off-by Alex Bennée <[email protected]>
Quoted 7 lines
---
v4
- add chmod step to helper
- also handle .zst extension--- tests/functional/qemu_test/uncompress.py | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
Quoted 8 lines
tests/functional/qemu_test/uncompress.py +0
-0
tests/functional/qemu_test/uncompress.py def guess_uncompress_format(compressed): · line 107
Quoted 7 lines
tests/functional/qemu_test/uncompress.py +4
-0@@ -79,5 +101,9 @@ def guess_uncompress_format(compressed): return "xz" elif ext == ".gz": return "gz" + elif ext == ".zstd": + return "zstd" + elif ext == ".zst": + return "zstd"
Or
elif ext in [".zstd", ".zst"]:
return 'zstd'
Either way, by R-b stands.
With 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 v4 19/32] tests/functional: add zstd support to uncompress utility
In reply to Alex BennéeQuoted 7 lines · Alex Bennée
Rather than using the python library (which has a different API anyway) lets just call the binary. zstdtools is already in out qemu.yml so all test containers should have it around. Tests should still use @skipIfMissingCommands('zstd') to gracefully handle when only minimal dependencies have been installed.
Signed-off-by Alex Bennée <[email protected]>
PATCH v4 20/32 tests/functional: update tuxruntest to use uncompress utility
In reply to Alex BennéeUse the utility functions to reduce code duplication.
--- tests/functional/qemu_test/tuxruntest.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
tests/functional/qemu_test/tuxruntest.py +1 -11
@@ -73,17 +73,7 @@ def fetch_tuxrun_assets(self, kernel_asset, rootfs_asset, dtb_asset=None): Fetch the TuxBoot assets. """ kernel_image = kernel_asset.fetch() - disk_image_zst = rootfs_asset.fetch() - - disk_image = self.scratch_file("rootfs.ext4") - - check_call(['zstd', "-f", "-d", disk_image_zst, - "-o", disk_image], - stdout=DEVNULL, stderr=DEVNULL) - # zstd copies source archive permissions for the output - # file, so must make this writable for QEMU - os.chmod(disk_image, stat.S_IRUSR | stat.S_IWUSR) - + disk_image = self.uncompress(rootfs_asset) dtb = dtb_asset.fetch() if dtb_asset is not None else None return (kernel_image, disk_image, dtb)
Signature · 1 line
2.39.5
Re: [PATCH v4 20/32] tests/functional: update tuxruntest to use uncompress utility
Quoted 6 lines · Alex Bennée
Use the utility functions to reduce code duplication.
Signed-off-by Alex Bennée <[email protected]>--- tests/functional/qemu_test/tuxruntest.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
PATCH v4 21/32 tests/functional: remove unused kernel_command_line
In reply to Alex BennéeThe Alpine test boots from the CDROM so we don't --append a command line. Drop the unused code.
--- tests/functional/test_aarch64_virt.py | 2 -- 1 file changed, 2 deletions(-)
tests/functional/test_aarch64_virt.py +0 -2
@@ -41,8 +41,6 @@ def test_alpine_virt_tcg_gic_max(self): self.set_machine('virt') self.vm.set_console() - kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + - 'console=ttyAMA0') self.require_accelerator("tcg") self.vm.add_args("-accel", "tcg")
Signature · 1 line
2.39.5
Re: [PATCH v4 21/32] tests/functional: remove unused kernel_command_line
Quoted 13 lines · Alex Bennée
The Alpine test boots from the CDROM so we don't --append a command line. Drop the unused code.
Signed-off-by Alex Bennée <[email protected]>--- tests/functional/test_aarch64_virt.py | 2 -- 1 file changed, 2 deletions(-)tests/functional/test_aarch64_virt.py +0
-0
tests/functional/test_aarch64_virt.py def test_alpine_virt_tcg_gic_max(self): · line 46
Quoted 8 lines
tests/functional/test_aarch64_virt.py +0
-2@@ -41,8 +41,6 @@ def test_alpine_virt_tcg_gic_max(self): self.set_machine('virt') self.vm.set_console() - kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + - 'console=ttyAMA0') self.require_accelerator("tcg") self.vm.add_args("-accel", "tcg")
PATCH v4 22/32 tests/functional: bail aarch64_virt tests early if missing TCG
In reply to Alex BennéeThe set_machine and require_accelerator steps can bail early so move those to the front of the test functions. While we are at it also clean up some long lines when adding the vm arguments.
--- tests/functional/test_aarch64_virt.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
tests/functional/test_aarch64_virt.py +7 -4
@@ -40,9 +40,9 @@ def test_alpine_virt_tcg_gic_max(self): iso_path = self.ASSET_ALPINE_ISO.fetch() self.set_machine('virt') - self.vm.set_console() self.require_accelerator("tcg") + self.vm.set_console() self.vm.add_args("-accel", "tcg") self.vm.add_args("-cpu", "max,pauth-impdef=on") self.vm.add_args("-machine",
@@ -71,15 +71,16 @@ def common_aarch64_virt(self, machine): Common code to launch basic virt machine with kernel+initrd and a scratch disk. """ + self.set_machine('virt') + self.require_accelerator("tcg") + logger = logging.getLogger('aarch64_virt') kernel_path = self.ASSET_KERNEL.fetch() - self.set_machine('virt') self.vm.set_console() kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyAMA0') - self.require_accelerator("tcg") self.vm.add_args('-cpu', 'max,pauth-impdef=on', '-machine', machine, '-accel', 'tcg',
@@ -100,7 +101,9 @@ def common_aarch64_virt(self, machine): # Add the device self.vm.add_args('-blockdev', - f"driver=qcow2,file.driver=file,file.filename={image_path},node-name=scratch") + "driver=qcow2," + "file.driver=file," + f"file.filename={image_path},node-name=scratch") self.vm.add_args('-device', 'virtio-blk-device,drive=scratch')
Signature · 1 line
2.39.5
Re: [PATCH v4 22/32] tests/functional: bail aarch64_virt tests early if missing TCG
Quoted 8 lines · Alex Bennée
The
set_machineandrequire_acceleratorsteps can bail early so move those to the front of the test functions. While we are at it also clean up some long lines when adding the vm arguments.Signed-off-by Alex Bennée <[email protected]>--- tests/functional/test_aarch64_virt.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
PATCH v4 23/32 tests/functional: extend test_aarch64_virt with vulkan test
In reply to Alex BennéeNow that we have virtio-gpu Vulkan support, let's add a test for it. Currently this is using images build by buildroot:
https://lists.buildroot.org/pipermail/buildroot/2024-December/768196.html
---
v2
- use decorator for has_cmd(zstd)
- un-handled->unhandled
- drop extra - from --snapshot
- drop unneeded virtualization=on
- only show 1s of each scene
- fix long lines
v3
- move set_machine/require_accelerator to top of test
- use uncompress utility function
- remove extra ()'s from ASSETS
v4
- split misc fixups into earlier commits
- don't swallow leading newlines before class
- fixup commit message
--- tests/functional/test_aarch64_virt.py | 74 ++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 2 deletions(-)
tests/functional/test_aarch64_virt.py +72 -2
@@ -13,10 +13,12 @@ import logging from subprocess import check_call, DEVNULL +from qemu.machine.machine import VMLaunchFailure + from qemu_test import QemuSystemTest, Asset -from qemu_test import exec_command_and_wait_for_pattern +from qemu_test import exec_command, exec_command_and_wait_for_pattern from qemu_test import wait_for_console_pattern -from qemu_test import get_qemu_img +from qemu_test import skipIfMissingCommands, get_qemu_img class Aarch64VirtMachine(QemuSystemTest):
@@ -132,5 +134,73 @@ def test_aarch64_virt_gicv2(self): self.common_aarch64_virt("virt,gic-version=2") + ASSET_VIRT_GPU_KERNEL = Asset( + 'https://fileserver.linaro.org/s/ce5jXBFinPxtEdx/' + 'download?path=%2F&files=' + 'Image', + '89e5099d26166204cc5ca4bb6d1a11b92c217e1f82ec67e3ba363d09157462f6') + + ASSET_VIRT_GPU_ROOTFS = Asset( + 'https://fileserver.linaro.org/s/ce5jXBFinPxtEdx/' + 'download?path=%2F&files=' + 'rootfs.ext4.zstd', + '792da7573f5dc2913ddb7c638151d4a6b2d028a4cb2afb38add513c1924bdad4') + + @skipIfMissingCommands('zstd') + def test_aarch64_virt_with_gpu(self): + # This tests boots with a buildroot test image that contains + # vkmark and other GPU exercising tools. We run a headless + # weston that nevertheless still exercises the virtio-gpu + # backend. + + self.set_machine('virt') + self.require_accelerator("tcg") + + kernel_path = self.ASSET_VIRT_GPU_KERNEL.fetch() + image_path = self.uncompress(self.ASSET_VIRT_GPU_ROOTFS, format="zstd") + + self.vm.set_console() + kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + + 'console=ttyAMA0 root=/dev/vda') + + self.vm.add_args("-accel", "tcg") + self.vm.add_args("-cpu", "neoverse-v1,pauth-impdef=on") + self.vm.add_args("-machine", "virt,gic-version=max", + '-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.add_args("-smp", "2", "-m", "2048") + self.vm.add_args("-device", + "virtio-gpu-gl-pci,hostmem=4G,blob=on,venus=on") + self.vm.add_args("-display", "egl-headless") + self.vm.add_args("-display", "dbus,gl=on") + self.vm.add_args("-device", "virtio-blk-device,drive=hd0") + self.vm.add_args("-blockdev", + "driver=raw,file.driver=file," + "node-name=hd0,read-only=on," + f"file.filename={image_path}") + self.vm.add_args("-snapshot") + + try: + self.vm.launch() + except VMLaunchFailure as excp: + if "old virglrenderer, blob resources unsupported" in excp.output: + self.skipTest("No blob support for virtio-gpu") + elif "old virglrenderer, venus unsupported" in excp.output: + self.skipTest("No venus support for virtio-gpu") + else: + self.log.info("unhandled launch failure: {excp.output}") + raise excp + + self.wait_for_console_pattern('buildroot login:') + exec_command(self, 'root') + exec_command(self, 'export XDG_RUNTIME_DIR=/tmp') + exec_command_and_wait_for_pattern(self, + "weston -B headless " + "--renderer gl " + "--shell kiosk " + "-- vkmark -b:duration=1.0", + "vkmark Score") + + if __name__ == '__main__': QemuSystemTest.main()
Signature · 1 line
2.39.5
Re: [PATCH v4 23/32] tests/functional: extend test_aarch64_virt with vulkan test
Quoted 6 lines · Alex Bennée
Now that we have virtio-gpu Vulkan support, let's add a test for it. Currently this is using images build by buildroot:
https://lists.buildroot.org/pipermail/buildroot/2024-December/768196.htmlSigned-off-by Alex Bennée <[email protected]>
PATCH v4 24/32 tests/lcitool: bump to latest version of libvirt-ci
In reply to Alex BennéeWe will shortly need this to build our riscv64 cross container. However to keep the delta down just do the bump first. As ccache4 is now preferred for FreeBSD to get the latest version there is a little update in the FreeBSD metadata.
--- .gitlab-ci.d/cirrus/freebsd-14.vars | 2 +- tests/lcitool/libvirt-ci | 2 +- tests/vm/generated/freebsd.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
.gitlab-ci.d/cirrus/freebsd-14.vars +1 -1
@@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake' NINJA='/usr/local/bin/ninja' PACKAGING_COMMAND='pkg' 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' +PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache4 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/lcitool/libvirt-ci +1 -1
@@ -1 +1 @@ -Subproject commit 9ad3f70bde9865d5ad18f36d256d472e72b5cbf3 +Subproject commit b6a65806bc9b2b56985f5e97c936b77c7e7a99fc
tests/vm/generated/freebsd.json +1 -1
@@ -13,7 +13,7 @@ "bzip2", "ca_root_nss", "capstone4", - "ccache", + "ccache4", "cmocka", "ctags", "curl",
Signature · 1 line
2.39.5
PATCH v4 25/32 tests/docker: move riscv64 cross container from sid to trixie
In reply to Alex BennéeAlthough riscv64 isn't going to be a release architecture for trixie the packages are still built while it is testing. Moving from sid will also avoid some of the volatility we get from tracking the bleeding edge.
--- tests/docker/dockerfiles/debian-riscv64-cross.docker | 4 ++-- tests/lcitool/refresh | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-)
tests/docker/dockerfiles/debian-riscv64-cross.docker +2 -2
@@ -1,10 +1,10 @@ # THIS FILE WAS AUTO-GENERATED # -# $ lcitool dockerfile --layers all --cross-arch riscv64 debian-sid qemu-minimal +# $ lcitool dockerfile --layers all --cross-arch riscv64 debian-13 qemu-minimal # # https://gitlab.com/libvirt/libvirt-ci -FROM docker.io/library/debian:sid-slim +FROM docker.io/library/debian:trixie-slim RUN export DEBIAN_FRONTEND=noninteractive && \ apt-get update && \
tests/lcitool/refresh +3 -1
@@ -220,7 +220,9 @@ try: trailer=cross_build("powerpc64le-linux-gnu-", "ppc64-softmmu,ppc64-linux-user")) - generate_dockerfile("debian-riscv64-cross", "debian-sid", + # while not yet a release architecture the packages are still + # build while part of testing + generate_dockerfile("debian-riscv64-cross", "debian-13", project="qemu-minimal", cross="riscv64", trailer=cross_build("riscv64-linux-gnu-",
Signature · 1 line
2.39.5
PATCH v4 26/32 tests/lcitool: remove temp workaround for debian mips64el
In reply to Alex BennéeFrom: Daniel P. Berrangé <[email protected]>
The workaround applied in
commit c60473d29254b79d9437eface8b342e84663ba66
Author: Alex Bennée <[email protected]>
Date: Wed Oct 2 10:03:33 2024 +0200
testing: bump mips64el cross to bookworm and fix package list
Is no longer required since the affected builds are now fixed.
Message-Id: <[email protected]>
--- .../dockerfiles/debian-mips64el-cross.docker | 9 ++++++ tests/lcitool/mappings.yml | 29 ------------------- 2 files changed, 9 insertions(+), 29 deletions(-)
tests/docker/dockerfiles/debian-mips64el-cross.docker +9 -0
@@ -93,13 +93,18 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libcmocka-dev:mips64el \ libcurl4-gnutls-dev:mips64el \ libdaxctl-dev:mips64el \ + libdrm-dev:mips64el \ + libepoxy-dev:mips64el \ libfdt-dev:mips64el \ libffi-dev:mips64el \ libfuse3-dev:mips64el \ + libgbm-dev:mips64el \ libgcrypt20-dev:mips64el \ libglib2.0-dev:mips64el \ libglusterfs-dev:mips64el \ libgnutls28-dev:mips64el \ + libgtk-3-dev:mips64el \ + libgtk-vnc-2.0-dev:mips64el \ libibverbs-dev:mips64el \ libiscsi-dev:mips64el \ libjemalloc-dev:mips64el \
@@ -119,6 +124,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ librbd-dev:mips64el \ librdmacm-dev:mips64el \ libsasl2-dev:mips64el \ + libsdl2-dev:mips64el \ + libsdl2-image-dev:mips64el \ libseccomp-dev:mips64el \ libselinux1-dev:mips64el \ libslirp-dev:mips64el \
@@ -134,6 +141,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libusb-1.0-0-dev:mips64el \ libusbredirhost-dev:mips64el \ libvdeplug-dev:mips64el \ + libvirglrenderer-dev:mips64el \ + libvte-2.91-dev:mips64el \ libxdp-dev:mips64el \ libzstd-dev:mips64el \ nettle-dev:mips64el \
tests/lcitool/mappings.yml +0 -29
@@ -6,23 +6,6 @@ mappings: flake8: OpenSUSELeap15: - # Due to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1081535 we - # have to disable all packages that depend on libgl1-mesa-dri:mips64el - gtk3: - mips64el-deb: - - libdrm: - mips64el-deb: - - libepoxy: - mips64el-deb: - - gtk-vnc: - mips64el-deb: - - mesa-libgbm: - mips64el-deb: - meson: OpenSUSELeap15:
@@ -81,18 +64,6 @@ mappings: python3-wheel: OpenSUSELeap15: python311-pip - sdl2: - mips64el-deb: - - sdl2-image: - mips64el-deb: - - virglrenderer: - mips64el-deb: - - vte: - mips64el-deb: - pypi_mappings: # Request more recent version meson:
Signature · 1 line
2.39.5
PATCH v4 27/32 tests/vm: fix build_path based path
In reply to Alex BennéeWe no longer need to go into the per-arch build directories to find the build directories binary. Lets call it directly.
--- tests/vm/basevm.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
tests/vm/basevm.py +1 -2
@@ -520,8 +520,7 @@ def get_qemu_path(arch, build_path=None): if "QEMU" in os.environ: qemu_path = os.environ["QEMU"] elif build_path: - qemu_path = os.path.join(build_path, arch + "-softmmu") - qemu_path = os.path.join(qemu_path, "qemu-system-" + arch) + qemu_path = os.path.join(build_path, "qemu-system-" + arch) else: # Default is to use system path for qemu. qemu_path = "qemu-system-" + arch
Signature · 1 line
2.39.5
PATCH v4 28/32 tests/vm: partially un-tabify help output
In reply to Alex BennéeWhile the make syntax itself uses tabs having a mixture of tabs and spaces in the vm-help output make no sense and confuses things lining up between terminal and editor. Fix that.
--- tests/vm/Makefile.include | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
tests/vm/Makefile.include +13 -13
@@ -64,23 +64,23 @@ endif @echo " vm-boot-ssh-<guest> - Boot guest and login via ssh" @echo @echo "Special variables:" - @echo " BUILD_TARGET=foo - Override the build target" - @echo " DEBUG=1 - Enable verbose output on host and interactive debugging" - @echo ' EXTRA_CONFIGURE_OPTS="..." - Pass to configure step' - @echo " J=[0..9]* - Override the -jN parameter for make commands" - @echo " LOG_CONSOLE=1 - Log console to file in: ~/.cache/qemu-vm " - @echo " USE_TCG=1 - Use TCG for cross-arch images" - @echo " QEMU=/path/to/qemu - Change path to QEMU binary" + @echo " BUILD_TARGET=foo - Override the build target" + @echo " DEBUG=1 - Enable verbose output on host and interactive debugging" + @echo ' EXTRA_CONFIGURE_OPTS="..." - Pass to configure step' + @echo " J=[0..9]* - Override the -jN parameter for make commands" + @echo " LOG_CONSOLE=1 - Log console to file in: ~/.cache/qemu-vm " + @echo " USE_TCG=1 - Use TCG for cross-arch images" + @echo " QEMU=/path/to/qemu - Change path to QEMU binary" ifeq ($(HAVE_PYTHON_YAML),yes) - @echo " QEMU_CONFIG=/path/conf.yml - Change path to VM configuration .yml file." + @echo " QEMU_CONFIG=/path/conf.yml - Change path to VM configuration .yml file." else @echo " (install python3-yaml to enable support for yaml file to configure a VM.)" endif - @echo " See conf_example_*.yml for file format details." - @echo " QEMU_IMG=/path/to/qemu-img - Change path to qemu-img tool" - @echo " QEMU_LOCAL=1 - Use QEMU binary local to this build." - @echo " TARGET_LIST=a,b,c - Override target list in builds" - @echo " V=1 - Enable verbose output on host and guest commands" + @echo " See conf_example_*.yml for file format details." + @echo " QEMU_IMG=/path/to/qemu-img - Change path to qemu-img tool" + @echo " QEMU_LOCAL=1 - Use QEMU binary local to this build." + @echo " TARGET_LIST=a,b,c - Override target list in builds" + @echo " V=1 - Enable verbose output on host and guest commands" vm-build-all: $(addprefix vm-build-, $(IMAGES))
Signature · 1 line
2.39.5
Re: [PATCH v4 28/32] tests/vm: partially un-tabify help output
Quoted 8 lines · Alex Bennée
While the make syntax itself uses tabs having a mixture of tabs and spaces in the vm-help output make no sense and confuses things lining up between terminal and editor. Fix that.
Signed-off-by Alex Bennée <[email protected]>--- tests/vm/Makefile.include | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
PATCH v4 29/32 tests/vm: allow interactive login as root
In reply to Alex BennéeThis is useful when debugging and you want to add packages to an image.
--- tests/vm/Makefile.include | 3 ++- tests/vm/basevm.py | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-)
tests/vm/Makefile.include +2 -1
@@ -66,6 +66,7 @@ endif @echo "Special variables:" @echo " BUILD_TARGET=foo - Override the build target" @echo " DEBUG=1 - Enable verbose output on host and interactive debugging" + @echo " ROOT_USER=1 - Login as root user for interactive shell" @echo ' EXTRA_CONFIGURE_OPTS="..." - Pass to configure step' @echo " J=[0..9]* - Override the -jN parameter for make commands" @echo " LOG_CONSOLE=1 - Log console to file in: ~/.cache/qemu-vm "
@@ -141,6 +142,6 @@ vm-boot-ssh-%: $(IMAGES_DIR)/%.img $(VM_VENV) $(if $(EFI_AARCH64),--efi-aarch64 $(EFI_AARCH64)) \ $(if $(LOG_CONSOLE),--log-console) \ --image "$<" \ - --interactive \ + $(if $(ROOT_USER),--interactive-root,-interactive) \ false, \ " VM-BOOT-SSH $*") || true
tests/vm/basevm.py +7 -2
@@ -612,8 +612,11 @@ def get_default_jobs(): parser.add_argument("--source-path", default=None, help="Path of source directory, "\ "for finding additional files. ") - parser.add_argument("--interactive", "-I", action="store_true", - help="Interactively run command") + int_ops = parser.add_mutually_exclusive_group() + int_ops.add_argument("--interactive", "-I", action="store_true", + help="Interactively run command") + int_ops.add_argument("--interactive-root", action="store_true", + help="Interactively run command as root") parser.add_argument("--snapshot", "-s", action="store_true", help="run tests with a snapshot") parser.add_argument("--genisoimage", default="genisoimage",
@@ -675,6 +678,8 @@ def main(vmcls, config=None): exitcode = 3 if args.interactive: vm.ssh() + elif args.interactive_root: + vm.ssh_root() if not args.snapshot: vm.graceful_shutdown()
Signature · 1 line
2.39.5
Re: [PATCH v4 29/32] tests/vm: allow interactive login as root
Quoted 8 lines · Alex Bennée
This is useful when debugging and you want to add packages to an image.
Signed-off-by Alex Bennée <[email protected]>--- tests/vm/Makefile.include | 3 ++- tests/vm/basevm.py | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-)
PATCH v4 30/32 pc-bios: ensure keymaps dependencies set vnc tests
In reply to Alex BennéeI was seeing failures on vnc-display-test on FreeBSD:
make vm-build-freebsd V=1 TARGET_LIST=aarch64-softmmu BUILD_TARGET=check-qtest QEMU_LOCAL=1 DEBUG=1
Leads to:
qemu-system-aarch64: -vnc none: could not read keymap file: 'en-us'
Broken pipe
../src/tests/qtest/libqtest.c:196: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0)
which was as far as I could tell because we don't populate the $BLD/pc-bios/keymaps (although something attempts to symlink qemu-bundle/usr/local/share/qemu/keymaps/ to that dir).
--- pc-bios/keymaps/meson.build | 17 ++++++++--------- tests/qtest/meson.build | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-)
pc-bios/keymaps/meson.build +8 -9
@@ -39,19 +39,18 @@ else native_qemu_keymap = qemu_keymap endif +keymap_targets = [] if native_qemu_keymap.found() - t = [] foreach km, args: keymaps # generate with qemu-kvm - t += custom_target(km, - build_by_default: true, - output: km, - command: [native_qemu_keymap, '-f', '@OUTPUT@', args.split()], - install: have_system, - install_dir: qemu_datadir / 'keymaps') + keymap_targets += custom_target(km, + build_by_default: true, + output: km, + command: [native_qemu_keymap, '-f', '@OUTPUT@', args.split()], + install: have_system, + install_dir: qemu_datadir / 'keymaps') endforeach - - alias_target('update-keymaps', t) + alias_target('update-keymaps', keymap_targets) else install_data(keymaps.keys(), install_dir: qemu_datadir / 'keymaps') endif
tests/qtest/meson.build +1 -1
@@ -383,7 +383,7 @@ qtests = { if vnc.found() gvnc = dependency('gvnc-1.0', method: 'pkg-config', required: false) if gvnc.found() - qtests += {'vnc-display-test': [gvnc]} + qtests += {'vnc-display-test': [gvnc, keymap_targets]} qtests_generic += [ 'vnc-display-test' ] endif endif
Signature · 1 line
2.39.5
Re: [PATCH v4 30/32] pc-bios: ensure keymaps dependencies set vnc tests
Quoted 6 lines · Alex Bennée
I was seeing failures on vnc-display-test on FreeBSD:
make vm-build-freebsd V=1 TARGET_LIST=aarch64-softmmu BUILD_TARGET=check-qtest QEMU_LOCAL=1 DEBUG=1
Leads to:
Quoted 7 lines
qemu-system-aarch64: -vnc none: could not read keymap file: 'en-us'
Broken pipe
../src/tests/qtest/libqtest.c:196:kill_qemu()tried to terminate QEMU process but encountered exit status 1 (expected 0)which was as far as I could tell because we don't populate the $BLD/pc-bios/keymaps (although something attempts to symlink qemu-bundle/usr/local/share/qemu/keymaps/ to that dir).
That something being scripts/symlink-install-tree.py.
This is where QEMU looks for the keymaps and your patch ensures that it is populated before running the test. Please add the above info to the commit message just for accuracy; otherwise:
Paolo
Quoted 52 lines
Signed-off-by Alex Bennée <[email protected]>Cc Paolo Bonzini <[email protected]>--- pc-bios/keymaps/meson.build | 17 ++++++++--------- tests/qtest/meson.build | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-)pc-bios/keymaps/meson.build +8
-9@@ -39,19 +39,18 @@ else native_qemu_keymap = qemu_keymap endif +keymap_targets = [] if native_qemu_keymap.found() - t = [] foreach km, args: keymaps # generate with qemu-kvm - t += custom_target(km, - build_by_default: true, - output: km, - command: [native_qemu_keymap, '-f', '@OUTPUT@', args.split()], - install: have_system, - install_dir: qemu_datadir / 'keymaps') + keymap_targets += custom_target(km, + build_by_default: true, + output: km, + command: [native_qemu_keymap, '-f', '@OUTPUT@', args.split()], + install: have_system, + install_dir: qemu_datadir / 'keymaps') endforeach - - alias_target('update-keymaps', t) + alias_target('update-keymaps', keymap_targets) else install_data(keymaps.keys(), install_dir: qemu_datadir / 'keymaps') endiftests/qtest/meson.build +1
-1@@ -383,7 +383,7 @@ qtests = { if vnc.found() gvnc = dependency('gvnc-1.0', method: 'pkg-config', required: false) if gvnc.found() - qtests += {'vnc-display-test': [gvnc]} + qtests += {'vnc-display-test': [gvnc, keymap_targets]} qtests_generic += [ 'vnc-display-test' ] endif endif
PATCH v4 31/32 dockerfiles: Remove 'MAINTAINER' entry in debian-tricore-cross.docker
In reply to Alex BennéeFrom: Philippe Mathieu-Daudé <[email protected]>
AMSAT closed its email service [*] so my personal email address is now defunct. Remove it to avoid bouncing emails.
Message-Id: <[email protected]>
--- tests/docker/dockerfiles/debian-tricore-cross.docker | 2 -- 1 file changed, 2 deletions(-)
tests/docker/dockerfiles/debian-tricore-cross.docker +0 -2
@@ -11,8 +11,6 @@ # FROM docker.io/library/debian:11-slim -MAINTAINER Philippe Mathieu-Daudé <[email protected]> - RUN apt update && \ DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \ DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy \
Signature · 1 line
2.39.5
PATCH v4 32/32 MAINTAINERS: Remove myself from reviewers
In reply to Alex BennéeFrom: Wainer dos Santos Moschetta <[email protected]>
The time I spent contributing to QEMU was great, but I've not been active for a long time now. So removing myself from the reviewers list of "Integration Testing with the Avocado framework" and
"Build and test automation" subsystems.
Message-Id: <[email protected]>
--- MAINTAINERS | 2 -- 1 file changed, 2 deletions(-)
MAINTAINERS +0 -2
@@ -4152,7 +4152,6 @@ M: Alex Bennée <[email protected]> T: git https://gitlab.com/stsquad/qemu testing/next M: Philippe Mathieu-Daudé <[email protected]> M: Thomas Huth <[email protected]> -R: Wainer dos Santos Moschetta <[email protected]> S: Maintained F: .github/workflows/lockdown.yml F: .gitlab-ci.yml
@@ -4198,7 +4197,6 @@ Integration Testing with the Avocado framework W: https://trello.com/b/6Qi1pxVn/avocado-qemu R: Cleber Rosa <[email protected]> R: Philippe Mathieu-Daudé <[email protected]> -R: Wainer dos Santos Moschetta <[email protected]> S: Odd Fixes F: tests/avocado/
Signature · 1 line
2.39.5