qemu-e2k/tests/libqos
Markus Armbruster 82cab70bd8 tests: Clean up string interpolation around qtest_qmp_device_add()
Leaving interpolation into JSON to qmp() is more robust than building
QMP input manually, as explained in the commit before previous.

qtest_qmp_device_add() and its wrappers interpolate into JSON as
follows:

* qtest_qmp_device_add() interpolates members into a JSON object.

* So do its wrappers qpci_plug_device_test() and usb_test_hotplug().

* usb_test_hotplug() additionally interpolates strings and numbers
  into JSON strings.

Clean them up:

* Have qtest_qmp_device_add() take its extra device properties as
  arguments for qdict_from_jsonf_nofail() instead of a string
  containing JSON members.

* Drop qpci_plug_device_test(), use qtest_qmp_device_add()
  directly.

* Change usb_test_hotplug() parameter @port to string, to avoid
  interpolation.  Interpolate @hcd_id separately.

Bonus: gets rid of a non-literal format string.  A step towards
compile-time format string checking without triggering
-Wformat-nonliteral.

Cc: Thomas Huth <thuth@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180806065344.7103-15-armbru@redhat.com>
2018-08-16 08:42:06 +02:00
..
ahci.c libqtest: Rename functions to send QMP messages 2018-08-16 08:42:06 +02:00
ahci.h ahci: fix FIS I bit and PIO Setup FIS interrupt 2018-06-25 16:50:48 -04:00
fw_cfg.c libqos: Use explicit QTestState for fw_cfg operations 2018-02-14 11:43:41 +01:00
fw_cfg.h libqos: Use explicit QTestState for fw_cfg operations 2018-02-14 11:43:41 +01:00
i2c-imx.c libqos: Use explicit QTestState for i2c operations 2018-02-14 11:43:41 +01:00
i2c-omap.c libqos: Use explicit QTestState for i2c operations 2018-02-14 11:43:41 +01:00
i2c.c
i2c.h misc: add pca9552 LED blinker model 2018-06-08 13:15:32 +01:00
libqos-pc.c libqos: Use explicit QTestState for remaining libqos operations 2018-02-14 11:43:41 +01:00
libqos-pc.h
libqos-spapr.c
libqos-spapr.h
libqos.c qobject: Replace qobject_incref/QINCREF qobject_decref/QDECREF 2018-05-04 08:27:53 +02:00
libqos.h libqos: Use explicit QTestState for fw_cfg operations 2018-02-14 11:43:41 +01:00
malloc-generic.c
malloc-generic.h
malloc-pc.c libqos: Use explicit QTestState for fw_cfg operations 2018-02-14 11:43:41 +01:00
malloc-pc.h libqos: Use explicit QTestState for fw_cfg operations 2018-02-14 11:43:41 +01:00
malloc-spapr.c libqos: Use explicit QTestState for fw_cfg operations 2018-02-14 11:43:41 +01:00
malloc-spapr.h libqos: Use explicit QTestState for fw_cfg operations 2018-02-14 11:43:41 +01:00
malloc.c
malloc.h libqos: Use explicit QTestState for fw_cfg operations 2018-02-14 11:43:41 +01:00
pci-pc.c tests: Clean up string interpolation into QMP input (simple cases) 2018-08-16 08:42:06 +02:00
pci-pc.h libqos: Track QTestState with QPCIBus 2018-02-14 11:43:02 +01:00
pci-spapr.c libqos: Use explicit QTestState for rtas operations 2018-02-14 11:43:41 +01:00
pci-spapr.h libqos: Track QTestState with QPCIBus 2018-02-14 11:43:02 +01:00
pci.c tests: Clean up string interpolation around qtest_qmp_device_add() 2018-08-16 08:42:06 +02:00
pci.h tests: Clean up string interpolation around qtest_qmp_device_add() 2018-08-16 08:42:06 +02:00
rtas.c libqos: Use explicit QTestState for rtas operations 2018-02-14 11:43:41 +01:00
rtas.h libqos: Use explicit QTestState for rtas operations 2018-02-14 11:43:41 +01:00
usb.c tests: Clean up string interpolation around qtest_qmp_device_add() 2018-08-16 08:42:06 +02:00
usb.h tests: Clean up string interpolation around qtest_qmp_device_add() 2018-08-16 08:42:06 +02:00
virtio-mmio.c
virtio-mmio.h
virtio-pci.c tests/libqos: Check for valid dev pointer when looking for PCI devices 2018-03-05 09:03:17 +00:00
virtio-pci.h
virtio.c libqos/virtio: return length written into used descriptor 2018-02-02 11:11:55 +01:00
virtio.h libqos/virtio: return length written into used descriptor 2018-02-02 11:11:55 +01:00