Skip to content

tests: Compile-time format string checking for libqtest.h

Markus Armbruster qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest posting 2/223 patches 2 repliesIn review
  2. v3 posting 1/223 patches 0 repliesSuperseded
  3. v223 patches 45 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v120 patches24 repliesSuperseded

Changes in v3 from the cover letter

* Reordered to reduce churn: PATCH 04 was 21, 05 was 01
* PATCH 04: Instead of open coding the *_discard_response() in tests, add macros with a TODO [Thomas]
* PATCH 05: Comments tweaked again, ripple effect on PATCH 06+14
* PATCH 14: Quoting bug and commit message typo fixed [Eric]
* PATCH 19: Missing attribute supplied [Eric]
* PATCH 20: Whitespace cleanup [Eric]
* PATCH 22: Commit message typo fixed [Eric]
* PATCH 23: Commit message improved [Eric]

Patches in v3 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/23libqtest: Rename functions to send QMP messagestests/ahci-test.c tests/libqos/ahci.c tests/libqtest.c +2 more+33 -330 replies
2/23libqtest: Clean up how we read device_del messagestests/libqtest.c+1 -10 replies
3/23libqtest: Clean up how we read the QMP greetingtests/libqtest.c+3 -10 replies
4/23libqtest: Remove qtest_qmp_discard_response() & friendstests/ahci-test.c tests/boot-order-test.c tests/drive_del-test.c +8 more+34 -551 reply
5/23libqtest: Document calling conventionstests/libqtest.h+21 -80 replies
6/23qobject: Replace qobject_from_jsonf() by qobject_from_jsonf_nofail()include/qapi/qmp/qjson.h qobject/qjson.c tests/check-qjson.c +1 more+31 -220 replies
7/23qobject: New qobject_from_vjsonf_nofail(), qdict_from_vjsonf_nofail()include/qapi/qmp/qjson.h qobject/qjson.c+41 -70 replies
8/23libqtest: Simplify qmp_fd_vsend() a bittests/libqtest.c+7 -110 replies
9/23test-qobject-input-visitor: Avoid format string ambiguitytests/test-qobject-input-visitor.c+10 -90 replies
10/23qobject: qobject_from_jsonv() is dangerous, hide it awayinclude/qapi/qmp/qjson.h qobject/qjson.c+12 -30 replies
11/23tests: Pass literal format strings directly to qmp_FOO()tests/ahci-test.c tests/ide-test.c+2 -60 replies
12/23tests: Clean up string interpolation into QMP input (simple cases)tests/libqos/pci-pc.c tests/libqtest.c tests/migration-test.c +3 more+77 -1120 replies
13/23cpu-plug-test: Don't pass integers as strings to device_addtests/cpu-plug-test.c+3 -30 replies
14/23tests: Clean up string interpolation around qtest_qmp_device_add()tests/cpu-plug-test.c tests/e1000e-test.c tests/ivshmem-test.c +15 more+48 -580 replies
15/23migration-test: Make wait_command() return the "return" membertests/migration-test.c+15 -230 replies
16/23tests: New helper qtest_qmp_receive_success()tests/libqtest.c tests/libqtest.h tests/migration-test.c +1 more+80 -670 replies
17/23migration-test: Make wait_command() cope with '%'tests/migration-test.c+7 -20 replies
18/23migration-test: Clean up string interpolation into QMP, part 1tests/migration-test.c+6 -60 replies
19/23migration-test: Clean up string interpolation into QMP, part 2tests/migration-test.c+22 -120 replies
20/23migration-test: Clean up string interpolation into QMP, part 3tests/migration-test.c+29 -450 replies
21/23libqtest: Enable compile-time format string checkingtests/libqtest.h+14 -100 replies
22/23libqtest: Replace qtest_startf() by qtest_initf()tests/boot-order-test.c tests/boot-serial-test.c tests/cdrom-test.c +20 more+80 -820 replies
23/23libqtest: Rename qtest_FOOv() to qtest_vFOO() for consistencytests/libqtest.c tests/libqtest.h+8 -81 reply

Reviews trailers per patch

All 23 patches have a Reviewed-by or Acked-by.

PatchEric BlakePhilippe Mathieu-DaudéThomas HuthJuan QuintelaStefan HajnocziMarkus ArmbrusterStefan Berger
1/23R-b R-b
2/23R-b R-b R-b
3/23R-b R-b
4/23R-b R-b
5/23R-b R-b
6/23R-b R-b
7/23R-b R-b
8/23R-b R-b
9/23R-b
10/23R-b R-b
11/23R-b R-b
12/23R-b R-b
13/23R-b R-b R-b
14/23R-b
15/23R-b R-b
16/23R-b R-b R-b
17/23R-b R-b
18/23R-b R-b
19/23R-b R-b
20/23R-b R-b
21/23R-b R-b
22/23R-b
23/23R-b

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

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 00/23] tests: Compile-time format string checking for libqtest.h

This is a reboot of "[PATCH 0/9] tests: Clean up around qmp() and hmp()" I sent about a year ago. Back then, Eric folded it into his "Clean up around qmp() and hmp()" series, which stalled after v4.

My reboot tries to avoid that fate by reducing mission creep. There are plenty of good ideas in Eric's series we should mine some day, but today is not that day.

v3:
* Reordered to reduce churn: PATCH 04 was 21, 05 was 01
* PATCH 04: Instead of open coding the *_discard_response() in tests, add macros with a TODO [Thomas]
* PATCH 05: Comments tweaked again, ripple effect on PATCH 06+14
* PATCH 14: Quoting bug and commit message typo fixed [Eric]
* PATCH 19: Missing attribute supplied [Eric]
* PATCH 20: Whitespace cleanup [Eric]
* PATCH 22: Commit message typo fixed [Eric]
* PATCH 23: Commit message improved [Eric]
v2:
* PATCH 01: Comments tweaked, ripple effect on PATCH 05+13
* PATCH 05: Commit message improved [Thomas]
* PATCH 06: Style fix [Philippe]
* PATCH 16+17: Silence a warning
* PATCH 21-23: New

Eric Blake (1):
libqtest: Document calling conventions

Markus Armbruster (22):
libqtest: Rename functions to send QMP messages
libqtest: Clean up how we read device_del messages
libqtest: Clean up how we read the QMP greeting
libqtest: Remove qtest_qmp_discard_response() & friends
qobject: Replace qobject_from_jsonf() by qobject_from_jsonf_nofail()
qobject: New qobject_from_vjsonf_nofail(), qdict_from_vjsonf_nofail()
libqtest: Simplify qmp_fd_vsend() a bit test-qobject-input-visitor: Avoid format string ambiguity
qobject: qobject_from_jsonv() is dangerous, hide it away
tests: Pass literal format strings directly to qmp_FOO()
tests: Clean up string interpolation into QMP input (simple cases)
cpu-plug-test: Don't pass integers as strings to device_add
tests: Clean up string interpolation around qtest_qmp_device_add()
migration-test: Make wait_command() return the "return" member
tests: New helper qtest_qmp_receive_success()
migration-test: Make wait_command() cope with '%'
migration-test: Clean up string interpolation into QMP, part 1
migration-test: Clean up string interpolation into QMP, part 2
migration-test: Clean up string interpolation into QMP, part 3
libqtest: Enable compile-time format string checking
libqtest: Replace qtest_startf() by qtest_initf()
libqtest: Rename qtest_FOOv() to qtest_vFOO() for consistency

 include/qapi/qmp/qjson.h           |  12 +-
 qobject/qjson.c                    |  89 ++++++++++----
 tests/ahci-test.c                  |  15 +--
 tests/boot-order-test.c            |  13 +-
 tests/boot-serial-test.c           |  10 +-
 tests/cdrom-test.c                 |   6 +-
 tests/check-qjson.c                |  15 +--
 tests/cpu-plug-test.c              |   7 +-
 tests/drive_del-test.c             |   3 +
 tests/e1000e-test.c                |   6 +-
 tests/endianness-test.c            |  24 ++--
 tests/fdc-test.c                   |   4 +
 tests/ide-test.c                   |   9 +-
 tests/ipmi-bt-test.c               |   2 +-
 tests/ivshmem-test.c               |   8 +-
 tests/libqos/ahci.c                |   4 +-
 tests/libqos/pci-pc.c              |   9 +-
 tests/libqos/pci.c                 |   7 --
 tests/libqos/pci.h                 |   2 -
 tests/libqos/usb.c                 |  10 +-
 tests/libqos/usb.h                 |   2 +-
 tests/libqtest.c                   | 189 ++++++++++++++---------------
 tests/libqtest.h                   | 124 ++++++++++---------
 tests/m25p80-test.c                |   6 +-
 tests/m48t59-test.c                |   2 +-
 tests/machine-none-test.c          |   2 +-
 tests/migration-test.c             | 187 +++++++++++++---------------
 tests/numa-test.c                  |   4 +-
 tests/pnv-xscom-test.c             |   8 +-
 tests/prom-env-test.c              |  10 +-
 tests/qmp-test.c                   |  20 +--
 tests/sdhci-test.c                 |   6 +-
 tests/tco-test.c                   |   6 +-
 tests/test-filter-mirror.c         |   6 +-
 tests/test-filter-redirector.c     |   8 +-
 tests/test-qga.c                   | 150 ++++++++++-------------
 tests/test-qobject-input-visitor.c |  19 +--
 tests/tpm-util.c                   |  41 ++-----
 tests/usb-hcd-ehci-test.c          |   2 +-
 tests/usb-hcd-ohci-test.c          |   2 +-
 tests/usb-hcd-uhci-test.c          |   4 +-
 tests/usb-hcd-xhci-test.c          |  10 +-
 tests/vhost-user-test.c            |   6 +-
 tests/virtio-balloon-test.c        |   4 +-
 tests/virtio-blk-test.c            |  17 ++-
 tests/virtio-console-test.c        |  12 +-
 tests/virtio-net-test.c            |   3 +-
 tests/virtio-rng-test.c            |   3 +-
 tests/virtio-scsi-test.c           |   2 +-
 tests/virtio-serial-test.c         |   6 +-
 tests/vmgenid-test.c               |   6 +-
 51 files changed, 561 insertions(+), 561 deletions(-)
Signature · 1 line
2.17.1