1 # All QTests for now are POSIX-only, but the dependencies are
2 # really in libqtest, not in the testcases themselves.
4 check-qtest-generic-y += cdrom-test
5 check-qtest-generic-y += device-introspect-test
6 check-qtest-generic-y += machine-none-test
7 check-qtest-generic-y += qmp-test
8 check-qtest-generic-y += qmp-cmd-test
9 check-qtest-generic-y += qom-test
10 check-qtest-generic-$(CONFIG_MODULES) += modules-test
11 check-qtest-generic-y += test-hmp
13 check-qtest-pci-$(CONFIG_RTL8139_PCI) += rtl8139-test
14 check-qtest-pci-$(CONFIG_VGA) += display-vga-test
15 check-qtest-pci-$(CONFIG_HDA) += intel-hda-test
16 check-qtest-pci-$(CONFIG_IVSHMEM_DEVICE) += ivshmem-test
18 DBUS_DAEMON := $(shell which dbus-daemon 2>/dev/null)
19 ifneq ($(GDBUS_CODEGEN),)
20 ifneq ($(DBUS_DAEMON),)
21 # Temporarily disabled due to Patchew failures:
22 #check-qtest-pci-$(CONFIG_GIO) += dbus-vmstate-test
26 check-qtest-i386-$(CONFIG_ISA_TESTDEV) = endianness-test
27 check-qtest-i386-y += fdc-test
28 check-qtest-i386-y += ide-test
29 check-qtest-i386-$(CONFIG_TOOLS) += ahci-test
30 check-qtest-i386-y += hd-geo-test
31 check-qtest-i386-y += boot-order-test
32 check-qtest-i386-y += bios-tables-test
33 check-qtest-i386-$(CONFIG_SGA) += boot-serial-test
34 check-qtest-i386-$(CONFIG_SLIRP) += pxe-test
35 check-qtest-i386-y += rtc-test
36 check-qtest-i386-$(CONFIG_ISA_IPMI_KCS) += ipmi-kcs-test
38 check-qtest-i386-$(CONFIG_ISA_IPMI_BT) += ipmi-bt-test
40 check-qtest-i386-y += i440fx-test
41 check-qtest-i386-y += fw_cfg-test
42 check-qtest-i386-y += device-plug-test
43 check-qtest-i386-y += drive_del-test
44 check-qtest-i386-$(CONFIG_WDT_IB700) += wdt_ib700-test
45 check-qtest-i386-y += tco-test
46 check-qtest-i386-y += $(check-qtest-pci-y)
47 check-qtest-i386-$(CONFIG_PVPANIC) += pvpanic-test
48 check-qtest-i386-$(CONFIG_I82801B11) += i82801b11-test
49 check-qtest-i386-$(CONFIG_IOH3420) += ioh3420-test
50 check-qtest-i386-$(CONFIG_USB_UHCI) += usb-hcd-uhci-test
51 check-qtest-i386-$(call land,$(CONFIG_USB_EHCI),$(CONFIG_USB_UHCI)) += usb-hcd-ehci-test
52 check-qtest-i386-$(CONFIG_USB_XHCI_NEC) += usb-hcd-xhci-test
53 check-qtest-i386-y += cpu-plug-test
54 check-qtest-i386-y += q35-test
55 check-qtest-i386-y += vmgenid-test
56 check-qtest-i386-$(CONFIG_TPM_CRB) += tpm-crb-swtpm-test
57 check-qtest-i386-$(CONFIG_TPM_CRB) += tpm-crb-test
58 check-qtest-i386-$(CONFIG_TPM_TIS_ISA) += tpm-tis-swtpm-test
59 check-qtest-i386-$(CONFIG_TPM_TIS_ISA) += tpm-tis-test
60 check-qtest-i386-$(CONFIG_SLIRP) += test-netfilter
61 check-qtest-i386-$(CONFIG_POSIX) += test-filter-mirror
62 check-qtest-i386-$(CONFIG_RTL8139_PCI) += test-filter-redirector
63 check-qtest-i386-y += migration-test
64 check-qtest-i386-y += test-x86-cpuid-compat
65 check-qtest-i386-y += numa-test
67 check-qtest-x86_64-y += $(check-qtest-i386-y)
69 check-qtest-avr-y += boot-serial-test
71 check-qtest-alpha-y += boot-serial-test
72 check-qtest-alpha-$(CONFIG_VGA) += display-vga-test
74 check-qtest-hppa-y += boot-serial-test
75 check-qtest-hppa-$(CONFIG_VGA) += display-vga-test
77 check-qtest-m68k-y = boot-serial-test
79 check-qtest-microblaze-y += boot-serial-test
81 check-qtest-mips-$(CONFIG_ISA_TESTDEV) = endianness-test
82 check-qtest-mips-$(CONFIG_VGA) += display-vga-test
84 check-qtest-mips64-$(CONFIG_ISA_TESTDEV) = endianness-test
85 check-qtest-mips64-$(CONFIG_VGA) += display-vga-test
87 check-qtest-mips64el-$(CONFIG_ISA_TESTDEV) = endianness-test
88 check-qtest-mips64el-$(CONFIG_VGA) += display-vga-test
90 check-qtest-moxie-y += boot-serial-test
92 check-qtest-ppc-$(CONFIG_ISA_TESTDEV) = endianness-test
93 check-qtest-ppc-y += boot-order-test
94 check-qtest-ppc-y += prom-env-test
95 check-qtest-ppc-y += drive_del-test
96 check-qtest-ppc-y += boot-serial-test
97 check-qtest-ppc-$(CONFIG_M48T59) += m48t59-test
99 check-qtest-ppc64-y += $(check-qtest-ppc-y)
100 check-qtest-ppc64-$(CONFIG_PSERIES) += device-plug-test
101 check-qtest-ppc64-$(CONFIG_POWERNV) += pnv-xscom-test
102 check-qtest-ppc64-y += migration-test
103 check-qtest-ppc64-$(CONFIG_PSERIES) += rtas-test
104 check-qtest-ppc64-$(CONFIG_SLIRP) += pxe-test
105 check-qtest-ppc64-$(CONFIG_USB_UHCI) += usb-hcd-uhci-test
106 check-qtest-ppc64-$(CONFIG_USB_XHCI_NEC) += usb-hcd-xhci-test
107 check-qtest-ppc64-$(CONFIG_SLIRP) += test-netfilter
108 check-qtest-ppc64-$(CONFIG_POSIX) += test-filter-mirror
109 check-qtest-ppc64-$(CONFIG_RTL8139_PCI) += test-filter-redirector
110 check-qtest-ppc64-$(CONFIG_VGA) += display-vga-test
111 check-qtest-ppc64-y += numa-test
112 check-qtest-ppc64-$(CONFIG_IVSHMEM_DEVICE) += ivshmem-test
113 check-qtest-ppc64-y += cpu-plug-test
115 check-qtest-sh4-$(CONFIG_ISA_TESTDEV) = endianness-test
117 check-qtest-sh4eb-$(CONFIG_ISA_TESTDEV) = endianness-test
119 check-qtest-sparc-y += prom-env-test
120 check-qtest-sparc-y += m48t59-test
121 check-qtest-sparc-y += boot-serial-test
123 check-qtest-sparc64-$(CONFIG_ISA_TESTDEV) = endianness-test
124 check-qtest-sparc64-y += prom-env-test
125 check-qtest-sparc64-y += boot-serial-test
127 check-qtest-arm-y += arm-cpu-features
128 check-qtest-arm-y += microbit-test
129 check-qtest-arm-y += m25p80-test
130 check-qtest-arm-y += test-arm-mptimer
131 check-qtest-arm-y += boot-serial-test
132 check-qtest-arm-y += hexloader-test
133 check-qtest-arm-$(CONFIG_PFLASH_CFI02) += pflash-cfi02-test
135 check-qtest-aarch64-y += arm-cpu-features
136 check-qtest-aarch64-$(CONFIG_TPM_TIS_SYSBUS) += tpm-tis-device-test
137 check-qtest-aarch64-$(CONFIG_TPM_TIS_SYSBUS) += tpm-tis-device-swtpm-test
138 check-qtest-aarch64-y += numa-test
139 check-qtest-aarch64-y += boot-serial-test
140 check-qtest-aarch64-y += migration-test
142 # TODO: once aarch64 TCG is fixed on ARM 32 bit host, make test unconditional
144 check-qtest-aarch64-y += bios-tables-test
147 check-qtest-microblazeel-y += $(check-qtest-microblaze-y)
149 check-qtest-xtensaeb-y += $(check-qtest-xtensa-y)
151 check-qtest-s390x-y = boot-serial-test
152 check-qtest-s390x-$(CONFIG_SLIRP) += pxe-test
153 check-qtest-s390x-$(CONFIG_SLIRP) += test-netfilter
154 check-qtest-s390x-$(CONFIG_POSIX) += test-filter-mirror
155 check-qtest-s390x-$(CONFIG_POSIX) += test-filter-redirector
156 check-qtest-s390x-y += drive_del-test
157 check-qtest-s390x-y += device-plug-test
158 check-qtest-s390x-y += virtio-ccw-test
159 check-qtest-s390x-y += cpu-plug-test
160 check-qtest-s390x-y += migration-test
163 libqgraph-obj-y = tests/qtest/libqos/qgraph.o
165 libqos-core-obj-y = $(libqgraph-obj-y) tests/qtest/libqos/pci.o tests/qtest/libqos/fw_cfg.o
166 libqos-core-obj-y += tests/qtest/libqos/malloc.o
167 libqos-core-obj-y += tests/qtest/libqos/libqos.o
168 libqos-spapr-obj-y = $(libqos-core-obj-y) tests/qtest/libqos/malloc-spapr.o
169 libqos-spapr-obj-y += tests/qtest/libqos/libqos-spapr.o
170 libqos-spapr-obj-y += tests/qtest/libqos/rtas.o
171 libqos-spapr-obj-y += tests/qtest/libqos/pci-spapr.o
172 libqos-pc-obj-y = $(libqos-core-obj-y) tests/qtest/libqos/pci-pc.o
173 libqos-pc-obj-y += tests/qtest/libqos/malloc-pc.o tests/qtest/libqos/libqos-pc.o
174 libqos-pc-obj-y += tests/qtest/libqos/ahci.o
175 libqos-usb-obj-y = $(libqos-spapr-obj-y) $(libqos-pc-obj-y) tests/qtest/libqos/usb.o
178 libqos-obj-y = $(libqgraph-obj-y)
179 libqos-obj-y += $(libqos-pc-obj-y) $(libqos-spapr-obj-y)
180 libqos-obj-y += tests/qtest/libqos/qos_external.o
181 libqos-obj-y += tests/qtest/libqos/e1000e.o
182 libqos-obj-y += tests/qtest/libqos/i2c.o
183 libqos-obj-y += tests/qtest/libqos/i2c-imx.o
184 libqos-obj-y += tests/qtest/libqos/i2c-omap.o
185 libqos-obj-y += tests/qtest/libqos/sdhci.o
186 libqos-obj-y += tests/qtest/libqos/tpci200.o
187 libqos-obj-y += tests/qtest/libqos/virtio.o
188 libqos-obj-$(CONFIG_VIRTFS) += tests/qtest/libqos/virtio-9p.o
189 libqos-obj-y += tests/qtest/libqos/virtio-balloon.o
190 libqos-obj-y += tests/qtest/libqos/virtio-blk.o
191 libqos-obj-y += tests/qtest/libqos/virtio-mmio.o
192 libqos-obj-y += tests/qtest/libqos/virtio-net.o
193 libqos-obj-y += tests/qtest/libqos/virtio-pci.o
194 libqos-obj-y += tests/qtest/libqos/virtio-pci-modern.o
195 libqos-obj-y += tests/qtest/libqos/virtio-rng.o
196 libqos-obj-y += tests/qtest/libqos/virtio-scsi.o
197 libqos-obj-y += tests/qtest/libqos/virtio-serial.o
200 libqos-obj-y += tests/qtest/libqos/aarch64-xlnx-zcu102-machine.o
201 libqos-obj-y += tests/qtest/libqos/arm-imx25-pdk-machine.o
202 libqos-obj-y += tests/qtest/libqos/arm-n800-machine.o
203 libqos-obj-y += tests/qtest/libqos/arm-raspi2-machine.o
204 libqos-obj-y += tests/qtest/libqos/arm-sabrelite-machine.o
205 libqos-obj-y += tests/qtest/libqos/arm-smdkc210-machine.o
206 libqos-obj-y += tests/qtest/libqos/arm-virt-machine.o
207 libqos-obj-y += tests/qtest/libqos/arm-xilinx-zynq-a9-machine.o
208 libqos-obj-y += tests/qtest/libqos/ppc64_pseries-machine.o
209 libqos-obj-y += tests/qtest/libqos/x86_64_pc-machine.o
212 qos-test-obj-y += tests/qtest/qos-test.o
213 qos-test-obj-y += tests/qtest/ac97-test.o
214 qos-test-obj-y += tests/qtest/ds1338-test.o
215 qos-test-obj-y += tests/qtest/e1000-test.o
216 qos-test-obj-y += tests/qtest/e1000e-test.o
217 qos-test-obj-y += tests/qtest/eepro100-test.o
218 qos-test-obj-y += tests/qtest/es1370-test.o
219 qos-test-obj-y += tests/qtest/ipoctal232-test.o
220 qos-test-obj-y += tests/qtest/megasas-test.o
221 qos-test-obj-y += tests/qtest/ne2000-test.o
222 qos-test-obj-y += tests/qtest/tulip-test.o
223 qos-test-obj-y += tests/qtest/nvme-test.o
224 qos-test-obj-y += tests/qtest/pca9552-test.o
225 qos-test-obj-y += tests/qtest/pci-test.o
226 qos-test-obj-y += tests/qtest/pcnet-test.o
227 qos-test-obj-y += tests/qtest/sdhci-test.o
228 qos-test-obj-y += tests/qtest/spapr-phb-test.o
229 qos-test-obj-y += tests/qtest/tmp105-test.o
230 qos-test-obj-y += tests/qtest/usb-hcd-ohci-test.o $(libqos-usb-obj-y)
231 qos-test-obj-$(CONFIG_VHOST_NET_USER) += tests/qtest/vhost-user-test.o $(chardev-obj-y) $(test-io-obj-y)
232 qos-test-obj-y += tests/qtest/virtio-test.o
233 qos-test-obj-$(CONFIG_VIRTFS) += tests/qtest/virtio-9p-test.o
234 qos-test-obj-y += tests/qtest/virtio-blk-test.o
235 qos-test-obj-y += tests/qtest/virtio-net-test.o
236 qos-test-obj-y += tests/qtest/virtio-rng-test.o
237 qos-test-obj-y += tests/qtest/virtio-scsi-test.o
238 qos-test-obj-y += tests/qtest/virtio-serial-test.o
239 qos-test-obj-y += tests/qtest/vmxnet3-test.o
241 check-unit-y += tests/test-qgraph$(EXESUF)
242 tests/test-qgraph$(EXESUF): tests/test-qgraph.o $(libqgraph-obj-y)
244 check-qtest-generic-y += qos-test
245 tests/qtest/qos-test$(EXESUF): $(qos-test-obj-y) $(libqos-obj-y)
247 # QTest dependencies:
248 tests/qtest/qmp-test$(EXESUF): tests/qtest/qmp-test.o
249 tests/qtest/qmp-cmd-test$(EXESUF): tests/qtest/qmp-cmd-test.o
250 tests/qtest/device-introspect-test$(EXESUF): tests/qtest/device-introspect-test.o
251 tests/qtest/rtc-test$(EXESUF): tests/qtest/rtc-test.o
252 tests/qtest/m48t59-test$(EXESUF): tests/qtest/m48t59-test.o
253 tests/qtest/hexloader-test$(EXESUF): tests/qtest/hexloader-test.o
254 tests/qtest/pflash-cfi02$(EXESUF): tests/qtest/pflash-cfi02-test.o
255 tests/qtest/endianness-test$(EXESUF): tests/qtest/endianness-test.o
256 tests/qtest/prom-env-test$(EXESUF): tests/qtest/prom-env-test.o $(libqos-obj-y)
257 tests/qtest/rtas-test$(EXESUF): tests/qtest/rtas-test.o $(libqos-spapr-obj-y)
258 tests/qtest/fdc-test$(EXESUF): tests/qtest/fdc-test.o
259 tests/qtest/ide-test$(EXESUF): tests/qtest/ide-test.o $(libqos-pc-obj-y)
260 tests/qtest/ahci-test$(EXESUF): tests/qtest/ahci-test.o $(libqos-pc-obj-y) qemu-img$(EXESUF)
261 tests/qtest/ipmi-kcs-test$(EXESUF): tests/qtest/ipmi-kcs-test.o
262 tests/qtest/ipmi-bt-test$(EXESUF): tests/qtest/ipmi-bt-test.o
263 tests/qtest/hd-geo-test$(EXESUF): tests/qtest/hd-geo-test.o $(libqos-obj-y)
264 tests/qtest/boot-order-test$(EXESUF): tests/qtest/boot-order-test.o $(libqos-obj-y)
265 tests/qtest/boot-serial-test$(EXESUF): tests/qtest/boot-serial-test.o $(libqos-obj-y)
266 tests/qtest/bios-tables-test$(EXESUF): tests/qtest/bios-tables-test.o \
267 tests/qtest/tpm-emu.o $(test-io-obj-y) \
268 tests/qtest/boot-sector.o tests/qtest/acpi-utils.o $(libqos-obj-y)
269 tests/qtest/pxe-test$(EXESUF): tests/qtest/pxe-test.o tests/qtest/boot-sector.o $(libqos-obj-y)
270 tests/qtest/microbit-test$(EXESUF): tests/qtest/microbit-test.o
271 tests/qtest/m25p80-test$(EXESUF): tests/qtest/m25p80-test.o
272 tests/qtest/i440fx-test$(EXESUF): tests/qtest/i440fx-test.o $(libqos-pc-obj-y)
273 tests/qtest/q35-test$(EXESUF): tests/qtest/q35-test.o $(libqos-pc-obj-y)
274 tests/qtest/fw_cfg-test$(EXESUF): tests/qtest/fw_cfg-test.o $(libqos-pc-obj-y)
275 tests/qtest/rtl8139-test$(EXESUF): tests/qtest/rtl8139-test.o $(libqos-pc-obj-y)
276 tests/qtest/pnv-xscom-test$(EXESUF): tests/qtest/pnv-xscom-test.o
277 tests/qtest/wdt_ib700-test$(EXESUF): tests/qtest/wdt_ib700-test.o
278 tests/qtest/tco-test$(EXESUF): tests/qtest/tco-test.o $(libqos-pc-obj-y)
279 tests/qtest/virtio-ccw-test$(EXESUF): tests/qtest/virtio-ccw-test.o
280 tests/qtest/display-vga-test$(EXESUF): tests/qtest/display-vga-test.o
281 tests/qtest/qom-test$(EXESUF): tests/qtest/qom-test.o
282 tests/qtest/modules-test$(EXESUF): tests/qtest/modules-test.o
283 tests/qtest/test-hmp$(EXESUF): tests/qtest/test-hmp.o
284 tests/qtest/machine-none-test$(EXESUF): tests/qtest/machine-none-test.o
285 tests/qtest/device-plug-test$(EXESUF): tests/qtest/device-plug-test.o
286 tests/qtest/drive_del-test$(EXESUF): tests/qtest/drive_del-test.o
287 tests/qtest/pvpanic-test$(EXESUF): tests/qtest/pvpanic-test.o
288 tests/qtest/i82801b11-test$(EXESUF): tests/qtest/i82801b11-test.o
289 tests/qtest/intel-hda-test$(EXESUF): tests/qtest/intel-hda-test.o
290 tests/qtest/ioh3420-test$(EXESUF): tests/qtest/ioh3420-test.o
291 tests/qtest/usb-hcd-uhci-test$(EXESUF): tests/qtest/usb-hcd-uhci-test.o $(libqos-usb-obj-y)
292 tests/qtest/usb-hcd-ehci-test$(EXESUF): tests/qtest/usb-hcd-ehci-test.o $(libqos-usb-obj-y)
293 tests/qtest/usb-hcd-xhci-test$(EXESUF): tests/qtest/usb-hcd-xhci-test.o $(libqos-usb-obj-y)
294 tests/qtest/cpu-plug-test$(EXESUF): tests/qtest/cpu-plug-test.o
295 tests/qtest/migration-test$(EXESUF): tests/qtest/migration-test.o tests/qtest/migration-helpers.o
296 tests/qtest/test-netfilter$(EXESUF): tests/qtest/test-netfilter.o $(qtest-obj-y)
297 tests/qtest/test-filter-mirror$(EXESUF): tests/qtest/test-filter-mirror.o $(qtest-obj-y)
298 tests/qtest/test-filter-redirector$(EXESUF): tests/qtest/test-filter-redirector.o $(qtest-obj-y)
299 tests/qtest/test-x86-cpuid-compat$(EXESUF): tests/qtest/test-x86-cpuid-compat.o $(qtest-obj-y)
300 tests/qtest/ivshmem-test$(EXESUF): tests/qtest/ivshmem-test.o contrib/ivshmem-server/ivshmem-server.o $(libqos-pc-obj-y) $(libqos-spapr-obj-y)
301 tests/qtest/dbus-vmstate-test$(EXESUF): tests/qtest/dbus-vmstate-test.o tests/qtest/migration-helpers.o tests/qtest/dbus-vmstate1.o $(libqos-pc-obj-y) $(libqos-spapr-obj-y)
302 tests/qtest/test-arm-mptimer$(EXESUF): tests/qtest/test-arm-mptimer.o
303 tests/qtest/numa-test$(EXESUF): tests/qtest/numa-test.o
304 tests/qtest/vmgenid-test$(EXESUF): tests/qtest/vmgenid-test.o tests/qtest/boot-sector.o tests/qtest/acpi-utils.o
305 tests/qtest/cdrom-test$(EXESUF): tests/qtest/cdrom-test.o tests/qtest/boot-sector.o $(libqos-obj-y)
306 tests/qtest/arm-cpu-features$(EXESUF): tests/qtest/arm-cpu-features.o
307 tests/qtest/tpm-crb-swtpm-test$(EXESUF): tests/qtest/tpm-crb-swtpm-test.o tests/qtest/tpm-emu.o \
308 tests/qtest/tpm-util.o tests/qtest/tpm-tests.o $(test-io-obj-y)
309 tests/qtest/tpm-crb-test$(EXESUF): tests/qtest/tpm-crb-test.o tests/qtest/tpm-emu.o $(test-io-obj-y)
310 tests/qtest/tpm-tis-swtpm-test$(EXESUF): tests/qtest/tpm-tis-swtpm-test.o tests/qtest/tpm-emu.o \
311 tests/qtest/tpm-util.o tests/qtest/tpm-tests.o $(test-io-obj-y)
312 tests/qtest/tpm-tis-device-swtpm-test$(EXESUF): tests/qtest/tpm-tis-device-swtpm-test.o tests/qtest/tpm-emu.o \
313 tests/qtest/tpm-util.o tests/qtest/tpm-tests.o $(test-io-obj-y)
314 tests/qtest/tpm-tis-test$(EXESUF): tests/qtest/tpm-tis-test.o tests/qtest/tpm-tis-util.o tests/qtest/tpm-emu.o $(test-io-obj-y)
315 tests/qtest/tpm-tis-device-test$(EXESUF): tests/qtest/tpm-tis-device-test.o tests/qtest/tpm-tis-util.o tests/qtest/tpm-emu.o $(test-io-obj-y)
319 TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS)))
321 # The qtests are not runnable (yet) under TSan due to a known issue.
322 # https://github.com/google/sanitizers/issues/1116
324 ifeq ($(CONFIG_POSIX),y)
325 QTEST_TARGETS = $(TARGETS)
326 check-qtest-y=$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y:%=tests/qtest/%$(EXESUF)))
327 check-qtest-y += $(check-qtest-generic-y:%=tests/qtest/%$(EXESUF))
331 qtest-obj-y = tests/qtest/libqtest.o $(test-util-obj-y)
332 $(check-qtest-y): $(qtest-obj-y)