diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 16e4fe3ccd87e6e8c66d2e45441742b428392577..4db74fc71fd9286915ceed6ad120a70b4c8f6255 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -28,7 +28,6 @@
 #include "tcg/tcg.h"
 #include "qemu/atomic.h"
 #include "qemu/compiler.h"
-#include "sysemu/qtest.h"
 #include "qemu/timer.h"
 #include "qemu/rcu.h"
 #include "exec/tb-hash.h"
diff --git a/blockdev.c b/blockdev.c
index cd438e60e35a0887abc9f6509609811c87284cef..7463dd5b09fc7644dc9be75397ed1250ceb056a4 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -57,7 +57,6 @@
 #include "block/block_int.h"
 #include "block/trace.h"
 #include "sysemu/arch_init.h"
-#include "sysemu/qtest.h"
 #include "sysemu/runstate.h"
 #include "sysemu/replay.h"
 #include "qemu/cutils.h"
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 5a6e2c9d3d7f4c5385844eed743458b60bf9feff..134806db529afc9b0fa0b9e4adb27c63143d02a2 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -25,7 +25,6 @@
 #include "coth.h"
 #include "trace.h"
 #include "migration/blocker.h"
-#include "sysemu/qtest.h"
 #include "qemu/xxhash.h"
 #include <math.h>
 #include <linux/limits.h>
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
index 8224d4ade9f932e1725fb85bcf8a71e0bab8de5a..6dd10d847031d088f89349606d1e138ad648e9bc 100644
--- a/hw/arm/armv7m.c
+++ b/hw/arm/armv7m.c
@@ -16,7 +16,6 @@
 #include "hw/loader.h"
 #include "hw/qdev-properties.h"
 #include "elf.h"
-#include "sysemu/qtest.h"
 #include "sysemu/reset.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c
index 6bc643651bc59038f1e7295a05f959a014798562..8454b6545853abc263e586465b87af87f19a7b18 100644
--- a/hw/arm/mainstone.c
+++ b/hw/arm/mainstone.c
@@ -22,7 +22,6 @@
 #include "hw/block/flash.h"
 #include "hw/sysbus.h"
 #include "exec/address-spaces.h"
-#include "sysemu/qtest.h"
 #include "cpu.h"
 
 /* Device addresses */
diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c
index c9713638c5b2907ead482228df4da357b543bd20..a9db25eb99f09ceb7f447001454a6fa3842e323c 100644
--- a/hw/arm/xlnx-zcu102.c
+++ b/hw/arm/xlnx-zcu102.c
@@ -22,7 +22,6 @@
 #include "hw/boards.h"
 #include "qemu/error-report.h"
 #include "qemu/log.h"
-#include "sysemu/qtest.h"
 #include "sysemu/device_tree.h"
 #include "qom/object.h"
 #include "net/can_emu.h"
diff --git a/hw/arm/z2.c b/hw/arm/z2.c
index 308c4da95662cc07e9c25bca34d9219767f48807..5099bd83802e7655594b5809fff59bda30a8fe97 100644
--- a/hw/arm/z2.c
+++ b/hw/arm/z2.c
@@ -24,7 +24,6 @@
 #include "hw/audio/wm8750.h"
 #include "audio/audio.h"
 #include "exec/address-spaces.h"
-#include "sysemu/qtest.h"
 #include "cpu.h"
 #include "qom/object.h"
 
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 8aa85dec54ed27ce7d0a09496096825e176a802a..410db9ef968e4b91e13784bdbed5fc38ba8a9300 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -58,7 +58,6 @@
 #include "sysemu/numa.h"
 #include "sysemu/kvm.h"
 #include "sysemu/xen.h"
-#include "sysemu/qtest.h"
 #include "sysemu/reset.h"
 #include "sysemu/runstate.h"
 #include "kvm/kvm_i386.h"
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 603e992a7ff3d4c0d60c7a5761ecd0e74127e3a2..a1fa4878bef90f16e3bb6268097380e986d59e6e 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -35,7 +35,6 @@
 #include "qom/object_interfaces.h"
 #include "chardev/char-fe.h"
 #include "sysemu/hostmem.h"
-#include "sysemu/qtest.h"
 #include "qapi/visitor.h"
 
 #include "hw/misc/ivshmem.h"
diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c
index b156bcb999087e52b713bb2b5f77d6211534628e..b7539aa7210bcb267a1295dfe01e9d52a3b532bd 100644
--- a/hw/ppc/ppc440_bamboo.c
+++ b/hw/ppc/ppc440_bamboo.c
@@ -30,7 +30,6 @@
 #include "hw/ppc/ppc.h"
 #include "ppc405.h"
 #include "sysemu/sysemu.h"
-#include "sysemu/qtest.h"
 #include "sysemu/reset.h"
 #include "hw/sysbus.h"
 #include "hw/intc/ppc-uic.h"
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index 7e72f6e4a9be1f462221f2f28ebabb3262818fde..f1b1efdcef9f11a9207c51fd6f43113773ad33ac 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -45,7 +45,6 @@
 #include "hw/qdev-properties.h"
 #include "sysemu/arch_init.h"
 #include "sysemu/kvm.h"
-#include "sysemu/qtest.h"
 #include "sysemu/reset.h"
 #include "exec/address-spaces.h"
 #include "trace.h"
diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
index e459b43065bbdc1d92479de05660f575bf4a671e..0c6baf77e8c36b3d1fb17c1b85b932d8bf660994 100644
--- a/hw/ppc/sam460ex.c
+++ b/hw/ppc/sam460ex.c
@@ -30,7 +30,6 @@
 #include "ppc405.h"
 #include "hw/block/flash.h"
 #include "sysemu/sysemu.h"
-#include "sysemu/qtest.h"
 #include "sysemu/reset.h"
 #include "hw/sysbus.h"
 #include "hw/char/serial.h"
diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c
index 9341e9782a3ff1fb1027dc96677d354b767242b5..9ea7ddd1e9a419812ff2d9b76b57761ad79ade69 100644
--- a/hw/ppc/spapr_caps.c
+++ b/hw/ppc/spapr_caps.c
@@ -33,7 +33,6 @@
 #include "cpu-models.h"
 #include "kvm_ppc.h"
 #include "migration/vmstate.h"
-#include "sysemu/qtest.h"
 #include "sysemu/tcg.h"
 
 #include "hw/ppc/spapr.h"
diff --git a/hw/ppc/spapr_pci_vfio.c b/hw/ppc/spapr_pci_vfio.c
index ecb34aaade173ff5629127b3493953f332dd7fd3..e0547b174085b263fb1b44f170d6a403600bb5f3 100644
--- a/hw/ppc/spapr_pci_vfio.c
+++ b/hw/ppc/spapr_pci_vfio.c
@@ -25,7 +25,6 @@
 #include "hw/pci/msix.h"
 #include "hw/vfio/vfio.h"
 #include "qemu/error-report.h"
-#include "sysemu/qtest.h"
 
 bool spapr_phb_eeh_available(SpaprPhbState *sphb)
 {
diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
index 3cc942152642f0a7e231ae614874b8fa810ed12e..ef06e0362c8ffe54c0e17907bac13e2619ccc3b9 100644
--- a/hw/ppc/spapr_vio.c
+++ b/hw/ppc/spapr_vio.c
@@ -31,7 +31,6 @@
 #include "sysemu/device_tree.h"
 #include "kvm_ppc.h"
 #include "migration/vmstate.h"
-#include "sysemu/qtest.h"
 
 #include "hw/ppc/spapr.h"
 #include "hw/ppc/spapr_vio.h"
diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
index b26ff177676a7401eea2c9fc37975dea98b2c42e..cb421570dab3aa8af96ae76c49250d4296233cfb 100644
--- a/hw/ppc/virtex_ml507.c
+++ b/hw/ppc/virtex_ml507.c
@@ -31,7 +31,6 @@
 #include "hw/char/serial.h"
 #include "hw/block/flash.h"
 #include "sysemu/sysemu.h"
-#include "sysemu/qtest.h"
 #include "sysemu/reset.h"
 #include "hw/boards.h"
 #include "sysemu/device_tree.h"
diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c
index ed4ca9808e1121dfe02fa345756e81c07280454d..ec7cb2f707481cafc01a2e8e88f07308c4801a99 100644
--- a/hw/riscv/spike.c
+++ b/hw/riscv/spike.c
@@ -40,7 +40,6 @@
 #include "chardev/char.h"
 #include "sysemu/arch_init.h"
 #include "sysemu/device_tree.h"
-#include "sysemu/qtest.h"
 #include "sysemu/sysemu.h"
 
 static const MemMapEntry spike_memmap[] = {
diff --git a/hw/rx/rx62n.c b/hw/rx/rx62n.c
index 17ec73fc7bbc82d330f75cb9d2d9476cc0edced5..9c34ce14de640d3a7fe75a5f9c006373f2711cdf 100644
--- a/hw/rx/rx62n.c
+++ b/hw/rx/rx62n.c
@@ -29,7 +29,6 @@
 #include "hw/sysbus.h"
 #include "hw/qdev-properties.h"
 #include "sysemu/sysemu.h"
-#include "sysemu/qtest.h"
 #include "cpu.h"
 #include "qom/object.h"
 
diff --git a/net/net.c b/net/net.c
index fb7b7dcc252857dab113559ef9d303dd33001ca7..6002ba50db813d35d8efc9db8076ef7cd42fe35b 100644
--- a/net/net.c
+++ b/net/net.c
@@ -50,7 +50,6 @@
 #include "qapi/error.h"
 #include "qapi/opts-visitor.h"
 #include "sysemu/sysemu.h"
-#include "sysemu/qtest.h"
 #include "sysemu/runstate.h"
 #include "sysemu/sysemu.h"
 #include "net/filter.h"
diff --git a/softmmu/cpu-timers.c b/softmmu/cpu-timers.c
index 1eb7c675c18bda7773d4a9c549f0157c6e978a83..cd38595245ed515f621d5c727b3fec4e45ad0eb6 100644
--- a/softmmu/cpu-timers.c
+++ b/softmmu/cpu-timers.c
@@ -30,7 +30,6 @@
 #include "qemu/error-report.h"
 #include "exec/exec-all.h"
 #include "sysemu/cpus.h"
-#include "sysemu/qtest.h"
 #include "qemu/main-loop.h"
 #include "qemu/option.h"
 #include "qemu/seqlock.h"
diff --git a/target/ppc/translate_init.c.inc b/target/ppc/translate_init.c.inc
index e7324e85cdbb3342ff60afc71aaf2e8184c5a578..108ff2be2bba142b11da8c62136392eb90c89373 100644
--- a/target/ppc/translate_init.c.inc
+++ b/target/ppc/translate_init.c.inc
@@ -37,7 +37,6 @@
 #include "hw/qdev-properties.h"
 #include "hw/ppc/ppc.h"
 #include "mmu-book3s-v3.h"
-#include "sysemu/qtest.h"
 #include "qemu/cutils.h"
 #include "disas/capstone.h"
 #include "fpu/softfloat.h"
diff --git a/util/main-loop.c b/util/main-loop.c
index 6bfc7c46f58e650f8f05fde24bbc154b0f4d3250..5188ff65407b3caba5216eb576c322a898b8b4d1 100644
--- a/util/main-loop.c
+++ b/util/main-loop.c
@@ -26,7 +26,6 @@
 #include "qapi/error.h"
 #include "qemu/cutils.h"
 #include "qemu/timer.h"
-#include "sysemu/qtest.h"
 #include "sysemu/cpu-timers.h"
 #include "sysemu/replay.h"
 #include "qemu/main-loop.h"
diff --git a/util/qemu-timer.c b/util/qemu-timer.c
index 81c28af517e2a0aa399d854eb97d9f411138b5f4..f36c75e594a6f23a7b982567f81180605d17f73d 100644
--- a/util/qemu-timer.c
+++ b/util/qemu-timer.c
@@ -29,7 +29,6 @@
 #include "sysemu/cpu-timers.h"
 #include "sysemu/replay.h"
 #include "sysemu/cpus.h"
-#include "sysemu/qtest.h"
 
 #ifdef CONFIG_POSIX
 #include <pthread.h>