Skip to content

tests/functional: Test with scripts/vmstate-static-checker.py

Thomas Huth qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 1 replyIn review
  2. v34 patches 0 repliesSuperseded
  3. v24 patches 8 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches11 repliesSuperseded

Changes in v4 from the cover letter

- Move the test with the dump*.json files to a separate file
- Rebase to current master since the folder layout in tests/functional has changed

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4tests: Move the old vmstate-static-checker files to tests/data/MAINTAINERS tests/data/vmstate-static-checker/dump1.json tests/data/vmstate-static-checker/dump2.json+1 -10 replies
2/4tests/functional: Test whether the vmstate-static-checker script works fineMAINTAINERS tests/functional/x86_64/meson.build tests/functional/x86_64/test_bad_vmstate.py+60 -00 replies
3/4tests/data/vmstate-static-checker: Add dump files from QEMU 7.2.17tests/data/vmstate-static-checker/aarch64/virt-7.2.json tests/data/vmstate-static-checker/m68k/virt-7.2.json tests/data/vmstate-static-checker/ppc64/pseries-7.2.json +2 more+10347 -00 replies
4/4tests/functional: Use vmstate-static-checker.py to test data from v7.2MAINTAINERS tests/functional/aarch64/meson.build tests/functional/generic/test_vmstate.py +4 more+80 -11 reply

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchPeter XuFabiano Rosas
1/4R-b
2/4
3/4A-b
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/4] tests/functional: Test with scripts/vmstate-static-checker.py

There are also some files available in tests/vmstate-static-checker-data/ which were used in the past to verify the functionality of the checker script. Move them to tests/data/vmstate-static-checker now and add an automated test that checks for the expected output when using these files with the scripts/vmstate-static-checker.py script.

Additionally also add an automatic test of the vmstate via good reference files from an older version of QEMU. I chose to use QEMU 7.2 for the reference files since this is a long term support release that is still actively being maintained, so we certainly want to make sure that we don't break migration from that version to the latest one.

Since the checker script can report false positives in certain cases, the latter test is marked with the "skipFlakyTests" decorator, i.e. it is only run if the user set the QEMU_TEST_FLAKY_TESTS environment variable before starting the tests.

v4:
- Move the test with the dump*.json files to a separate file
- Rebase to current master since the folder layout in tests/functional has changed

v3:
- Do not run the tests by default, only if QEMU_TEST_FLAKY_TESTS has been set
- Add some hints what to do in case the test detects an error

v2:
- Dropped the patch that is already upstream
- Don't remove the old dump files, rather test for the expected output of the checker script with them

Thomas Huth (4):
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

 MAINTAINERS                                   |    4 +-
 .../aarch64/virt-7.2.json                     | 2571 +++++++++++++
 .../vmstate-static-checker}/dump1.json        |    0
 .../vmstate-static-checker}/dump2.json        |    0
 .../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 +++++++++++++++++
 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           |    4 +-
 tests/functional/x86_64/test_bad_vmstate.py   |   58 +
 15 files changed, 10488 insertions(+), 2 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/x86_64/test_bad_vmstate.py
Signature · 1 line
2.51.0