aboutsummaryrefslogtreecommitdiff
path: root/tests/libqtest-single.h
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2019-09-03 07:50:26 +0200
committerThomas Huth <thuth@redhat.com>2019-09-05 13:18:52 +0200
commitdd210749727530cdef7c335040edbf81c3c5d041 (patch)
tree0e761474de9ed8bf6a10190a30141edb58cd9182 /tests/libqtest-single.h
parent0ba67974aff2b42105c93e61b852d90197f37a20 (diff)
downloadqemu-dd210749727530cdef7c335040edbf81c3c5d041.zip
qemu-dd210749727530cdef7c335040edbf81c3c5d041.tar.gz
qemu-dd210749727530cdef7c335040edbf81c3c5d041.tar.bz2
tests/libqtest: Use libqtest-single.h in tests that require global_qtest
Tests that require global_qtest or the related wrapper functions now use the libqtest-single.h header that is dedicated for everything related to global_qtest. The core libqtest.c and libqtest.h files are now completely indepedent from global_qtest, so that the core library is now not depending on a global state anymore. Message-Id: <20190904130047.25808-7-thuth@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/libqtest-single.h')
-rw-r--r--tests/libqtest-single.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/libqtest-single.h b/tests/libqtest-single.h
index 4925955..6f1bb13 100644
--- a/tests/libqtest-single.h
+++ b/tests/libqtest-single.h
@@ -11,6 +11,10 @@
#ifndef LIBQTEST_SINGLE_H
#define LIBQTEST_SINGLE_H
+#include "libqtest.h"
+
+QTestState *global_qtest __attribute__((common, weak));
+
/**
* qtest_start:
* @args: other arguments to pass to QEMU