]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tests: move libqtest.h back under qtest/
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 30 Mar 2022 09:39:05 +0000 (13:39 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 3 May 2022 11:16:51 +0000 (15:16 +0400)
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>
143 files changed:
docs/devel/qtest.rst
scripts/oss-fuzz/output_reproducer.py
tests/qtest/ac97-test.c
tests/qtest/acpi-utils.h
tests/qtest/ahci-test.c
tests/qtest/am53c974-test.c
tests/qtest/arm-cpu-features.c
tests/qtest/aspeed_hace-test.c
tests/qtest/boot-order-test.c
tests/qtest/boot-sector.c
tests/qtest/boot-sector.h
tests/qtest/boot-serial-test.c
tests/qtest/cdrom-test.c
tests/qtest/dbus-display-test.c
tests/qtest/dbus-vmstate-test.c
tests/qtest/device-introspect-test.c
tests/qtest/device-plug-test.c
tests/qtest/drive_del-test.c
tests/qtest/ds1338-test.c
tests/qtest/e1000-test.c
tests/qtest/eepro100-test.c
tests/qtest/endianness-test.c
tests/qtest/erst-test.c
tests/qtest/es1370-test.c
tests/qtest/fuzz-e1000e-test.c
tests/qtest/fuzz-lsi53c895a-test.c
tests/qtest/fuzz-megasas-test.c
tests/qtest/fuzz-sb16-test.c
tests/qtest/fuzz-sdcard-test.c
tests/qtest/fuzz-virtio-scsi-test.c
tests/qtest/fuzz-xlnx-dp-test.c
tests/qtest/fuzz/fuzz.c
tests/qtest/fuzz/fuzz.h
tests/qtest/fuzz/generic_fuzz.c
tests/qtest/fuzz/i440fx_fuzz.c
tests/qtest/fuzz/qos_fuzz.c
tests/qtest/fuzz/virtio_blk_fuzz.c
tests/qtest/fuzz/virtio_net_fuzz.c
tests/qtest/fuzz/virtio_scsi_fuzz.c
tests/qtest/fw_cfg-test.c
tests/qtest/hd-geo-test.c
tests/qtest/hexloader-test.c
tests/qtest/ide-test.c
tests/qtest/ipoctal232-test.c
tests/qtest/ivshmem-test.c
tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c
tests/qtest/libqos/ahci.c
tests/qtest/libqos/arm-imx25-pdk-machine.c
tests/qtest/libqos/arm-n800-machine.c
tests/qtest/libqos/arm-raspi2-machine.c
tests/qtest/libqos/arm-sabrelite-machine.c
tests/qtest/libqos/arm-smdkc210-machine.c
tests/qtest/libqos/arm-virt-machine.c
tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c
tests/qtest/libqos/e1000e.c
tests/qtest/libqos/fw_cfg.c
tests/qtest/libqos/fw_cfg.h
tests/qtest/libqos/i2c-imx.c
tests/qtest/libqos/i2c-omap.c
tests/qtest/libqos/i2c.c
tests/qtest/libqos/i2c.h
tests/qtest/libqos/libqos.c
tests/qtest/libqos/libqos.h
tests/qtest/libqos/libqtest.h [deleted file]
tests/qtest/libqos/malloc.h
tests/qtest/libqos/pci-pc.c
tests/qtest/libqos/pci-spapr.c
tests/qtest/libqos/pci.h
tests/qtest/libqos/ppc64_pseries-machine.c
tests/qtest/libqos/qgraph.c
tests/qtest/libqos/qos_external.c
tests/qtest/libqos/rtas.c
tests/qtest/libqos/sdhci-cmd.c
tests/qtest/libqos/sdhci-cmd.h
tests/qtest/libqos/sdhci.c
tests/qtest/libqos/tpci200.c
tests/qtest/libqos/usb.c
tests/qtest/libqos/vhost-user-blk.c
tests/qtest/libqos/virtio-9p.c
tests/qtest/libqos/virtio-balloon.c
tests/qtest/libqos/virtio-blk.c
tests/qtest/libqos/virtio-iommu.c
tests/qtest/libqos/virtio-mmio.c
tests/qtest/libqos/virtio-net.c
tests/qtest/libqos/virtio-pci.c
tests/qtest/libqos/virtio-rng.c
tests/qtest/libqos/virtio-scsi.c
tests/qtest/libqos/virtio-serial.c
tests/qtest/libqos/virtio.c
tests/qtest/libqos/x86_64_pc-machine.c
tests/qtest/libqtest-single.h
tests/qtest/libqtest.c
tests/qtest/libqtest.h [new file with mode: 0644]
tests/qtest/lpc-ich9-test.c
tests/qtest/m48t59-test.c
tests/qtest/machine-none-test.c
tests/qtest/megasas-test.c
tests/qtest/microbit-test.c
tests/qtest/migration-helpers.h
tests/qtest/migration-test.c
tests/qtest/modules-test.c
tests/qtest/ne2000-test.c
tests/qtest/npcm7xx_adc-test.c
tests/qtest/npcm7xx_pwm-test.c
tests/qtest/npcm7xx_sdhci-test.c
tests/qtest/npcm7xx_smbus-test.c
tests/qtest/npcm7xx_watchdog_timer-test.c
tests/qtest/numa-test.c
tests/qtest/nvme-test.c
tests/qtest/pca9552-test.c
tests/qtest/pci-test.c
tests/qtest/pcnet-test.c
tests/qtest/pflash-cfi02-test.c
tests/qtest/pnv-xscom-test.c
tests/qtest/prom-env-test.c
tests/qtest/pvpanic-pci-test.c
tests/qtest/pvpanic-test.c
tests/qtest/pxe-test.c
tests/qtest/q35-test.c
tests/qtest/qmp-cmd-test.c
tests/qtest/qmp-test.c
tests/qtest/qom-test.c
tests/qtest/rtas-test.c
tests/qtest/sdhci-test.c
tests/qtest/spapr-phb-test.c
tests/qtest/tco-test.c
tests/qtest/test-filter-mirror.c
tests/qtest/test-filter-redirector.c
tests/qtest/test-hmp.c
tests/qtest/tpm-crb-swtpm-test.c
tests/qtest/tpm-emu.h
tests/qtest/tpm-tis-device-swtpm-test.c
tests/qtest/tpm-tis-swtpm-test.c
tests/qtest/tpm-util.c
tests/qtest/tulip-test.c
tests/qtest/virtio-net-failover.c
tests/qtest/virtio-rng-test.c
tests/qtest/virtio-test.c
tests/qtest/vmgenid-test.c
tests/qtest/vmxnet3-test.c
tests/qtest/wdt_ib700-test.c
tests/qtest/xlnx-can-test.c
tests/unit/test-qga.c

index add293d39700c7f2d9510c51a28ff451db9ef53c..0455aa06ab28aa43ced1c23933129a5b6340243a 100644 (file)
@@ -88,4 +88,4 @@ QTest Protocol
 libqtest API reference
 ----------------------
 
-.. kernel-doc:: tests/qtest/libqos/libqtest.h
+.. kernel-doc:: tests/qtest/libqtest.h
index 3608b0600e00d737c1eea025e71a2b8fde5a5762..e8ef76b3413812313ec2bb0e1c5e9df8cb6be48a 100755 (executable)
@@ -36,7 +36,7 @@ def c_header(owner):
 
 #include "qemu/osdep.h"
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
     """.format(date=date.today().year, owner=owner)
 
index e09f2495d24da37cd5a94d83afbe2c2291830087..b084e31bff5ffd05caf58a8be29d85a9db619d7b 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
index 261784d251896e923538171f8340b9961e6c501b..0c86780689315d76a534f9dd524f72e0c0c74206 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef TEST_ACPI_UTILS_H
 #define TEST_ACPI_UTILS_H
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 /* DSDT and SSDTs format */
 typedef struct {
index aff5f3f797760fbc53357e13db2cc1561c0bd959..f1e510b0ac00a49ad360eb6698aeffd33795d64b 100644 (file)
@@ -25,7 +25,7 @@
 #include "qemu/osdep.h"
 #include <getopt.h>
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "libqos/libqos-pc.h"
 #include "libqos/ahci.h"
 #include "libqos/pci-pc.h"
index d214a912b3b43638d304e824a54956cfae0d1229..ed3ac7db20de80ffd8a3bf3dd0ebf04d0e8e1de2 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 
 static void test_cmdfifo_underflow_ok(void)
index f76652143accb4b6739d4fdbd1ead0ba17d92e53..5a145273860c844acc5d957561cec36635b27a6a 100644 (file)
@@ -10,7 +10,7 @@
  */
 #include "qemu/osdep.h"
 #include "qemu/bitops.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qjson.h"
 
index 58aa22014d04f44a5bfb4d6bf91af694bac855e8..be0dd71df9bd567915e39f478a386946596a6701 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/bitops.h"
 
 #define HACE_CMD                 0x10
index f1f59b1261fe7917abbe19dcda2dbe5fbdc6154c..0680d79d6da3b721d596a15e4f88b1d384be8593 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "qemu/osdep.h"
 #include "libqos/fw_cfg.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "standard-headers/linux/qemu_fw_cfg.h"
 
index 9d9825bc8145bb56d62458eb7e933cb7321e2f3e..44a109abd8f0be97a55946bafe548d5196c14d58 100644 (file)
@@ -12,7 +12,7 @@
  */
 #include "qemu/osdep.h"
 #include "boot-sector.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 #define LOW(x) ((x) & 0xff)
 #define HIGH(x) ((x) >> 8)
index b339fdee4c84c56a5de85c58981896c0b9a61922..6ee6bb4d97f4eb98b694095c20f50d54fc383536 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef TEST_BOOT_SECTOR_H
 #define TEST_BOOT_SECTOR_H
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 /* Create boot disk file. fname must be a suitable string for mkstemp() */
 int boot_sector_init(char *fname);
index d72a82d6292e267007def4d5337a533c69572f06..2f99d71cab3546c24a76a4937290da0d27f7ce55 100644 (file)
@@ -14,7 +14,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "libqos/libqos-spapr.h"
 
 static const uint8_t bios_avr[] = {
index fdd889a487db18a6ec0717b1aede97461c9f5dc5..a7766a9e6571edd921fd9b8b7aaf13c2a6ede301 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "boot-sector.h"
 #include "qapi/qmp/qdict.h"
 
index 81043162dfddb76bb6282566afe72f0235be65c1..8be597476315ab9eabe88e21803554684dbb1316 100644 (file)
@@ -2,7 +2,7 @@
 #include "qemu/dbus.h"
 #include <gio/gio.h>
 #include <gio/gunixfdlist.h>
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "dbus-display1.h"
 
 static GDBusConnection*
index a8acab763f5d140870affe02ea2bc79fdad8ba08..74ede651f63de272bfd2cf74135eab8732d3ba57 100644 (file)
@@ -1,7 +1,7 @@
 #include "qemu/osdep.h"
 #include <glib/gstdio.h>
 #include <gio/gio.h>
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "dbus-vmstate1.h"
 #include "migration-helpers.h"
 
index adf39b2518e84471d53d22efa4a53589d16c82d5..5b0ffe43f5f428d7ae6d6c700181e36ec95aee15 100644 (file)
@@ -21,7 +21,7 @@
 #include "qapi/qmp/qstring.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qlist.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 const char common_args[] = "-nodefaults -machine none";
 
index 404a92e1328adc2c0acc9ac440e49cb68bc13c6d..2e3137843e371db544dd0b4a0b2fb29393d3b088 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qstring.h"
 
index 0cc18dfa4aae062d65489c83a6b28ab5ed8450ff..5e6d58b4dd269af5f5b63f94dcb26b52ba7eefe8 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "libqos/virtio.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qlist.h"
index c5d46bcc643d40a1d05037587e5d0bfbd65b430b..f6ade9a050fb50a44a00b8338308234acd765128 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "libqos/i2c.h"
 
 #define DS1338_ADDR 0x68
index ea286d1793046b0508ec7ed4714740ee947a84bd..c387984ef6d69dbf0361b83f19e96f00e5896775 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
index d72ad099f1eb7b98988c19a7117a5adb893693ef..8dbffff0b81b1632a876ad1dcfa7d4623dfa4f4a 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
index 2f5a88bf4ce503b6ed41f797604e3d509e27b3db..222d116fae2d52c74808c5a137858c02bd21db5f 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/bswap.h"
 
 typedef struct TestCase TestCase;
index a0adc35bef7fa98d1e2a0daa69e53d77f71ea5b6..4e768a126f6a39e859578eb91a3475c8f518f998 100644 (file)
@@ -10,7 +10,7 @@
 #include "qemu/osdep.h"
 #include <glib/gstdio.h>
 #include "libqos/libqos-pc.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 #include "hw/pci/pci.h"
 
index 2fd7fd2d3d3039e64c2e22596d9018b40f488da9..adccdac1be57ef6df00cfa18d13df28e7f399db4 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
index 66229e60964a8b1e65d847ecdacdb6c1bcb5724c..5052883fb6a8e44b34680681019d70fcc9eb3ac4 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 /*
  * https://bugs.launchpad.net/qemu/+bug/1879531
index 031d9de2419b9d115ab90829ec7abcad7b51e9eb..2e8e67859efb96e85411b155fd1fa148078c34e9 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 /*
  * This used to trigger the assert in lsi_do_dma()
index 129b182f830c1e73b9a994bbeae9e1e24e047638..287fe19fc7640d7de408b0758a5d12a456971fe4 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 /*
  * This used to trigger the assert in scsi_dma_complete
index 91fdcd1e8a0f8b4095f8374a375091a5e412af53..a65826b943789afb9c31b2fdbe119ba550f38360 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 /*
  * This used to trigger the assert in audio_calloc
index d0f4e0e93c0b0e23894b1f6a8095b64f6dae32e6..e7fd818148e82bdf3bdeb08068f03c95bedffa12 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 /*
  * https://gitlab.com/qemu-project/qemu/-/issues/450
index c9b6fe21231d618cbaf336cada20211b88e00bea..71c91b03568da28c7fc15ace49792bcc1cd53d5f 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 /*
  * Here a MemoryRegionCache pointed to an MMIO region but had a
index 69eb6c0eb10441c48ad9d6d41f159f47758d1027..51e9a373002ce142ac2c3eb6d2e48f7c0772bc3b 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 /*
  * This used to trigger the out-of-bounds read in xlnx_dp_read
index 5f77c849837f918b741d77a03e2206840b294b96..a7a5e14fa3bc3a54354bbc438f5318515125e9be 100644 (file)
@@ -21,7 +21,7 @@
 #include "sysemu/runstate.h"
 #include "qemu/main-loop.h"
 #include "qemu/rcu.h"
-#include "tests/qtest/libqos/libqtest.h"
+#include "tests/qtest/libqtest.h"
 #include "tests/qtest/libqos/qgraph.h"
 #include "fuzz.h"
 
index 3a8570e84c796f62e72f9c303fea9ed9892a53a2..c5f0b7227a100d02f03fab269f6a1b1b7781730b 100644 (file)
@@ -17,7 +17,7 @@
 #include "qemu/units.h"
 #include "qapi/error.h"
 
-#include "tests/qtest/libqos/libqtest.h"
+#include "tests/qtest/libqtest.h"
 
 /**
  * A libfuzzer fuzzing target
index bce83604825e2543c59c885ccfb9f1bb7e567961..25df19fd5af3c8448d5d2d6e63ca0311a52b2aaa 100644 (file)
@@ -15,7 +15,7 @@
 #include <wordexp.h>
 
 #include "hw/core/cpu.h"
-#include "tests/qtest/libqos/libqtest.h"
+#include "tests/qtest/libqtest.h"
 #include "tests/qtest/libqos/pci-pc.h"
 #include "fuzz.h"
 #include "fork_fuzz.h"
index 86796bff2bca2d4639319fc22fd1a68b2138b2a4..b17fc725dfd6be08b79c08ef22b309ef9a5d302f 100644 (file)
@@ -13,7 +13,7 @@
 #include "qemu/osdep.h"
 
 #include "qemu/main-loop.h"
-#include "tests/qtest/libqos/libqtest.h"
+#include "tests/qtest/libqtest.h"
 #include "tests/qtest/libqos/pci.h"
 #include "tests/qtest/libqos/pci-pc.h"
 #include "fuzz.h"
index dc891d838b6a2d6e1ba451602df8c99b843d4952..c856d3d500e8f9ccce3cf3683228f35320f4ddd3 100644 (file)
@@ -22,7 +22,7 @@
 #include "exec/memory.h"
 #include "qemu/main-loop.h"
 
-#include "tests/qtest/libqos/libqtest.h"
+#include "tests/qtest/libqtest.h"
 #include "tests/qtest/libqos/malloc.h"
 #include "tests/qtest/libqos/qgraph.h"
 #include "tests/qtest/libqos/qgraph_internal.h"
index 623a756fd472c03659ea6b2243e8c01beabbe2e9..236d078cc86230fab85b65b168517ce6d8ed9fdd 100644 (file)
@@ -11,7 +11,7 @@
 
 #include "qemu/osdep.h"
 
-#include "tests/qtest/libqos/libqtest.h"
+#include "tests/qtest/libqtest.h"
 #include "tests/qtest/libqos/virtio-blk.h"
 #include "tests/qtest/libqos/virtio.h"
 #include "tests/qtest/libqos/virtio-pci.h"
index 0e873ab8e25ffc63ba9fb3f765d569f037cd0c86..3df78d9c1c2ac43faa9ffbb8c02a0e953d587044 100644 (file)
@@ -13,7 +13,7 @@
 #include "qemu/osdep.h"
 
 #include "standard-headers/linux/virtio_config.h"
-#include "tests/qtest/libqos/libqtest.h"
+#include "tests/qtest/libqtest.h"
 #include "tests/qtest/libqos/virtio-net.h"
 #include "fuzz.h"
 #include "fork_fuzz.h"
index 6ff6fabe4ad3cab78c3dddc602df2118361e59b5..b3220ef6cb201cdda558ac6c41557f160eceba21 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "qemu/osdep.h"
 
-#include "tests/qtest/libqos/libqtest.h"
+#include "tests/qtest/libqtest.h"
 #include "tests/qtest/libqos/virtio-scsi.h"
 #include "tests/qtest/libqos/virtio.h"
 #include "tests/qtest/libqos/virtio-pci.h"
index 95b3907c18c471f2f946f3cd09798f4b10436a5c..5dc807ba2385398714bfae552ff7366635923bcd 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "standard-headers/linux/qemu_fw_cfg.h"
 #include "libqos/fw_cfg.h"
 #include "qemu/bswap.h"
index da9c4c2792de4118065049afef32d1f2059645cb..413cf964c05b8d16e36f872047b9b467bc34b602 100644 (file)
@@ -18,7 +18,7 @@
 #include "qemu/osdep.h"
 #include "qemu/bswap.h"
 #include "qapi/qmp/qlist.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "libqos/fw_cfg.h"
 #include "libqos/libqos.h"
 #include "standard-headers/linux/qemu_fw_cfg.h"
index 561502052a6748ba75c741de3f36b8e32958b0f4..8b7aa2d72d0dfda9f5cafb56128206aa9e2382bb 100644 (file)
@@ -10,7 +10,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 /* Load 'test.hex' and verify that the in-memory contents are as expected.
  * 'test.hex' is a memory test pattern stored in Hexadecimal Object
index b7243a17b11d2fa137740af94fc5c06b5188dcf9..5bcb75a7e53d6338968be245872da578d8210cb1 100644 (file)
@@ -25,7 +25,7 @@
 #include "qemu/osdep.h"
 
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "libqos/libqos.h"
 #include "libqos/pci-pc.h"
 #include "libqos/malloc-pc.h"
index 65ce10b81befb05396ddd691873bb7999f0accc9..53a8c9b13ce582764e56a4fa85edafe4fc32d760 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 
index 95628a41857961064de66e6d856b79d8c6038e5f..bfc91d1719d286f209167de18ff02aea7bd477bf 100644 (file)
@@ -13,7 +13,7 @@
 #include "contrib/ivshmem-server/ivshmem-server.h"
 #include "libqos/libqos-pc.h"
 #include "libqos/libqos-spapr.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 #define TMPSHMSIZE (1 << 20)
 static char *tmpshm;
index 79631cc7a9ad87a4f2019dbf05ec3304b0adc4b4..c8a3ea11eb406c37deeafd425763f95f364df9a1 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
 #include "qemu/module.h"
 #include "malloc.h"
 #include "qgraph.h"
index 41c4be5efa936dd4f3d60c1ea60a8428e7edcc1d..f53f12aa9965f1c81448ecf992af6892f7be50d1 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqtest.h"
+#include "../libqtest.h"
 #include "ahci.h"
 #include "pci-pc.h"
 
index 6692adfa4fcb8589e73675d3f0f616ad2d0b8e9a..54d0c95330448780e84b6276175bba1240463770 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
 #include "malloc.h"
 #include "qgraph.h"
 #include "i2c.h"
index ff2049c3a7eb38410cee411376058c8d337a5526..ecd46b1dafa0dea5a18c0e4fc559c944d121be06 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
 #include "malloc.h"
 #include "qgraph.h"
 #include "i2c.h"
index 09ca863c1030f0c3392961cac0af04b3e06885e3..0a2943440b28682174a56d56d8354c557cb24b96 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
 #include "qemu/module.h"
 #include "malloc.h"
 #include "qgraph.h"
index 72425f0ad4043905bdd584b6d09181836153e214..ec19a01660c0f0452a336508695369947a63900b 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
 #include "qemu/module.h"
 #include "malloc.h"
 #include "qgraph.h"
index 321b8826d4a2b64d8fbda630e30d46e8006e886c..4bff249ee89afff06c0a78067869c0db4fe44225 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
 #include "qemu/module.h"
 #include "malloc.h"
 #include "qgraph.h"
index e0f59322845aeebeb9b7a703185800038c7a9384..2e0beaefb8d78c86db8c719ac5a9bbf3863aec3b 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
 #include "qemu/module.h"
 #include "malloc.h"
 #include "qgraph.h"
index 56e53c745bffd4f80e9414bc45924ded4a85581e..3be80020a6bc903fd6409866141cdb44c963f93f 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
 #include "qemu/module.h"
 #include "malloc.h"
 #include "qgraph.h"
index a451f6168f63d8672cc52943801fd9e8562fa71c..f87e0e84b2aad6186375bd8443f39108594bff72 100644 (file)
@@ -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"
index 6b8e1babe51e963f95c572bef51c4b2f4ab87b1d..89f053ccacbd363eb2d33220c75c1151b39cea0d 100644 (file)
@@ -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"
 
index c6a7cf8cf053be892ad49e58b9a597b1c714d0a7..b0456a15df1961cc14338880e5b19ae686d462c9 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef LIBQOS_FW_CFG_H
 #define LIBQOS_FW_CFG_H
 
-#include "libqtest.h"
+#include "../libqtest.h"
 
 typedef struct QFWCFG QFWCFG;
 
index 8f9a7e383146694e428e0dc9852e2acea2f425a8..710cb926d62bf45eed61ccabb9f42d6473ff8e4f 100644 (file)
@@ -21,7 +21,7 @@
 #include "i2c.h"
 
 
-#include "libqtest.h"
+#include "../libqtest.h"
 
 #include "hw/i2c/imx_i2c.h"
 
index eb4e453485dbdfa7d22e681b1767e54457c65715..6f98f54820bee0c5075c7d588f307415b7951928 100644 (file)
@@ -11,7 +11,7 @@
 
 
 #include "qemu/bswap.h"
-#include "libqtest.h"
+#include "../libqtest.h"
 
 enum OMAPI2CRegisters {
     OMAP_I2C_REV  = 0x00,
index ade1bdb40e05e56bf64da292c57d375cbc4dd439..1a54c004eb413d374188cff49af88a5bc01732af 100644 (file)
@@ -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)
 {
index 1341bac1c599114e61e99d487855e77bb97526ea..d0322409227cb7212c650108a70fff25e64c23d7 100644 (file)
@@ -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;
index 2251e864efe1a00c51e41a50ddb8602a2cbd9639..85c7641add1b94e05a3c5e6a5a6f94e2f8244dba 100644 (file)
@@ -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"
index e0b2bfe7caf9071df7a4f9df698522d5c5e1cd72..ba7df448cad7391dbc2bf4f5aa92ad997f76e538 100644 (file)
@@ -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 (file)
index 552667f..0000000
+++ /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
index 4d1a2e2bef4a0b94bcb8392ea51598ded98da37f..bbb8c743cc5a116651f904f008e47d81c271897c 100644 (file)
@@ -14,7 +14,7 @@
 #define LIBQOS_MALLOC_H
 
 #include "qemu/queue.h"
-#include "libqtest.h"
+#include "../libqtest.h"
 
 typedef enum {
     ALLOC_NO_FLAGS    = 0x00,
index f97844289f138c1d082723ef90ebc5f6d0eb883c..e9dd5a57ec55af96e6a2ad9d8d6dd2d926a689e9 100644 (file)
@@ -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"
index 262226985f378e8af0c65e12577d7f94e9464115..76bf9a855d5cc4f05b1c9caa8ee81ac4f074ea20 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
 #include "pci-spapr.h"
 #include "rtas.h"
 #include "qgraph.h"
index becb800f9e6a197a472bd1b32629982ee333e378..e705e06598c240283cbc0708e3890b1eb6ca384d 100644 (file)
@@ -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
index 24ca1799765f382eef46e61996b68dffec96e352..364e9c689bb935b5e81977719e5a6812497854bb 100644 (file)
@@ -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"
index 109ff04e1e8fc69ea4a305e27b6a3b4fb666c16b..0a2dddfafa4f4a87529b402dc7399d0a71b3809a 100644 (file)
@@ -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"
index 10ee0f75b288dc0f270e94a321514323ed1804bf..b7a0b873a362918b4924e5754619d6843f89b7c2 100644 (file)
@@ -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"
index db29d5554dcb51b1d15f315c989125ba1c0440a8..dedbfb4cb3a6f5436ba90b21f099a3cc576174e1 100644 (file)
@@ -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,
index 2d9e51834114142a2c0a881dafd313660ff94c1c..a6f073ac1ac9e21215577e0d253a05130934d48a 100644 (file)
@@ -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)
 {
index 64763c5a2ace95c0a541bff600c0385e17369f60..9e61dd4944643f5a27ca609fa6338167c52eecfb 100644 (file)
@@ -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
index 65f0d07fc5ace15f99f536b7db5e5ab5d9d0ac45..71696980f83e40e79cce7309de3766ec248da9d2 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
 #include "qgraph.h"
 #include "pci.h"
 #include "qemu/module.h"
index 1787b1f188d3d8213aa3b939e6c5eefc2cdb2da9..8b006032472880aae1f30b0eba3b2355ec0d23a0 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
 #include "qemu/module.h"
 #include "qgraph.h"
 #include "pci.h"
index 8b45b0298446a1f861f72ac6890cdc39b8d4ef94..446fdb5796c489aa6db12d6c1e91096fd31765fa 100644 (file)
@@ -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"
 
index 568c3426ed3ae98ae9f426042f750970a0ec7e35..2f3c9cb5336d5a563438545663c38f2689c5b58a 100644 (file)
@@ -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"
index f51f0635cc0cbbc156f12a5f59aee1e2bb2190cf..70aea8bf62870f6e59465640fbb82c18b239619a 100644 (file)
@@ -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"
index a3da5c234d49753fedc77e3288ac1f92d470cc8f..29b5d175845aebf25c52672315ce09dbe20f8cee 100644 (file)
@@ -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"
index 5da02591bcc2c2889b195242231dd4c2dae38da3..ee4943f32b991945b8d275b14d960be96376a826 100644 (file)
@@ -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"
index 18cba4ca36b662d1da2fadedb0f54af943306058..afc7d14e9a60af97a2016d548025a4e96f758811 100644 (file)
@@ -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"
index 75efda30299aab163ad30c162eb6009406cda192..a6cca8613b2c6db89173f15e6bc3b39c444a4e08 100644 (file)
@@ -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"
index 1cae07f60d6cb588cbebb94c73d8f6f9510a8b15..2ac73ac0b416c09ad0f4101bfbcaa8bffdd979ad 100644 (file)
@@ -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"
index cd3c0f5bf33518ddb9dba995a9a8ada58f98001e..67c2498c84af6996c2437f4f9b479d492f458cda 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "../libqtest.h"
 #include "virtio.h"
 #include "virtio-pci.h"
 #include "pci.h"
index 2e09dd7c48cb2669ab1df06df26d37acc5b185b4..078e3abaa72a2d7752580bab08997b059ebb212a 100644 (file)
@@ -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"
index 5644e32fc3194df341f6c11bfe0a865be38c6214..c4d04614201251a496ae4dc1e81e6861b4f8c0d4 100644 (file)
@@ -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"
index ee34afd95ad8078217443ee3526e8500e95b3992..1d689c3e38fc4117719970a1e05f45d9d32188b3 100644 (file)
@@ -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"
index fba918665951ff7f2eab8217616610fe285879ff..09ec09b655cd1e988c2c128f246b402d5b6becef 100644 (file)
@@ -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"
index ad96742a92d6f0f8fe804fd2ef9f118508cabbde..dce0c9463a4718624eeaf63efc629d5e4eae6d71 100644 (file)
@@ -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"
index b0838b9e0e710a533ecd2ea78be10a69317d151b..4e7d0ae1dcd3eeed274b4363beeb8005a75fd5ec 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef LIBQTEST_SINGLE_H
 #define LIBQTEST_SINGLE_H
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 QTestState *global_qtest __attribute__((common, weak));
 
index 5098d71485cc81e0f29b84b8c9b058265df1bf5d..aaf5ab0ca5331d5fd331e20a8393ad7260a80851 100644 (file)
@@ -20,7 +20,7 @@
 #include <sys/wait.h>
 #include <sys/un.h>
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/ctype.h"
 #include "qemu/cutils.h"
 #include "qapi/error.h"
diff --git a/tests/qtest/libqtest.h b/tests/qtest/libqtest.h
new file mode 100644 (file)
index 0000000..552667f
--- /dev/null
@@ -0,0 +1,813 @@
+/*
+ * 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
index fe0bef9980755140ddcbf6315ae574bed657a5a7..8ac95b89f7292a3f29dc6d413f478b5bbff21ba8 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 static void test_lp1878642_pci_bus_get_irq_level_assert(void)
 {
index 6db3234100a3b8a074b6b3667af453179f95fde0..b94a1230f7fdf742102597f402e2ea894689320b 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 #define RTC_SECONDS             0x9
 #define RTC_MINUTES             0xa
index 8ca18074b9f9d603a250ae7eb7d93a8c03159dec..d0f8cd9902456253afc5aecc218b5d3838e908d9 100644 (file)
@@ -13,7 +13,7 @@
 #include "qemu/osdep.h"
 
 #include "qemu/cutils.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qapi/qmp/qdict.h"
 
 
index eae70ff95f9c3942a784c165895aca9d6fe80d17..d6796b9bd74df3a14ee539b26d0f02183c616113 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/bswap.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
index 2b255579dfddf203d8f3a8b2e0de0f773adc19e5..04e199ec33f452e990802fba6d7d559bfb6c1aa6 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "qemu/osdep.h"
 #include "exec/hwaddr.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 #include "hw/arm/nrf51.h"
 #include "hw/char/nrf51_uart.h"
index 555adafce129baadc12b55ab915f231c3cdd5baf..c7872e84421f0371a29aa1727ac9416d7295f8a6 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef MIGRATION_HELPERS_H_
 #define MIGRATION_HELPERS_H_
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 extern bool got_stop;
 
index 2af36c16a3718a2897710993508a248c15c98967..cba6023eb50046d6800a942c61856a54d1d4db89 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qapi/error.h"
 #include "qapi/qmp/qdict.h"
 #include "qemu/module.h"
index c238b3f4221608762b584b33047e53b7a6597e20..88217686e14e3924833b3feff87e9b014484029e 100644 (file)
@@ -1,5 +1,5 @@
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 const char common_args[] = "-nodefaults -machine none";
 
index 43cfc4535aabe14833ce4a423006254eb8829719..3fc0e555d5e25de99ff5c9635c8c336ace19b398 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
index 5ce8ce13b3d7beb6b2bd092992f2ebc69e49ae98..3fa6d9ece0bd881495fc59abd9af49867589cfe9 100644 (file)
@@ -17,7 +17,7 @@
 #include "qemu/osdep.h"
 #include "qemu/bitops.h"
 #include "qemu/timer.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qapi/qmp/qdict.h"
 
 #define REF_HZ          (25000000)
index a54fd70d273bc5a806b2c61a055014052a090747..c4a5fdcacd7929989b816b5e520691efeae67093 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/bitops.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qnum.h"
 
index c1f496fb29bb86d8984fcd2323f14fc16f1d31b4..aa35a77e8d3778bb06322bd20dc4f366564f72c6 100644 (file)
@@ -17,7 +17,7 @@
 #include "qemu/osdep.h"
 #include "hw/sd/npcm7xx_sdhci.h"
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "libqtest-single.h"
 #include "libqos/sdhci-cmd.h"
 
index 6b3038ac596fef6b1ba553ac08e17fc9b420fe76..a878cdc0014228bd824124e45c18280a69bb4586 100644 (file)
@@ -17,7 +17,7 @@
 #include "qemu/osdep.h"
 #include "qemu/bitops.h"
 #include "libqos/i2c.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "hw/sensor/tmp105_regs.h"
 
 #define NR_SMBUS_DEVICES    16
index 3aae5a043813d7c87f0f1ef3da8dc8cfb8ddbdcf..4773a673b2078b0d501746826de9baa845ecc1ec 100644 (file)
@@ -17,7 +17,7 @@
 #include "qemu/osdep.h"
 #include "qemu/timer.h"
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qapi/qmp/qdict.h"
 
 #define WTCR_OFFSET     0x1c
index 90bf68a5b33c1f0098eb8bc482b5029cf1d469cc..749429dd27e62a204050f65592abb3a043031f54 100644 (file)
@@ -10,7 +10,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qlist.h"
 
index f8bafb5d70fb6b5fdaa4ad8cf64944f0b67eb3bd..008d189b0faf8fc4cb924a9c77535f7bf909a6e6 100644 (file)
@@ -10,7 +10,7 @@
 #include "qemu/osdep.h"
 #include "qemu/module.h"
 #include "qemu/units.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
 #include "include/block/nvme.h"
index 42a131266512c77cff0440f86b192f965a1613ad..d80ed93cd3a519fdebe93f9af386fc11fea18007 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "libqos/qgraph.h"
 #include "libqos/i2c.h"
 #include "hw/misc/pca9552_regs.h"
index e15d4d94d1d0c65b20981cd4c5fd350835ce5473..4b2092b94973abcc3dd704ab5bdd55c1810eb9c4 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
index 7583aeb3c38ff3758eaca23e4d72971dd9f2e5de..900944fa7e34c220418bca663240be5fde61b3ba 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
index 6168edc821a86195295861fc94140ceb601ae4ad..7fce614b6412a933806521f45151120c8bd3eca0 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 /*
  * To test the pflash_cfi02 device, we run QEMU with the musicpal machine with
index c8d40433620af77afaa9873282b539b2ff46e83a..2c46d5cf6de3c9e85e700d6e884ad8c6e01f769a 100644 (file)
@@ -8,7 +8,7 @@
  */
 #include "qemu/osdep.h"
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 typedef enum PnvChipType {
     PNV_CHIP_POWER8E,     /* AKA Murano (default) */
index bdbb01d8e584fd73af31fcafd9c67d43cc1efaef..c2b0448e551da2c021e1f207e7232bcf1a05a0df 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "libqos/libqos-spapr.h"
 
 #define MAGIC   0xcafec0de
index 2358852d356feb83b33cfd5e584bddd0afe5983a..c82c365c267d462b891ad45a3e1fc7e270428b0f 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "libqos/pci.h"
 #include "libqos/pci-pc.h"
index 6dcad2db4984c4f0371349275a547d5577325dc0..bc7b7dfc39e24092a73dfd15019412a3fbdbafa2 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qapi/qmp/qdict.h"
 
 static void test_panic_nopause(void)
index 3cb47d2c5496dc9bc5dd8390307db4abd2dbc0a6..52f0b5c67c033b8ed859a88569eb1d0e1bec8303 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "qemu/osdep.h"
 #include <glib/gstdio.h>
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "boot-sector.h"
 #include "libqos/libqos-spapr.h"
 
index b7cf1449906f568bde04578d63cf29878b7a8e1b..c922d81bc020739074c86e6c43a152d42d7ec91b 100644 (file)
@@ -10,7 +10,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "libqos/pci.h"
 #include "libqos/pci-pc.h"
 #include "hw/pci-host/q35.h"
index 7f103ea3fd2ac5c9fd0b6ebb91ce4b66bac31a41..056b40e67f606ca8774403c68ddf2c08741ffdab 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qapi/error.h"
 #include "qapi/qapi-visit-introspect.h"
 #include "qapi/qmp/qdict.h"
index cd27fae3deb294695a05284dde051b0919415800..9a42480cef0afb835ac0c43525fa86788a42c977 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qapi/error.h"
 #include "qapi/qapi-visit-control.h"
 #include "qapi/qmp/qdict.h"
index 6b162e12b5aafd54d05e47359cd5d0f49528ebce..7b871b2a3107ce88632f0d23246228115086daff 100644 (file)
@@ -12,7 +12,7 @@
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qlist.h"
 #include "qemu/cutils.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 static void test_properties(QTestState *qts, const char *path, bool recurse)
 {
index 5f1194a6eb5337a5e43c45349d08d0388e16ab2d..50df60e5b20e5573ad3114ff1d62b9ebd112d89c 100644 (file)
@@ -1,6 +1,6 @@
 #include "qemu/osdep.h"
 #include "qemu/cutils.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 #include "libqos/libqos-spapr.h"
 #include "libqos/rtas.h"
index a110cfe3219ce2b254218fcda89dbd9dadecdfe4..6275e7626c215638d7647bb2088f59b93a908c3c 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/registerfields.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/module.h"
 #include "libqos/pci-pc.h"
 #include "hw/pci/pci.h"
index ea8d59650721533b23e3c8836079b2834be314bf..093dc22f2f41d707ffcdbe3af6a8c897669ea0b6 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 
index 47bc7ad3019d00967ec12403624c1316241e6cdd..254f7353701c788727af9faedce3ad7697519c95 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "libqos/pci.h"
 #include "libqos/pci-pc.h"
 #include "qapi/qmp/qdict.h"
index fdf66cebd62ff513e2e2e7df2e1a6222db177ac4..c8b0a92b53b772cc508468c568d50b725edecafd 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qemu/iov.h"
 #include "qemu/sockets.h"
index 339d3c04cedc992e34766de9eefa4b61fc6a3684..24ca9280f8144f24980a84c515d29b45b69ed32d 100644 (file)
@@ -51,7 +51,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qemu/iov.h"
 #include "qemu/sockets.h"
index 413eb95d2a0cf591a65121618aa25ea88b580733..f8b22abe4cacabd5863f6f541b1536a7418b6fc7 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 static int verbose;
 
index 1d82a48c04bec4ca7bb999d0b7f08f2dee425a7c..55fdb5657d910ca3feaad9b5b762d2471778f6ba 100644 (file)
@@ -15,7 +15,7 @@
 #include "qemu/osdep.h"
 #include <glib/gstdio.h>
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/module.h"
 #include "tpm-tests.h"
 #include "hw/acpi/tpm.h"
index c33d99af3743795c65fbbcf1c9f916d759509a4e..712cee9b7a5462e1665591523214554ec3317f84 100644 (file)
@@ -22,7 +22,7 @@
 #include "qemu/sockets.h"
 #include "io/channel.h"
 #include "sysemu/tpm.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 struct tpm_hdr {
     uint16_t tag;
index f7126eff9e742098697f0d3f66668fa3b0e06be0..7b200351426a38f3a187f09509d45cd1ded3d7fe 100644 (file)
@@ -16,7 +16,7 @@
 #include "qemu/osdep.h"
 #include <glib/gstdio.h>
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/module.h"
 #include "tpm-tests.h"
 #include "hw/acpi/tpm.h"
index fa590e68f1155da83c1efa7b355fa54091881f83..90131cb3c487515f1a3f1124c8b9785296e1a11e 100644 (file)
@@ -15,7 +15,7 @@
 #include "qemu/osdep.h"
 #include <glib/gstdio.h>
 
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/module.h"
 #include "tpm-tests.h"
 #include "hw/acpi/tpm.h"
index 3a40ff3f96c267dfb2295587b24917d09d24da71..e0dc5da0af1e9cf41b6004f386c1a0ce5a5f4e82 100644 (file)
@@ -15,7 +15,7 @@
 #include "qemu/osdep.h"
 
 #include "hw/acpi/tpm.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "tpm-util.h"
 #include "qapi/qmp/qdict.h"
 
index da16cbfafcc277ab9a7e46d9a4d1627ce7199076..2fb6c4d5a781f444ac1eedeb15d35d48af4d5bbc 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
index 78811f1c921654a59d2af5d67e4211816d962940..443ee56de9668cfff19e944ad42137ffd3c21503 100644 (file)
@@ -8,7 +8,7 @@
  * SPDX-License-Identifier: GPL-2.0-or-later
  */
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "libqos/pci.h"
 #include "libqos/pci-pc.h"
 #include "qapi/qmp/qdict.h"
index e6b8cd8e0cfa2ef8422cc7317fd99d295559ab4d..092ba130684dfdc378265f17ba1d779aec75fa35 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/virtio-rng.h"
index 63134176303a8bae9d946b9a5120e6289a0a4fe8..f7c6afdcf11130a173a042db3a04eecc51d68a9b 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
index 6781a514479bc47af0199d5a4705cf94635e0df9..efba76e7164e284f0f97920be0ddcb06fb0f4865 100644 (file)
@@ -14,7 +14,7 @@
 #include "hw/acpi/acpi-defs.h"
 #include "boot-sector.h"
 #include "acpi-utils.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qapi/qmp/qdict.h"
 
 #define VGID_GUID "324e6eaf-d1d1-4bf6-bf41-b9bb6c91fb87"
index 97c23fd3a8f6d133b1cf18dc0573ffeba36d7c92..a81025252c87989952cea07c1c546d55e25639f0 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
index 6c36e43fb8358e589255f6822ebfbea15f62fff2..797288d939fac2fb51f7200bfc3119e824bd29d0 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qemu/timer.h"
 
index 54de71a68643df93fcccbd49b8711086fc3e165f..89610fc499b6e10e52517c663ae9472bb5432865 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/libqtest.h"
+#include "libqtest.h"
 
 /* Base address. */
 #define CAN0_BASE_ADDR          0xFF060000
index e17a288034bc7878e57a5a9ccbea2a2008ac4896..d6df1ee92ea14a97403e999515d0385e2ba60822 100644 (file)
@@ -4,7 +4,7 @@
 #include <sys/socket.h>
 #include <sys/un.h>
 
-#include "../qtest/libqos/libqtest.h"
+#include "../qtest/libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qlist.h"