aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-06-12 13:50:01 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-06-12 13:50:02 +0100
commit59c58f96b270f5edd4ad10954c3a96556cb3a728 (patch)
tree005ac413277b8b88a2a580eab2d10d45f25d2fc8 /tests
parentd3e3413bd6a8c0287dbad8942e208d562fd8e29e (diff)
parent84995ea21935403cc9d57b6cb7dddcac5fa02c1c (diff)
Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2019-06-11-v3' into staging
Miscellaneous patches for 2019-06-11 # gpg: Signature made Wed 12 Jun 2019 12:20:41 BST # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-misc-2019-06-11-v3: MAINTAINERS: Polish headline decorations MAINTAINERS: Improve section headlines MAINTAINERS: Remove duplicate entries of qemu-devel@nongnu.org Clean up a header guard symbols (again) Supply missing header guards Clean up a few header guard symbols scripts/clean-header-guards: Fix handling of trailing comments Normalize position of header guard Include qemu-common.h exactly where needed Include qemu/module.h where needed, drop it from qemu-common.h qemu-common: Move qemu_isalnum() etc. to qemu/ctype.h qemu-common: Move tcg_enabled() etc. to sysemu/tcg.h Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/ac97-test.c1
-rw-r--r--tests/crypto-tls-psk-helpers.h6
-rw-r--r--tests/crypto-tls-x509-helpers.h6
-rw-r--r--tests/e1000-test.c1
-rw-r--r--tests/e1000e-test.c2
-rw-r--r--tests/eepro100-test.c1
-rw-r--r--tests/es1370-test.c1
-rw-r--r--tests/io-channel-helpers.h9
-rw-r--r--tests/ipoctal232-test.c1
-rw-r--r--tests/libqos/aarch64-xlnx-zcu102-machine.c1
-rw-r--r--tests/libqos/arm-raspi2-machine.c1
-rw-r--r--tests/libqos/arm-sabrelite-machine.c1
-rw-r--r--tests/libqos/arm-smdkc210-machine.c1
-rw-r--r--tests/libqos/arm-virt-machine.c1
-rw-r--r--tests/libqos/arm-xilinx-zynq-a9-machine.c1
-rw-r--r--tests/libqos/e1000e.c2
-rw-r--r--tests/libqos/pci-pc.c2
-rw-r--r--tests/libqos/pci-spapr.c2
-rw-r--r--tests/libqos/ppc64_pseries-machine.c3
-rw-r--r--tests/libqos/sdhci.c1
-rw-r--r--tests/libqos/tpci200.c1
-rw-r--r--tests/libqos/virtio-9p.c1
-rw-r--r--tests/libqos/virtio-9p.h5
-rw-r--r--tests/libqos/virtio-balloon.c1
-rw-r--r--tests/libqos/virtio-balloon.h5
-rw-r--r--tests/libqos/virtio-blk.c1
-rw-r--r--tests/libqos/virtio-blk.h5
-rw-r--r--tests/libqos/virtio-mmio.c1
-rw-r--r--tests/libqos/virtio-net.c1
-rw-r--r--tests/libqos/virtio-net.h5
-rw-r--r--tests/libqos/virtio-rng.c1
-rw-r--r--tests/libqos/virtio-rng.h5
-rw-r--r--tests/libqos/virtio-scsi.c1
-rw-r--r--tests/libqos/virtio-scsi.h5
-rw-r--r--tests/libqos/virtio-serial.c1
-rw-r--r--tests/libqos/virtio-serial.h5
-rw-r--r--tests/libqos/x86_64_pc-machine.c1
-rw-r--r--tests/libqtest.c1
-rw-r--r--tests/megasas-test.c1
-rw-r--r--tests/migration-test.c1
-rw-r--r--tests/migration/migration-test.h2
-rw-r--r--tests/ne2000-test.c1
-rw-r--r--tests/nvme-test.c1
-rw-r--r--tests/pci-test.c1
-rw-r--r--tests/pcnet-test.c1
-rw-r--r--tests/qos-test.c1
-rw-r--r--tests/sdhci-test.c2
-rw-r--r--tests/socket-helpers.h6
-rw-r--r--tests/spapr-phb-test.c1
-rw-r--r--tests/test-authz-list.c1
-rw-r--r--tests/test-authz-listfile.c1
-rw-r--r--tests/test-authz-pam.c1
-rw-r--r--tests/test-authz-simple.c1
-rw-r--r--tests/test-char.c1
-rw-r--r--tests/test-crypto-block.c1
-rw-r--r--tests/test-crypto-tlscredsx509.c1
-rw-r--r--tests/test-crypto-tlssession.c1
-rw-r--r--tests/test-filter-mirror.c1
-rw-r--r--tests/test-filter-redirector.c1
-rw-r--r--tests/test-io-channel-buffer.c1
-rw-r--r--tests/test-io-channel-command.c1
-rw-r--r--tests/test-io-channel-file.c1
-rw-r--r--tests/test-io-channel-socket.c1
-rw-r--r--tests/test-io-channel-tls.c1
-rw-r--r--tests/test-io-task.c1
-rw-r--r--tests/test-qmp-cmds.c2
-rw-r--r--tests/test-throttle.c1
-rw-r--r--tests/test-vmstate.c2
-rw-r--r--tests/tpm-crb-swtpm-test.c1
-rw-r--r--tests/tpm-crb-test.c1
-rw-r--r--tests/tpm-tis-swtpm-test.c1
-rw-r--r--tests/tpm-tis-test.c1
-rw-r--r--tests/uefi-test-tools/UefiTestToolsPkg/Include/Guid/BiosTablesTest.h6
-rw-r--r--tests/usb-hcd-ohci-test.c1
-rw-r--r--tests/vhost-user-bridge.c2
-rw-r--r--tests/vhost-user-test.c1
-rw-r--r--tests/virtio-9p-test.c1
-rw-r--r--tests/virtio-blk-test.c1
-rw-r--r--tests/virtio-net-test.c2
-rw-r--r--tests/virtio-rng-test.c1
-rw-r--r--tests/virtio-scsi-test.c1
-rw-r--r--tests/virtio-serial-test.c1
-rw-r--r--tests/virtio-test.c1
-rw-r--r--tests/vmxnet3-test.c1
84 files changed, 132 insertions, 20 deletions
diff --git a/tests/ac97-test.c b/tests/ac97-test.c
index 532fb1cc98..b084e31bff 100644
--- a/tests/ac97-test.c
+++ b/tests/ac97-test.c
@@ -9,6 +9,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/crypto-tls-psk-helpers.h b/tests/crypto-tls-psk-helpers.h
index 9aec29f1a0..5aa9951cb6 100644
--- a/tests/crypto-tls-psk-helpers.h
+++ b/tests/crypto-tls-psk-helpers.h
@@ -18,12 +18,16 @@
* Author: Richard W.M. Jones <rjones@redhat.com>
*/
+#ifndef TESTS_CRYPTO_TLS_PSK_HELPERS_H
+#define TESTS_CRYPTO_TLS_PSK_HELPERS_H
+
#include <gnutls/gnutls.h>
#ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT
-# include "qemu-common.h"
void test_tls_psk_init(const char *keyfile);
void test_tls_psk_cleanup(const char *keyfile);
#endif /* QCRYPTO_HAVE_TLS_TEST_SUPPORT */
+
+#endif
diff --git a/tests/crypto-tls-x509-helpers.h b/tests/crypto-tls-x509-helpers.h
index 88c30d7c94..08efba4e19 100644
--- a/tests/crypto-tls-x509-helpers.h
+++ b/tests/crypto-tls-x509-helpers.h
@@ -18,6 +18,9 @@
* Author: Daniel P. Berrange <berrange@redhat.com>
*/
+#ifndef TESTS_CRYPTO_TLS_X509_HELPERS_H
+#define TESTS_CRYPTO_TLS_X509_HELPERS_H
+
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
@@ -29,7 +32,6 @@
#ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT
# include <libtasn1.h>
-# include "qemu-common.h"
/*
* This contains parameter about how to generate
@@ -126,3 +128,5 @@ void test_tls_cleanup(const char *keyfile);
extern const ASN1_ARRAY_TYPE pkix_asn1_tab[];
#endif /* QCRYPTO_HAVE_TLS_TEST_SUPPORT */
+
+#endif
diff --git a/tests/e1000-test.c b/tests/e1000-test.c
index 9e67916169..c387984ef6 100644
--- a/tests/e1000-test.c
+++ b/tests/e1000-test.c
@@ -9,6 +9,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/e1000e-test.c b/tests/e1000e-test.c
index 6a946c0484..445787a7e4 100644
--- a/tests/e1000e-test.c
+++ b/tests/e1000e-test.c
@@ -25,11 +25,13 @@
#include "qemu/osdep.h"
+#include "qemu-common.h"
#include "libqtest.h"
#include "qemu-common.h"
#include "libqos/pci-pc.h"
#include "qemu/sockets.h"
#include "qemu/iov.h"
+#include "qemu/module.h"
#include "qemu/bitops.h"
#include "libqos/malloc.h"
#include "libqos/e1000e.h"
diff --git a/tests/eepro100-test.c b/tests/eepro100-test.c
index 90b5c1afd9..8dbffff0b8 100644
--- a/tests/eepro100-test.c
+++ b/tests/eepro100-test.c
@@ -9,6 +9,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/es1370-test.c b/tests/es1370-test.c
index d845cd06f8..adccdac1be 100644
--- a/tests/es1370-test.c
+++ b/tests/es1370-test.c
@@ -9,6 +9,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/io-channel-helpers.h b/tests/io-channel-helpers.h
index fedc64fd5a..bb2de6fbb9 100644
--- a/tests/io-channel-helpers.h
+++ b/tests/io-channel-helpers.h
@@ -15,13 +15,12 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
- *
*/
-#include "io/channel.h"
+#ifndef TEST_IO_CHANNEL_HELPERS_H
+#define TEST_IO_CHANNEL_HELPERS_H
-#ifndef TEST_IO_CHANNEL_HELPERS
-#define TEST_IO_CHANNEL_HELPERS
+#include "io/channel.h"
typedef struct QIOChannelTest QIOChannelTest;
@@ -39,4 +38,4 @@ void qio_channel_test_run_reader(QIOChannelTest *test,
void qio_channel_test_validate(QIOChannelTest *test);
-#endif /* TEST_IO_CHANNEL_HELPERS */
+#endif /* TEST_IO_CHANNEL_HELPERS_H */
diff --git a/tests/ipoctal232-test.c b/tests/ipoctal232-test.c
index 42d53718b8..53a8c9b13c 100644
--- a/tests/ipoctal232-test.c
+++ b/tests/ipoctal232-test.c
@@ -9,6 +9,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/qgraph.h"
typedef struct QIpoctal232 QIpoctal232;
diff --git a/tests/libqos/aarch64-xlnx-zcu102-machine.c b/tests/libqos/aarch64-xlnx-zcu102-machine.c
index 6fff040b37..1d5de5af00 100644
--- a/tests/libqos/aarch64-xlnx-zcu102-machine.c
+++ b/tests/libqos/aarch64-xlnx-zcu102-machine.c
@@ -18,6 +18,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/malloc.h"
#include "libqos/qgraph.h"
#include "sdhci.h"
diff --git a/tests/libqos/arm-raspi2-machine.c b/tests/libqos/arm-raspi2-machine.c
index 3aff670f76..12a7cb7e4b 100644
--- a/tests/libqos/arm-raspi2-machine.c
+++ b/tests/libqos/arm-raspi2-machine.c
@@ -18,6 +18,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/malloc.h"
#include "libqos/qgraph.h"
#include "sdhci.h"
diff --git a/tests/libqos/arm-sabrelite-machine.c b/tests/libqos/arm-sabrelite-machine.c
index c4128d8686..e6df43795a 100644
--- a/tests/libqos/arm-sabrelite-machine.c
+++ b/tests/libqos/arm-sabrelite-machine.c
@@ -18,6 +18,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/malloc.h"
#include "libqos/qgraph.h"
#include "sdhci.h"
diff --git a/tests/libqos/arm-smdkc210-machine.c b/tests/libqos/arm-smdkc210-machine.c
index 1fb9dfc0cb..215b628a7d 100644
--- a/tests/libqos/arm-smdkc210-machine.c
+++ b/tests/libqos/arm-smdkc210-machine.c
@@ -18,6 +18,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/malloc.h"
#include "libqos/qgraph.h"
#include "sdhci.h"
diff --git a/tests/libqos/arm-virt-machine.c b/tests/libqos/arm-virt-machine.c
index 2abc431ecf..96ffe3ee5c 100644
--- a/tests/libqos/arm-virt-machine.c
+++ b/tests/libqos/arm-virt-machine.c
@@ -18,6 +18,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/malloc.h"
#include "libqos/qgraph.h"
#include "libqos/virtio-mmio.h"
diff --git a/tests/libqos/arm-xilinx-zynq-a9-machine.c b/tests/libqos/arm-xilinx-zynq-a9-machine.c
index 4e199fcd48..5bc95f2e73 100644
--- a/tests/libqos/arm-xilinx-zynq-a9-machine.c
+++ b/tests/libqos/arm-xilinx-zynq-a9-machine.c
@@ -18,6 +18,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/malloc.h"
#include "libqos/qgraph.h"
#include "sdhci.h"
diff --git a/tests/libqos/e1000e.c b/tests/libqos/e1000e.c
index 54d3898899..1d0592974e 100644
--- a/tests/libqos/e1000e.c
+++ b/tests/libqos/e1000e.c
@@ -18,10 +18,10 @@
#include "qemu/osdep.h"
#include "libqtest.h"
-#include "qemu-common.h"
#include "libqos/pci-pc.h"
#include "qemu/sockets.h"
#include "qemu/iov.h"
+#include "qemu/module.h"
#include "qemu/bitops.h"
#include "libqos/malloc.h"
#include "libqos/qgraph.h"
diff --git a/tests/libqos/pci-pc.c b/tests/libqos/pci-pc.c
index 634fedd049..0bc591d1da 100644
--- a/tests/libqos/pci-pc.c
+++ b/tests/libqos/pci-pc.c
@@ -16,7 +16,7 @@
#include "qapi/qmp/qdict.h"
#include "hw/pci/pci_regs.h"
-#include "qemu-common.h"
+#include "qemu/module.h"
#define ACPI_PCIHP_ADDR 0xae00
#define PCI_EJ_BASE 0x0008
diff --git a/tests/libqos/pci-spapr.c b/tests/libqos/pci-spapr.c
index 58ba27ae6d..d6f8c01cb7 100644
--- a/tests/libqos/pci-spapr.c
+++ b/tests/libqos/pci-spapr.c
@@ -13,8 +13,8 @@
#include "hw/pci/pci_regs.h"
-#include "qemu-common.h"
#include "qemu/host-utils.h"
+#include "qemu/module.h"
/*
* PCI devices are always little-endian
diff --git a/tests/libqos/ppc64_pseries-machine.c b/tests/libqos/ppc64_pseries-machine.c
index 2f3640010d..867f27a3c8 100644
--- a/tests/libqos/ppc64_pseries-machine.c
+++ b/tests/libqos/ppc64_pseries-machine.c
@@ -16,10 +16,11 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>
*/
- #include "qemu/osdep.h"
+#include "qemu/osdep.h"
#include "libqtest.h"
#include "libqos/qgraph.h"
#include "pci-spapr.h"
+#include "qemu/module.h"
#include "libqos/malloc-spapr.h"
typedef struct QSPAPR_pci_host QSPAPR_pci_host;
diff --git a/tests/libqos/sdhci.c b/tests/libqos/sdhci.c
index 22c33de453..309794bc52 100644
--- a/tests/libqos/sdhci.c
+++ b/tests/libqos/sdhci.c
@@ -20,6 +20,7 @@
#include "libqtest.h"
#include "libqos/qgraph.h"
#include "pci.h"
+#include "qemu/module.h"
#include "sdhci.h"
#include "hw/pci/pci.h"
diff --git a/tests/libqos/tpci200.c b/tests/libqos/tpci200.c
index 98dc532933..ae590a456e 100644
--- a/tests/libqos/tpci200.c
+++ b/tests/libqos/tpci200.c
@@ -9,6 +9,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/libqos/virtio-9p.c b/tests/libqos/virtio-9p.c
index a378b56fa9..8c9efce3e1 100644
--- a/tests/libqos/virtio-9p.c
+++ b/tests/libqos/virtio-9p.c
@@ -18,6 +18,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "standard-headers/linux/virtio_ids.h"
#include "libqos/virtio-9p.h"
#include "libqos/qgraph.h"
diff --git a/tests/libqos/virtio-9p.h b/tests/libqos/virtio-9p.h
index dba22772b5..b54e89b3a1 100644
--- a/tests/libqos/virtio-9p.h
+++ b/tests/libqos/virtio-9p.h
@@ -16,6 +16,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>
*/
+#ifndef TESTS_LIBQOS_VIRTIO_9P_H
+#define TESTS_LIBQOS_VIRTIO_9P_H
+
#include "libqos/qgraph.h"
#include "libqos/virtio.h"
#include "libqos/virtio-pci.h"
@@ -40,3 +43,5 @@ struct QVirtio9PDevice {
QOSGraphObject obj;
QVirtio9P v9p;
};
+
+#endif
diff --git a/tests/libqos/virtio-balloon.c b/tests/libqos/virtio-balloon.c
index 7e6e9e9de5..42a4c5831e 100644
--- a/tests/libqos/virtio-balloon.c
+++ b/tests/libqos/virtio-balloon.c
@@ -18,6 +18,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/virtio-balloon.h"
diff --git a/tests/libqos/virtio-balloon.h b/tests/libqos/virtio-balloon.h
index e8066c42bb..52661cc87d 100644
--- a/tests/libqos/virtio-balloon.h
+++ b/tests/libqos/virtio-balloon.h
@@ -16,6 +16,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>
*/
+#ifndef TESTS_LIBQOS_VIRTIO_BALLOON_H
+#define TESTS_LIBQOS_VIRTIO_BALLOON_H
+
#include "libqos/qgraph.h"
#include "libqos/virtio.h"
#include "libqos/virtio-pci.h"
@@ -37,3 +40,5 @@ struct QVirtioBalloonDevice {
QOSGraphObject obj;
QVirtioBalloon balloon;
};
+
+#endif
diff --git a/tests/libqos/virtio-blk.c b/tests/libqos/virtio-blk.c
index c17bdf4217..726e93c5c1 100644
--- a/tests/libqos/virtio-blk.c
+++ b/tests/libqos/virtio-blk.c
@@ -18,6 +18,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "standard-headers/linux/virtio_blk.h"
#include "libqos/qgraph.h"
#include "libqos/virtio-blk.h"
diff --git a/tests/libqos/virtio-blk.h b/tests/libqos/virtio-blk.h
index dc258496ba..c05adc659d 100644
--- a/tests/libqos/virtio-blk.h
+++ b/tests/libqos/virtio-blk.h
@@ -16,6 +16,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>
*/
+#ifndef TESTS_LIBQOS_VIRTIO_BLK_H
+#define TESTS_LIBQOS_VIRTIO_BLK_H
+
#include "libqos/qgraph.h"
#include "libqos/virtio.h"
#include "libqos/virtio-pci.h"
@@ -38,3 +41,5 @@ struct QVirtioBlkDevice {
QOSGraphObject obj;
QVirtioBlk blk;
};
+
+#endif
diff --git a/tests/libqos/virtio-mmio.c b/tests/libqos/virtio-mmio.c
index 213a5f9de0..5f37b51129 100644
--- a/tests/libqos/virtio-mmio.c
+++ b/tests/libqos/virtio-mmio.c
@@ -9,6 +9,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/virtio.h"
#include "libqos/virtio-mmio.h"
#include "libqos/malloc.h"
diff --git a/tests/libqos/virtio-net.c b/tests/libqos/virtio-net.c
index 61c56170e9..66405b646e 100644
--- a/tests/libqos/virtio-net.c
+++ b/tests/libqos/virtio-net.c
@@ -18,6 +18,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/virtio-net.h"
#include "hw/virtio/virtio-net.h"
diff --git a/tests/libqos/virtio-net.h b/tests/libqos/virtio-net.h
index 28238a1b20..a5697d7326 100644
--- a/tests/libqos/virtio-net.h
+++ b/tests/libqos/virtio-net.h
@@ -16,6 +16,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>
*/
+#ifndef TESTS_LIBQOS_VIRTIO_NET_H
+#define TESTS_LIBQOS_VIRTIO_NET_H
+
#include "libqos/qgraph.h"
#include "libqos/virtio.h"
#include "libqos/virtio-pci.h"
@@ -39,3 +42,5 @@ struct QVirtioNetDevice {
QOSGraphObject obj;
QVirtioNet net;
};
+
+#endif
diff --git a/tests/libqos/virtio-rng.c b/tests/libqos/virtio-rng.c
index a1d2c7671c..b86349e2fd 100644
--- a/tests/libqos/virtio-rng.c
+++ b/tests/libqos/virtio-rng.c
@@ -18,6 +18,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/virtio-rng.h"
diff --git a/tests/libqos/virtio-rng.h b/tests/libqos/virtio-rng.h
index fbba988875..9e192f11f7 100644
--- a/tests/libqos/virtio-rng.h
+++ b/tests/libqos/virtio-rng.h
@@ -16,6 +16,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>
*/
+#ifndef TESTS_LIBQOS_VIRTIO_RNG_H
+#define TESTS_LIBQOS_VIRTIO_RNG_H
+
#include "libqos/qgraph.h"
#include "libqos/virtio.h"
#include "libqos/virtio-pci.h"
@@ -37,3 +40,5 @@ struct QVirtioRngDevice {
QOSGraphObject obj;
QVirtioRng rng;
};
+
+#endif
diff --git a/tests/libqos/virtio-scsi.c b/tests/libqos/virtio-scsi.c
index 482684d0bc..94842ec3fa 100644
--- a/tests/libqos/virtio-scsi.c
+++ b/tests/libqos/virtio-scsi.c
@@ -18,6 +18,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "standard-headers/linux/virtio_ids.h"
#include "libqos/qgraph.h"
#include "libqos/virtio-scsi.h"
diff --git a/tests/libqos/virtio-scsi.h b/tests/libqos/virtio-scsi.h
index 17a47beddc..4ca19a6a7a 100644
--- a/tests/libqos/virtio-scsi.h
+++ b/tests/libqos/virtio-scsi.h
@@ -16,6 +16,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>
*/
+#ifndef TESTS_LIBQOS_VIRTIO_SCSI_H
+#define TESTS_LIBQOS_VIRTIO_SCSI_H
+
#include "libqos/qgraph.h"
#include "libqos/virtio.h"
#include "libqos/virtio-pci.h"
@@ -37,3 +40,5 @@ struct QVirtioSCSIDevice {
QOSGraphObject obj;
QVirtioSCSI scsi;
};
+
+#endif
diff --git a/tests/libqos/virtio-serial.c b/tests/libqos/virtio-serial.c
index 91cedefb8d..3e5b8b82c7 100644
--- a/tests/libqos/virtio-serial.c
+++ b/tests/libqos/virtio-serial.c
@@ -18,6 +18,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/virtio-serial.h"
diff --git a/tests/libqos/virtio-serial.h b/tests/libqos/virtio-serial.h
index b7e2a5d178..080fa8428d 100644
--- a/tests/libqos/virtio-serial.h
+++ b/tests/libqos/virtio-serial.h
@@ -16,6 +16,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>
*/
+#ifndef TESTS_LIBQOS_VIRTIO_SERIAL_H
+#define TESTS_LIBQOS_VIRTIO_SERIAL_H
+
#include "libqos/qgraph.h"
#include "libqos/virtio.h"
#include "libqos/virtio-pci.h"
@@ -37,3 +40,5 @@ struct QVirtioSerialDevice {
QOSGraphObject obj;
QVirtioSerial serial;
};
+
+#endif
diff --git a/tests/libqos/x86_64_pc-machine.c b/tests/libqos/x86_64_pc-machine.c
index 8bd0360ba9..6dfa705217 100644
--- a/tests/libqos/x86_64_pc-machine.c
+++ b/tests/libqos/x86_64_pc-machine.c
@@ -20,6 +20,7 @@
#include "libqtest.h"
#include "libqos/qgraph.h"
#include "pci-pc.h"
+#include "qemu/module.h"
#include "malloc-pc.h"
typedef struct QX86PCMachine QX86PCMachine;
diff --git a/tests/libqtest.c b/tests/libqtest.c
index 9b9b5f37fc..3c5c3f49d8 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -22,6 +22,7 @@
#include "libqtest.h"
#include "qemu-common.h"
+#include "qemu/ctype.h"
#include "qemu/cutils.h"
#include "qapi/error.h"
#include "qapi/qmp/json-parser.h"
diff --git a/tests/megasas-test.c b/tests/megasas-test.c
index 1111d331d3..c3e4ab6595 100644
--- a/tests/megasas-test.c
+++ b/tests/megasas-test.c
@@ -10,6 +10,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
#include "qemu/bswap.h"
+#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/migration-test.c b/tests/migration-test.c
index e0407576cb..0cd014dbe5 100644
--- a/tests/migration-test.c
+++ b/tests/migration-test.c
@@ -15,6 +15,7 @@
#include "libqtest.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qjson.h"
+#include "qemu/module.h"
#include "qemu/option.h"
#include "qemu/range.h"
#include "qemu/sockets.h"
diff --git a/tests/migration/migration-test.h b/tests/migration/migration-test.h
index aa3c3a9625..68512c0b1b 100644
--- a/tests/migration/migration-test.h
+++ b/tests/migration/migration-test.h
@@ -32,4 +32,4 @@
*/
#define ARM_TEST_MAX_KERNEL_SIZE (512 * 1024)
-#endif /* _MIGRATION_TEST_H */
+#endif /* MIGRATION_TEST_H */
diff --git a/tests/ne2000-test.c b/tests/ne2000-test.c
index 097c2eec6c..3fc0e555d5 100644
--- a/tests/ne2000-test.c
+++ b/tests/ne2000-test.c
@@ -9,6 +9,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/nvme-test.c b/tests/nvme-test.c
index b48d3a24b9..505299324b 100644
--- a/tests/nvme-test.c
+++ b/tests/nvme-test.c
@@ -8,6 +8,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/module.h"
#include "qemu/units.h"
#include "libqtest.h"
#include "libqos/qgraph.h"
diff --git a/tests/pci-test.c b/tests/pci-test.c
index ff80985093..4b2092b949 100644
--- a/tests/pci-test.c
+++ b/tests/pci-test.c
@@ -9,6 +9,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/pcnet-test.c b/tests/pcnet-test.c
index 484448cc64..900944fa7e 100644
--- a/tests/pcnet-test.c
+++ b/tests/pcnet-test.c
@@ -9,6 +9,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/qos-test.c b/tests/qos-test.c
index 01b2a22c08..3c0071b3b7 100644
--- a/tests/qos-test.c
+++ b/tests/qos-test.c
@@ -22,6 +22,7 @@
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qbool.h"
#include "qapi/qmp/qstring.h"
+#include "qemu/module.h"
#include "qapi/qmp/qlist.h"
#include "libqos/malloc.h"
#include "libqos/qgraph.h"
diff --git a/tests/sdhci-test.c b/tests/sdhci-test.c
index 2f177e569f..6275e7626c 100644
--- a/tests/sdhci-test.c
+++ b/tests/sdhci-test.c
@@ -7,9 +7,11 @@
* See the COPYING file in the top-level directory.
* SPDX-License-Identifier: GPL-2.0-or-later
*/
+
#include "qemu/osdep.h"
#include "hw/registerfields.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/pci-pc.h"
#include "hw/pci/pci.h"
#include "libqos/qgraph.h"
diff --git a/tests/socket-helpers.h b/tests/socket-helpers.h
index 1c07d6d656..9de0e6b151 100644
--- a/tests/socket-helpers.h
+++ b/tests/socket-helpers.h
@@ -15,9 +15,11 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
- *
*/
+#ifndef TESTS_SOCKET_HELPERS_H
+#define TESTS_SOCKET_HELPERS_H
+
/*
* @hostname: a DNS name or numeric IP address
*
@@ -40,3 +42,5 @@ int socket_can_bind_connect(const char *hostname);
* Returns 0 on success, -1 on fatal error
*/
int socket_check_protocol_support(bool *has_ipv4, bool *has_ipv6);
+
+#endif
diff --git a/tests/spapr-phb-test.c b/tests/spapr-phb-test.c
index 39b5766710..093dc22f2f 100644
--- a/tests/spapr-phb-test.c
+++ b/tests/spapr-phb-test.c
@@ -10,6 +10,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/qgraph.h"
/* Tests only initialization so far. TODO: Replace with functional tests,
diff --git a/tests/test-authz-list.c b/tests/test-authz-list.c
index 24347a6ac3..d80e6a6d4d 100644
--- a/tests/test-authz-list.c
+++ b/tests/test-authz-list.c
@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include "authz/list.h"
+#include "qemu/module.h"
static void test_authz_default_deny(void)
{
diff --git a/tests/test-authz-listfile.c b/tests/test-authz-listfile.c
index 1e452fef6d..26166b691b 100644
--- a/tests/test-authz-listfile.c
+++ b/tests/test-authz-listfile.c
@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "qemu/main-loop.h"
+#include "qemu/module.h"
#include "authz/listfile.h"
static char *workdir;
diff --git a/tests/test-authz-pam.c b/tests/test-authz-pam.c
index 93d5ac8bbf..02bb1493e7 100644
--- a/tests/test-authz-pam.c
+++ b/tests/test-authz-pam.c
@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
+#include "qemu/module.h"
#include "authz/pamacct.h"
#include <security/pam_appl.h>
diff --git a/tests/test-authz-simple.c b/tests/test-authz-simple.c
index 2cf14fb87e..d21d43e2e9 100644
--- a/tests/test-authz-simple.c
+++ b/tests/test-authz-simple.c
@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
+#include "qemu/module.h"
#include "authz/simple.h"
diff --git a/tests/test-char.c b/tests/test-char.c
index 95ccfd3cdb..f9440cdcfd 100644
--- a/tests/test-char.c
+++ b/tests/test-char.c
@@ -2,6 +2,7 @@
#include <glib/gstdio.h>
#include "qemu/config-file.h"
+#include "qemu/module.h"
#include "qemu/option.h"
#include "qemu/sockets.h"
#include "chardev/char-fe.h"
diff --git a/tests/test-crypto-block.c b/tests/test-crypto-block.c
index d309d044ef..7c1ab07855 100644
--- a/tests/test-crypto-block.c
+++ b/tests/test-crypto-block.c
@@ -23,6 +23,7 @@
#include "crypto/init.h"
#include "crypto/block.h"
#include "qemu/buffer.h"
+#include "qemu/module.h"
#include "crypto/secret.h"
#ifndef _WIN32
#include <sys/resource.h>
diff --git a/tests/test-crypto-tlscredsx509.c b/tests/test-crypto-tlscredsx509.c
index 940a026c6e..a27efb7540 100644
--- a/tests/test-crypto-tlscredsx509.c
+++ b/tests/test-crypto-tlscredsx509.c
@@ -23,6 +23,7 @@
#include "crypto-tls-x509-helpers.h"
#include "crypto/tlscredsx509.h"
#include "qapi/error.h"
+#include "qemu/module.h"
#ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT
diff --git a/tests/test-crypto-tlssession.c b/tests/test-crypto-tlssession.c
index 15212ec276..6560d7134f 100644
--- a/tests/test-crypto-tlssession.c
+++ b/tests/test-crypto-tlssession.c
@@ -27,6 +27,7 @@
#include "crypto/tlssession.h"
#include "qom/object_interfaces.h"
#include "qapi/error.h"
+#include "qemu/module.h"
#include "qemu/sockets.h"
#include "authz/list.h"
diff --git a/tests/test-filter-mirror.c b/tests/test-filter-mirror.c
index d942c74a3f..1e3ced84a9 100644
--- a/tests/test-filter-mirror.c
+++ b/tests/test-filter-mirror.c
@@ -9,6 +9,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu-common.h"
#include "libqtest.h"
#include "qapi/qmp/qdict.h"
#include "qemu/iov.h"
diff --git a/tests/test-filter-redirector.c b/tests/test-filter-redirector.c
index 6dc21dd4fb..e4d53220fd 100644
--- a/tests/test-filter-redirector.c
+++ b/tests/test-filter-redirector.c
@@ -51,6 +51,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu-common.h"
#include "libqtest.h"
#include "qapi/qmp/qdict.h"
#include "qemu/iov.h"
diff --git a/tests/test-io-channel-buffer.c b/tests/test-io-channel-buffer.c
index 64722a214b..59d6c64b04 100644
--- a/tests/test-io-channel-buffer.c
+++ b/tests/test-io-channel-buffer.c
@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "io/channel-buffer.h"
+#include "qemu/module.h"
#include "io-channel-helpers.h"
diff --git a/tests/test-io-channel-command.c b/tests/test-io-channel-command.c
index 46ce1ff01c..3bc5266121 100644
--- a/tests/test-io-channel-command.c
+++ b/tests/test-io-channel-command.c
@@ -22,6 +22,7 @@
#include "io/channel-command.h"
#include "io-channel-helpers.h"
#include "qapi/error.h"
+#include "qemu/module.h"
#ifndef WIN32
static void test_io_channel_command_fifo(bool async)
diff --git a/tests/test-io-channel-file.c b/tests/test-io-channel-file.c
index 2e94f638f2..bac2b07562 100644
--- a/tests/test-io-channel-file.c
+++ b/tests/test-io-channel-file.c
@@ -23,6 +23,7 @@
#include "io/channel-util.h"
#include "io-channel-helpers.h"
#include "qapi/error.h"
+#include "qemu/module.h"
#define TEST_FILE "tests/test-io-channel-file.txt"
#define TEST_MASK 0600
diff --git a/tests/test-io-channel-socket.c b/tests/test-io-channel-socket.c
index c253ae30f5..d2053c464c 100644
--- a/tests/test-io-channel-socket.c
+++ b/tests/test-io-channel-socket.c
@@ -24,6 +24,7 @@
#include "io-channel-helpers.h"
#include "socket-helpers.h"
#include "qapi/error.h"
+#include "qemu/module.h"
static void test_io_channel_set_socket_bufs(QIOChannel *src,
diff --git a/tests/test-io-channel-tls.c b/tests/test-io-channel-tls.c
index 43b707eba7..3c9ef6f941 100644
--- a/tests/test-io-channel-tls.c
+++ b/tests/test-io-channel-tls.c
@@ -30,6 +30,7 @@
#include "crypto/init.h"
#include "crypto/tlscredsx509.h"
#include "qapi/error.h"
+#include "qemu/module.h"
#include "authz/list.h"
#include "qom/object_interfaces.h"
diff --git a/tests/test-io-task.c b/tests/test-io-task.c
index bac1bb4e7a..aa8b653bfa 100644
--- a/tests/test-io-task.c
+++ b/tests/test-io-task.c
@@ -22,6 +22,7 @@
#include "io/task.h"
#include "qapi/error.h"
+#include "qemu/module.h"
#define TYPE_DUMMY "qemu:dummy"
diff --git a/tests/test-qmp-cmds.c b/tests/test-qmp-cmds.c
index 630b1b9bac..f0b95dcbc3 100644
--- a/tests/test-qmp-cmds.c
+++ b/tests/test-qmp-cmds.c
@@ -1,10 +1,8 @@
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qnum.h"
#include "qapi/qmp/qstring.h"
#include "qapi/error.h"
-#include "qemu/module.h"
#include "qapi/qobject-input-visitor.h"
#include "tests/test-qapi-types.h"
#include "tests/test-qapi-visit.h"
diff --git a/tests/test-throttle.c b/tests/test-throttle.c
index 5644cf95ca..a28812260e 100644
--- a/tests/test-throttle.c
+++ b/tests/test-throttle.c
@@ -18,6 +18,7 @@
#include "qapi/error.h"
#include "qemu/throttle.h"
#include "qemu/error-report.h"
+#include "qemu/module.h"
#include "block/throttle-groups.h"
#include "sysemu/block-backend.h"
diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c
index fc8ce62471..e80c4c6143 100644
--- a/tests/test-vmstate.c
+++ b/tests/test-vmstate.c
@@ -24,7 +24,6 @@
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "../migration/migration.h"
#include "migration/vmstate.h"
#include "migration/qemu-file-types.h"
@@ -32,6 +31,7 @@
#include "../migration/qemu-file-channel.h"
#include "../migration/savevm.h"
#include "qemu/coroutine.h"
+#include "qemu/module.h"
#include "io/channel-file.h"
static char temp_file[] = "/tmp/vmst.test.XXXXXX";
diff --git a/tests/tpm-crb-swtpm-test.c b/tests/tpm-crb-swtpm-test.c
index 8c0a55f3ca..2c4fb8ae29 100644
--- a/tests/tpm-crb-swtpm-test.c
+++ b/tests/tpm-crb-swtpm-test.c
@@ -16,6 +16,7 @@
#include <glib/gstdio.h>
#include "libqtest.h"
+#include "qemu/module.h"
#include "tpm-tests.h"
typedef struct TestState {
diff --git a/tests/tpm-crb-test.c b/tests/tpm-crb-test.c
index 6fde579bab..a139caa51d 100644
--- a/tests/tpm-crb-test.c
+++ b/tests/tpm-crb-test.c
@@ -16,6 +16,7 @@
#include "hw/acpi/tpm.h"
#include "io/channel-socket.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "tpm-emu.h"
#define TPM_CMD "\x80\x01\x00\x00\x00\x0c\x00\x00\x01\x44\x00\x00"
diff --git a/tests/tpm-tis-swtpm-test.c b/tests/tpm-tis-swtpm-test.c
index 7dcd1d3912..9f58a3a92b 100644
--- a/tests/tpm-tis-swtpm-test.c
+++ b/tests/tpm-tis-swtpm-test.c
@@ -16,6 +16,7 @@
#include <glib/gstdio.h>
#include "libqtest.h"
+#include "qemu/module.h"
#include "tpm-tests.h"
typedef struct TestState {
diff --git a/tests/tpm-tis-test.c b/tests/tpm-tis-test.c
index c8ec14888f..92a7e95aad 100644
--- a/tests/tpm-tis-test.c
+++ b/tests/tpm-tis-test.c
@@ -18,6 +18,7 @@
#include "hw/acpi/tpm.h"
#include "io/channel-socket.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "tpm-emu.h"
#define TIS_REG(LOCTY, REG) \
diff --git a/tests/uefi-test-tools/UefiTestToolsPkg/Include/Guid/BiosTablesTest.h b/tests/uefi-test-tools/UefiTestToolsPkg/Include/Guid/BiosTablesTest.h
index 7a74c121d5..07808787cc 100644
--- a/tests/uefi-test-tools/UefiTestToolsPkg/Include/Guid/BiosTablesTest.h
+++ b/tests/uefi-test-tools/UefiTestToolsPkg/Include/Guid/BiosTablesTest.h
@@ -21,8 +21,8 @@
WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
-#ifndef __BIOS_TABLES_TEST_H__
-#define __BIOS_TABLES_TEST_H__
+#ifndef BIOSTABLESTEST_H
+#define BIOSTABLESTEST_H
#include <Uefi/UefiBaseType.h>
@@ -77,4 +77,4 @@ typedef struct {
} BIOS_TABLES_TEST;
#pragma pack ()
-#endif // __BIOS_TABLES_TEST_H__
+#endif /* BIOSTABLESTEST_H */
diff --git a/tests/usb-hcd-ohci-test.c b/tests/usb-hcd-ohci-test.c
index 98af02e898..c12b892085 100644
--- a/tests/usb-hcd-ohci-test.c
+++ b/tests/usb-hcd-ohci-test.c
@@ -9,6 +9,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/usb.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c
index 5b771de7a3..0bb03af0e5 100644
--- a/tests/vhost-user-bridge.c
+++ b/tests/vhost-user-bridge.c
@@ -30,8 +30,8 @@
#define _FILE_OFFSET_BITS 64
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "qemu/atomic.h"
+#include "qemu/ctype.h"
#include "qemu/iov.h"
#include "standard-headers/linux/virtio_net.h"
#include "contrib/libvhost-user/libvhost-user.h"
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index 3817966010..6ae8a23688 100644
--- a/tests/vhost-user-test.c
+++ b/tests/vhost-user-test.c
@@ -19,6 +19,7 @@
#include "qemu/sockets.h"
#include "chardev/char-fe.h"
#include "qemu/memfd.h"
+#include "qemu/module.h"
#include "sysemu/sysemu.h"
#include "libqos/libqos.h"
#include "libqos/pci-pc.h"
diff --git a/tests/virtio-9p-test.c b/tests/virtio-9p-test.c
index 16107ad280..ac49bca991 100644
--- a/tests/virtio-9p-test.c
+++ b/tests/virtio-9p-test.c
@@ -9,6 +9,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "hw/9pfs/9p.h"
#include "hw/9pfs/9p-synth.h"
#include "libqos/virtio-9p.h"
diff --git a/tests/virtio-blk-test.c b/tests/virtio-blk-test.c
index fe1168a90a..1b02714bc7 100644
--- a/tests/virtio-blk-test.c
+++ b/tests/virtio-blk-test.c
@@ -11,6 +11,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
#include "qemu/bswap.h"
+#include "qemu/module.h"
#include "standard-headers/linux/virtio_blk.h"
#include "standard-headers/linux/virtio_pci.h"
#include "libqos/qgraph.h"
diff --git a/tests/virtio-net-test.c b/tests/virtio-net-test.c
index 163126cf07..663cf7ea7e 100644
--- a/tests/virtio-net-test.c
+++ b/tests/virtio-net-test.c
@@ -8,8 +8,10 @@
*/
#include "qemu/osdep.h"
+#include "qemu-common.h"
#include "libqtest.h"
#include "qemu/iov.h"
+#include "qemu/module.h"
#include "qapi/qmp/qdict.h"
#include "hw/virtio/virtio-net.h"
#include "libqos/qgraph.h"
diff --git a/tests/virtio-rng-test.c b/tests/virtio-rng-test.c
index fcb22481bd..a38a0d175b 100644
--- a/tests/virtio-rng-test.c
+++ b/tests/virtio-rng-test.c
@@ -9,6 +9,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/virtio-rng.h"
diff --git a/tests/virtio-scsi-test.c b/tests/virtio-scsi-test.c
index 1e535cb178..1ad9f75d74 100644
--- a/tests/virtio-scsi-test.c
+++ b/tests/virtio-scsi-test.c
@@ -10,6 +10,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "scsi/constants.h"
#include "libqos/libqos-pc.h"
#include "libqos/libqos-spapr.h"
diff --git a/tests/virtio-serial-test.c b/tests/virtio-serial-test.c
index 85f35e09b7..066ca61280 100644
--- a/tests/virtio-serial-test.c
+++ b/tests/virtio-serial-test.c
@@ -9,6 +9,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/virtio-serial.h"
/* Tests only initialization so far. TODO: Replace with functional tests */
diff --git a/tests/virtio-test.c b/tests/virtio-test.c
index 804e5371dc..f7c6afdcf1 100644
--- a/tests/virtio-test.c
+++ b/tests/virtio-test.c
@@ -9,6 +9,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/vmxnet3-test.c b/tests/vmxnet3-test.c
index 35cdea939b..a81025252c 100644
--- a/tests/vmxnet3-test.c
+++ b/tests/vmxnet3-test.c
@@ -9,6 +9,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
+#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"