summaryrefslogtreecommitdiffstats
path: root/tests/ahci-test.c
diff options
context:
space:
mode:
authorEric Blake2017-09-11 19:20:01 +0200
committerThomas Huth2018-02-14 11:43:41 +0100
commit3d95fb9770f0fbf4396879bb6152b0e78edf0546 (patch)
treee2e4022460ab6878de071853c5d8cba8c3410be1 /tests/ahci-test.c
parentlibqos: Use explicit QTestState for ahci operations (diff)
downloadqemu-3d95fb9770f0fbf4396879bb6152b0e78edf0546.tar.gz
qemu-3d95fb9770f0fbf4396879bb6152b0e78edf0546.tar.xz
qemu-3d95fb9770f0fbf4396879bb6152b0e78edf0546.zip
libqos: Use explicit QTestState for remaining libqos operations
Drop one more client of global_qtest by teaching all remaining libqos stragglers to pass in an explicit QTestState. Change the setting of global_qtest from being implicit in libqos' call to qtest_start() to instead be explicit in all clients that are still relying on global_qtest. Note that qmp_execute() can be greatly simplified in the process, and that we also get rid of interpolation of a JSON string into a temporary variable when qtest_qmp() can do it more reliably. Signed-off-by: Eric Blake <eblake@redhat.com> Acked-by: Greg Kurz <groug@kaod.org> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/ahci-test.c')
-rw-r--r--tests/ahci-test.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/ahci-test.c b/tests/ahci-test.c
index e847c98df1..2342fe3099 100644
--- a/tests/ahci-test.c
+++ b/tests/ahci-test.c
@@ -158,6 +158,7 @@ static AHCIQState *ahci_vboot(const char *cli, va_list ap)
s = g_new0(AHCIQState, 1);
s->parent = qtest_pc_vboot(cli, ap);
+ global_qtest = s->parent->qts;
alloc_set_flags(s->parent->alloc, ALLOC_LEAK_ASSERT);
/* Verify that we have an AHCI device present. */