OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eac7a77
)
tests: qtest: print device_add error before failing test
author
Igor Mammedov
<imammedo@redhat.com>
Thu, 12 Jan 2023 14:02:33 +0000
(15:02 +0100)
committer
Michael S. Tsirkin
<mst@redhat.com>
Sat, 28 Jan 2023 11:21:29 +0000
(06:21 -0500)
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <
20230112140312
.
3096331
-2-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
tests/qtest/libqtest.c
patch
|
blob
|
history
diff --git
a/tests/qtest/libqtest.c
b/tests/qtest/libqtest.c
index
6b2216c
..
d658222
100644
(file)
--- a/
tests/qtest/libqtest.c
+++ b/
tests/qtest/libqtest.c
@@
-1435,6
+1435,10
@@
void qtest_qmp_device_add_qdict(QTestState *qts, const char *drv,
resp = qtest_qmp(qts, "{'execute': 'device_add', 'arguments': %p}", args);
g_assert(resp);
g_assert(!qdict_haskey(resp, "event")); /* We don't expect any events */
+ if (qdict_haskey(resp, "error")) {
+ fprintf(stderr, "error: %s\n",
+ qdict_get_str(qdict_get_qdict(resp, "error"), "desc"));
+ }
g_assert(!qdict_haskey(resp, "error"));
qobject_unref(resp);
}