tests/libqtest: Remove unused global_qtest-related wrapper functions
PATCH 1/1 tests/libqtest: Remove unused global_qtest-related wrapper functions
A bunch of the wrapper functions that use global_qtest are not used anymore. Remove them to avoid that they are used in new code again.
Signed-off-by Thomas Huth <[email protected]>
--- tests/libqtest.c | 11 +---- tests/libqtest.h | 108 ----------------------------------------------- 2 files changed, 1 insertion(+), 118 deletions(-)
tests/libqtest.c +1 -10
@@ -1038,15 +1038,6 @@ QDict *qmp(const char *fmt, ...)return response; } -void qmp_send (const char *fmt, ...) -{ -va_list ap; - -va_start (ap, fmt); -qtest_qmp_vsend (global_qtest, fmt, ap); -va_end (ap); -} -char *hmp (const char *fmt, ...) {va_list ap;
@@ -1232,7 +1223,7 @@ void qtest_qmp_device_del(const char *id) &got_event);qobject_unref (rsp);if (!got_event) { - rsp =qmp_receive (); + rsp =qtest_qmp_receive (global_qtest);g_assert_cmpstr (qdict_get_try_str (rsp,"event" ), ==, "DEVICE_DELETED");qobject_unref (rsp);
tests/libqtest.h +0 -108
144 lines not on this page · raw message
Signature · 1 line
2.21.0
Quoted 8 lines · Thomas Huth
A bunch of the wrapper functions that use
global_qtestare not used anymore. Remove them to avoid that they are used in new code again.Signed-off-by Thomas Huth <[email protected]>--- tests/libqtest.c | 11 +---- tests/libqtest.h | 108 ----------------------------------------------- 2 files changed, 1 insertion(+), 118 deletions(-)
Nice!
Reviewed-by Eric Blake <[email protected]>
tests/libqtest.h static inline bool get_irq(int num) · line 704
Quoted 8 lines
tests/libqtest.h +0
-8-/** -* qtest_irq_intercept_out: -* @string: QOM path of a device. -* -* Associate qtest irqs with the GPIO-out pins of the device -* whose path is specified by @string. -*/ -static inline void irq_intercept_out (const char *string)
Fixes a copy-and-paste misdocumentation bug while at it :)
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
Quoted 8 lines · Thomas Huth
A bunch of the wrapper functions that use
global_qtestare not used anymore. Remove them to avoid that they are used in new code again.Signed-off-by Thomas Huth <[email protected]>--- tests/libqtest.c | 11 +---- tests/libqtest.h | 108 ----------------------------------------------- 2 files changed, 1 insertion(+), 118 deletions(-)
Reviewed-by Stefan Hajnoczi <[email protected]>