Skip to content

Preliminary libqtest cleanups

Eric Blake qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest38 patches 36 repliesIn review
  2. v629 patches 67 repliesSuperseded
  3. v513 patches 21 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v11 patch4 repliesSuperseded

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/38test-qga: Kill broken and dead QGA_TEST_SIDE_EFFECTING codetests/test-qga.c+0 -900 replies
2/38qtest: Don't perform side effects inside assertionqtest.c+57 -230 replies
3/38numa-test: Use hmp()tests/numa-test.c+3 -180 replies
4/38tests: Clean up wait for eventtests/boot-order-test.c tests/libqos/pci-pc.c tests/tco-test.c +3 more+16 -480 replies
5/38libqtest: Remove dead qtest_instances variabletests/libqtest.c+1 -50 replies
6/38libqtest: Use qemu_strtoul()tests/libqtest.c+13 -60 replies
7/38libqtest: Inline qtest_query_target_endianness()tests/libqtest.c+9 -171 reply
8/38libqos: Track QTestState with QPCIBustests/ahci-test.c tests/e1000e-test.c tests/i440fx-test.c +15 more+33 -332 replies
9/38libqos: Track QTestState with QVirtioBustests/libqos/virtio-mmio.c tests/libqos/virtio-mmio.h tests/libqos/virtio-pci.c +4 more+36 -123 replies
10/38libqos: Move/rename qpci_unplug_acpi_device_test() to pci.ctests/e1000e-test.c tests/ivshmem-test.c tests/libqos/pci-pc.c +5 more+29 -293 replies
11/38libqos: Use explicit QTestState for pci operationstests/e1000e-test.c tests/ivshmem-test.c tests/libqos/pci-pc.c +6 more+55 -570 replies
12/38libqos: Use explicit QTestState for virtio operationstests/libqos/virtio-mmio.c tests/libqos/virtio-pci.c tests/libqos/virtio.c +2 more+94 -721 reply
13/38libqos: Use explicit QTestState for fw_cfg operationstests/boot-order-test.c tests/e1000e-test.c tests/fw_cfg-test.c +11 more+36 -362 replies
14/38libqos: Use explicit QTestState for rtas operationstests/libqos/pci-spapr.c tests/libqos/rtas.c tests/libqos/rtas.h +1 more+39 -261 reply
15/38libqos: Use explicit QTestState for i2c operationstests/ds1338-test.c tests/libqos/i2c-imx.c tests/libqos/i2c-omap.c +2 more+66 -651 reply
16/38libqos: Use explicit QTestState for ahci operationstests/libqos/ahci.c+23 -222 replies
17/38libqos: Use explicit QTestState for remaining libqos operationstests/ahci-test.c tests/ivshmem-test.c tests/libqos/libqos-pc.c +8 more+39 -352 replies
18/38ahci-test: Drop dependence on global_qtesttests/ahci-test.c tests/libqos/libqos.c tests/libqos/libqos.h+39 -542 replies
19/38ivshmem-test: Drop dependence on global_qtesttests/ivshmem-test.c+7 -210 replies
20/38postcopy-test: Drop dependence on global_qtesttests/postcopy-test.c+40 -440 replies
21/38vhost-user-test: Drop dependence on global_qtesttests/vhost-user-test.c+30 -380 replies
22/38qmp-test: Drop dependence on global_qtesttests/qmp-test.c+18 -170 replies
23/38tests/boot-sector: Drop dependence on global_qtesttests/bios-tables-test.c tests/boot-sector.c tests/boot-sector.h +2 more+11 -90 replies
24/38tests/acpi-utils: Drop dependence on global_qtesttests/acpi-utils.c tests/acpi-utils.h tests/bios-tables-test.c +1 more+146 -1401 reply
25/38wdt_ib700-test: Drop dependence on global_qtesttests/wdt_ib700-test.c+34 -290 replies
26/38libqtest: Merge qtest_end() into qtest_quit()tests/ac97-test.c tests/device-introspect-test.c tests/display-vga-test.c +42 more+80 -872 replies
27/38libqtest: Swap order of qtest_init() and qtest_start()tests/libqtest.c tests/libqtest.h tests/qmp-test.c+34 -291 reply
28/38libqtest: Add qtest_[v]startf()tests/bios-tables-test.c tests/boot-order-test.c tests/boot-serial-test.c +25 more+199 -3063 replies
29/38libqtest: Merge qtest_init() into qtest_start()tests/ac97-test.c tests/device-introspect-test.c tests/display-vga-test.c +39 more+101 -1281 reply
30/38qtest: Avoid passing raw strings through hmp()tests/libqtest.h tests/test-hmp.c+6 -62 replies
31/38libqtest: Merge qtest_clock_*() with clock_*()tests/e1000e-test.c tests/fdc-test.c tests/ide-test.c +8 more+90 -1253 replies
32/38libqtest: Merge qtest_irq*() with irq*()tests/fdc-test.c tests/ide-test.c tests/ipmi-bt-test.c +7 more+60 -941 reply
33/38libqtest: Merge qtest_{in, out}[bwl]() with {in, out}[bwl]()tests/boot-order-test.c tests/endianness-test.c tests/fdc-test.c +14 more+120 -1921 reply
34/38libqtest: Merge qtest_{read, write}[bwlq]() with {read, write}[bwlq]()tests/acpi-utils.c tests/acpi-utils.h tests/bios-tables-test.c +24 more+245 -3560 replies
35/38libqtest: Merge qtest_{mem, buf}{read, write}() with {mem, buf}{read, write}()tests/ahci-test.c tests/e1000e-test.c tests/i440fx-test.c +12 more+78 -1271 reply
36/38libqtest: Merge qtest_memset() with qmemset()tests/ahci-test.c tests/libqos/ahci.c tests/libqtest.c +1 more+10 -230 replies
37/38libqtest: Separate qmp_discard_response() from commandtests/ahci-test.c tests/boot-order-test.c tests/drive_del-test.c +8 more+57 -720 replies
38/38libqtest: Merge qtest_hmp() with hmp()tests/device-introspect-test.c tests/drive_del-test.c tests/ide-test.c +4 more+19 -600 replies

Reviews trailers per patch

25 of 38 patches have a Reviewed-by or Acked-by.

PatchMarkus ArmbrusterPhilippe Mathieu-DaudéThomas HuthMarc-André LureauStefan HajnocziMichael S. TsirkinDr. David Alan GilbertGreg KurzJohn Snow
1/38R-b R-b
2/38R-b
3/38R-b R-b R-b
4/38R-b
5/38R-b R-b
6/38R-b R-b
7/38R-b
8/38R-b R-b
9/38
10/38
11/38
12/38R-b
13/38R-b R-b
14/38R-b
15/38R-b
16/38R-b R-b
17/38A-b R-b
18/38R-b
19/38
20/38R-b
21/38R-b
22/38R-b
23/38R-b A-b
24/38R-b
25/38R-b
26/38R-b R-b
27/38R-b
28/38
29/38
30/38R-b R-b
31/38
32/38
33/38
34/38
35/38A-b
36/38
37/38
38/38

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 9 reviewers.

Read the v7 thread

Cover letter [Qemu-devel] [PATCH v7 00/38] Preliminary libqtest cleanups

I'm trying to get rid of some of the duplication in libqtest.h before tackling the project of making qmp() easier to use. v6 got some positive review on the direction of making dependence on global_qtest explicit (compared to v5 where I went the opposite direction and tried to use global_qtest even more than it was already being abused for), so most of the changes in this posting are related to additional cleanups or addressing good review comments.

Still to come: I still have work pending on overhauling the qmp() and qtest_qmp() code, using naming that makes more sense, as well as getting us to the point that we can reliably use -Wformat checking on qmp().

Available as a tag at:
git fetch git://repo.or.cz/qemu/ericb.git qapi-qmp-cleanup-v7

Since v6 (https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg00308.html):
- Add review tags where appropriate
- merge a couple of patches [Thomas]
- split ahci into multiple patches [Thomas]
- add qtest_[v]startf rather than overloading (and churn) on qtest_start [Thomas]
- catch more depedencies on global_qtest under tests/libqos/
- lots more patches added to make use of global_qtest obvious
- drop .gitignore changes for a later series

001/38:[----] [--] 'test-qga: Kill broken and dead QGA_TEST_SIDE_EFFECTING code' 002/38:[----] [--] 'qtest: Don't perform side effects inside assertion' 003/38:[----] [--] 'numa-test: Use hmp()'
004/38:[----] [--] 'tests: Clean up wait for event'
005/38:[----] [--] 'libqtest: Remove dead qtest_instances variable' 006/38:[----] [--] 'libqtest: Use qemu_strtoul()'
007/38:[0020] [FC] 'libqtest: Inline qtest_query_target_endianness()' 008/38:[0019] [FC] 'libqos: Track QTestState with QPCIBus'
009/38:[down] 'libqos: Track QTestState with QVirtioBus'
010/38:[down] 'libqos: Move/rename qpci_unplug_acpi_device_test() to pci.c' 011/38:[0045] [FC] 'libqos: Use explicit QTestState for pci operations' 012/38:[0179] [FC] 'libqos: Use explicit QTestState for virtio operations' 013/38:[0011] [FC] 'libqos: Use explicit QTestState for fw_cfg operations' 014/38:[0015] [FC] 'libqos: Use explicit QTestState for rtas operations' 015/38:[down] 'libqos: Use explicit QTestState for i2c operations' 016/38:[down] 'libqos: Use explicit QTestState for ahci operations' 017/38:[down] 'libqos: Use explicit QTestState for remaining libqos operations' 018/38:[0079] [FC] 'ahci-test: Drop dependence on global_qtest' 019/38:[0012] [FC] 'ivshmem-test: Drop dependence on global_qtest' 020/38:[----] [--] 'postcopy-test: Drop dependence on global_qtest' 021/38:[----] [--] 'vhost-user-test: Drop dependence on global_qtest' 022/38:[----] [-C] 'qmp-test: Drop dependence on global_qtest' 023/38:[----] [--] 'tests/boot-sector: Drop dependence on global_qtest' 024/38:[0079] [FC] 'tests/acpi-utils: Drop dependence on global_qtest' 025/38:[----] [--] 'wdt_ib700-test: Drop dependence on global_qtest' 026/38:[down] 'libqtest: Merge qtest_end() into qtest_quit()'
027/38:[down] 'libqtest: Swap order of qtest_init() and qtest_start()' 028/38:[down] 'libqtest: Add qtest_[v]startf()'
029/38:[down] 'libqtest: Merge qtest_init() into qtest_start()' 030/38:[0008] [FC] 'qtest: Avoid passing raw strings through hmp()' 031/38:[down] 'libqtest: Merge qtest_clock_*() with clock_*()' 032/38:[down] 'libqtest: Merge qtest_irq*() with irq*()'
033/38:[down] 'libqtest: Merge qtest_{in,out}[bwl]() with {in,out}[bwl]()' 034/38:[down] 'libqtest: Merge qtest_{read,write}[bwlq]() with {read,write}[bwlq]()' 035/38:[down] 'libqtest: Merge qtest_{mem,buf}{read,write}() with {mem,buf}{read,write}()' 036/38:[down] 'libqtest: Merge qtest_memset() with qmemset()'
037/38:[0088] [FC] 'libqtest: Separate qmp_discard_response() from command' 038/38:[down] 'libqtest: Merge qtest_hmp() with hmp()'

Eric Blake (37):
test-qga: Kill broken and dead QGA_TEST_SIDE_EFFECTING code
qtest: Don't perform side effects inside assertion
numa-test: Use hmp()
libqtest: Remove dead qtest_instances variable
libqtest: Use qemu_strtoul()
libqtest: Inline qtest_query_target_endianness()
libqos: Track QTestState with QPCIBus
libqos: Track QTestState with QVirtioBus
libqos: Move/rename qpci_unplug_acpi_device_test() to pci.c
libqos: Use explicit QTestState for pci operations
libqos: Use explicit QTestState for virtio operations
libqos: Use explicit QTestState for fw_cfg operations
libqos: Use explicit QTestState for rtas operations
libqos: Use explicit QTestState for i2c operations
libqos: Use explicit QTestState for ahci operations
libqos: Use explicit QTestState for remaining libqos operations
ahci-test: Drop dependence on global_qtest
ivshmem-test: Drop dependence on global_qtest
postcopy-test: Drop dependence on global_qtest
vhost-user-test: Drop dependence on global_qtest
qmp-test: Drop dependence on global_qtest tests/boot-sector: Drop dependence on global_qtest tests/acpi-utils: Drop dependence on global_qtest
wdt_ib700-test: Drop dependence on global_qtest
libqtest: Merge qtest_end() into qtest_quit()
libqtest: Swap order of qtest_init() and qtest_start()
libqtest: Add qtest_[v]startf()
libqtest: Merge qtest_init() into qtest_start()
qtest: Avoid passing raw strings through hmp()
libqtest: Merge qtest_clock_*() with clock_*()
libqtest: Merge qtest_irq*() with irq*()
libqtest: Merge qtest_{in,out}[bwl]() with {in,out}[bwl]()
libqtest: Merge qtest_{read,write}[bwlq]() with {read,write}[bwlq]()
libqtest: Merge qtest_{mem,buf}{read,write}() with

    {mem,buf}{read,write}()

libqtest: Merge qtest_memset() with qmemset()
libqtest: Separate qmp_discard_response() from command
libqtest: Merge qtest_hmp() with hmp()

Markus Armbruster (1):
tests: Clean up wait for event

 tests/libqtest.h               | 522 +++++++----------------------------------
 tests/acpi-utils.h             |  67 +++---
 tests/boot-sector.h            |   6 +-
 tests/libqos/ahci.h            |   2 +-
 tests/libqos/fw_cfg.h          |  10 +-
 tests/libqos/i2c.h             |   7 +-
 tests/libqos/libqos.h          |   5 +-
 tests/libqos/malloc-pc.h       |   4 +-
 tests/libqos/malloc-spapr.h    |   2 +-
 tests/libqos/malloc.h          |   1 +
 tests/libqos/pci-pc.h          |   2 +-
 tests/libqos/pci-spapr.h       |   2 +-
 tests/libqos/pci.h             |   5 +-
 tests/libqos/rtas.h            |   9 +-
 tests/libqos/virtio-mmio.h     |   6 +-
 tests/libqos/virtio-pci.h      |   2 -
 tests/libqos/virtio.h          |  13 +-
 tests/multiboot/libc.h         |   2 +-
 tests/libqtest.c               | 192 ++++++++-------
 qtest.c                        |  80 +++++--
 tests/ac97-test.c              |   4 +-
 tests/acpi-utils.c             |  19 +-
 tests/ahci-test.c              |  92 ++++----
 tests/bios-tables-test.c       | 199 ++++++++--------
 tests/boot-order-test.c        |  31 ++-
 tests/boot-sector.c            |   8 +-
 tests/boot-serial-test.c       |  12 +-
 tests/device-introspect-test.c |  30 +--
 tests/display-vga-test.c       |  18 +-
 tests/drive_del-test.c         |  26 +-
 tests/ds1338-test.c            |   6 +-
 tests/e1000-test.c             |  10 +-
 tests/e1000e-test.c            |  46 ++--
 tests/eepro100-test.c          |  11 +-
 tests/endianness-test.c        |  57 ++---
 tests/es1370-test.c            |   4 +-
 tests/fdc-test.c               | 144 ++++++------
 tests/fw_cfg-test.c            |  13 +-
 tests/hd-geo-test.c            |  20 +-
 tests/i440fx-test.c            |  24 +-
 tests/i82801b11-test.c         |   5 +-
 tests/ide-test.c               |  58 +++--
 tests/intel-hda-test.c         |   9 +-
 tests/ioh3420-test.c           |   7 +-
 tests/ipmi-bt-test.c           |  29 +--
 tests/ipmi-kcs-test.c          |  23 +-
 tests/ipoctal232-test.c        |   5 +-
 tests/ivshmem-test.c           |  27 +--
 tests/libqos/ahci.c            |  47 ++--
 tests/libqos/fw_cfg.c          |  14 +-
 tests/libqos/i2c-imx.c         |  67 +++---
 tests/libqos/i2c-omap.c        |  45 ++--
 tests/libqos/libqos-pc.c       |   2 +-
 tests/libqos/libqos.c          |  52 +---
 tests/libqos/malloc-pc.c       |   8 +-
 tests/libqos/malloc-spapr.c    |   4 +-
 tests/libqos/pci-pc.c          |  81 +++----
 tests/libqos/pci-spapr.c       |  45 ++--
 tests/libqos/pci.c             |  22 +-
 tests/libqos/rtas.c            |  36 +--
 tests/libqos/virtio-mmio.c     |  61 +++--
 tests/libqos/virtio-pci.c      |  14 +-
 tests/libqos/virtio.c          |  87 ++++---
 tests/m25p80-test.c            |  89 ++++---
 tests/m48t59-test.c            |  14 +-
 tests/megasas-test.c           |   7 +-
 tests/multiboot/libc.c         |   2 +-
 tests/ne2000-test.c            |   4 +-
 tests/numa-test.c              | 102 +++-----
 tests/nvme-test.c              |   7 +-
 tests/pc-cpu-test.c            |  24 +-
 tests/pcnet-test.c             |   4 +-
 tests/pnv-xscom-test.c         |  18 +-
 tests/postcopy-test.c          |  93 ++++----
 tests/prom-env-test.c          |  15 +-
 tests/pvpanic-test.c           |   8 +-
 tests/pxe-test.c               |  16 +-
 tests/q35-test.c               |  24 +-
 tests/qmp-test.c               |  43 ++--
 tests/qom-test.c               |   7 +-
 tests/rtas-test.c              |   3 +-
 tests/rtc-test.c               |  94 ++++----
 tests/rtl8139-test.c           |  17 +-
 tests/spapr-phb-test.c         |   5 +-
 tests/tco-test.c               |  45 ++--
 tests/test-arm-mptimer.c       |  43 ++--
 tests/test-filter-mirror.c     |  19 +-
 tests/test-filter-redirector.c |  66 +++---
 tests/test-hmp.c               |  13 +-
 tests/test-netfilter.c         |   9 +-
 tests/test-qga.c               |  90 -------
 tests/test-x86-cpuid-compat.c  |  13 +-
 tests/tmp105-test.c            |   7 +-
 tests/tpci200-test.c           |   4 +-
 tests/usb-hcd-ehci-test.c      |  27 ++-
 tests/usb-hcd-ohci-test.c      |   4 +-
 tests/usb-hcd-uhci-test.c      |   7 +-
 tests/usb-hcd-xhci-test.c      |  19 +-
 tests/vhost-user-test.c        | 105 +++------
 tests/virtio-9p-test.c         |   5 +-
 tests/virtio-balloon-test.c    |   4 +-
 tests/virtio-blk-test.c        |  83 ++++---
 tests/virtio-console-test.c    |  10 +-
 tests/virtio-net-test.c        |  30 ++-
 tests/virtio-rng-test.c        |   9 +-
 tests/virtio-scsi-test.c       |  22 +-
 tests/virtio-serial-test.c     |   4 +-
 tests/vmgenid-test.c           |  51 ++--
 tests/vmxnet3-test.c           |   4 +-
 tests/wdt_ib700-test.c         |  92 ++++----
 110 files changed, 1632 insertions(+), 2210 deletions(-)
Signature · 1 line
2.13.5