Skip to content

tests/qtest: migration-test refactoring

Fabiano Rosas qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest17 patches 4 repliesIn review
  2. v222 patches 32 repliesSuperseded
  3. v122 patches 19 repliesSuperseded

Changes in v3 from the cover letter

- Fixed some more hook names I had missed;
- Move addition of migration-qmp.c in meson to correct patch;
- Moved QEMU_ENV_* variables to framework.c where they are used;
- patch 7: improve commit message;
- s/test-framework/framework/
- meson.build style changes;
- did *not* move migration-test into migration/, meson doesn't like it. We'd need a separate meson.build for that directory, which I don't think is worth it;
- Drop the other build changes, this is now just the refactoring of migration-test.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17tests/qtest/migration: Standardize hook namestests/qtest/migration-test.c+174 -1680 replies
2/17tests/qtest/migration: Stop calling everything "test"tests/qtest/migration-test.c+36 -360 replies
3/17tests/migration: Disambiguate guestperf vs. a-bMAINTAINERS tests/meson.build tests/migration-stress/guestperf-batch.py +30 more+9 -82 replies
4/17tests/qtest/migration: Move bootfile code to its own filetests/qtest/meson.build tests/qtest/migration-helpers.c tests/qtest/migration-test.c +2 more+86 -600 replies
5/17tests/qtest/migration: Move qmp helpers to a separate filetests/qtest/meson.build tests/qtest/migration-helpers.c tests/qtest/migration-helpers.h +4 more+542 -4970 replies
6/17tests/qtest/migration: Rename migration-helpers.ctests/qtest/meson.build tests/qtest/migration-test.c tests/qtest/migration/migration-qmp.c +4 more+12 -100 replies
7/17tests/qtest/migration: Move ufd_version_check to utilstests/qtest/migration-test.c tests/qtest/migration/migration-util.c tests/qtest/migration/migration-util.h+52 -450 replies
8/17tests/qtest/migration: Move kvm_dirty_ring_supported to utilstests/qtest/migration-test.c tests/qtest/migration/migration-util.c tests/qtest/migration/migration-util.h+30 -290 replies
9/17tests/qtest/migration: Isolate test initializationtests/qtest/migration-test.c+86 -360 replies
10/17tests/qtest/migration: Move common test codetests/qtest/meson.build tests/qtest/migration-test.c tests/qtest/migration/bootfile.c +3 more+1205 -11290 replies
11/17tests/qtest/migration: Split TLS tests from migration-test.ctests/qtest/meson.build tests/qtest/migration-test.c tests/qtest/migration/framework.h +1 more+804 -7890 replies
12/17tests/qtest/migration: Split compression tests from migration-test.ctests/qtest/meson.build tests/qtest/migration-test.c tests/qtest/migration/compression-tests.c +1 more+242 -1600 replies
13/17tests/qtest/migration: Split postcopy teststests/qtest/meson.build tests/qtest/migration-test.c tests/qtest/migration/framework.h +1 more+109 -770 replies
14/17tests/qtest/migration: Split file teststests/qtest/meson.build tests/qtest/migration-test.c tests/qtest/migration/file-tests.c +1 more+341 -3100 replies
15/17tests/qtest/migration: Split precopy teststests/qtest/meson.build tests/qtest/migration-test.c tests/qtest/migration/framework.h +1 more+1011 -9680 replies
16/17tests/qtest/migration: Split CPR teststests/qtest/meson.build tests/qtest/migration-test.c tests/qtest/migration/cpr-tests.c +1 more+61 -330 replies
17/17tests/qtest/migration: Split validation tests + misctests/qtest/meson.build tests/qtest/migration-test.c tests/qtest/migration/framework.h +1 more+279 -2760 replies

Reviews trailers per patch

16 of 17 patches have a Reviewed-by or Acked-by.

PatchPeter XuDaniel P. Berrangé
1/17R-b
2/17R-b
3/17R-b
4/17R-b
5/17R-b
6/17
7/17R-b
8/17R-b
9/17R-b
10/17A-b
11/17A-b
12/17R-b
13/17R-b
14/17R-b
15/17R-b
16/17R-b
17/17R-b

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

Read the v3 thread

Cover letter [PATCH v3 00/17] tests/qtest: migration-test refactoring

v3:
- Fixed some more hook names I had missed;
- Move addition of migration-qmp.c in meson to correct patch;
- Moved QEMU_ENV_* variables to framework.c where they are used;
- patch 7: improve commit message;
- s/test-framework/framework/
- meson.build style changes;
- did *not* move migration-test into migration/, meson doesn't like it. We'd need a separate meson.build for that directory, which I don't think is worth it;
- Drop the other build changes, this is now just the refactoring of migration-test.

Refactor migration-test.c and migration-helpers.c into multiple smaller files structured like so:

qtest/
migration-test.c

qtest/migration/
framework.h
framework.c - core tests infrastructure: migrate_start|end,
*_common, wait_for_*, check_guests_ram, etc.

migration-util.h
migration-util.c - general utilities, equivalent to
migration-helpers.c

migration-qmp.h
migration-qmp.c - utilities for querying information via QMP

bootfile.h - formerly migration-test.h, the old name was confusing bootfile.c - the guest code

# test code, without main()
compression-tests.c
cpr-tests.c
file-tests.c
misc-tests.c
postcopy-tests.c
precopy-tests.c
tls-tests.c

CI run: https://gitlab.com/farosas/qemu/-/pipelines/1563199058

v2:
https://lore.kernel.org/r/[email protected]
v1:
https://lore.kernel.org/r/[email protected]
v0:
https://lore.kernel.org/r/[email protected]

Fabiano Rosas (17):
tests/qtest/migration: Standardize hook names tests/qtest/migration: Stop calling everything "test" tests/migration: Disambiguate guestperf vs. a-b tests/qtest/migration: Move bootfile code to its own file tests/qtest/migration: Move qmp helpers to a separate file tests/qtest/migration: Rename migration-helpers.c tests/qtest/migration: Move ufd_version_check to utils tests/qtest/migration: Move kvm_dirty_ring_supported to utils tests/qtest/migration: Isolate test initialization tests/qtest/migration: Move common test code tests/qtest/migration: Split TLS tests from migration-test.c tests/qtest/migration: Split compression tests from migration-test.c tests/qtest/migration: Split postcopy tests tests/qtest/migration: Split file tests tests/qtest/migration: Split precopy tests tests/qtest/migration: Split CPR tests tests/qtest/migration: Split validation tests + misc

 MAINTAINERS                                   |    5 +-
 tests/meson.build                             |    2 +-
 .../guestperf-batch.py                        |    0
 .../guestperf-plot.py                         |    0
 .../guestperf.py                              |    0
 .../guestperf/__init__.py                     |    0
 .../guestperf/comparison.py                   |    0
 .../guestperf/engine.py                       |    0
 .../guestperf/hardware.py                     |    0
 .../guestperf/plot.py                         |    0
 .../guestperf/progress.py                     |    0
 .../guestperf/report.py                       |    0
 .../guestperf/scenario.py                     |    0
 .../guestperf/shell.py                        |    0
 .../guestperf/timings.py                      |    0
 .../initrd-stress.sh                          |    0
 .../meson.build                               |    0
 .../{migration => migration-stress}/stress.c  |    0
 tests/qtest/meson.build                       |   27 +-
 tests/qtest/migration-test.c                  | 4031 +----------------
 tests/{ => qtest}/migration/Makefile          |    0
 tests/{ => qtest}/migration/aarch64/Makefile  |    0
 .../migration/aarch64/a-b-kernel.S            |    0
 .../migration/aarch64/a-b-kernel.h            |    0
 tests/qtest/migration/bootfile.c              |   70 +
 .../migration/bootfile.h}                     |    9 +-
 tests/qtest/migration/compression-tests.c     |  239 +
 tests/qtest/migration/cpr-tests.c             |   58 +
 tests/qtest/migration/file-tests.c            |  338 ++
 tests/qtest/migration/framework.c             |  971 ++++
 tests/qtest/migration/framework.h             |  230 +
 tests/{ => qtest}/migration/i386/Makefile     |    0
 .../migration/i386/a-b-bootblock.S            |    0
 .../migration/i386/a-b-bootblock.h            |    0
 .../migration-qmp.c}                          |  567 ++-
 tests/qtest/migration/migration-qmp.h         |   46 +
 tests/qtest/migration/migration-util.c        |  362 ++
 .../migration-util.h}                         |   27 +-
 tests/qtest/migration/misc-tests.c            |  275 ++
 tests/qtest/migration/postcopy-tests.c        |  106 +
 tests/{ => qtest}/migration/ppc64/Makefile    |    0
 .../{ => qtest}/migration/ppc64/a-b-kernel.S  |    0
 .../{ => qtest}/migration/ppc64/a-b-kernel.h  |    0
 tests/qtest/migration/precopy-tests.c         | 1007 ++++
 tests/{ => qtest}/migration/s390x/Makefile    |    0
 tests/{ => qtest}/migration/s390x/a-b-bios.c  |    0
 tests/{ => qtest}/migration/s390x/a-b-bios.h  |    0
 tests/qtest/migration/tls-tests.c             |  791 ++++
 tests/qtest/virtio-net-failover.c             |    3 +-
 49 files changed, 4806 insertions(+), 4358 deletions(-)
 rename tests/{migration => migration-stress}/guestperf-batch.py (100%)
 rename tests/{migration => migration-stress}/guestperf-plot.py (100%)
 rename tests/{migration => migration-stress}/guestperf.py (100%)
 rename tests/{migration => migration-stress}/guestperf/__init__.py (100%)
 rename tests/{migration => migration-stress}/guestperf/comparison.py (100%)
 rename tests/{migration => migration-stress}/guestperf/engine.py (100%)
 rename tests/{migration => migration-stress}/guestperf/hardware.py (100%)
 rename tests/{migration => migration-stress}/guestperf/plot.py (100%)
 rename tests/{migration => migration-stress}/guestperf/progress.py (100%)
 rename tests/{migration => migration-stress}/guestperf/report.py (100%)
 rename tests/{migration => migration-stress}/guestperf/scenario.py (100%)
 rename tests/{migration => migration-stress}/guestperf/shell.py (100%)
 rename tests/{migration => migration-stress}/guestperf/timings.py (100%)
 rename tests/{migration => migration-stress}/initrd-stress.sh (100%)
 rename tests/{migration => migration-stress}/meson.build (100%)
 rename tests/{migration => migration-stress}/stress.c (100%)
 rename tests/{ => qtest}/migration/Makefile (100%)
 rename tests/{ => qtest}/migration/aarch64/Makefile (100%)
 rename tests/{ => qtest}/migration/aarch64/a-b-kernel.S (100%)
 rename tests/{ => qtest}/migration/aarch64/a-b-kernel.h (100%)
 create mode 100644 tests/qtest/migration/bootfile.c
 rename tests/{migration/migration-test.h => qtest/migration/bootfile.h} (85%)
 create mode 100644 tests/qtest/migration/compression-tests.c
 create mode 100644 tests/qtest/migration/cpr-tests.c
 create mode 100644 tests/qtest/migration/file-tests.c
 create mode 100644 tests/qtest/migration/framework.c
 create mode 100644 tests/qtest/migration/framework.h
 rename tests/{ => qtest}/migration/i386/Makefile (100%)
 rename tests/{ => qtest}/migration/i386/a-b-bootblock.S (100%)
 rename tests/{ => qtest}/migration/i386/a-b-bootblock.h (100%)
 rename tests/qtest/{migration-helpers.c => migration/migration-qmp.c} (51%)
 create mode 100644 tests/qtest/migration/migration-qmp.h
 create mode 100644 tests/qtest/migration/migration-util.c
 rename tests/qtest/{migration-helpers.h => migration/migration-util.h} (67%)
 create mode 100644 tests/qtest/migration/misc-tests.c
 create mode 100644 tests/qtest/migration/postcopy-tests.c
 rename tests/{ => qtest}/migration/ppc64/Makefile (100%)
 rename tests/{ => qtest}/migration/ppc64/a-b-kernel.S (100%)
 rename tests/{ => qtest}/migration/ppc64/a-b-kernel.h (100%)
 create mode 100644 tests/qtest/migration/precopy-tests.c
 rename tests/{ => qtest}/migration/s390x/Makefile (100%)
 rename tests/{ => qtest}/migration/s390x/a-b-bios.c (100%)
 rename tests/{ => qtest}/migration/s390x/a-b-bios.h (100%)
 create mode 100644 tests/qtest/migration/tls-tests.c

base-commit: 7872e5fdf38ac0d8d0083aabb98d67da1f530ef4

Signature · 1 line
2.35.3