Functional test patches
Subsystems (2)
[PULL 09/12] tests/functional/hppa: Add a CD-ROM boot test for qemu-system-hppa
In reply to Thomas HuthFrom: Thomas Huth <[email protected]>
Add a test which boots a HP-UX firmware upgrade CD-ROM. It exercise the PCI LSI53C895A SCSI controller. The ISO image comes from:
https://web.archive.org/web/20101204061612/http://ftp.parisc-linux.org/kernels/712/PF_C7120023
The test is very quick, less than 3s.
Based on an old patch from Philippe that has been posted here:
https://www.mail-archive.com/[email protected]/msg651012.html
[thuth: Adjusted the patch to the functional framework,
and adjusted the commit message]
Message-ID: <[email protected]>
--- MAINTAINERS | 2 +- tests/functional/hppa/meson.build | 4 +++ tests/functional/hppa/test_cdboot.py | 38 ++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100755 tests/functional/hppa/test_cdboot.py
MAINTAINERS +1 -1
@@ -1276,7 +1276,7 @@ F: include/hw/pci-host/astro.h F: include/hw/pci-host/dino.h F: pc-bios/hppa-firmware.img F: roms/seabios-hppa/ -F: tests/functional/hppa/test_seabios.py +F: tests/functional/hppa/ LoongArch Machines ------------------
tests/functional/hppa/meson.build +4 -0
@@ -3,3 +3,7 @@ tests_hppa_system_quick = [ 'seabios', ] + +tests_hppa_system_thorough = [ + 'cdboot', +]
tests/functional/hppa/test_cdboot.py new file +38 -0
@@ -0,0 +1,38 @@ +#!/usr/bin/env python3 +# +# CD boot test for HPPA machines +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import QemuSystemTest, Asset, exec_command_and_wait_for_pattern +from qemu_test import wait_for_console_pattern + + +class HppaCdBoot(QemuSystemTest): + + ASSET_CD = Asset( + ('https://github.com/philmd/qemu-testing-blob/raw/ec1b741/' + 'hppa/hp9000/712/C7120023.frm'), + '32c612ad2074516986bdc27768903c561fa92af2ca48e5ac3f3359ade1c42f70') + + def test_cdboot(self): + self.set_machine('B160L') + cdrom_path = self.ASSET_CD.fetch() + + self.vm.set_console() + self.vm.add_args('-cdrom', cdrom_path, + '-boot', 'd', + '-no-reboot') + self.vm.launch() + wait_for_console_pattern(self, 'Unrecognized MODEL TYPE = 502') + wait_for_console_pattern(self, 'UPDATE PAUSED>') + + exec_command_and_wait_for_pattern(self, 'exit\r', 'UPDATE>') + exec_command_and_wait_for_pattern(self, 'ls\r', 'IMAGE1B') + wait_for_console_pattern(self, 'UPDATE>') + exec_command_and_wait_for_pattern(self, 'exit\r', + 'THIS UTILITY WILL NOW RESET THE SYSTEM.....') + + +if __name__ == '__main__': + QemuSystemTest.main()
Signature · 1 line
2.51.0
Hi Richard!
The following changes since commit ab8008b231e758e03c87c1c483c03afdd9c02e19:
Merge tag 'pull-9p-20250918' of https://github.com/cschoenebeck/qemu into staging (2025-09-19 12:21:35 -0700)
are available in the Git repository at:
https://gitlab.com/thuth/qemu.git tags/pull-request-2025-09-24
for you to fetch changes up to 097bbfc5e0ba889ce17106ef941a56111c3de270:
tests/functional: treat unknown exceptions as transient faults (2025-09-24 08:26:11 +0200)
----------------------------------------------------------------
* New functional tests to check via the vmstate-static-checker.py script
* New functional tests for CD-ROM boot on hppa
* Skip functional tests on more exotic network errors, too
* Fix another issue with htags in the gitlab CI
* Some additional minor fixes to various functional tests
----------------------------------------------------------------
Daniel P. Berrangé (3):
tests/functional: use self.log for all logging tests/functional: retry when seeing ConnectionError exception tests/functional: treat unknown exceptions as transient faults
Peter Maydell (1):
.gitlab-ci.d/buildtest.yml: Unset CI_COMMIT_DESCRIPTION for htags
Thomas Huth (8):
tests/functional/m68k: Use proper polling in the next-cube test tests/functional/s390x/test_pxelinux: Fix warnings from pylint
tests: Move the old vmstate-static-checker files to tests/data/ tests/functional: Test whether the vmstate-static-checker script works fine tests/data/vmstate-static-checker: Add dump files from QEMU 7.2.17 tests/functional: Use vmstate-static-checker.py to test data from v7.2 tests/functional/hppa: Add a CD-ROM boot test for qemu-system-hppa
tests: Fix "make check-functional" for targets without thorough tests
MAINTAINERS | 6 +-
.gitlab-ci.d/buildtest.yml | 2 +-
tests/Makefile.include | 3 +
.../vmstate-static-checker/aarch64/virt-7.2.json | 2571 +++++++++++++++
.../vmstate-static-checker}/dump1.json | 0
.../vmstate-static-checker}/dump2.json | 0
.../data/vmstate-static-checker/m68k/virt-7.2.json | 2936 +++++++++++++++++
.../vmstate-static-checker/ppc64/pseries-7.2.json | 1068 +++++++
.../s390x/s390-ccw-virtio-7.2.json | 475 +++
.../vmstate-static-checker/x86_64/pc-q35-7.2.json | 3297 ++++++++++++++++++++
tests/functional/aarch64/meson.build | 1 +
tests/functional/aarch64/test_virt.py | 4 +-
tests/functional/arm/test_integratorcp.py | 3 +-
tests/functional/generic/test_vmstate.py | 67 +
tests/functional/hppa/meson.build | 4 +
tests/functional/hppa/test_cdboot.py | 38 +
tests/functional/m68k/meson.build | 4 +
tests/functional/m68k/test_nextcube.py | 17 +-
tests/functional/mips64el/test_malta.py | 3 +-
tests/functional/ppc64/meson.build | 1 +
tests/functional/qemu_test/asset.py | 10 +-
tests/functional/replay_kernel.py | 16 +-
tests/functional/s390x/meson.build | 4 +
tests/functional/s390x/test_pxelinux.py | 25 +-
tests/functional/x86_64/meson.build | 4 +-
tests/functional/x86_64/test_acpi_bits.py | 31 +-
tests/functional/x86_64/test_bad_vmstate.py | 58 +
27 files changed, 10599 insertions(+), 49 deletions(-)
create mode 100644 tests/data/vmstate-static-checker/aarch64/virt-7.2.json
rename tests/{vmstate-static-checker-data => data/vmstate-static-checker}/dump1.json (100%)
rename tests/{vmstate-static-checker-data => data/vmstate-static-checker}/dump2.json (100%)
create mode 100644 tests/data/vmstate-static-checker/m68k/virt-7.2.json
create mode 100644 tests/data/vmstate-static-checker/ppc64/pseries-7.2.json
create mode 100644 tests/data/vmstate-static-checker/s390x/s390-ccw-virtio-7.2.json
create mode 100644 tests/data/vmstate-static-checker/x86_64/pc-q35-7.2.json
create mode 100755 tests/functional/generic/test_vmstate.py
create mode 100755 tests/functional/hppa/test_cdboot.py
create mode 100755 tests/functional/x86_64/test_bad_vmstate.py[PULL 04/12] tests/functional: Test whether the vmstate-static-checker script works fine
From: Thomas Huth <[email protected]>
We've got two vmstate dump files in the repository which are meant for verifying whether the vmstate-static-checker.py works as expected. Since running this manually is a cumbersome job, let's add an automated test for this instead that runs the script with the two dump files and checks for the expected output.
Message-ID: <[email protected]>
--- MAINTAINERS | 1 + tests/functional/x86_64/meson.build | 1 + tests/functional/x86_64/test_bad_vmstate.py | 58 +++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100755 tests/functional/x86_64/test_bad_vmstate.py
MAINTAINERS +1 -0
@@ -3613,6 +3613,7 @@ F: migration/ F: scripts/vmstate-static-checker.py F: tests/functional/migration.py F: tests/functional/*/*migration.py +F: tests/functional/x86_64/test_bad_vmstate.py F: tests/data/vmstate-static-checker/ F: tests/qtest/migration/ F: tests/qtest/migration-*
tests/functional/x86_64/meson.build +1 -0
@@ -10,6 +10,7 @@ test_x86_64_timeouts = { } tests_x86_64_system_quick = [ + 'bad_vmstate', 'cpu_model_versions', 'cpu_queries', 'mem_addr_space',
tests/functional/x86_64/test_bad_vmstate.py new file +58 -0
58 lines not on this page · raw message
Signature · 1 line
2.51.0
[PULL 12/12] tests/functional: treat unknown exceptions as transient faults
In reply to Thomas HuthFrom: Daniel P. Berrangé <[email protected]>
To maximise the robustness of the functional tests we want to treat most asset download failures as non-fatal to the test suite. Instead it should just skip the tests which need that particular asset. The only time aim to make it fatal is for 404 errors which are highly likely to reflect genuine problems to be fixed.
We catch certain exception classes and handle them as transient errors, but unfortunately it is proving difficult to predict what exception classes urlopen() is capable of raising, with new possibilities being discovered.
To provide a fail-safe, treat the generic Exception class as being a transient error too. This may well mask certain genuine bugs, but it is preferrable to prioritize running the test suite to the greatest extent practical.
Message-ID: <[email protected]>
--- tests/functional/qemu_test/asset.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tests/functional/qemu_test/asset.py +2 -1
@@ -188,7 +188,8 @@ def fetch(self): continue except Exception as e: tmp_cache_file.unlink() - raise AssetError(self, "Unable to download: %s" % e) + raise AssetError(self, "Unable to download: %s" % e, + transient=True) if not os.path.exists(tmp_cache_file): raise AssetError(self, "Download retries exceeded", transient=True)
Signature · 1 line
2.51.0
[PULL 08/12] .gitlab-ci.d/buildtest.yml: Unset CI_COMMIT_DESCRIPTION for htags
In reply to Thomas HuthFrom: Peter Maydell <[email protected]>
In commit 52a21689cd829 we added a workaround for a bug in older versions of htags where they fail with a weird error message if the environment is too large. However, we missed one variable which gitlab CI can set to the body of the commit message:CI_COMMIT_DESCRIPTION.
Add this to the variables we unset when running htags, so that the 'pages' job doesn't fail if the most recent commit happens to have a very large commit message.
Message-ID: <[email protected]>
--- .gitlab-ci.d/buildtest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.d/buildtest.yml +1 -1
@@ -736,7 +736,7 @@ pages: - make gtags # We unset variables to work around a bug in some htags versions # which causes it to fail when the environment is large - - CI_COMMIT_MESSAGE= CI_COMMIT_TAG_MESSAGE= htags + - CI_COMMIT_MESSAGE= CI_COMMIT_TAG_MESSAGE= CI_COMMIT_DESCRIPTION= htags -anT --tree-view=filetree -m qemu_init -t "Welcome to the QEMU sourcecode" - mv HTML public/src
Signature · 1 line
2.51.0
[PULL 06/12] tests/functional: Use vmstate-static-checker.py to test data from v7.2
In reply to Thomas HuthFrom: Thomas Huth <[email protected]>
We've got this nice vmstate-static-checker.py script that can help to detect screw-ups in the migration states. Unfortunately, it's currently only run manually, which can be cumbersome. Let's run it from a functional test automatically with the reference data from QEMU 7.2, so that we get at least a basic coverage here. Since the test can fail when the checker script detects a false positive, mark the test with a skipFlakyTest decorator for now, so that it is only run when the user also set the QEMU_TEST_FLAKY_TESTS environment variable.
Message-ID: <[email protected]>
--- MAINTAINERS | 1 + tests/functional/aarch64/meson.build | 1 + tests/functional/generic/test_vmstate.py | 67 ++++++++++++++++++++++++ tests/functional/m68k/meson.build | 4 ++ tests/functional/ppc64/meson.build | 1 + tests/functional/s390x/meson.build | 4 ++ tests/functional/x86_64/meson.build | 3 +- 7 files changed, 80 insertions(+), 1 deletion(-) create mode 100755 tests/functional/generic/test_vmstate.py
MAINTAINERS +1 -0
@@ -3613,6 +3613,7 @@ F: migration/ F: scripts/vmstate-static-checker.py F: tests/functional/migration.py F: tests/functional/*/*migration.py +F: tests/functional/generic/test_vmstate.py F: tests/functional/x86_64/test_bad_vmstate.py F: tests/data/vmstate-static-checker/ F: tests/qtest/migration/
tests/functional/aarch64/meson.build +1 -0
@@ -19,6 +19,7 @@ test_aarch64_timeouts = { tests_aarch64_system_quick = [ 'migration', + 'vmstate', ] tests_aarch64_system_thorough = [
tests/functional/generic/test_vmstate.py new file +67 -0
67 lines not on this page · raw message
tests/functional/m68k/meson.build +4 -0
@@ -1,5 +1,9 @@ # SPDX-License-Identifier: GPL-2.0-or-later +tests_m68k_system_quick = [ + 'vmstate', +] + tests_m68k_system_thorough = [ 'mcf5208evb', 'nextcube',
tests/functional/ppc64/meson.build +1 -0
@@ -11,6 +11,7 @@ test_ppc64_timeouts = { tests_ppc64_system_quick = [ 'migration', + 'vmstate', ] tests_ppc64_system_thorough = [
tests/functional/s390x/meson.build +4 -0
@@ -4,6 +4,10 @@ test_s390x_timeouts = { 'ccw_virtio' : 420, } +tests_s390x_system_quick = [ + 'vmstate', +] + tests_s390x_system_thorough = [ 'ccw_virtio', 'pxelinux',
tests/functional/x86_64/meson.build +2 -1
@@ -14,10 +14,11 @@ tests_x86_64_system_quick = [ 'cpu_model_versions', 'cpu_queries', 'mem_addr_space', + 'memlock', 'migration', 'pc_cpu_hotplug_props', 'virtio_version', - 'memlock', + 'vmstate', ] tests_x86_64_system_thorough = [
Signature · 1 line
2.51.0
[PULL 05/12] tests/data/vmstate-static-checker: Add dump files from QEMU 7.2.17
In reply to Thomas HuthFrom: Thomas Huth <[email protected]>
For automatic tests, we need reference files from older QEMU versions. QEMU 7.2 is a long term stable release, so it's a good candidate for checking whether the migration could still work correctly. Let's add the files from that version that have been taken with the "-dump-vmstate" parameter of QEMU (compiled with single machines and the configure switch "--without-default-devices" to keep the json files reasonable small).
Some devices also have been removed manually from the json files, e.g. the "pci-bridge" (which can be disabled in later QEMU versions via Kconfig), and some Linux-related devices like "scsi-block" and "scsi-generic" and KVM-related devices. Without removing them, we might get errors otherwise if these devices have not been compiled into the destination QEMU build.
Message-ID: <[email protected]>
--- .../aarch64/virt-7.2.json | 2571 +++++++++++++ .../vmstate-static-checker/m68k/virt-7.2.json | 2936 +++++++++++++++ .../ppc64/pseries-7.2.json | 1068 ++++++ .../s390x/s390-ccw-virtio-7.2.json | 475 +++ .../x86_64/pc-q35-7.2.json | 3297 +++++++++++++++++ 5 files changed, 10347 insertions(+) create mode 100644 tests/data/vmstate-static-checker/aarch64/virt-7.2.json create mode 100644 tests/data/vmstate-static-checker/m68k/virt-7.2.json create mode 100644 tests/data/vmstate-static-checker/ppc64/pseries-7.2.json create mode 100644 tests/data/vmstate-static-checker/s390x/s390-ccw-virtio-7.2.json create mode 100644 tests/data/vmstate-static-checker/x86_64/pc-q35-7.2.json
tests/data/vmstate-static-checker/aarch64/virt-7.2.json new file +2571 -0
@@ -0,0 +1,2571 @@ +{ + "vmschkmachine": { + "Name": "virt-7.2" + }, + "gpex-pcihost": { + "Name": "gpex-pcihost", + "version_id": 1, + "minimum_version_id": 1, + "Description": { + "name": "PCIHost", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "config_reg", + "version_id": 0, + "field_exists": false, + "size": 4 + } + ] + } + }, + "arm_gic": { + "Name": "arm_gic", + "version_id": 12, + "minimum_version_id": 12, + "Description": { + "name": "arm_gic", + "version_id": 12, + "minimum_version_id": 12, + "Fields": [ + { + "field": "ctlr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "cpu_ctlr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "irq_state", + "version_id": 1, + "field_exists": false, + "size": 7, + "Description": { + "name": "arm_gic_irq_state", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "enabled", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "pending", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "active", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "level", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "model", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "edge_trigger", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "group", + "version_id": 0, + "field_exists": false, + "size": 1 + } + ] + } + }, + { + "field": "irq_target", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "priority1", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "priority2", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "sgi_pending", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "priority_mask", + "version_id": 0, + "field_exists": false, + "size": 2 + }, + { + "field": "running_priority", + "version_id": 0, + "field_exists": false, + "size": 2 + }, + { + "field": "current_pending", + "version_id": 0, + "field_exists": false, + "size": 2 + }, + { + "field": "bpr", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "abpr", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "apr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "nsapr", + "version_id": 0, + "field_exists": false, + "size": 4 + } + ], + "Subsections": [ + { + "name": "arm_gic_virt_state", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "h_hcr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "h_misr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "h_lr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "h_apr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "cpu_ctlr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "priority_mask", + "version_id": 0, + "field_exists": false, + "size": 2 + }, + { + "field": "running_priority", + "version_id": 0, + "field_exists": false, + "size": 2 + }, + { + "field": "current_pending", + "version_id": 0, + "field_exists": false, + "size": 2 + }, + { + "field": "bpr", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "abpr", + "version_id": 0, + "field_exists": false, + "size": 1 + } + ] + } + ] + } + }, + "arm-gicv3-its-common": { + "Name": "arm-gicv3-its-common", + "version_id": 0, + "minimum_version_id": 0, + "Description": { + "name": "arm_gicv3_its", + "version_id": 0, + "minimum_version_id": 0, + "Fields": [ + { + "field": "ctlr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "iidr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "cbaser", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "cwriter", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "creadr", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "baser", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ] + } + }, + "arm-gicv3-common": { + "Name": "arm-gicv3-common", + "version_id": 1, + "minimum_version_id": 1, + "Description": { + "name": "arm_gicv3", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "gicd_ctlr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "gicd_statusr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "group", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "grpmod", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "enabled", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "pending", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "active", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "level", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "edge_trigger", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "gicd_ipriority", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "gicd_irouter", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "gicd_nsacr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "cpu", + "version_id": 0, + "field_exists": false, + "size": 664, + "Description": { + "name": "arm_gicv3_cpu", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "level", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "gicr_ctlr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "gicr_statusr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "gicr_waker", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "gicr_propbaser", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "gicr_pendbaser", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "gicr_igroupr0", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "gicr_ienabler0", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "gicr_ipendr0", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "gicr_iactiver0", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "edge_trigger", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "gicr_igrpmodr0", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "gicr_nsacr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "gicr_ipriorityr", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "icc_ctlr_el1", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "icc_pmr_el1", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "icc_bpr", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "icc_apr", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "icc_igrpen", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "icc_ctlr_el3", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ], + "Subsections": [ + { + "name": "arm_gicv3_cpu/virt", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "ich_apr", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "ich_hcr_el2", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "ich_lr_el2", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "ich_vmcr_el2", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ] + }, + { + "name": "arm_gicv3_cpu/sre_el1", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "icc_sre_el1", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ] + }, + { + "name": "arm_gicv3_cpu/gicv4", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "gicr_vpropbaser", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "gicr_vpendbaser", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ] + } + ] + } + } + ], + "Subsections": [ + { + "name": "arm_gicv3/gicd_no_migration_shift_bug", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "gicd_no_migration_shift_bug", + "version_id": 0, + "field_exists": false, + "size": 1 + } + ] + } + ] + } + }, + "fw_cfg": { + "Name": "fw_cfg", + "version_id": 2, + "minimum_version_id": 1, + "Description": { + "name": "fw_cfg", + "version_id": 2, + "minimum_version_id": 1, + "Fields": [ + { + "field": "cur_entry", + "version_id": 0, + "field_exists": false, + "size": 2 + }, + { + "field": "cur_offset", + "version_id": 0, + "field_exists": true, + "size": 4 + }, + { + "field": "cur_offset", + "version_id": 2, + "field_exists": false, + "size": 4 + } + ], + "Subsections": [ + { + "name": "fw_cfg/dma", + "version_id": 0, + "minimum_version_id": 0, + "Fields": [ + { + "field": "dma_addr", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ] + }, + { + "name": "fw_cfg/acpi_mr", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "table_mr_size", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "linker_mr_size", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "rsdp_mr_size", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ] + } + ] + } + }, + "cfi.pflash01": { + "Name": "cfi.pflash01", + "version_id": 1, + "minimum_version_id": 1, + "Description": { + "name": "pflash_cfi01", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "wcycle", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "cmd", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "status", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "counter", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ], + "Subsections": [ + { + "name": "pflash_cfi01_blk_write", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "blk_bytes", + "version_id": 0, + "field_exists": false, + "size": 0 + }, + { + "field": "blk_offset", + "version_id": 0, + "field_exists": false, + "size": 4 + } + ] + } + ] + } + }, + "pl061_luminary": { + "Name": "pl061_luminary", + "version_id": 4, + "minimum_version_id": 4, + "Description": { + "name": "pl061", + "version_id": 4, + "minimum_version_id": 4, + "Fields": [ + { + "field": "locked", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "data", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "old_out_data", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "old_in_data", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "dir", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "isense", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "ibe", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "iev", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "im", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "istate", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "afsel", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "dr2r", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "dr4r", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "dr8r", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "odr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "pur", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "pdr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "slr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "den", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "cr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "amsel", + "version_id": 2, + "field_exists": false, + "size": 4 + } + ] + } + }, + "pl011_luminary": { + "Name": "pl011_luminary", + "version_id": 2, + "minimum_version_id": 2, + "Description": { + "name": "pl011", + "version_id": 2, + "minimum_version_id": 2, + "Fields": [ + { + "field": "readbuff", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "flags", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "lcr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "rsr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "cr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "dmacr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "int_enabled", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "int_level", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "read_fifo", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "ilpr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "ibrd", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "fbrd", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "ifl", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "read_pos", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "read_count", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "read_trigger", + "version_id": 0, + "field_exists": false, + "size": 4 + } + ], + "Subsections": [ + { + "name": "pl011/clock", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "clk", + "version_id": 0, + "field_exists": false, + "size": 8, + "Description": { + "name": "clock", + "version_id": 0, + "minimum_version_id": 0, + "Fields": [ + { + "field": "period", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ], + "Subsections": [ + { + "name": "clock/muldiv", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "multiplier", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "divider", + "version_id": 0, + "field_exists": false, + "size": 4 + } + ] + } + ] + } + } + ] + } + ] + } + }, + "pl061": { + "Name": "pl061", + "version_id": 4, + "minimum_version_id": 4, + "Description": { + "name": "pl061", + "version_id": 4, + "minimum_version_id": 4, + "Fields": [ + { + "field": "locked", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "data", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "old_out_data", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "old_in_data", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "dir", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "isense", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "ibe", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "iev", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "im", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "istate", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "afsel", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "dr2r", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "dr4r", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "dr8r", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "odr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "pur", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "pdr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "slr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "den", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "cr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "amsel", + "version_id": 2, + "field_exists": false, + "size": 4 + } + ] + } + }, + "vmcoreinfo": { + "Name": "vmcoreinfo", + "version_id": 1, + "minimum_version_id": 1, + "Description": { + "name": "vmcoreinfo", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "has_vmcoreinfo", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "vmcoreinfo.host_format", + "version_id": 0, + "field_exists": false, + "size": 2 + }, + { + "field": "vmcoreinfo.guest_format", + "version_id": 0, + "field_exists": false, + "size": 2 + }, + { + "field": "vmcoreinfo.size", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "vmcoreinfo.paddr", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ] + } + }, + "arm_gic_common": { + "Name": "arm_gic_common", + "version_id": 12, + "minimum_version_id": 12, + "Description": { + "name": "arm_gic", + "version_id": 12, + "minimum_version_id": 12, + "Fields": [ + { + "field": "ctlr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "cpu_ctlr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "irq_state", + "version_id": 1, + "field_exists": false, + "size": 7, + "Description": { + "name": "arm_gic_irq_state", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "enabled", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "pending", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "active", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "level", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "model", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "edge_trigger", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "group", + "version_id": 0, + "field_exists": false, + "size": 1 + } + ] + } + }, + { + "field": "irq_target", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "priority1", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "priority2", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "sgi_pending", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "priority_mask", + "version_id": 0, + "field_exists": false, + "size": 2 + }, + { + "field": "running_priority", + "version_id": 0, + "field_exists": false, + "size": 2 + }, + { + "field": "current_pending", + "version_id": 0, + "field_exists": false, + "size": 2 + }, + { + "field": "bpr", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "abpr", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "apr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "nsapr", + "version_id": 0, + "field_exists": false, + "size": 4 + } + ], + "Subsections": [ + { + "name": "arm_gic_virt_state", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "h_hcr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "h_misr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "h_lr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "h_apr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "cpu_ctlr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "priority_mask", + "version_id": 0, + "field_exists": false, + "size": 2 + }, + { + "field": "running_priority", + "version_id": 0, + "field_exists": false, + "size": 2 + }, + { + "field": "current_pending", + "version_id": 0, + "field_exists": false, + "size": 2 + }, + { + "field": "bpr", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "abpr", + "version_id": 0, + "field_exists": false, + "size": 1 + } + ] + } + ] + } + }, + "arm-smmuv3": { + "Name": "arm-smmuv3", + "version_id": 1, + "minimum_version_id": 1, + "Description": { + "name": "smmuv3", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "features", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "sid_size", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "sid_split", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "cr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "cr0ack", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "statusr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "irq_ctrl", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "gerror", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "gerrorn", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "gerror_irq_cfg0", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "gerror_irq_cfg1", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "gerror_irq_cfg2", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "strtab_base", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "strtab_base_cfg", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "eventq_irq_cfg0", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "eventq_irq_cfg1", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "eventq_irq_cfg2", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "cmdq", + "version_id": 0, + "field_exists": false, + "size": 24, + "Description": { + "name": "smmuv3_queue", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "base", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "prod", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "cons", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "log2size", + "version_id": 0, + "field_exists": false, + "size": 1 + } + ] + } + }, + { + "field": "eventq", + "version_id": 0, + "field_exists": false, + "size": 24, + "Description": { + "name": "smmuv3_queue", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "base", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "prod", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "cons", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "log2size", + "version_id": 0, + "field_exists": false, + "size": 1 + } + ] + } + } + ] + } + }, + "pl011": { + "Name": "pl011", + "version_id": 2, + "minimum_version_id": 2, + "Description": { + "name": "pl011", + "version_id": 2, + "minimum_version_id": 2, + "Fields": [ + { + "field": "readbuff", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "flags", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "lcr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "rsr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "cr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "dmacr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "int_enabled", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "int_level", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "read_fifo", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "ilpr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "ibrd", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "fbrd", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "ifl", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "read_pos", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "read_count", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "read_trigger", + "version_id": 0, + "field_exists": false, + "size": 4 + } + ], + "Subsections": [ + { + "name": "pl011/clock", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "clk", + "version_id": 0, + "field_exists": false, + "size": 8, + "Description": { + "name": "clock", + "version_id": 0, + "minimum_version_id": 0, + "Fields": [ + { + "field": "period", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ], + "Subsections": [ + { + "name": "clock/muldiv", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "multiplier", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "divider", + "version_id": 0, + "field_exists": false, + "size": 4 + } + ] + } + ] + } + } + ] + } + ] + } + }, + "armv7m": { + "Name": "armv7m", + "version_id": 1, + "minimum_version_id": 1, + "Description": { + "name": "armv7m", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "refclk", + "version_id": 0, + "field_exists": false, + "size": 8, + "Description": { + "name": "clock", + "version_id": 0, + "minimum_version_id": 0, + "Fields": [ + { + "field": "period", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ], + "Subsections": [ + { + "name": "clock/muldiv", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "multiplier", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "divider", + "version_id": 0, + "field_exists": false, + "size": 4 + } + ] + } + ] + } + }, + { + "field": "cpuclk", + "version_id": 0, + "field_exists": false, + "size": 8, + "Description": { + "name": "clock", + "version_id": 0, + "minimum_version_id": 0, + "Fields": [ + { + "field": "period", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ], + "Subsections": [ + { + "name": "clock/muldiv", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "multiplier", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "divider", + "version_id": 0, + "field_exists": false, + "size": 4 + } + ] + } + ] + } + } + ] + } + }, + "fw_cfg_mem": { + "Name": "fw_cfg_mem", + "version_id": 2, + "minimum_version_id": 1, + "Description": { + "name": "fw_cfg", + "version_id": 2, + "minimum_version_id": 1, + "Fields": [ + { + "field": "cur_entry", + "version_id": 0, + "field_exists": false, + "size": 2 + }, + { + "field": "cur_offset", + "version_id": 0, + "field_exists": true, + "size": 4 + }, + { + "field": "cur_offset", + "version_id": 2, + "field_exists": false, + "size": 4 + } + ], + "Subsections": [ + { + "name": "fw_cfg/dma", + "version_id": 0, + "minimum_version_id": 0, + "Fields": [ + { + "field": "dma_addr", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ] + }, + { + "name": "fw_cfg/acpi_mr", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "table_mr_size", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "linker_mr_size", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "rsdp_mr_size", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ] + } + ] + } + }, + "pl031": { + "Name": "pl031", + "version_id": 1, + "minimum_version_id": 1, + "Description": { + "name": "pl031", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "tick_offset_vmstate", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "mr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "lr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "cr", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "im", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "is", + "version_id": 0, + "field_exists": false, + "size": 4 + } + ], + "Subsections": [ + { + "name": "pl031/tick-offset", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "tick_offset", + "version_id": 0, + "field_exists": false, + "size": 4 + } + ] + } + ] + } + }, + "fw_cfg_io": { + "Name": "fw_cfg_io", + "version_id": 2, + "minimum_version_id": 1, + "Description": { + "name": "fw_cfg", + "version_id": 2, + "minimum_version_id": 1, + "Fields": [ + { + "field": "cur_entry", + "version_id": 0, + "field_exists": false, + "size": 2 + }, + { + "field": "cur_offset", + "version_id": 0, + "field_exists": true, + "size": 4 + }, + { + "field": "cur_offset", + "version_id": 2, + "field_exists": false, + "size": 4 + } + ], + "Subsections": [ + { + "name": "fw_cfg/dma", + "version_id": 0, + "minimum_version_id": 0, + "Fields": [ + { + "field": "dma_addr", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ] + }, + { + "name": "fw_cfg/acpi_mr", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "table_mr_size", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "linker_mr_size", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "rsdp_mr_size", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ] + } + ] + } + }, + "virtio-serial-device": { + "Name": "virtio-serial-device", + "version_id": 3, + "minimum_version_id": 3, + "Description": { + "name": "virtio-console", + "version_id": 3, + "minimum_version_id": 3, + "Fields": [ + { + "field": "virtio", + "version_id": 0, + "field_exists": false, + "size": 0 + } + ] + } + }, + "acpi-ged": { + "Name": "acpi-ged", + "version_id": 1, + "minimum_version_id": 1, + "Description": { + "name": "acpi-ged", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "ged_state", + "version_id": 1, + "field_exists": false, + "size": 560, + "Description": { + "name": "acpi-ged-state", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "sel", + "version_id": 0, + "field_exists": false, + "size": 4 + } + ] + } + } + ], + "Subsections": [ + { + "name": "acpi-ged/memhp", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "memhp_state", + "version_id": 1, + "field_exists": false, + "size": 304, + "Description": { + "name": "memory hotplug state", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "selector", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "devs", + "version_id": 0, + "field_exists": false, + "size": 24, + "Description": { + "name": "memory hotplug device state", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "is_enabled", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "is_inserting", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "ost_event", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "ost_status", + "version_id": 0, + "field_exists": false, + "size": 4 + } + ] + } + } + ] + } + } + ] + }, + { + "name": "acpi-ged/ghes", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "ghes_state", + "version_id": 1, + "field_exists": false, + "size": 16, + "Description": { + "name": "acpi-ghes", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "ghes_addr_le", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ] + } + } + ] + } + ] + } + }, + "pcie-host-bridge": { + "Name": "pcie-host-bridge", + "version_id": 1, + "minimum_version_id": 1, + "Description": { + "name": "PCIHost", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "config_reg", + "version_id": 0, + "field_exists": false, + "size": 4 + } + ] + } + }, + "gpio-key": { + "Name": "gpio-key", + "version_id": 1, + "minimum_version_id": 1, + "Description": { + "name": "gpio-key", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "timer", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ] + } + }, + "armv7m_nvic": { + "Name": "armv7m_nvic", + "version_id": 4, + "minimum_version_id": 4, + "Description": { + "name": "armv7m_nvic", + "version_id": 4, + "minimum_version_id": 4, + "Fields": [ + { + "field": "vectors", + "version_id": 1, + "field_exists": false, + "size": 6, + "Description": { + "name": "armv7m_nvic_info", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "prio", + "version_id": 0, + "field_exists": false, + "size": 2 + }, + { + "field": "enabled", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "pending", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "active", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "level", + "version_id": 0, + "field_exists": false, + "size": 1 + } + ] + } + }, + { + "field": "prigroup[M_REG_NS]", + "version_id": 0, + "field_exists": false, + "size": 4 + } + ], + "Subsections": [ + { + "name": "armv7m_nvic/m-security", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "sec_vectors", + "version_id": 1, + "field_exists": false, + "size": 6, + "Description": { + "name": "armv7m_nvic_info", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "prio", + "version_id": 0, + "field_exists": false, + "size": 2 + }, + { + "field": "enabled", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "pending", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "active", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "level", + "version_id": 0, + "field_exists": false, + "size": 1 + } + ] + } + }, + { + "field": "prigroup[M_REG_S]", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "itns", + "version_id": 0, + "field_exists": false, + "size": 1 + } + ] + } + ] + } + }, + "pci-host-bridge": { + "Name": "pci-host-bridge", + "version_id": 1, + "minimum_version_id": 1, + "Description": { + "name": "PCIHost", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "config_reg", + "version_id": 0, + "field_exists": false, + "size": 4 + } + ] + } + }, + "gpex-root": { + "Name": "gpex-root", + "version_id": 1, + "minimum_version_id": 1, + "Description": { + "name": "gpex_root", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "parent_obj", + "version_id": 0, + "field_exists": false, + "size": 2608, + "Description": { + "name": "PCIDevice", + "version_id": 2, + "minimum_version_id": 1, + "Fields": [ + { + "field": "version_id", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "config", + "version_id": 0, + "field_exists": true, + "size": 256 + }, + { + "field": "config", + "version_id": 0, + "field_exists": true, + "size": 4096 + }, + { + "field": "irq_state", + "version_id": 2, + "field_exists": false, + "size": 16 + } + ] + } + } + ] + } + }, + "armv7m_systick": { + "Name": "armv7m_systick", + "version_id": 3, + "minimum_version_id": 3, + "Description": { + "name": "armv7m_systick", + "version_id": 3, + "minimum_version_id": 3, + "Fields": [ + { + "field": "refclk", + "version_id": 0, + "field_exists": false, + "size": 8, + "Description": { + "name": "clock", + "version_id": 0, + "minimum_version_id": 0, + "Fields": [ + { + "field": "period", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ], + "Subsections": [ + { + "name": "clock/muldiv", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "multiplier", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "divider", + "version_id": 0, + "field_exists": false, + "size": 4 + } + ] + } + ] + } + }, + { + "field": "cpuclk", + "version_id": 0, + "field_exists": false, + "size": 8, + "Description": { + "name": "clock", + "version_id": 0, + "minimum_version_id": 0, + "Fields": [ + { + "field": "period", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ], + "Subsections": [ + { + "name": "clock/muldiv", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "multiplier", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "divider", + "version_id": 0, + "field_exists": false, + "size": 4 + } + ] + } + ] + } + }, + { + "field": "control", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "tick", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "ptimer", + "version_id": 1, + "field_exists": false, + "size": 8, + "Description": { + "name": "ptimer", + "version_id": 1, + "minimum_version_id": 1, + "Fields": [ + { + "field": "enabled", + "version_id": 0, + "field_exists": false, + "size": 1 + }, + { + "field": "limit", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "delta", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "period_frac", + "version_id": 0, + "field_exists": false, + "size": 4 + }, + { + "field": "period", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "last_event", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "next_event", + "version_id": 0, + "field_exists": false, + "size": 8 + }, + { + "field": "timer", + "version_id": 0, + "field_exists": false, + "size": 8 + } + ] + } + } + ] + } + } +}
tests/data/vmstate-static-checker/m68k/virt-7.2.json new file +2936 -0
429 lines not on this page · raw message
tests/data/vmstate-static-checker/ppc64/pseries-7.2.json new file +1068 -0
1,068 lines not on this page · raw message
tests/data/vmstate-static-checker/s390x/s390-ccw-virtio-7.2.json new file +475 -0
475 lines not on this page · raw message
tests/data/vmstate-static-checker/x86_64/pc-q35-7.2.json new file +3297 -0
3,297 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.51.0
Part of the diff is not shown here. View the raw message.
[PULL 01/12] tests/functional/m68k: Use proper polling in the next-cube test
In reply to Thomas HuthFrom: Thomas Huth <[email protected]>
The next-cube tests currently sleep for 2 seconds to wait for the guest's display to come up with the expected results. That's bad since there is still a theoretical race left here, and since there are two subtests, the whole test takes more than 4 seconds this way.
Looking at what the firmware does, there is a better way instead of blindly waiting for two seconds: The firmware is writing some values to the FPU registers during a test (and never touches them again afterwards, so we can be sure about the final values), so we can poll for the right values in those registers to know when we reached a state when the display is initialized for sure. We just have to also make sure to not look for text anymore that is only printed after the FPU test has been done by the guest firmware.
This way the whole tests finishes in less than 1 second here, and there should be no race condition here anymore.
Message-ID: <[email protected]>
--- tests/functional/m68k/test_nextcube.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
tests/functional/m68k/test_nextcube.py +12 -5
@@ -29,8 +29,15 @@ def check_bootrom_framebuffer(self, screenshot_path): self.vm.launch() self.log.info('VM launched, waiting for display') - # TODO: wait for the 'displaysurface_create 1120x832' trace-event. - time.sleep(2) + # Wait for the FPU test to finish, then the display is available, too: + while True: + res = self.vm.cmd('human-monitor-command', + command_line='info registers') + if ("F0 = 400e 8400000000000000" in res and + "F1 = 400e 83ff000000000000" in res and + "F2 = 400e 83ff000000000000" in res): + break + time.sleep(0.1) res = self.vm.cmd('human-monitor-command', command_line='screendump %s' % screenshot_path)
@@ -56,10 +63,10 @@ def test_bootrom_framebuffer_ocr_with_tesseract(self): self.check_bootrom_framebuffer(screenshot_path) lines = tesseract_ocr(screenshot_path) text = '\n'.join(lines) + self.assertIn('Backplane slot', text) + self.assertIn('Ethernet address', text) self.assertIn('Testing the FPU', text) - self.assertIn('System test failed. Error code', text) - self.assertIn('Boot command', text) - self.assertIn('Next>', text) + if __name__ == '__main__': QemuSystemTest.main()
Signature · 1 line
2.51.0
[PULL 07/12] tests/functional: use self.log for all logging
In reply to Thomas HuthFrom: Daniel P. Berrangé <[email protected]>
Some tests are creating their on logger category which means any output they log is not captured in base.log.
Message-ID: <[email protected]>
--- tests/functional/aarch64/test_virt.py | 4 +-- tests/functional/arm/test_integratorcp.py | 3 +-- tests/functional/mips64el/test_malta.py | 3 +-- tests/functional/replay_kernel.py | 16 +++++------- tests/functional/x86_64/test_acpi_bits.py | 31 +++++++++++------------ 5 files changed, 25 insertions(+), 32 deletions(-)
tests/functional/aarch64/test_virt.py +1 -3
@@ -72,8 +72,6 @@ def common_aarch64_virt(self, machine): self.set_machine('virt') self.require_accelerator("tcg") - logger = logging.getLogger('aarch64_virt') - kernel_path = self.ASSET_KERNEL.fetch() self.vm.set_console()
@@ -91,7 +89,7 @@ def common_aarch64_virt(self, machine): 'rng-random,id=rng0,filename=/dev/urandom') # Also add a scratch block device - logger.info('creating scratch qcow2 image') + self.log.info('creating scratch qcow2 image') image_path = self.scratch_file('scratch.qcow2') qemu_img = get_qemu_img(self) check_call([qemu_img, 'create', '-f', 'qcow2', image_path, '8M'],
tests/functional/arm/test_integratorcp.py +1 -2
@@ -77,7 +77,6 @@ def test_framebuffer_tux_logo(self): command_line='screendump %s' % screendump_path) if 'unknown command' in res: self.skipTest('screendump not available') - logger = logging.getLogger('framebuffer') cpu_count = 1 match_threshold = 0.92
@@ -88,7 +87,7 @@ def test_framebuffer_tux_logo(self): loc = np.where(result >= match_threshold) tux_count = 0 for tux_count, pt in enumerate(zip(*loc[::-1]), start=1): - logger.debug('found Tux at position [x, y] = %s', pt) + self.log.debug('found Tux at position [x, y] = %s', pt) self.assertGreaterEqual(tux_count, cpu_count) if __name__ == '__main__':
tests/functional/mips64el/test_malta.py +1 -2
@@ -159,7 +159,6 @@ def do_test_i6400_framebuffer_logo(self, cpu_cores_count): command_line='screendump %s' % screendump_path) if 'unknown command' in res: self.skipTest('screendump not available') - logger = logging.getLogger('framebuffer') match_threshold = 0.95 screendump_bgr = cv2.imread(screendump_path, cv2.IMREAD_COLOR)
@@ -171,7 +170,7 @@ def do_test_i6400_framebuffer_logo(self, cpu_cores_count): h, w = tuxlogo_bgr.shape[:2] debug_png = os.getenv('QEMU_TEST_CV2_SCREENDUMP_PNG_PATH') for tuxlogo_count, pt in enumerate(zip(*loc[::-1]), start=1): - logger.debug('found Tux at position (x, y) = %s', pt) + self.log.debug('found Tux at position (x, y) = %s', pt) cv2.rectangle(screendump_bgr, pt, (pt[0] + w, pt[1] + h), (0, 0, 255), 2) if debug_png:
tests/functional/replay_kernel.py +7 -9
@@ -32,15 +32,14 @@ def run_vm(self, kernel_path, kernel_command_line, console_pattern, # icount requires TCG to be available self.require_accelerator('tcg') - logger = logging.getLogger('replay') start_time = time.time() vm = self.get_vm(name='recording' if record else 'replay') vm.set_console() if record: - logger.info('recording the execution...') + self.log.info('recording the execution...') mode = 'record' else: - logger.info('replaying the execution...') + self.log.info('replaying the execution...') mode = 'replay' vm.add_args('-icount', 'shift=%s,rr=%s,rrfile=%s' % (shift, mode, replay_path),
@@ -54,15 +53,15 @@ def run_vm(self, kernel_path, kernel_command_line, console_pattern, self.wait_for_console_pattern(console_pattern, vm) if record: vm.shutdown() - logger.info('finished the recording with log size %s bytes' + self.log.info('finished the recording with log size %s bytes' % os.path.getsize(replay_path)) self.run_replay_dump(replay_path) - logger.info('successfully tested replay-dump.py') + self.log.info('successfully tested replay-dump.py') else: vm.wait() - logger.info('successfully finished the replay') + self.log.info('successfully finished the replay') elapsed = time.time() - start_time - logger.info('elapsed time %.2f sec' % elapsed) + self.log.info('elapsed time %.2f sec' % elapsed) return elapsed def run_replay_dump(self, replay_path):
@@ -80,5 +79,4 @@ def run_rr(self, kernel_path, kernel_command_line, console_pattern, True, shift, args, replay_path) t2 = self.run_vm(kernel_path, kernel_command_line, console_pattern, False, shift, args, replay_path) - logger = logging.getLogger('replay') - logger.info('replay overhead {:.2%}'.format(t2 / t1 - 1)) + self.log.info('replay overhead {:.2%}'.format(t2 / t1 - 1))
tests/functional/x86_64/test_acpi_bits.py +15 -16
@@ -121,10 +121,10 @@ def __init__(self, *args, **kwargs): self._debugcon_log = 'debugcon-log.txt' def _print_log(self, log): - self.logger.info('\nlogs from biosbits follows:') - self.logger.info('==========================================\n') - self.logger.info(log) - self.logger.info('==========================================\n') + self.log.info('\nlogs from biosbits follows:') + self.log.info('==========================================\n') + self.log.info(log) + self.log.info('==========================================\n') def copy_bits_config(self): """ copies the bios bits config file into bits.
@@ -138,8 +138,8 @@ def copy_bits_config(self): self.assertTrue(os.path.exists(bits_config_file)) self.assertTrue(os.path.exists(target_config_dir)) shutil.copy2(bits_config_file, target_config_dir) - self.logger.info('copied config file %s to %s', - bits_config_file, target_config_dir) + self.log.info('copied config file %s to %s', + bits_config_file, target_config_dir) def copy_test_scripts(self): """copies the python test scripts into bits. """
@@ -163,8 +163,8 @@ def copy_test_scripts(self): newfilename = os.path.splitext(filename)[0] + '.py' shutil.copy2(os.path.join(bits_test_dir, filename), os.path.join(target_test_dir, newfilename)) - self.logger.info('copied test file %s to %s', - filename, target_test_dir) + self.log.info('copied test file %s to %s', + filename, target_test_dir) # now remove the pyc test file if it exists, otherwise the # changes in the python test script won't be executed.
@@ -172,9 +172,9 @@ def copy_test_scripts(self): if os.access(os.path.join(target_test_dir, testfile_pyc), os.F_OK): os.remove(os.path.join(target_test_dir, testfile_pyc)) - self.logger.info('removed compiled file %s', - os.path.join(target_test_dir, - testfile_pyc)) + self.log.info('removed compiled file %s', + os.path.join(target_test_dir, + testfile_pyc)) def fix_mkrescue(self, mkrescue): """ grub-mkrescue is a bash script with two variables, 'prefix' and
@@ -216,7 +216,7 @@ def generate_bits_iso(self): self.fix_mkrescue(mkrescue_script) - self.logger.info('using grub-mkrescue for generating biosbits iso ...') + self.log.info('using grub-mkrescue for generating biosbits iso ...') try: if os.getenv('V') or os.getenv('BITS_DEBUG'):
@@ -225,7 +225,7 @@ def generate_bits_iso(self): stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True) - self.logger.info("grub-mkrescue output %s" % proc.stdout) + self.log.info("grub-mkrescue output %s" % proc.stdout) else: subprocess.check_call([mkrescue_script, '-o', iso_file, bits_dir],
@@ -238,11 +238,10 @@ def generate_bits_iso(self): self.assertTrue(os.access(iso_file, os.R_OK)) - self.logger.info('iso file %s successfully generated.', iso_file) + self.log.info('iso file %s successfully generated.', iso_file) def setUp(self): # pylint: disable=arguments-differ super().setUp() - self.logger = self.log prebuiltDir = self.scratch_file('prebuilt') if not os.path.isdir(prebuiltDir):
@@ -333,7 +332,7 @@ def test_acpi_smbios_bits(self): # in batch mode and then automatically initiate a vm shutdown. self._vm.event_wait('SHUTDOWN', timeout=BITS_TIMEOUT) self._vm.wait(timeout=None) - self.logger.debug("Checking console output ...") + self.log.debug("Checking console output ...") self.parse_log() if __name__ == '__main__':
Signature · 1 line
2.51.0
[PULL 02/12] tests/functional/s390x/test_pxelinux: Fix warnings from pylint
In reply to Thomas HuthFrom: Thomas Huth <[email protected]>
pylint complains about wrong indentation in one of the lines and that the pxelinux_cfg_contents is a constant that should be written with capital letters. While we're at it, also add the missing doc strings.
Message-ID: <[email protected]>
--- tests/functional/s390x/test_pxelinux.py | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-)
tests/functional/s390x/test_pxelinux.py +18 -7
@@ -1,10 +1,11 @@ #!/usr/bin/env python3 # # SPDX-License-Identifier: GPL-2.0-or-later -# -# Functional test that checks the pxelinux.cfg network booting of a s390x VM -# (TFTP booting without config file is already tested by the pxe qtest, so -# we don't repeat that here). +''' +Functional test that checks the pxelinux.cfg network booting of a s390x VM +(TFTP booting without config file is already tested by the pxe qtest, so +we don't repeat that here). +''' import os import shutil
@@ -12,7 +13,7 @@ from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern -pxelinux_cfg_contents='''# pxelinux.cfg style config file +PXELINUX_CFG_CONTENTS='''# pxelinux.cfg style config file default Debian label Nonexisting kernel kernel.notavailable
@@ -26,6 +27,10 @@ ''' class S390PxeLinux(QemuSystemTest): + ''' + Test various ways of booting via a pxelinux.cfg file, for details see: + https://wiki.syslinux.org/wiki/index.php?title=PXELINUX#Configuration + ''' ASSET_DEBIAN_KERNEL = Asset( ('https://snapshot.debian.org/archive/debian/'
@@ -46,6 +51,7 @@ class S390PxeLinux(QemuSystemTest): '480859574f3f44caa6cd35c62d70e1ac0609134e22ce2a954bbed9b110c06e0b') def pxelinux_launch(self, pl_name='default', extra_opts=None): + '''Create a pxelinux.cfg file in the right location and launch QEMU''' self.require_netdev('user') self.set_machine('s390-ccw-virtio')
@@ -66,11 +72,11 @@ def pxelinux_launch(self, pl_name='default', extra_opts=None): cfg_fname = self.scratch_file('tftp', 'pxelinux.cfg', pl_name) with open(cfg_fname, 'w', encoding='utf-8') as f: - f.write(pxelinux_cfg_contents) + f.write(PXELINUX_CFG_CONTENTS) virtio_net_dev = 'virtio-net-ccw,netdev=n1,bootindex=1' if extra_opts: - virtio_net_dev += ',' + extra_opts + virtio_net_dev += ',' + extra_opts self.vm.add_args('-m', '384', '-netdev', f'user,id=n1,tftp={tftpdir}',
@@ -80,6 +86,7 @@ def pxelinux_launch(self, pl_name='default', extra_opts=None): def test_default(self): + '''Check whether the guest uses the "default" file name''' self.pxelinux_launch() # The kernel prints its arguments to the console, so we can use # this to check whether the kernel parameters are correctly handled:
@@ -89,11 +96,13 @@ def test_default(self): wait_for_console_pattern(self, 'Run /init as init process') def test_mac(self): + '''Check whether the guest uses file name based on its MAC address''' self.pxelinux_launch(pl_name='01-02-ca-fe-ba-be-42', extra_opts='mac=02:ca:fe:ba:be:42,loadparm=3') wait_for_console_pattern(self, 'Linux version 5.3.7-301.fc31.s390x') def test_uuid(self): + '''Check whether the guest uses file name based on its UUID''' # Also add a non-bootable disk to check the fallback to network boot: self.vm.add_args('-blockdev', 'null-co,size=65536,node-name=d1', '-device', 'virtio-blk,drive=d1,bootindex=0,loadparm=1',
@@ -102,11 +111,13 @@ def test_uuid(self): wait_for_console_pattern(self, 'Debian 4.19.146-1 (2020-09-17)') def test_ip(self): + '''Check whether the guest uses file name based on its IP address''' self.vm.add_args('-M', 'loadparm=3') self.pxelinux_launch(pl_name='0A00020F') wait_for_console_pattern(self, 'Linux version 5.3.7-301.fc31.s390x') def test_menu(self): + '''Check whether the boot menu works for pxelinux.cfg booting''' self.vm.add_args('-boot', 'menu=on,splash-time=10') self.pxelinux_launch(pl_name='0A00') wait_for_console_pattern(self, '[1] Nonexisting')
Signature · 1 line
2.51.0
[PULL 11/12] tests/functional: retry when seeing ConnectionError exception
In reply to Thomas HuthFrom: Daniel P. Berrangé <[email protected]>
This base class is used for many different socket connection errors, corresponding to ECONNRESET, ECONNREFUSED, ECONNABORTED and more. Most of these are things you might expect to see every now and then as transient flaws. We should thus retry the asset download when seeing them.
Message-ID: <[email protected]>
--- tests/functional/qemu_test/asset.py | 7 +++++++ 1 file changed, 7 insertions(+)
tests/functional/qemu_test/asset.py +7 -0
@@ -179,6 +179,13 @@ def fetch(self): self.url, e.reason) raise AssetError(self, "Unable to download: URL error %s" % e.reason, transient=True) + except ConnectionError as e: + # A socket connection failure, such as dropped conn + # or refused conn + tmp_cache_file.unlink() + self.log.error("Unable to download %s: Connection error %s", + self.url, e) + continue except Exception as e: tmp_cache_file.unlink() raise AssetError(self, "Unable to download: %s" % e)
Signature · 1 line
2.51.0
[PULL 03/12] tests: Move the old vmstate-static-checker files to tests/data/
In reply to Thomas HuthFrom: Thomas Huth <[email protected]>
All other test data resides in tests/data/, so let's move the dump files here, too.
Message-ID: <[email protected]>
---
MAINTAINERS | 2 +-
.../vmstate-static-checker}/dump1.json | 0
.../vmstate-static-checker}/dump2.json | 0
3 files changed, 1 insertion(+), 1 deletion(-)
rename tests/{vmstate-static-checker-data => data/vmstate-static-checker}/dump1.json (100%)
rename tests/{vmstate-static-checker-data => data/vmstate-static-checker}/dump2.json (100%)MAINTAINERS +1 -1
@@ -3613,7 +3613,7 @@ F: migration/ F: scripts/vmstate-static-checker.py F: tests/functional/migration.py F: tests/functional/*/*migration.py -F: tests/vmstate-static-checker-data/ +F: tests/data/vmstate-static-checker/ F: tests/qtest/migration/ F: tests/qtest/migration-* F: docs/devel/migration/
tests/data/vmstate-static-checker/dump1.json renamed from tests/vmstate-static-checker-data/dump1.json +0 -0
tests/data/vmstate-static-checker/dump2.json renamed from tests/vmstate-static-checker-data/dump2.json +0 -0
Signature · 1 line
2.51.0
[PULL 10/12] tests: Fix "make check-functional" for targets without thorough tests
In reply to Thomas HuthFrom: Thomas Huth <[email protected]>
If QEMU gets configured for a single target that does not have any thorough functional tests, "make check-functional" currently fails with the error message "No rule to make target 'check-func'". This happens because "check-func" only gets defined for thorough tests (quick ones get added to "check-func-quick" instead). The same problem can happen with the quick tests for targets that do not have any functional test at all. To fix it, simply make sure that the targets are always available in the Makefile.
Message-ID: <[email protected]>
--- tests/Makefile.include | 3 +++ 1 file changed, 3 insertions(+)
tests/Makefile.include +3 -0
@@ -113,6 +113,9 @@ check-functional: @$(NINJA) precache-functional @QEMU_TEST_NO_DOWNLOAD=1 $(MAKE) SPEED=thorough check-func check-func-quick +.PHONY: check-func check-func-quick +check-func check-func-quick: + # Consolidated targets .PHONY: check check-clean
Signature · 1 line
2.51.0
Richard Henderson
AppliedQuoted 12 lines · Thomas Huth
Hi Richard!
The following changes since commit
ab8008b231e758e03c87c1c483c03afdd9c02e19:Merge tag 'pull-9p-20250918' ofhttps://github.com/cschoenebeck/qemu into staging (2025-09-19 12:21:35 -0700)are available in the Git repository at:
https://gitlab.com/thuth/qemu.git tags/pull-request-2025-09-24for you to fetch changes up to
097bbfc5e0ba889ce17106ef941a56111c3de270:
Quoted 8 lines
tests/functional: treat unknown exceptions as transient faults (2025-09-24 08:26:11 +0200)
----------------------------------------------------------------
* New functional tests to check via thevmstate-static-checker.pyscript
* New functional tests for CD-ROM boot on hppa
* Skip functional tests on more exotic network errors, too
* Fix another issue with htags in the gitlab CI
* Some additional minor fixes to various functional tests
Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/10.2 as appropriate.
r~
Re: [PULL 04/12] tests/functional: Test whether the vmstate-static-checker script works fine
In reply to Thomas HuthQuoted 7 lines · Thomas Huth
From: Thomas Huth <[email protected]>
We've got two vmstate dump files in the repository which are meant for verifying whether the
vmstate-static-checker.pyworks as expected. Since running this manually is a cumbersome job, let's add an automated test for this instead that runs the script with the two dump files and checks for the expected output.
This job always fails on Fedora 43, because the vmstate script output includes python deprecation warnings:
2025-10-29 11:53:55,097 - INFO: vmstate-static-checker output:
/var/home/berrange/src/virt/qemu/tests/functional/../../scripts/vmstate-static-checker.py:385: PendingDeprecationWarning: FileType is deprecated. Simply open files after parsing arguments.
parser.add_argument('-s', '--src', type=argparse.FileType('r'),
/var/home/berrange/src/virt/qemu/tests/functional/../../scripts/vmstate-static-checker.py:388: PendingDeprecationWarning: FileType is deprecated. Simply open files after parsing arguments.
parser.add_argument('-d', '--dest', type=argparse.FileType('r'),Quoted 9 lines
Signed-off-by Thomas Huth <[email protected]>Message-ID: <[email protected]>
--- MAINTAINERS | 1 + tests/functional/x86_64/meson.build | 1 + tests/functional/x86_64/test_bad_vmstate.py | 58 +++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100755 tests/functional/x86_64/test_bad_vmstate.py
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: [PULL 04/12] tests/functional: Test whether the vmstate-static-checker script works fine
Quoted 9 lines · Daniel P. Berrangé
Quoted 7 lines · Thomas Huth
From: Thomas Huth <[email protected]>
We've got two vmstate dump files in the repository which are meant for verifying whether the
vmstate-static-checker.pyworks as expected. Since running this manually is a cumbersome job, let's add an automated test for this instead that runs the script with the two dump files and checks for the expected output.
Quoted 8 lines
This job always fails on Fedora 43, because the vmstate script output includes python deprecation warnings:
2025-10-29 11:53:55,097 - INFO: vmstate-static-checker output: /var/home/berrange/src/virt/qemu/tests/functional/../../scripts/vmstate-static-checker.py:385: PendingDeprecationWarning: FileType is deprecated. Simply open files after parsing arguments. parser.add_argument('-s', '--src', type=argparse.FileType('r'), /var/home/berrange/src/virt/qemu/tests/functional/../../scripts/vmstate-static-checker.py:388: PendingDeprecationWarning: FileType is deprecated. Simply open files after parsing arguments. parser.add_argument('-d', '--dest', type=argparse.FileType('r'),
Thanks for the heads-up, I guess we should now rather use type=pathlib.Path in this script instead. I'll try to come up with a patch...
Thomas
Re: [PULL 05/12] tests/data/vmstate-static-checker: Add dump files from QEMU 7.2.17
In reply to Thomas HuthQuoted 25 lines · Thomas Huth
From: Thomas Huth <[email protected]>
For automatic tests, we need reference files from older QEMU versions. QEMU 7.2 is a long term stable release, so it's a good candidate for checking whether the migration could still work correctly. Let's add the files from that version that have been taken with the "-dump-vmstate" parameter of QEMU (compiled with single machines and the configure switch "--without-default-devices" to keep the json files reasonable small).
Some devices also have been removed manually from the json files, e.g. the "pci-bridge" (which can be disabled in later QEMU versions via
Kconfig), and some Linux-related devices like "scsi-block" and "scsi-generic" and KVM-related devices. Without removing them, we might get errors otherwise if these devices have not been compiled into the destination QEMU build.Acked-by Peter Xu <[email protected]>Signed-off-by Thomas Huth <[email protected]>Message-ID: <[email protected]>
--- .../aarch64/virt-7.2.json | 2571 +++++++++++++ .../vmstate-static-checker/m68k/virt-7.2.json | 2936 +++++++++++++++ .../ppc64/pseries-7.2.json | 1068 ++++++ .../s390x/s390-ccw-virtio-7.2.json | 475 +++ .../x86_64/pc-q35-7.2.json | 3297 +++++++++++++++++ 5 files changed, 10347 insertions(+)
Quoted 5 lines
create mode 100644
tests/data/vmstate-static-checker/aarch64/virt-7.2.jsoncreate mode 100644tests/data/vmstate-static-checker/m68k/virt-7.2.jsoncreate mode 100644tests/data/vmstate-static-checker/ppc64/pseries-7.2.jsoncreate mode 100644tests/data/vmstate-static-checker/s390x/s390-ccw-virtio-7.2.jsoncreate mode 100644tests/data/vmstate-static-checker/x86_64/pc-q35-7.2.json
On a s390x host, this test fails :
▶ 108/658 test_vmstate.VmStateTest.test_vmstate_7_2 FAIL
108/658 qemu:func-quick+func-s390x / func-s390x-vmstate ERROR 0.23s exit status 1
Quoted 1 line
Quoted 1 line
Quoted 1 line
UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MALLOC_PERTURB_=8 MESON_TEST_ITERATION=1 QEMU_TEST_GDB=/usr/bin/gdb LD_LIBRARY_PATH=/home/legoater/work/qemu/qemu.git/build/tests/tcg/plugins:/home/legoater/work/qemu/qemu.git/build/contrib/plugins QEMU_TEST_QEMU_BINARY=/home/legoater/work/qemu/qemu.git/build/qemu-system-s390x PYTHONPATH=/home/legoater/work/qemu/qemu.git/python:/home/legoater/work/qemu/qemu.git/tests/functional QEMU_TEST_QEMU_IMG=/home/legoater/work/qemu/qemu.git/build/qemu-img RUST_BACKTRACE=1 ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MESON_BUILD_ROOT=/home/legoater/work/qemu/qemu.git/build
/home/legoater/work/qemu/qemu.git/build/pyvenv/bin/python3/home/legoater/work/qemu/qemu.git/tests/functional/generic/test_vmstate.py
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀ ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― stderr:
Traceback (most recent call last):
File "/home/legoater/work/qemu/qemu.git/tests/functional/generic/test_vmstate.py", line 55, in test_vmstate_7_2
self.fail('Running vmstate-static-checker failed:\n' + cp.stdout +
AssertionError: Running vmstate-static-checker failed:
Section "s390-sclp-event-facility ", Description "vmstate-event-facility": expected field "receive_mask_pieces[1]", got "receive_mask_pieces[0]"; skipping rest Section "s390-sclp-event-facility", Description "vmstate-event-facility/mask64": expected field "receive_mask_pieces[0]", got "receive_mask_pieces[1]"; skipping rest
The reason seems to be that the reference JSON s390-ccw-virtio-7.2.json file was generated on a little-endian host (x86_64), s390x is big-endian.
The fix could be in vmstate-static-checker.py to treat receive_mask_pieces[0] and receive_mask_pieces[1] as interchangeable. Or regenerate the vmstate on s390x and skip the test on other platforms. What do you think ?
Thanks,
C.
Re: [PULL 05/12] tests/data/vmstate-static-checker: Add dump files from QEMU 7.2.17
Quoted 37 lines · Cédric Le Goater
Quoted 24 lines · Thomas Huth
From: Thomas Huth <[email protected]>
For automatic tests, we need reference files from older QEMU versions. QEMU 7.2 is a long term stable release, so it's a good candidate for checking whether the migration could still work correctly. Let's add the files from that version that have been taken with the "-dump-vmstate" parameter of QEMU (compiled with single machines and the configure switch "--without-default-devices" to keep the json files reasonable small).
Some devices also have been removed manually from the json files, e.g. the "pci-bridge" (which can be disabled in later QEMU versions via
Kconfig), and some Linux-related devices like "scsi-block" and "scsi-generic" and KVM-related devices. Without removing them, we might get errors otherwise if these devices have not been compiled into the destination QEMU build.Acked-by Peter Xu <[email protected]>Signed-off-by Thomas Huth <[email protected]>Message-ID: <[email protected]>
---
.../aarch64/virt-7.2.json | 2571 +++++++++++++.../vmstate-static-checker/m68k/virt-7.2.json| 2936 +++++++++++++++ .../ppc64/pseries-7.2.json | 1068 ++++++ .../s390x/s390-ccw-virtio-7.2.json | 475 +++ .../x86_64/pc-q35-7.2.json | 3297 +++++++++++++++++Quoted 6 lines
5 files changed, 10347 insertions(+)create mode 100644
tests/data/vmstate-static-checker/aarch64/virt-7.2.jsoncreate mode 100644tests/data/vmstate-static-checker/m68k/virt-7.2.jsoncreate mode 100644tests/data/vmstate-static-checker/ppc64/pseries-7.2.jsoncreate mode 100644 tests/data/vmstate-static-checker/s390x/s390-ccw- virtio-7.2.json create mode 100644tests/data/vmstate-static-checker/x86_64/pc-q35-7.2.jsonOn a s390x host, this test fails :
▶ 108/658 test_vmstate.VmStateTest.test_vmstate_7_2 FAIL
108/658 qemu:func-quick+func-s390x / func-s390x- vmstate ERROR 0.23s exit status 1Quoted 1 line
Quoted 1 line
Quoted 1 line
UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MALLOC_PERTURB_=8 MESON_TEST_ITERATION=1 QEMU_TEST_GDB=/usr/bin/gdb LD_LIBRARY_PATH=/home/legoater/work/qemu/qemu.git/build/tests/tcg/plugins:/home/legoater/work/qemu/qemu.git/build/contrib/plugins QEMU_TEST_QEMU_BINARY=/home/legoater/work/qemu/qemu.git/build/qemu-system-s390x PYTHONPATH=/home/legoater/work/qemu/qemu.git/python:/home/legoater/work/qemu/qemu.git/tests/functional QEMU_TEST_QEMU_IMG=/home/legoater/work/qemu/qemu.git/build/qemu-img RUST_BACKTRACE=1 ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MESON_BUILD_ROOT=/home/legoater/work/qemu/qemu.git/build
/home/legoater/work/qemu/qemu.git/build/pyvenv/bin/python3/home/legoater/work/qemu/qemu.git/tests/functional/generic/test_vmstate.py
Quoted 9 lines
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀ ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― stderr:
Traceback (most recent call last):
File "/home/legoater/work/qemu/qemu.git/tests/functional/generic/test_vmstate.py", line 55, intest_vmstate_7_2
self.fail('Running vmstate-static-checker failed:\n' + cp.stdout +
AssertionError: Running vmstate-static-checker failed:
Section "s390-sclp-event-facility ", Description "vmstate-event-facility": expected field "receive_mask_pieces[1]", got "receive_mask_pieces[0]"; skipping rest Section "s390-sclp-event-facility", Description "vmstate-event-facility/ mask64": expected field "receive_mask_pieces[0]", got "receive_mask_pieces[1]"; skipping rest
Ugh, that's ugly!
Quoted 2 lines
The reason seems to be that the reference JSON s390-ccw-virtio-7.2.json file was generated on a little-endian host (
x86_64), s390x is big-endian.
Ack.
Quoted 4 lines
The fix could be in
vmstate-static-checker.pyto treat receive_mask_pieces[0] and receive_mask_pieces[1] as interchangeable. Or regenerate the vmstate on s390x and skip the test on other platforms. What do you think ?
Easiest work-around for the test is likely to drop the ""s390-sclp-event-facility" section from tests/data/vmstate-static-checker/s390x/s390-ccw-virtio-7.2.json, so that it does not get checked at all anymore.
But note that there is a real bug here. This:
/* we need to save 32 bit chunks for compatibility */ #ifdef HOST_WORDS_BIGENDIAN
#define RECV_MASK_LOWER 1
#define RECV_MASK_UPPER 0
#else /* little endian host */
#define RECV_MASK_LOWER 0
#define RECV_MASK_UPPER 1
#endif
from commit 98e43b71b25330566d902fbdc8fe35041c2decbe will also break migration e.g. from a big endian TCG host to a little endian TCG host.
To fix it properly (at least for new machine types), it's maybe best to introduce a proper 64-bit field for new machine types, and handle the chunks as good as possible for old machine types... Anybody wants to have a try to cook a patch?
Thomas