aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/libqos
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2022-03-30 13:39:05 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2022-05-03 15:16:51 +0400
commit907b5105f1b9e1af1abbdbb4f2039c7ab105c001 (patch)
treeccc9fdb503e2447cde53ab7ffc2787a5f583c7cd /tests/qtest/libqos
parent638466f777dc385dbd9b581ea31c6defd5f75efe (diff)
tests: move libqtest.h back under qtest/
Since commit a2ce7dbd917 ("meson: convert tests/qtest to meson"), libqtest.h is under libqos/ directory, while libqtest.c is still in qtest/. Move back to its original location to avoid mixing with libqos/. Suggested-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Diffstat (limited to 'tests/qtest/libqos')
-rw-r--r--tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c2
-rw-r--r--tests/qtest/libqos/ahci.c2
-rw-r--r--tests/qtest/libqos/arm-imx25-pdk-machine.c2
-rw-r--r--tests/qtest/libqos/arm-n800-machine.c2
-rw-r--r--tests/qtest/libqos/arm-raspi2-machine.c2
-rw-r--r--tests/qtest/libqos/arm-sabrelite-machine.c2
-rw-r--r--tests/qtest/libqos/arm-smdkc210-machine.c2
-rw-r--r--tests/qtest/libqos/arm-virt-machine.c2
-rw-r--r--tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c2
-rw-r--r--tests/qtest/libqos/e1000e.c2
-rw-r--r--tests/qtest/libqos/fw_cfg.c2
-rw-r--r--tests/qtest/libqos/fw_cfg.h2
-rw-r--r--tests/qtest/libqos/i2c-imx.c2
-rw-r--r--tests/qtest/libqos/i2c-omap.c2
-rw-r--r--tests/qtest/libqos/i2c.c2
-rw-r--r--tests/qtest/libqos/i2c.h2
-rw-r--r--tests/qtest/libqos/libqos.c2
-rw-r--r--tests/qtest/libqos/libqos.h2
-rw-r--r--tests/qtest/libqos/libqtest.h813
-rw-r--r--tests/qtest/libqos/malloc.h2
-rw-r--r--tests/qtest/libqos/pci-pc.c2
-rw-r--r--tests/qtest/libqos/pci-spapr.c2
-rw-r--r--tests/qtest/libqos/pci.h2
-rw-r--r--tests/qtest/libqos/ppc64_pseries-machine.c2
-rw-r--r--tests/qtest/libqos/qgraph.c2
-rw-r--r--tests/qtest/libqos/qos_external.c2
-rw-r--r--tests/qtest/libqos/rtas.c2
-rw-r--r--tests/qtest/libqos/sdhci-cmd.c2
-rw-r--r--tests/qtest/libqos/sdhci-cmd.h2
-rw-r--r--tests/qtest/libqos/sdhci.c2
-rw-r--r--tests/qtest/libqos/tpci200.c2
-rw-r--r--tests/qtest/libqos/usb.c2
-rw-r--r--tests/qtest/libqos/vhost-user-blk.c2
-rw-r--r--tests/qtest/libqos/virtio-9p.c2
-rw-r--r--tests/qtest/libqos/virtio-balloon.c2
-rw-r--r--tests/qtest/libqos/virtio-blk.c2
-rw-r--r--tests/qtest/libqos/virtio-iommu.c2
-rw-r--r--tests/qtest/libqos/virtio-mmio.c2
-rw-r--r--tests/qtest/libqos/virtio-net.c2
-rw-r--r--tests/qtest/libqos/virtio-pci.c2
-rw-r--r--tests/qtest/libqos/virtio-rng.c2
-rw-r--r--tests/qtest/libqos/virtio-scsi.c2
-rw-r--r--tests/qtest/libqos/virtio-serial.c2
-rw-r--r--tests/qtest/libqos/virtio.c2
-rw-r--r--tests/qtest/libqos/x86_64_pc-machine.c2
45 files changed, 44 insertions, 857 deletions
diff --git a/tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c b/tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c
index 79631cc7a9..c8a3ea11eb 100644
--- a/tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c
+++ b/tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c
@@ -17,7 +17,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qemu/module.h"
#include "malloc.h"
#include "qgraph.h"
diff --git a/tests/qtest/libqos/ahci.c b/tests/qtest/libqos/ahci.c
index 41c4be5efa..f53f12aa99 100644
--- a/tests/qtest/libqos/ahci.c
+++ b/tests/qtest/libqos/ahci.c
@@ -24,7 +24,7 @@
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "ahci.h"
#include "pci-pc.h"
diff --git a/tests/qtest/libqos/arm-imx25-pdk-machine.c b/tests/qtest/libqos/arm-imx25-pdk-machine.c
index 6692adfa4f..54d0c95330 100644
--- a/tests/qtest/libqos/arm-imx25-pdk-machine.c
+++ b/tests/qtest/libqos/arm-imx25-pdk-machine.c
@@ -19,7 +19,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "malloc.h"
#include "qgraph.h"
#include "i2c.h"
diff --git a/tests/qtest/libqos/arm-n800-machine.c b/tests/qtest/libqos/arm-n800-machine.c
index ff2049c3a7..ecd46b1daf 100644
--- a/tests/qtest/libqos/arm-n800-machine.c
+++ b/tests/qtest/libqos/arm-n800-machine.c
@@ -19,7 +19,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "malloc.h"
#include "qgraph.h"
#include "i2c.h"
diff --git a/tests/qtest/libqos/arm-raspi2-machine.c b/tests/qtest/libqos/arm-raspi2-machine.c
index 09ca863c10..0a2943440b 100644
--- a/tests/qtest/libqos/arm-raspi2-machine.c
+++ b/tests/qtest/libqos/arm-raspi2-machine.c
@@ -17,7 +17,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qemu/module.h"
#include "malloc.h"
#include "qgraph.h"
diff --git a/tests/qtest/libqos/arm-sabrelite-machine.c b/tests/qtest/libqos/arm-sabrelite-machine.c
index 72425f0ad4..ec19a01660 100644
--- a/tests/qtest/libqos/arm-sabrelite-machine.c
+++ b/tests/qtest/libqos/arm-sabrelite-machine.c
@@ -17,7 +17,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qemu/module.h"
#include "malloc.h"
#include "qgraph.h"
diff --git a/tests/qtest/libqos/arm-smdkc210-machine.c b/tests/qtest/libqos/arm-smdkc210-machine.c
index 321b8826d4..4bff249ee8 100644
--- a/tests/qtest/libqos/arm-smdkc210-machine.c
+++ b/tests/qtest/libqos/arm-smdkc210-machine.c
@@ -17,7 +17,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qemu/module.h"
#include "malloc.h"
#include "qgraph.h"
diff --git a/tests/qtest/libqos/arm-virt-machine.c b/tests/qtest/libqos/arm-virt-machine.c
index e0f5932284..2e0beaefb8 100644
--- a/tests/qtest/libqos/arm-virt-machine.c
+++ b/tests/qtest/libqos/arm-virt-machine.c
@@ -17,7 +17,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qemu/module.h"
#include "malloc.h"
#include "qgraph.h"
diff --git a/tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c b/tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c
index 56e53c745b..3be80020a6 100644
--- a/tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c
+++ b/tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c
@@ -17,7 +17,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qemu/module.h"
#include "malloc.h"
#include "qgraph.h"
diff --git a/tests/qtest/libqos/e1000e.c b/tests/qtest/libqos/e1000e.c
index a451f6168f..f87e0e84b2 100644
--- a/tests/qtest/libqos/e1000e.c
+++ b/tests/qtest/libqos/e1000e.c
@@ -17,7 +17,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "pci-pc.h"
#include "qemu/sockets.h"
#include "qemu/iov.h"
diff --git a/tests/qtest/libqos/fw_cfg.c b/tests/qtest/libqos/fw_cfg.c
index 6b8e1babe5..89f053ccac 100644
--- a/tests/qtest/libqos/fw_cfg.c
+++ b/tests/qtest/libqos/fw_cfg.c
@@ -14,7 +14,7 @@
#include "qemu/osdep.h"
#include "fw_cfg.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qemu/bswap.h"
#include "hw/nvram/fw_cfg.h"
diff --git a/tests/qtest/libqos/fw_cfg.h b/tests/qtest/libqos/fw_cfg.h
index c6a7cf8cf0..b0456a15df 100644
--- a/tests/qtest/libqos/fw_cfg.h
+++ b/tests/qtest/libqos/fw_cfg.h
@@ -13,7 +13,7 @@
#ifndef LIBQOS_FW_CFG_H
#define LIBQOS_FW_CFG_H
-#include "libqtest.h"
+#include "../libqtest.h"
typedef struct QFWCFG QFWCFG;
diff --git a/tests/qtest/libqos/i2c-imx.c b/tests/qtest/libqos/i2c-imx.c
index 8f9a7e3831..710cb926d6 100644
--- a/tests/qtest/libqos/i2c-imx.c
+++ b/tests/qtest/libqos/i2c-imx.c
@@ -21,7 +21,7 @@
#include "i2c.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "hw/i2c/imx_i2c.h"
diff --git a/tests/qtest/libqos/i2c-omap.c b/tests/qtest/libqos/i2c-omap.c
index eb4e453485..6f98f54820 100644
--- a/tests/qtest/libqos/i2c-omap.c
+++ b/tests/qtest/libqos/i2c-omap.c
@@ -11,7 +11,7 @@
#include "qemu/bswap.h"
-#include "libqtest.h"
+#include "../libqtest.h"
enum OMAPI2CRegisters {
OMAP_I2C_REV = 0x00,
diff --git a/tests/qtest/libqos/i2c.c b/tests/qtest/libqos/i2c.c
index ade1bdb40e..1a54c004eb 100644
--- a/tests/qtest/libqos/i2c.c
+++ b/tests/qtest/libqos/i2c.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
#include "i2c.h"
-#include "libqtest.h"
+#include "../libqtest.h"
void qi2c_send(QI2CDevice *i2cdev, const uint8_t *buf, uint16_t len)
{
diff --git a/tests/qtest/libqos/i2c.h b/tests/qtest/libqos/i2c.h
index 1341bac1c5..d032240922 100644
--- a/tests/qtest/libqos/i2c.h
+++ b/tests/qtest/libqos/i2c.h
@@ -9,7 +9,7 @@
#ifndef LIBQOS_I2C_H
#define LIBQOS_I2C_H
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qgraph.h"
typedef struct I2CAdapter I2CAdapter;
diff --git a/tests/qtest/libqos/libqos.c b/tests/qtest/libqos/libqos.c
index 2251e864ef..85c7641add 100644
--- a/tests/qtest/libqos/libqos.c
+++ b/tests/qtest/libqos/libqos.c
@@ -1,7 +1,7 @@
#include "qemu/osdep.h"
#include <sys/wait.h>
-#include "libqtest.h"
+#include "../libqtest.h"
#include "libqos.h"
#include "pci.h"
#include "qapi/qmp/qdict.h"
diff --git a/tests/qtest/libqos/libqos.h b/tests/qtest/libqos/libqos.h
index e0b2bfe7ca..ba7df448ca 100644
--- a/tests/qtest/libqos/libqos.h
+++ b/tests/qtest/libqos/libqos.h
@@ -1,7 +1,7 @@
#ifndef LIBQOS_H
#define LIBQOS_H
-#include "libqtest.h"
+#include "../libqtest.h"
#include "pci.h"
#include "malloc.h"
diff --git a/tests/qtest/libqos/libqtest.h b/tests/qtest/libqos/libqtest.h
deleted file mode 100644
index 552667f17e..0000000000
--- a/tests/qtest/libqos/libqtest.h
+++ /dev/null
@@ -1,813 +0,0 @@
-/*
- * QTest
- *
- * Copyright IBM, Corp. 2012
- * Copyright Red Hat, Inc. 2012
- * Copyright SUSE LINUX Products GmbH 2013
- *
- * Authors:
- * Anthony Liguori <aliguori@us.ibm.com>
- * Paolo Bonzini <pbonzini@redhat.com>
- * Andreas Färber <afaerber@suse.de>
- *
- * This work is licensed under the terms of the GNU GPL, version 2 or later.
- * See the COPYING file in the top-level directory.
- *
- */
-#ifndef LIBQTEST_H
-#define LIBQTEST_H
-
-#include "qapi/qmp/qobject.h"
-#include "qapi/qmp/qdict.h"
-
-typedef struct QTestState QTestState;
-
-/**
- * qtest_initf:
- * @fmt: Format for creating other arguments to pass to QEMU, formatted
- * like sprintf().
- *
- * Convenience wrapper around qtest_init().
- *
- * Returns: #QTestState instance.
- */
-QTestState *qtest_initf(const char *fmt, ...) G_GNUC_PRINTF(1, 2);
-
-/**
- * qtest_vinitf:
- * @fmt: Format for creating other arguments to pass to QEMU, formatted
- * like vsprintf().
- * @ap: Format arguments.
- *
- * Convenience wrapper around qtest_init().
- *
- * Returns: #QTestState instance.
- */
-QTestState *qtest_vinitf(const char *fmt, va_list ap) G_GNUC_PRINTF(1, 0);
-
-/**
- * qtest_init:
- * @extra_args: other arguments to pass to QEMU. CAUTION: these
- * arguments are subject to word splitting and shell evaluation.
- *
- * Returns: #QTestState instance.
- */
-QTestState *qtest_init(const char *extra_args);
-
-/**
- * qtest_init_without_qmp_handshake:
- * @extra_args: other arguments to pass to QEMU. CAUTION: these
- * arguments are subject to word splitting and shell evaluation.
- *
- * Returns: #QTestState instance.
- */
-QTestState *qtest_init_without_qmp_handshake(const char *extra_args);
-
-/**
- * qtest_init_with_serial:
- * @extra_args: other arguments to pass to QEMU. CAUTION: these
- * arguments are subject to word splitting and shell evaluation.
- * @sock_fd: pointer to store the socket file descriptor for
- * connection with serial.
- *
- * Returns: #QTestState instance.
- */
-QTestState *qtest_init_with_serial(const char *extra_args, int *sock_fd);
-
-/**
- * qtest_kill_qemu:
- * @s: #QTestState instance to operate on.
- *
- * Kill the QEMU process and wait for it to terminate. It is safe to call this
- * function multiple times. Normally qtest_quit() is used instead because it
- * also frees QTestState. Use qtest_kill_qemu() when you just want to kill QEMU
- * and qtest_quit() will be called later.
- */
-void qtest_kill_qemu(QTestState *s);
-
-/**
- * qtest_quit:
- * @s: #QTestState instance to operate on.
- *
- * Shut down the QEMU process associated to @s.
- */
-void qtest_quit(QTestState *s);
-
-/**
- * qtest_qmp_fds:
- * @s: #QTestState instance to operate on.
- * @fds: array of file descriptors
- * @fds_num: number of elements in @fds
- * @fmt: QMP message to send to qemu, formatted like
- * qobject_from_jsonf_nofail(). See parse_interpolation() for what's
- * supported after '%'.
- *
- * Sends a QMP message to QEMU with fds and returns the response.
- */
-QDict *qtest_qmp_fds(QTestState *s, int *fds, size_t fds_num,
- const char *fmt, ...)
- G_GNUC_PRINTF(4, 5);
-
-/**
- * qtest_qmp:
- * @s: #QTestState instance to operate on.
- * @fmt: QMP message to send to qemu, formatted like
- * qobject_from_jsonf_nofail(). See parse_interpolation() for what's
- * supported after '%'.
- *
- * Sends a QMP message to QEMU and returns the response.
- */
-QDict *qtest_qmp(QTestState *s, const char *fmt, ...)
- G_GNUC_PRINTF(2, 3);
-
-/**
- * qtest_qmp_send:
- * @s: #QTestState instance to operate on.
- * @fmt: QMP message to send to qemu, formatted like
- * qobject_from_jsonf_nofail(). See parse_interpolation() for what's
- * supported after '%'.
- *
- * Sends a QMP message to QEMU and leaves the response in the stream.
- */
-void qtest_qmp_send(QTestState *s, const char *fmt, ...)
- G_GNUC_PRINTF(2, 3);
-
-/**
- * qtest_qmp_send_raw:
- * @s: #QTestState instance to operate on.
- * @fmt: text to send, formatted like sprintf()
- *
- * Sends text to the QMP monitor verbatim. Need not be valid JSON;
- * this is useful for negative tests.
- */
-void qtest_qmp_send_raw(QTestState *s, const char *fmt, ...)
- G_GNUC_PRINTF(2, 3);
-
-/**
- * qtest_socket_server:
- * @socket_path: the UNIX domain socket path
- *
- * Create and return a listen socket file descriptor, or abort on failure.
- */
-int qtest_socket_server(const char *socket_path);
-
-/**
- * qtest_vqmp_fds:
- * @s: #QTestState instance to operate on.
- * @fds: array of file descriptors
- * @fds_num: number of elements in @fds
- * @fmt: QMP message to send to QEMU, formatted like
- * qobject_from_jsonf_nofail(). See parse_interpolation() for what's
- * supported after '%'.
- * @ap: QMP message arguments
- *
- * Sends a QMP message to QEMU with fds and returns the response.
- */
-QDict *qtest_vqmp_fds(QTestState *s, int *fds, size_t fds_num,
- const char *fmt, va_list ap)
- G_GNUC_PRINTF(4, 0);
-
-/**
- * qtest_vqmp:
- * @s: #QTestState instance to operate on.
- * @fmt: QMP message to send to QEMU, formatted like
- * qobject_from_jsonf_nofail(). See parse_interpolation() for what's
- * supported after '%'.
- * @ap: QMP message arguments
- *
- * Sends a QMP message to QEMU and returns the response.
- */
-QDict *qtest_vqmp(QTestState *s, const char *fmt, va_list ap)
- G_GNUC_PRINTF(2, 0);
-
-/**
- * qtest_qmp_vsend_fds:
- * @s: #QTestState instance to operate on.
- * @fds: array of file descriptors
- * @fds_num: number of elements in @fds
- * @fmt: QMP message to send to QEMU, formatted like
- * qobject_from_jsonf_nofail(). See parse_interpolation() for what's
- * supported after '%'.
- * @ap: QMP message arguments
- *
- * Sends a QMP message to QEMU and leaves the response in the stream.
- */
-void qtest_qmp_vsend_fds(QTestState *s, int *fds, size_t fds_num,
- const char *fmt, va_list ap)
- G_GNUC_PRINTF(4, 0);
-
-/**
- * qtest_qmp_vsend:
- * @s: #QTestState instance to operate on.
- * @fmt: QMP message to send to QEMU, formatted like
- * qobject_from_jsonf_nofail(). See parse_interpolation() for what's
- * supported after '%'.
- * @ap: QMP message arguments
- *
- * Sends a QMP message to QEMU and leaves the response in the stream.
- */
-void qtest_qmp_vsend(QTestState *s, const char *fmt, va_list ap)
- G_GNUC_PRINTF(2, 0);
-
-/**
- * qtest_qmp_receive_dict:
- * @s: #QTestState instance to operate on.
- *
- * Reads a QMP message from QEMU and returns the response.
- */
-QDict *qtest_qmp_receive_dict(QTestState *s);
-
-/**
- * qtest_qmp_receive:
- * @s: #QTestState instance to operate on.
- *
- * Reads a QMP message from QEMU and returns the response.
- * Buffers all the events received meanwhile, until a
- * call to qtest_qmp_eventwait
- */
-QDict *qtest_qmp_receive(QTestState *s);
-
-/**
- * qtest_qmp_eventwait:
- * @s: #QTestState instance to operate on.
- * @event: event to wait for.
- *
- * Continuously polls for QMP responses until it receives the desired event.
- */
-void qtest_qmp_eventwait(QTestState *s, const char *event);
-
-/**
- * qtest_qmp_eventwait_ref:
- * @s: #QTestState instance to operate on.
- * @event: event to wait for.
- *
- * Continuously polls for QMP responses until it receives the desired event.
- * Returns a copy of the event for further investigation.
- */
-QDict *qtest_qmp_eventwait_ref(QTestState *s, const char *event);
-
-/**
- * qtest_qmp_event_ref:
- * @s: #QTestState instance to operate on.
- * @event: event to return.
- *
- * Removes non-matching events from the buffer that was set by
- * qtest_qmp_receive, until an event bearing the given name is found,
- * and returns it.
- * If no event matches, clears the buffer and returns NULL.
- *
- */
-QDict *qtest_qmp_event_ref(QTestState *s, const char *event);
-
-/**
- * qtest_hmp:
- * @s: #QTestState instance to operate on.
- * @fmt: HMP command to send to QEMU, formats arguments like sprintf().
- *
- * Send HMP command to QEMU via QMP's human-monitor-command.
- * QMP events are discarded.
- *
- * Returns: the command's output. The caller should g_free() it.
- */
-char *qtest_hmp(QTestState *s, const char *fmt, ...) G_GNUC_PRINTF(2, 3);
-
-/**
- * qtest_hmpv:
- * @s: #QTestState instance to operate on.
- * @fmt: HMP command to send to QEMU, formats arguments like vsprintf().
- * @ap: HMP command arguments
- *
- * Send HMP command to QEMU via QMP's human-monitor-command.
- * QMP events are discarded.
- *
- * Returns: the command's output. The caller should g_free() it.
- */
-char *qtest_vhmp(QTestState *s, const char *fmt, va_list ap)
- G_GNUC_PRINTF(2, 0);
-
-void qtest_module_load(QTestState *s, const char *prefix, const char *libname);
-
-/**
- * qtest_get_irq:
- * @s: #QTestState instance to operate on.
- * @num: Interrupt to observe.
- *
- * Returns: The level of the @num interrupt.
- */
-bool qtest_get_irq(QTestState *s, int num);
-
-/**
- * qtest_irq_intercept_in:
- * @s: #QTestState instance to operate on.
- * @string: QOM path of a device.
- *
- * Associate qtest irqs with the GPIO-in pins of the device
- * whose path is specified by @string.
- */
-void qtest_irq_intercept_in(QTestState *s, const char *string);
-
-/**
- * qtest_irq_intercept_out:
- * @s: #QTestState instance to operate on.
- * @string: QOM path of a device.
- *
- * Associate qtest irqs with the GPIO-out pins of the device
- * whose path is specified by @string.
- */
-void qtest_irq_intercept_out(QTestState *s, const char *string);
-
-/**
- * qtest_set_irq_in:
- * @s: QTestState instance to operate on.
- * @string: QOM path of a device
- * @name: IRQ name
- * @irq: IRQ number
- * @level: IRQ level
- *
- * Force given device/irq GPIO-in pin to the given level.
- */
-void qtest_set_irq_in(QTestState *s, const char *string, const char *name,
- int irq, int level);
-
-/**
- * qtest_outb:
- * @s: #QTestState instance to operate on.
- * @addr: I/O port to write to.
- * @value: Value being written.
- *
- * Write an 8-bit value to an I/O port.
- */
-void qtest_outb(QTestState *s, uint16_t addr, uint8_t value);
-
-/**
- * qtest_outw:
- * @s: #QTestState instance to operate on.
- * @addr: I/O port to write to.
- * @value: Value being written.
- *
- * Write a 16-bit value to an I/O port.
- */
-void qtest_outw(QTestState *s, uint16_t addr, uint16_t value);
-
-/**
- * qtest_outl:
- * @s: #QTestState instance to operate on.
- * @addr: I/O port to write to.
- * @value: Value being written.
- *
- * Write a 32-bit value to an I/O port.
- */
-void qtest_outl(QTestState *s, uint16_t addr, uint32_t value);
-
-/**
- * qtest_inb:
- * @s: #QTestState instance to operate on.
- * @addr: I/O port to read from.
- *
- * Returns an 8-bit value from an I/O port.
- */
-uint8_t qtest_inb(QTestState *s, uint16_t addr);
-
-/**
- * qtest_inw:
- * @s: #QTestState instance to operate on.
- * @addr: I/O port to read from.
- *
- * Returns a 16-bit value from an I/O port.
- */
-uint16_t qtest_inw(QTestState *s, uint16_t addr);
-
-/**
- * qtest_inl:
- * @s: #QTestState instance to operate on.
- * @addr: I/O port to read from.
- *
- * Returns a 32-bit value from an I/O port.
- */
-uint32_t qtest_inl(QTestState *s, uint16_t addr);
-
-/**
- * qtest_writeb:
- * @s: #QTestState instance to operate on.
- * @addr: Guest address to write to.
- * @value: Value being written.
- *
- * Writes an 8-bit value to memory.
- */
-void qtest_writeb(QTestState *s, uint64_t addr, uint8_t value);
-
-/**
- * qtest_writew:
- * @s: #QTestState instance to operate on.
- * @addr: Guest address to write to.
- * @value: Value being written.
- *
- * Writes a 16-bit value to memory.
- */
-void qtest_writew(QTestState *s, uint64_t addr, uint16_t value);
-
-/**
- * qtest_writel:
- * @s: #QTestState instance to operate on.
- * @addr: Guest address to write to.
- * @value: Value being written.
- *
- * Writes a 32-bit value to memory.
- */
-void qtest_writel(QTestState *s, uint64_t addr, uint32_t value);
-
-/**
- * qtest_writeq:
- * @s: #QTestState instance to operate on.
- * @addr: Guest address to write to.
- * @value: Value being written.
- *
- * Writes a 64-bit value to memory.
- */
-void qtest_writeq(QTestState *s, uint64_t addr, uint64_t value);
-
-/**
- * qtest_readb:
- * @s: #QTestState instance to operate on.
- * @addr: Guest address to read from.
- *
- * Reads an 8-bit value from memory.
- *
- * Returns: Value read.
- */
-uint8_t qtest_readb(QTestState *s, uint64_t addr);
-
-/**
- * qtest_readw:
- * @s: #QTestState instance to operate on.
- * @addr: Guest address to read from.
- *
- * Reads a 16-bit value from memory.
- *
- * Returns: Value read.
- */
-uint16_t qtest_readw(QTestState *s, uint64_t addr);
-
-/**
- * qtest_readl:
- * @s: #QTestState instance to operate on.
- * @addr: Guest address to read from.
- *
- * Reads a 32-bit value from memory.
- *
- * Returns: Value read.
- */
-uint32_t qtest_readl(QTestState *s, uint64_t addr);
-
-/**
- * qtest_readq:
- * @s: #QTestState instance to operate on.
- * @addr: Guest address to read from.
- *
- * Reads a 64-bit value from memory.
- *
- * Returns: Value read.
- */
-uint64_t qtest_readq(QTestState *s, uint64_t addr);
-
-/**
- * qtest_memread:
- * @s: #QTestState instance to operate on.
- * @addr: Guest address to read from.
- * @data: Pointer to where memory contents will be stored.
- * @size: Number of bytes to read.
- *
- * Read guest memory into a buffer.
- */
-void qtest_memread(QTestState *s, uint64_t addr, void *data, size_t size);
-
-/**
- * qtest_rtas_call:
- * @s: #QTestState instance to operate on.
- * @name: name of the command to call.
- * @nargs: Number of args.
- * @args: Guest address to read args from.
- * @nret: Number of return value.
- * @ret: Guest address to write return values to.
- *
- * Call an RTAS function
- */
-uint64_t qtest_rtas_call(QTestState *s, const char *name,
- uint32_t nargs, uint64_t args,
- uint32_t nret, uint64_t ret);
-
-/**
- * qtest_bufread:
- * @s: #QTestState instance to operate on.
- * @addr: Guest address to read from.
- * @data: Pointer to where memory contents will be stored.
- * @size: Number of bytes to read.
- *
- * Read guest memory into a buffer and receive using a base64 encoding.
- */
-void qtest_bufread(QTestState *s, uint64_t addr, void *data, size_t size);
-
-/**
- * qtest_memwrite:
- * @s: #QTestState instance to operate on.
- * @addr: Guest address to write to.
- * @data: Pointer to the bytes that will be written to guest memory.
- * @size: Number of bytes to write.
- *
- * Write a buffer to guest memory.
- */
-void qtest_memwrite(QTestState *s, uint64_t addr, const void *data, size_t size);
-
-/**
- * qtest_bufwrite:
- * @s: #QTestState instance to operate on.
- * @addr: Guest address to write to.
- * @data: Pointer to the bytes that will be written to guest memory.
- * @size: Number of bytes to write.
- *
- * Write a buffer to guest memory and transmit using a base64 encoding.
- */
-void qtest_bufwrite(QTestState *s, uint64_t addr,
- const void *data, size_t size);
-
-/**
- * qtest_memset:
- * @s: #QTestState instance to operate on.
- * @addr: Guest address to write to.
- * @patt: Byte pattern to fill the guest memory region with.
- * @size: Number of bytes to write.
- *
- * Write a pattern to guest memory.
- */
-void qtest_memset(QTestState *s, uint64_t addr, uint8_t patt, size_t size);
-
-/**
- * qtest_clock_step_next:
- * @s: #QTestState instance to operate on.
- *
- * Advance the QEMU_CLOCK_VIRTUAL to the next deadline.
- *
- * Returns: The current value of the QEMU_CLOCK_VIRTUAL in nanoseconds.
- */
-int64_t qtest_clock_step_next(QTestState *s);
-
-/**
- * qtest_clock_step:
- * @s: QTestState instance to operate on.
- * @step: Number of nanoseconds to advance the clock by.
- *
- * Advance the QEMU_CLOCK_VIRTUAL by @step nanoseconds.
- *
- * Returns: The current value of the QEMU_CLOCK_VIRTUAL in nanoseconds.
- */
-int64_t qtest_clock_step(QTestState *s, int64_t step);
-
-/**
- * qtest_clock_set:
- * @s: QTestState instance to operate on.
- * @val: Nanoseconds value to advance the clock to.
- *
- * Advance the QEMU_CLOCK_VIRTUAL to @val nanoseconds since the VM was launched.
- *
- * Returns: The current value of the QEMU_CLOCK_VIRTUAL in nanoseconds.
- */
-int64_t qtest_clock_set(QTestState *s, int64_t val);
-
-/**
- * qtest_big_endian:
- * @s: QTestState instance to operate on.
- *
- * Returns: True if the architecture under test has a big endian configuration.
- */
-bool qtest_big_endian(QTestState *s);
-
-/**
- * qtest_get_arch:
- *
- * Returns: The architecture for the QEMU executable under test.
- */
-const char *qtest_get_arch(void);
-
-/**
- * qtest_has_accel:
- * @accel_name: Accelerator name to check for.
- *
- * Returns: true if the accelerator is built in.
- */
-bool qtest_has_accel(const char *accel_name);
-
-/**
- * qtest_add_func:
- * @str: Test case path.
- * @fn: Test case function
- *
- * Add a GTester testcase with the given name and function.
- * The path is prefixed with the architecture under test, as
- * returned by qtest_get_arch().
- */
-void qtest_add_func(const char *str, void (*fn)(void));
-
-/**
- * qtest_add_data_func:
- * @str: Test case path.
- * @data: Test case data
- * @fn: Test case function
- *
- * Add a GTester testcase with the given name, data and function.
- * The path is prefixed with the architecture under test, as
- * returned by qtest_get_arch().
- */
-void qtest_add_data_func(const char *str, const void *data,
- void (*fn)(const void *));
-
-/**
- * qtest_add_data_func_full:
- * @str: Test case path.
- * @data: Test case data
- * @fn: Test case function
- * @data_free_func: GDestroyNotify for data
- *
- * Add a GTester testcase with the given name, data and function.
- * The path is prefixed with the architecture under test, as
- * returned by qtest_get_arch().
- *
- * @data is passed to @data_free_func() on test completion.
- */
-void qtest_add_data_func_full(const char *str, void *data,
- void (*fn)(const void *),
- GDestroyNotify data_free_func);
-
-/**
- * qtest_add:
- * @testpath: Test case path
- * @Fixture: Fixture type
- * @tdata: Test case data
- * @fsetup: Test case setup function
- * @ftest: Test case function
- * @fteardown: Test case teardown function
- *
- * Add a GTester testcase with the given name, data and functions.
- * The path is prefixed with the architecture under test, as
- * returned by qtest_get_arch().
- */
-#define qtest_add(testpath, Fixture, tdata, fsetup, ftest, fteardown) \
- do { \
- char *path = g_strdup_printf("/%s/%s", qtest_get_arch(), testpath); \
- g_test_add(path, Fixture, tdata, fsetup, ftest, fteardown); \
- g_free(path); \
- } while (0)
-
-/**
- * qtest_add_abrt_handler:
- * @fn: Handler function
- * @data: Argument that is passed to the handler
- *
- * Add a handler function that is invoked on SIGABRT. This can be used to
- * terminate processes and perform other cleanup. The handler can be removed
- * with qtest_remove_abrt_handler().
- */
-void qtest_add_abrt_handler(GHookFunc fn, const void *data);
-
-/**
- * qtest_remove_abrt_handler:
- * @data: Argument previously passed to qtest_add_abrt_handler()
- *
- * Remove an abrt handler that was previously added with
- * qtest_add_abrt_handler().
- */
-void qtest_remove_abrt_handler(void *data);
-
-/**
- * qtest_qmp_assert_success:
- * @qts: QTestState instance to operate on
- * @fmt: QMP message to send to qemu, formatted like
- * qobject_from_jsonf_nofail(). See parse_interpolation() for what's
- * supported after '%'.
- *
- * Sends a QMP message to QEMU and asserts that a 'return' key is present in
- * the response.
- */
-void qtest_qmp_assert_success(QTestState *qts, const char *fmt, ...)
- G_GNUC_PRINTF(2, 3);
-
-QDict *qmp_fd_receive(int fd);
-void qmp_fd_vsend_fds(int fd, int *fds, size_t fds_num,
- const char *fmt, va_list ap) G_GNUC_PRINTF(4, 0);
-void qmp_fd_vsend(int fd, const char *fmt, va_list ap) G_GNUC_PRINTF(2, 0);
-void qmp_fd_send(int fd, const char *fmt, ...) G_GNUC_PRINTF(2, 3);
-void qmp_fd_send_raw(int fd, const char *fmt, ...) G_GNUC_PRINTF(2, 3);
-void qmp_fd_vsend_raw(int fd, const char *fmt, va_list ap) G_GNUC_PRINTF(2, 0);
-QDict *qmp_fdv(int fd, const char *fmt, va_list ap) G_GNUC_PRINTF(2, 0);
-QDict *qmp_fd(int fd, const char *fmt, ...) G_GNUC_PRINTF(2, 3);
-
-/**
- * qtest_cb_for_every_machine:
- * @cb: Pointer to the callback function
- * @skip_old_versioned: true if versioned old machine types should be skipped
- *
- * Call a callback function for every name of all available machines.
- */
-void qtest_cb_for_every_machine(void (*cb)(const char *machine),
- bool skip_old_versioned);
-
-/**
- * qtest_has_machine:
- * @machine: The machine to look for
- *
- * Returns: true if the machine is available in the target binary.
- */
-bool qtest_has_machine(const char *machine);
-
-/**
- * qtest_has_device:
- * @device: The device to look for
- *
- * Returns: true if the device is available in the target binary.
- */
-bool qtest_has_device(const char *device);
-
-/**
- * qtest_qmp_device_add_qdict:
- * @qts: QTestState instance to operate on
- * @drv: Name of the device that should be added
- * @arguments: QDict with properties for the device to intialize
- *
- * Generic hot-plugging test via the device_add QMP command with properties
- * supplied in form of QDict. Use NULL for empty properties list.
- */
-void qtest_qmp_device_add_qdict(QTestState *qts, const char *drv,
- const QDict *arguments);
-
-/**
- * qtest_qmp_device_add:
- * @qts: QTestState instance to operate on
- * @driver: Name of the device that should be added
- * @id: Identification string
- * @fmt: QMP message to send to qemu, formatted like
- * qobject_from_jsonf_nofail(). See parse_interpolation() for what's
- * supported after '%'.
- *
- * Generic hot-plugging test via the device_add QMP command.
- */
-void qtest_qmp_device_add(QTestState *qts, const char *driver, const char *id,
- const char *fmt, ...) G_GNUC_PRINTF(4, 5);
-
-/**
- * qtest_qmp_add_client:
- * @qts: QTestState instance to operate on
- * @protocol: the protocol to add to
- * @fd: the client file-descriptor
- *
- * Call QMP ``getfd`` followed by ``add_client`` with the given @fd.
- */
-void qtest_qmp_add_client(QTestState *qts, const char *protocol, int fd);
-
-/**
- * qtest_qmp_device_del:
- * @qts: QTestState instance to operate on
- * @id: Identification string
- *
- * Generic hot-unplugging test via the device_del QMP command.
- */
-void qtest_qmp_device_del(QTestState *qts, const char *id);
-
-/**
- * qmp_rsp_is_err:
- * @rsp: QMP response to check for error
- *
- * Test @rsp for error and discard @rsp.
- * Returns 'true' if there is error in @rsp and 'false' otherwise.
- */
-bool qmp_rsp_is_err(QDict *rsp);
-
-/**
- * qmp_expect_error_and_unref:
- * @rsp: QMP response to check for error
- * @class: an error class
- *
- * Assert the response has the given error class and discard @rsp.
- */
-void qmp_expect_error_and_unref(QDict *rsp, const char *class);
-
-/**
- * qtest_probe_child:
- * @s: QTestState instance to operate on.
- *
- * Returns: true if the child is still alive.
- */
-bool qtest_probe_child(QTestState *s);
-
-/**
- * qtest_set_expected_status:
- * @s: QTestState instance to operate on.
- * @status: an expected exit status.
- *
- * Set expected exit status of the child.
- */
-void qtest_set_expected_status(QTestState *s, int status);
-
-QTestState *qtest_inproc_init(QTestState **s, bool log, const char* arch,
- void (*send)(void*, const char*));
-
-void qtest_client_inproc_recv(void *opaque, const char *str);
-#endif
diff --git a/tests/qtest/libqos/malloc.h b/tests/qtest/libqos/malloc.h
index 4d1a2e2bef..bbb8c743cc 100644
--- a/tests/qtest/libqos/malloc.h
+++ b/tests/qtest/libqos/malloc.h
@@ -14,7 +14,7 @@
#define LIBQOS_MALLOC_H
#include "qemu/queue.h"
-#include "libqtest.h"
+#include "../libqtest.h"
typedef enum {
ALLOC_NO_FLAGS = 0x00,
diff --git a/tests/qtest/libqos/pci-pc.c b/tests/qtest/libqos/pci-pc.c
index f97844289f..e9dd5a57ec 100644
--- a/tests/qtest/libqos/pci-pc.c
+++ b/tests/qtest/libqos/pci-pc.c
@@ -11,7 +11,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "pci-pc.h"
#include "qapi/qmp/qdict.h"
#include "hw/pci/pci_regs.h"
diff --git a/tests/qtest/libqos/pci-spapr.c b/tests/qtest/libqos/pci-spapr.c
index 262226985f..76bf9a855d 100644
--- a/tests/qtest/libqos/pci-spapr.c
+++ b/tests/qtest/libqos/pci-spapr.c
@@ -6,7 +6,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "pci-spapr.h"
#include "rtas.h"
#include "qgraph.h"
diff --git a/tests/qtest/libqos/pci.h b/tests/qtest/libqos/pci.h
index becb800f9e..e705e06598 100644
--- a/tests/qtest/libqos/pci.h
+++ b/tests/qtest/libqos/pci.h
@@ -13,7 +13,7 @@
#ifndef LIBQOS_PCI_H
#define LIBQOS_PCI_H
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qgraph.h"
#define QPCI_PIO_LIMIT 0x10000
diff --git a/tests/qtest/libqos/ppc64_pseries-machine.c b/tests/qtest/libqos/ppc64_pseries-machine.c
index 24ca179976..364e9c689b 100644
--- a/tests/qtest/libqos/ppc64_pseries-machine.c
+++ b/tests/qtest/libqos/ppc64_pseries-machine.c
@@ -17,7 +17,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qgraph.h"
#include "pci-spapr.h"
#include "qemu/module.h"
diff --git a/tests/qtest/libqos/qgraph.c b/tests/qtest/libqos/qgraph.c
index 109ff04e1e..0a2dddfafa 100644
--- a/tests/qtest/libqos/qgraph.c
+++ b/tests/qtest/libqos/qgraph.c
@@ -17,7 +17,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qemu/queue.h"
#include "qgraph_internal.h"
#include "qgraph.h"
diff --git a/tests/qtest/libqos/qos_external.c b/tests/qtest/libqos/qos_external.c
index 10ee0f75b2..b7a0b873a3 100644
--- a/tests/qtest/libqos/qos_external.c
+++ b/tests/qtest/libqos/qos_external.c
@@ -18,7 +18,7 @@
#include "qemu/osdep.h"
#include <getopt.h>
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qbool.h"
#include "qapi/qmp/qstring.h"
diff --git a/tests/qtest/libqos/rtas.c b/tests/qtest/libqos/rtas.c
index db29d5554d..dedbfb4cb3 100644
--- a/tests/qtest/libqos/rtas.c
+++ b/tests/qtest/libqos/rtas.c
@@ -4,7 +4,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "rtas.h"
static void qrtas_copy_args(QTestState *qts, uint64_t target_args,
diff --git a/tests/qtest/libqos/sdhci-cmd.c b/tests/qtest/libqos/sdhci-cmd.c
index 2d9e518341..a6f073ac1a 100644
--- a/tests/qtest/libqos/sdhci-cmd.c
+++ b/tests/qtest/libqos/sdhci-cmd.c
@@ -16,7 +16,7 @@
#include "qemu/osdep.h"
#include "sdhci-cmd.h"
-#include "libqtest.h"
+#include "../libqtest.h"
static ssize_t read_fifo(QTestState *qts, uint64_t reg, char *msg, size_t count)
{
diff --git a/tests/qtest/libqos/sdhci-cmd.h b/tests/qtest/libqos/sdhci-cmd.h
index 64763c5a2a..9e61dd4944 100644
--- a/tests/qtest/libqos/sdhci-cmd.h
+++ b/tests/qtest/libqos/sdhci-cmd.h
@@ -14,7 +14,7 @@
* for more details.
*/
-#include "libqtest.h"
+#include "../libqtest.h"
/* more details at hw/sd/sdhci-internal.h */
#define SDHC_BLKSIZE 0x04
diff --git a/tests/qtest/libqos/sdhci.c b/tests/qtest/libqos/sdhci.c
index 65f0d07fc5..71696980f8 100644
--- a/tests/qtest/libqos/sdhci.c
+++ b/tests/qtest/libqos/sdhci.c
@@ -17,7 +17,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qgraph.h"
#include "pci.h"
#include "qemu/module.h"
diff --git a/tests/qtest/libqos/tpci200.c b/tests/qtest/libqos/tpci200.c
index 1787b1f188..8b00603247 100644
--- a/tests/qtest/libqos/tpci200.c
+++ b/tests/qtest/libqos/tpci200.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qemu/module.h"
#include "qgraph.h"
#include "pci.h"
diff --git a/tests/qtest/libqos/usb.c b/tests/qtest/libqos/usb.c
index 8b45b02984..446fdb5796 100644
--- a/tests/qtest/libqos/usb.c
+++ b/tests/qtest/libqos/usb.c
@@ -12,7 +12,7 @@
* See the COPYING file in the top-level directory.
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "hw/usb/uhci-regs.h"
#include "usb.h"
diff --git a/tests/qtest/libqos/vhost-user-blk.c b/tests/qtest/libqos/vhost-user-blk.c
index 568c3426ed..2f3c9cb533 100644
--- a/tests/qtest/libqos/vhost-user-blk.c
+++ b/tests/qtest/libqos/vhost-user-blk.c
@@ -21,7 +21,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qemu/module.h"
#include "standard-headers/linux/virtio_blk.h"
#include "vhost-user-blk.h"
diff --git a/tests/qtest/libqos/virtio-9p.c b/tests/qtest/libqos/virtio-9p.c
index f51f0635cc..70aea8bf62 100644
--- a/tests/qtest/libqos/virtio-9p.c
+++ b/tests/qtest/libqos/virtio-9p.c
@@ -22,7 +22,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qemu/module.h"
#include "standard-headers/linux/virtio_ids.h"
#include "virtio-9p.h"
diff --git a/tests/qtest/libqos/virtio-balloon.c b/tests/qtest/libqos/virtio-balloon.c
index a3da5c234d..29b5d17584 100644
--- a/tests/qtest/libqos/virtio-balloon.c
+++ b/tests/qtest/libqos/virtio-balloon.c
@@ -17,7 +17,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qemu/module.h"
#include "qgraph.h"
#include "virtio-balloon.h"
diff --git a/tests/qtest/libqos/virtio-blk.c b/tests/qtest/libqos/virtio-blk.c
index 5da02591bc..ee4943f32b 100644
--- a/tests/qtest/libqos/virtio-blk.c
+++ b/tests/qtest/libqos/virtio-blk.c
@@ -17,7 +17,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qemu/module.h"
#include "standard-headers/linux/virtio_blk.h"
#include "qgraph.h"
diff --git a/tests/qtest/libqos/virtio-iommu.c b/tests/qtest/libqos/virtio-iommu.c
index 18cba4ca36..afc7d14e9a 100644
--- a/tests/qtest/libqos/virtio-iommu.c
+++ b/tests/qtest/libqos/virtio-iommu.c
@@ -12,7 +12,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qemu/module.h"
#include "qgraph.h"
#include "virtio-iommu.h"
diff --git a/tests/qtest/libqos/virtio-mmio.c b/tests/qtest/libqos/virtio-mmio.c
index 75efda3029..a6cca8613b 100644
--- a/tests/qtest/libqos/virtio-mmio.c
+++ b/tests/qtest/libqos/virtio-mmio.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qemu/module.h"
#include "virtio.h"
#include "virtio-mmio.h"
diff --git a/tests/qtest/libqos/virtio-net.c b/tests/qtest/libqos/virtio-net.c
index 1cae07f60d..2ac73ac0b4 100644
--- a/tests/qtest/libqos/virtio-net.c
+++ b/tests/qtest/libqos/virtio-net.c
@@ -17,7 +17,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qemu/module.h"
#include "qgraph.h"
#include "virtio-net.h"
diff --git a/tests/qtest/libqos/virtio-pci.c b/tests/qtest/libqos/virtio-pci.c
index cd3c0f5bf3..67c2498c84 100644
--- a/tests/qtest/libqos/virtio-pci.c
+++ b/tests/qtest/libqos/virtio-pci.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "virtio.h"
#include "virtio-pci.h"
#include "pci.h"
diff --git a/tests/qtest/libqos/virtio-rng.c b/tests/qtest/libqos/virtio-rng.c
index 2e09dd7c48..078e3abaa7 100644
--- a/tests/qtest/libqos/virtio-rng.c
+++ b/tests/qtest/libqos/virtio-rng.c
@@ -17,7 +17,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qemu/module.h"
#include "qgraph.h"
#include "virtio-rng.h"
diff --git a/tests/qtest/libqos/virtio-scsi.c b/tests/qtest/libqos/virtio-scsi.c
index 5644e32fc3..c4d0461420 100644
--- a/tests/qtest/libqos/virtio-scsi.c
+++ b/tests/qtest/libqos/virtio-scsi.c
@@ -17,7 +17,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qemu/module.h"
#include "standard-headers/linux/virtio_ids.h"
#include "qgraph.h"
diff --git a/tests/qtest/libqos/virtio-serial.c b/tests/qtest/libqos/virtio-serial.c
index ee34afd95a..1d689c3e38 100644
--- a/tests/qtest/libqos/virtio-serial.c
+++ b/tests/qtest/libqos/virtio-serial.c
@@ -17,7 +17,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qemu/module.h"
#include "qgraph.h"
#include "virtio-serial.h"
diff --git a/tests/qtest/libqos/virtio.c b/tests/qtest/libqos/virtio.c
index fba9186659..09ec09b655 100644
--- a/tests/qtest/libqos/virtio.c
+++ b/tests/qtest/libqos/virtio.c
@@ -9,7 +9,7 @@
#include "qemu/osdep.h"
#include "qemu/bswap.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "virtio.h"
#include "standard-headers/linux/virtio_config.h"
#include "standard-headers/linux/virtio_ring.h"
diff --git a/tests/qtest/libqos/x86_64_pc-machine.c b/tests/qtest/libqos/x86_64_pc-machine.c
index ad96742a92..dce0c9463a 100644
--- a/tests/qtest/libqos/x86_64_pc-machine.c
+++ b/tests/qtest/libqos/x86_64_pc-machine.c
@@ -17,7 +17,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
#include "qgraph.h"
#include "pci-pc.h"
#include "qemu/module.h"