| 1 | slow_qtests = { |
| 2 | 'ahci-test': 150, |
| 3 | 'aspeed_smc-test': 360, |
| 4 | 'bios-tables-test' : 910, |
| 5 | 'cdrom-test' : 610, |
| 6 | 'device-introspect-test' : 720, |
| 7 | 'ide-test' : 120, |
| 8 | 'migration-test' : 480, |
| 9 | 'npcm7xx_pwm-test': 300, |
| 10 | 'npcm7xx_watchdog_timer-test': 120, |
| 11 | 'qmp-cmd-test' : 120, |
| 12 | 'qom-test' : 900, |
| 13 | 'stm32l4x5_usart-test' : 600, |
| 14 | 'test-hmp' : 240, |
| 15 | 'pxe-test': 610, |
| 16 | 'prom-env-test': 360, |
| 17 | 'boot-serial-test': 360, |
| 18 | 'qos-test': 120, |
| 19 | 'vmgenid-test': 610, |
| 20 | } |
| 21 | |
| 22 | qtests_generic = [ |
| 23 | 'cdrom-test', |
| 24 | 'device-introspect-test', |
| 25 | 'machine-none-test', |
| 26 | 'qmp-test', |
| 27 | 'qmp-cmd-test', |
| 28 | 'qom-test', |
| 29 | ] |
| 30 | if have_hmp |
| 31 | qtests_generic += [ |
| 32 | 'test-hmp', |
| 33 | ] |
| 34 | endif |
| 35 | qtests_generic += [ |
| 36 | 'qos-test', |
| 37 | 'readconfig-test', |
| 38 | 'netdev-socket', |
| 39 | ] |
| 40 | if enable_modules |
| 41 | qtests_generic += [ 'modules-test' ] |
| 42 | endif |
| 43 | |
| 44 | qtests_pci = \ |
| 45 | (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) + \ |
| 46 | (config_all_devices.has_key('CONFIG_IVSHMEM_DEVICE') ? ['ivshmem-test'] : []) |
| 47 | |
| 48 | qtests_cxl = \ |
| 49 | (config_all_devices.has_key('CONFIG_CXL') ? ['cxl-test'] : []) |
| 50 | |
| 51 | # FIXME: Get rid of get_option('default_devices') here and check |
| 52 | # for the availability of the default NICs in the tests |
| 53 | qtests_filter = \ |
| 54 | (get_option('default_devices') and slirp.found() ? ['test-netfilter'] : []) + \ |
| 55 | (get_option('default_devices') and host_os != 'windows' ? ['test-filter-buffer'] : []) + \ |
| 56 | (get_option('default_devices') and host_os != 'windows' ? ['test-filter-mirror'] : []) + \ |
| 57 | (get_option('default_devices') and host_os != 'windows' ? ['test-filter-redirector'] : []) |
| 58 | |
| 59 | qtests_i386 = \ |
| 60 | (slirp.found() ? ['pxe-test'] : []) + \ |
| 61 | qtests_filter + \ |
| 62 | (config_all_devices.has_key('CONFIG_ACPI_VMGENID') ? ['vmgenid-test'] : []) + \ |
| 63 | (config_all_devices.has_key('CONFIG_AHCI_ICH9') and have_tools ? ['ahci-test'] : []) + \ |
| 64 | (config_all_devices.has_key('CONFIG_AHCI_ICH9') ? ['tco-test'] : []) + \ |
| 65 | (config_all_devices.has_key('CONFIG_FDC_ISA') ? ['fdc-test'] : []) + \ |
| 66 | (config_all_devices.has_key('CONFIG_I440FX') ? ['fw_cfg-test'] : []) + \ |
| 67 | (config_all_devices.has_key('CONFIG_Q35') ? ['e820-test'] : []) + \ |
| 68 | (config_all_devices.has_key('CONFIG_FW_CFG_DMA') ? ['vmcoreinfo-test'] : []) + \ |
| 69 | (config_all_devices.has_key('CONFIG_Q35') ? ['dump-test'] : []) + \ |
| 70 | (igvm.found() and |
| 71 | config_all_devices.has_key('CONFIG_FW_CFG_DMA') ? ['launchupdate-test'] : []) + \ |
| 72 | (config_all_devices.has_key('CONFIG_I440FX') ? ['i440fx-test'] : []) + \ |
| 73 | (config_all_devices.has_key('CONFIG_I440FX') ? ['ide-test'] : []) + \ |
| 74 | (config_all_devices.has_key('CONFIG_I440FX') ? ['numa-test'] : []) + \ |
| 75 | (config_all_devices.has_key('CONFIG_I440FX') ? ['test-x86-cpuid-compat'] : []) + \ |
| 76 | (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \ |
| 77 | (config_all_devices.has_key('CONFIG_SGA') ? ['boot-serial-test'] : []) + \ |
| 78 | (config_all_devices.has_key('CONFIG_ISA_IPMI_KCS') ? ['ipmi-kcs-test'] : []) + \ |
| 79 | (host_os == 'linux' and \ |
| 80 | config_all_devices.has_key('CONFIG_ISA_IPMI_BT') and |
| 81 | config_all_devices.has_key('CONFIG_IPMI_EXTERN') ? ['ipmi-bt-test'] : []) + \ |
| 82 | (config_all_devices.has_key('CONFIG_WDT_IB700') ? ['wdt_ib700-test'] : []) + \ |
| 83 | (config_all_devices.has_key('CONFIG_PVPANIC_ISA') ? ['pvpanic-test'] : []) + \ |
| 84 | (config_all_devices.has_key('CONFIG_PVPANIC_PCI') ? ['pvpanic-pci-test'] : []) + \ |
| 85 | (config_all_devices.has_key('CONFIG_HDA') ? ['intel-hda-test'] : []) + \ |
| 86 | (config_all_devices.has_key('CONFIG_I82801B11') ? ['i82801b11-test'] : []) + \ |
| 87 | (config_all_devices.has_key('CONFIG_IOH3420') ? ['ioh3420-test'] : []) + \ |
| 88 | (config_all_devices.has_key('CONFIG_LPC_ICH9') ? ['lpc-ich9-test'] : []) + \ |
| 89 | (config_all_devices.has_key('CONFIG_MC146818RTC') ? ['rtc-test'] : []) + \ |
| 90 | (config_all_devices.has_key('CONFIG_USB_UHCI') ? ['usb-hcd-uhci-test'] : []) + \ |
| 91 | (config_all_devices.has_key('CONFIG_USB_UHCI') and \ |
| 92 | config_all_devices.has_key('CONFIG_USB_EHCI') ? ['usb-hcd-ehci-test'] : []) + \ |
| 93 | (config_all_devices.has_key('CONFIG_USB_XHCI_NEC') ? ['usb-hcd-xhci-test'] : []) + \ |
| 94 | (config_all_devices.has_key('CONFIG_TPM_CRB') ? ['tpm-crb-test'] : []) + \ |
| 95 | (config_all_devices.has_key('CONFIG_TPM_CRB') ? ['tpm-crb-swtpm-test'] : []) + \ |
| 96 | (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-test'] : []) + \ |
| 97 | (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-swtpm-test'] : []) + \ |
| 98 | (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['rtl8139-test'] : []) + \ |
| 99 | (config_all_devices.has_key('CONFIG_E1000E_PCI_EXPRESS') ? ['fuzz-e1000e-test'] : []) + \ |
| 100 | (config_all_devices.has_key('CONFIG_MEGASAS_SCSI_PCI') ? ['fuzz-megasas-test'] : []) + \ |
| 101 | (config_all_devices.has_key('CONFIG_LSI_SCSI_PCI') ? ['fuzz-lsi53c895a-test'] : []) + \ |
| 102 | (config_all_devices.has_key('CONFIG_VIRTIO_SCSI') ? ['fuzz-virtio-scsi-test'] : []) + \ |
| 103 | (config_all_devices.has_key('CONFIG_VIRTIO_BALLOON') ? ['virtio-balloon-test'] : []) + \ |
| 104 | (config_all_devices.has_key('CONFIG_Q35') ? ['q35-test'] : []) + \ |
| 105 | (config_all_devices.has_key('CONFIG_SB16') ? ['fuzz-sb16-test'] : []) + \ |
| 106 | (config_all_devices.has_key('CONFIG_SDHCI_PCI') ? ['fuzz-sdcard-test'] : []) + \ |
| 107 | (config_all_devices.has_key('CONFIG_ESP_PCI') ? ['am53c974-test'] : []) + \ |
| 108 | (config_all_devices.has_key('CONFIG_AMD_IOMMU') ? ['amd-iommu-test'] : []) + \ |
| 109 | (config_all_devices.has_key('CONFIG_VTD') ? ['intel-iommu-test'] : []) + \ |
| 110 | (config_all_devices.has_key('CONFIG_VTD') and |
| 111 | config_all_devices.has_key('CONFIG_IOMMU_TESTDEV') ? ['iommu-intel-test', 'iommu-intel-inv-test'] : []) + \ |
| 112 | (host_os != 'windows' and \ |
| 113 | config_all_devices.has_key('CONFIG_ACPI_ERST') ? ['erst-test'] : []) + \ |
| 114 | (config_all_devices.has_key('CONFIG_PCIE_PORT') and \ |
| 115 | config_all_devices.has_key('CONFIG_VIRTIO_NET') and \ |
| 116 | config_all_devices.has_key('CONFIG_Q35') and \ |
| 117 | config_all_devices.has_key('CONFIG_VIRTIO_PCI') and \ |
| 118 | slirp.found() ? ['virtio-net-failover'] : []) + \ |
| 119 | (unpack_edk2_blobs and \ |
| 120 | config_all_devices.has_key('CONFIG_HPET') and \ |
| 121 | config_all_devices.has_key('CONFIG_PARALLEL') ? ['bios-tables-test'] : []) + \ |
| 122 | qtests_pci + \ |
| 123 | qtests_cxl + \ |
| 124 | [ |
| 125 | 'hd-geo-test', |
| 126 | 'boot-order-test', |
| 127 | 'device-plug-test', |
| 128 | 'drive_del-test', |
| 129 | 'cpu-plug-test', |
| 130 | 'migration-test', |
| 131 | ] |
| 132 | |
| 133 | if dbus_display and config_all_devices.has_key('CONFIG_VGA') |
| 134 | qtests_i386 += ['dbus-display-test'] |
| 135 | endif |
| 136 | |
| 137 | dbus_daemon = find_program('dbus-daemon', required: false) |
| 138 | if dbus_daemon.found() and gdbus_codegen.found() |
| 139 | qtests_i386 += ['dbus-vmstate-test'] |
| 140 | dbus_vmstate1 = custom_target('dbus-vmstate description', |
| 141 | build_by_default: true, |
| 142 | output: [ 'dbus-vmstate1.h', 'dbus-vmstate1.c'], |
| 143 | input: meson.project_source_root() / 'backends/dbus-vmstate1.xml', |
| 144 | command: [gdbus_codegen, '@INPUT@', |
| 145 | '--interface-prefix', 'org.qemu', |
| 146 | '--output-directory', meson.current_build_dir(), |
| 147 | '--generate-c-code', '@BASENAME@']).to_list() |
| 148 | else |
| 149 | dbus_vmstate1 = [] |
| 150 | endif |
| 151 | |
| 152 | qtests_x86_64 = qtests_i386 |
| 153 | |
| 154 | qtests_alpha = ['boot-serial-test'] + \ |
| 155 | qtests_filter + \ |
| 156 | (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) |
| 157 | |
| 158 | qtests_avr = [ 'boot-serial-test' ] |
| 159 | |
| 160 | qtests_hppa = \ |
| 161 | qtests_filter + \ |
| 162 | (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) |
| 163 | |
| 164 | qtests_loongarch64 = qtests_filter + \ |
| 165 | (config_all_devices.has_key('CONFIG_LOONGARCH_VIRT') ? ['numa-test'] : []) + \ |
| 166 | (unpack_edk2_blobs ? ['bios-tables-test'] : []) + \ |
| 167 | ['boot-serial-test', |
| 168 | 'cpu-plug-test', |
| 169 | 'migration-test'] |
| 170 | |
| 171 | qtests_m68k = ['boot-serial-test'] + \ |
| 172 | qtests_filter |
| 173 | |
| 174 | qtests_microblaze = ['boot-serial-test'] + \ |
| 175 | qtests_filter |
| 176 | |
| 177 | qtests_mips = \ |
| 178 | qtests_filter + \ |
| 179 | (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \ |
| 180 | (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) |
| 181 | |
| 182 | qtests_mipsel = qtests_mips |
| 183 | qtests_mips64 = qtests_mips |
| 184 | qtests_mips64el = qtests_mips |
| 185 | |
| 186 | qtests_ppc = \ |
| 187 | qtests_filter + \ |
| 188 | (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \ |
| 189 | (config_all_accel.has_key('CONFIG_TCG') ? ['prom-env-test'] : []) + \ |
| 190 | (config_all_accel.has_key('CONFIG_TCG') ? ['boot-serial-test'] : []) + \ |
| 191 | ['boot-order-test'] |
| 192 | |
| 193 | qtests_ppc64 = \ |
| 194 | qtests_ppc + \ |
| 195 | (config_all_devices.has_key('CONFIG_PSERIES') ? ['device-plug-test'] : []) + \ |
| 196 | (config_all_devices.has_key('CONFIG_POWERNV') ? ['pnv-xscom-test'] : []) + \ |
| 197 | (config_all_devices.has_key('CONFIG_POWERNV') ? ['pnv-xive2-test'] : []) + \ |
| 198 | (config_all_devices.has_key('CONFIG_POWERNV') ? ['pnv-spi-seeprom-test'] : []) + \ |
| 199 | (config_all_devices.has_key('CONFIG_POWERNV') ? ['pnv-host-i2c-test'] : []) + \ |
| 200 | (config_all_devices.has_key('CONFIG_PSERIES') ? ['numa-test'] : []) + \ |
| 201 | (config_all_devices.has_key('CONFIG_PSERIES') ? ['rtas-test'] : []) + \ |
| 202 | (slirp.found() ? ['pxe-test'] : []) + \ |
| 203 | (config_all_devices.has_key('CONFIG_USB_UHCI') ? ['usb-hcd-uhci-test'] : []) + \ |
| 204 | (config_all_devices.has_key('CONFIG_USB_XHCI_NEC') ? ['usb-hcd-xhci-test'] : []) + \ |
| 205 | qtests_pci + ['migration-test', 'cpu-plug-test', 'drive_del-test'] |
| 206 | |
| 207 | qtests_sh4 = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \ |
| 208 | (config_all_devices.has_key('CONFIG_PFLASH_CFI02') and |
| 209 | config_all_devices.has_key('CONFIG_R2D') ? ['pflash-cfi02-test'] : []) |
| 210 | qtests_sh4eb = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) |
| 211 | |
| 212 | qtests_sparc = ['prom-env-test', 'm48t59-test', 'boot-serial-test'] + \ |
| 213 | qtests_filter |
| 214 | |
| 215 | qtests_sparc64 = \ |
| 216 | (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \ |
| 217 | qtests_filter + \ |
| 218 | ['prom-env-test', 'boot-serial-test'] |
| 219 | |
| 220 | qtests_npcm7xx = \ |
| 221 | ['npcm7xx_adc-test', |
| 222 | 'npcm7xx_gpio-test', |
| 223 | 'npcm7xx_pwm-test', |
| 224 | 'npcm7xx_rng-test', |
| 225 | 'npcm7xx_sdhci-test', |
| 226 | 'npcm7xx_smbus-test', |
| 227 | 'npcm7xx_timer-test', |
| 228 | 'npcm7xx_watchdog_timer-test'] + \ |
| 229 | (slirp.found() ? ['npcm7xx_emc-test'] : []) |
| 230 | qtests_npcm8xx = \ |
| 231 | ['npcm_gmac-test'] |
| 232 | qtests_aspeed = \ |
| 233 | ['aspeed_gpio-test', |
| 234 | 'aspeed_hace-test', |
| 235 | 'aspeed_scu-test', |
| 236 | 'aspeed_smc-test'] |
| 237 | qtests_aspeed64 = \ |
| 238 | ['ast2700-gpio-test', |
| 239 | 'ast2700-hace-test', |
| 240 | 'ast2700-sgpio-test', |
| 241 | 'ast2700-smc-test'] |
| 242 | |
| 243 | qtests_stm32l4x5 = \ |
| 244 | ['stm32l4x5_exti-test', |
| 245 | 'stm32l4x5_syscfg-test', |
| 246 | 'stm32l4x5_rcc-test', |
| 247 | 'stm32l4x5_gpio-test', |
| 248 | 'stm32l4x5_usart-test'] |
| 249 | |
| 250 | qtests_arm = \ |
| 251 | (config_all_devices.has_key('CONFIG_MPS2') ? ['sse-timer-test'] : []) + \ |
| 252 | (config_all_devices.has_key('CONFIG_CMSDK_APB_DUALTIMER') ? ['cmsdk-apb-dualtimer-test'] : []) + \ |
| 253 | (config_all_devices.has_key('CONFIG_CMSDK_APB_TIMER') ? ['cmsdk-apb-timer-test'] : []) + \ |
| 254 | (config_all_devices.has_key('CONFIG_STELLARIS') or |
| 255 | config_all_devices.has_key('CONFIG_MPS2') ? ['cmsdk-apb-watchdog-test'] : []) + \ |
| 256 | (config_all_devices.has_key('CONFIG_ASPEED_SOC') ? qtests_aspeed : []) + \ |
| 257 | (config_all_devices.has_key('CONFIG_NPCM7XX') ? qtests_npcm7xx : []) + \ |
| 258 | (config_all_devices.has_key('CONFIG_GENERIC_LOADER') ? ['hexloader-test'] : []) + \ |
| 259 | (config_all_devices.has_key('CONFIG_TPM_TIS_I2C') ? ['tpm-tis-i2c-test', 'tpm-tis-i2c-swtpm-test'] : []) + \ |
| 260 | (config_all_devices.has_key('CONFIG_VEXPRESS') ? ['test-arm-mptimer'] : []) + \ |
| 261 | (config_all_devices.has_key('CONFIG_MICROBIT') ? ['microbit-test'] : []) + \ |
| 262 | (config_all_devices.has_key('CONFIG_STM32L4X5_SOC') ? qtests_stm32l4x5 : []) + \ |
| 263 | (config_all_devices.has_key('CONFIG_FSI_APB2OPB_ASPEED') ? ['aspeed_fsi-test'] : []) + \ |
| 264 | (config_all_devices.has_key('CONFIG_CAN_FLEXCAN') ? ['flexcan-test'] : []) + \ |
| 265 | (config_all_devices.has_key('CONFIG_STM32L4X5_SOC') and |
| 266 | config_all_devices.has_key('CONFIG_DM163')? ['dm163-test'] : []) + \ |
| 267 | ['arm-cpu-features', |
| 268 | 'boot-serial-test'] |
| 269 | |
| 270 | # TODO: once aarch64 TCG is fixed on ARM 32 bit host, make bios-tables-test unconditional |
| 271 | qtests_aarch64 = \ |
| 272 | (cpu != 'arm' and unpack_edk2_blobs ? ['bios-tables-test'] : []) + \ |
| 273 | (config_all_accel.has_key('CONFIG_TCG') and config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? \ |
| 274 | ['tpm-tis-device-test', 'tpm-tis-device-swtpm-test'] : []) + \ |
| 275 | (config_all_devices.has_key('CONFIG_XLNX_ZYNQMP_ARM') ? ['xlnx-can-test', 'fuzz-xlnx-dp-test'] : []) + \ |
| 276 | (config_all_devices.has_key('CONFIG_XLNX_VERSAL') ? ['xlnx-canfd-test', 'xlnx-versal-trng-test'] : []) + \ |
| 277 | (config_all_devices.has_key('CONFIG_RASPI') ? ['bcm2835-dma-test', 'bcm2835-i2c-test'] : []) + \ |
| 278 | (config_all_accel.has_key('CONFIG_TCG') and \ |
| 279 | config_all_devices.has_key('CONFIG_TPM_TIS_I2C') ? ['tpm-tis-i2c-test', 'tpm-tis-i2c-swtpm-test'] : []) + \ |
| 280 | (config_all_devices.has_key('CONFIG_ASPEED_SOC') ? qtests_aspeed64 : []) + \ |
| 281 | (config_all_devices.has_key('CONFIG_NPCM8XX') ? qtests_npcm8xx : []) + \ |
| 282 | (config_all_devices.has_key('CONFIG_IOMMU_TESTDEV') and |
| 283 | config_all_devices.has_key('CONFIG_ARM_VIRT') ? |
| 284 | ['iommu-smmuv3-test'] : []) + \ |
| 285 | qtests_cxl + \ |
| 286 | ['arm-cpu-features', |
| 287 | 'numa-test', |
| 288 | 'boot-serial-test', |
| 289 | 'migration-test'] |
| 290 | |
| 291 | qtests_s390x = \ |
| 292 | qtests_filter + \ |
| 293 | ['boot-serial-test', |
| 294 | 'drive_del-test', |
| 295 | 'device-plug-test', |
| 296 | 'virtio-ccw-test', |
| 297 | 'cpu-plug-test', |
| 298 | 'migration-test'] |
| 299 | |
| 300 | qtests_riscv32 = \ |
| 301 | (config_all_devices.has_key('CONFIG_SIFIVE_E_AON') ? ['sifive-e-aon-watchdog-test'] : []) |
| 302 | |
| 303 | qtests_riscv64 = ['riscv-csr-test'] + \ |
| 304 | (unpack_edk2_blobs ? ['bios-tables-test'] : []) + \ |
| 305 | (config_all_devices.has_key('CONFIG_IOMMU_TESTDEV') and |
| 306 | config_all_devices.has_key('CONFIG_RISCV_IOMMU') ? |
| 307 | ['iommu-riscv-test'] : []) + \ |
| 308 | (config_all_devices.has_key('CONFIG_K230') ? |
| 309 | ['k230-ddr-test', 'k230-wdt-test', 'k230-gsdma-test', 'k230-decomp-gzip-test'] : []) |
| 310 | |
| 311 | qtests_hexagon = ['boot-serial-test', 'l2vic-test', 'qct-qtimer-test'] |
| 312 | |
| 313 | qos_test_ss = ss.source_set() |
| 314 | qos_test_ss.add( |
| 315 | 'ac97-test.c', |
| 316 | 'adc128d818-test.c', |
| 317 | 'adm1272-test.c', |
| 318 | 'adm1266-test.c', |
| 319 | 'ds1338-test.c', |
| 320 | 'e1000-test.c', |
| 321 | 'eepro100-test.c', |
| 322 | 'es1370-test.c', |
| 323 | 'lsm303dlhc-mag-test.c', |
| 324 | 'isl_pmbus_vr-test.c', |
| 325 | 'max34451-test.c', |
| 326 | 'megasas-test.c', |
| 327 | 'ne2000-test.c', |
| 328 | 'tulip-test.c', |
| 329 | 'nvme-test.c', |
| 330 | 'pca9552-test.c', |
| 331 | 'pca9554-test.c', |
| 332 | 'pca9555-test.c', |
| 333 | 'pci-test.c', |
| 334 | 'pcnet-test.c', |
| 335 | 'rs5c372-test.c', |
| 336 | 'sdhci-test.c', |
| 337 | 'spapr-phb-test.c', |
| 338 | 'tmp105-test.c', |
| 339 | 'emc141x-test.c', |
| 340 | 'usb-hcd-ohci-test.c', |
| 341 | 'virtio-test.c', |
| 342 | 'virtio-blk-test.c', |
| 343 | 'virtio-net-test.c', |
| 344 | 'virtio-rng-test.c', |
| 345 | 'virtio-scsi-test.c', |
| 346 | 'virtio-iommu-test.c', |
| 347 | 'vmxnet3-test.c', |
| 348 | 'igb-test.c', |
| 349 | 'ufs-test.c', |
| 350 | 'riscv-iommu-test.c', |
| 351 | ) |
| 352 | |
| 353 | if config_all_devices.has_key('CONFIG_VIRTIO_SERIAL') |
| 354 | qos_test_ss.add(files('virtio-serial-test.c')) |
| 355 | endif |
| 356 | if config_all_devices.has_key('CONFIG_IP_OCTAL_232') |
| 357 | qos_test_ss.add(files('ipoctal232-test.c')) |
| 358 | endif |
| 359 | |
| 360 | if host_os != 'windows' |
| 361 | qos_test_ss.add(files('e1000e-test.c')) |
| 362 | endif |
| 363 | if have_virtfs |
| 364 | qos_test_ss.add(files('virtio-9p-test.c')) |
| 365 | endif |
| 366 | if have_vhost_user |
| 367 | qos_test_ss.add(files('vhost-user-test.c')) |
| 368 | endif |
| 369 | if have_tools and have_vhost_user_blk_server |
| 370 | qos_test_ss.add(files('vhost-user-blk-test.c')) |
| 371 | endif |
| 372 | |
| 373 | tpmemu_files = ['tpm-emu.c', 'tpm-util.c', 'tpm-tests.c'] |
| 374 | |
| 375 | test_migration_files = [files( |
| 376 | 'migration/bootfile.c', |
| 377 | 'migration/framework.c', |
| 378 | 'migration/migration-qmp.c', |
| 379 | 'migration/migration-util.c', |
| 380 | 'migration/compression-tests.c', |
| 381 | 'migration/cpr-tests.c', |
| 382 | 'migration/file-tests.c', |
| 383 | 'migration/misc-tests.c', |
| 384 | 'migration/precopy-tests.c', |
| 385 | 'migration/postcopy-tests.c', |
| 386 | )] |
| 387 | |
| 388 | migration_tls_files = [] |
| 389 | if gnutls.found() |
| 390 | migration_tls_files = [files('migration/tls-tests.c', |
| 391 | '../unit/crypto-tls-psk-helpers.c'), gnutls] |
| 392 | |
| 393 | if tasn1.found() |
| 394 | migration_tls_files += [files('../unit/crypto-tls-x509-helpers.c'), tasn1] |
| 395 | endif |
| 396 | endif |
| 397 | |
| 398 | migration_colo_files = [] |
| 399 | if get_option('replication').allowed() |
| 400 | migration_colo_files = [files('migration/colo-tests.c')] |
| 401 | endif |
| 402 | |
| 403 | qtests = { |
| 404 | 'aspeed_hace-test': [files('aspeed-hace-utils.c', 'aspeed_hace-test.c'), |
| 405 | crypto], |
| 406 | 'aspeed_smc-test': files('aspeed-smc-utils.c', 'aspeed_smc-test.c'), |
| 407 | 'ast2700-hace-test': [files('aspeed-hace-utils.c', 'ast2700-hace-test.c'), |
| 408 | crypto], |
| 409 | 'ast2700-smc-test': files('aspeed-smc-utils.c', 'ast2700-smc-test.c'), |
| 410 | 'bios-tables-test': [io, 'boot-sector.c', 'acpi-utils.c', 'tpm-emu.c'], |
| 411 | 'cdrom-test': files('boot-sector.c'), |
| 412 | 'dbus-vmstate-test': files('migration/migration-qmp.c', |
| 413 | 'migration/migration-util.c') + dbus_vmstate1 + |
| 414 | [gio], |
| 415 | 'erst-test': files('erst-test.c'), |
| 416 | 'ivshmem-test': [rt, '../../contrib/ivshmem-server/ivshmem-server.c'], |
| 417 | 'migration-test': test_migration_files + migration_tls_files + migration_colo_files, |
| 418 | 'pxe-test': files('boot-sector.c'), |
| 419 | 'pnv-xive2-test': files('pnv-xive2-common.c', 'pnv-xive2-flush-sync.c', |
| 420 | 'pnv-xive2-nvpg_bar.c'), |
| 421 | 'qos-test': [chardev, io, qos_test_ss.apply({}).sources()], |
| 422 | 'tpm-crb-swtpm-test': [io, tpmemu_files], |
| 423 | 'tpm-crb-test': [io, tpmemu_files], |
| 424 | 'tpm-tis-swtpm-test': [io, tpmemu_files, 'tpm-tis-util.c'], |
| 425 | 'tpm-tis-test': [io, tpmemu_files, 'tpm-tis-util.c'], |
| 426 | 'tpm-tis-i2c-test': [io, tpmemu_files, 'tpm-tis-i2c-util.c', 'qtest_aspeed.c'], |
| 427 | 'tpm-tis-i2c-swtpm-test': [io, tpmemu_files, 'tpm-tis-i2c-util.c', 'qtest_aspeed.c'], |
| 428 | 'tpm-tis-device-swtpm-test': [io, tpmemu_files, 'tpm-tis-util.c'], |
| 429 | 'tpm-tis-device-test': [io, tpmemu_files, 'tpm-tis-util.c'], |
| 430 | 'virtio-net-failover': test_migration_files, |
| 431 | 'vmgenid-test': files('boot-sector.c', 'acpi-utils.c'), |
| 432 | 'netdev-socket': files('netdev-socket.c', '../unit/socket-helpers.c'), |
| 433 | } |
| 434 | |
| 435 | if vnc.found() |
| 436 | gvnc = dependency('gvnc-1.0', method: 'pkg-config', required: false) |
| 437 | if gvnc.found() |
| 438 | qtests += {'vnc-display-test': [gvnc, keymap_targets]} |
| 439 | qtests_generic += [ 'vnc-display-test' ] |
| 440 | if have_qemu_vnc and dbus_display and config_all_devices.has_key('CONFIG_VGA') |
| 441 | dbus_vnc_test_deps = [dbus_display1, qemu_vnc1, gio, gvnc, keymap_targets] |
| 442 | if gnutls.found() and tasn1.found() |
| 443 | dbus_vnc_test_deps += [files('../unit/crypto-tls-x509-helpers.c'), |
| 444 | gnutls, tasn1] |
| 445 | endif |
| 446 | qtests += {'dbus-vnc-test': dbus_vnc_test_deps} |
| 447 | qtests_x86_64 += ['dbus-vnc-test'] |
| 448 | endif |
| 449 | endif |
| 450 | endif |
| 451 | |
| 452 | if dbus_display |
| 453 | qtests += {'dbus-display-test': [dbus_display1, gio]} |
| 454 | endif |
| 455 | |
| 456 | qtest_executables = {} |
| 457 | foreach dir : target_dirs |
| 458 | if not dir.endswith('-softmmu') |
| 459 | continue |
| 460 | endif |
| 461 | |
| 462 | target_base = dir.split('-')[0] |
| 463 | qtest_emulator = emulators['qemu-system-' + target_base] |
| 464 | target_qtests = get_variable('qtests_' + target_base, []) + qtests_generic |
| 465 | has_kvm = ('CONFIG_KVM' in config_all_accel and host_os == 'linux' |
| 466 | and cpu == target_base and fs.exists('/dev/kvm')) |
| 467 | |
| 468 | test_deps = roms |
| 469 | qtest_env = environment() |
| 470 | if have_tools |
| 471 | qtest_env.set('QTEST_QEMU_IMG', './qemu-img') |
| 472 | test_deps += [qemu_img] |
| 473 | endif |
| 474 | qtest_env.set('G_TEST_DBUS_DAEMON', meson.project_source_root() / 'tests/dbus-daemon.sh') |
| 475 | qtest_env.set('QTEST_QEMU_BINARY', './qemu-system-' + target_base) |
| 476 | if have_tools and have_vhost_user_blk_server |
| 477 | qtest_env.set('QTEST_QEMU_STORAGE_DAEMON_BINARY', './storage-daemon/qemu-storage-daemon') |
| 478 | test_deps += [qsd] |
| 479 | endif |
| 480 | if have_qemu_vnc |
| 481 | qtest_env.set('QTEST_QEMU_VNC_BINARY', './tools/qemu-vnc/qemu-vnc') |
| 482 | test_deps += [qemu_vnc] |
| 483 | endif |
| 484 | |
| 485 | qtest_env.set('PYTHON', python.full_path()) |
| 486 | |
| 487 | foreach test : target_qtests |
| 488 | # Executables are shared across targets, declare them only the first time we |
| 489 | # encounter them |
| 490 | if not qtest_executables.has_key(test) |
| 491 | src = [test + '.c'] |
| 492 | deps = [qemuutil, qos] |
| 493 | if test in qtests |
| 494 | # use a sourceset to quickly separate sources and deps |
| 495 | test_ss = ss.source_set() |
| 496 | test_ss.add(qtests[test]) |
| 497 | src += test_ss.all_sources() |
| 498 | deps += test_ss.all_dependencies() |
| 499 | endif |
| 500 | qtest_executables += { |
| 501 | test: executable(test, src, dependencies: deps) |
| 502 | } |
| 503 | endif |
| 504 | |
| 505 | test_args = ['--tap', '-k'] |
| 506 | |
| 507 | if test == 'migration-test' and has_kvm |
| 508 | test_args += ['--full'] |
| 509 | endif |
| 510 | |
| 511 | test('qtest-@0@/@1@'.format(target_base, test), |
| 512 | qtest_executables[test], |
| 513 | depends: [test_deps, qtest_emulator, emulator_modules], |
| 514 | env: qtest_env, |
| 515 | args: test_args, |
| 516 | protocol: 'tap', |
| 517 | timeout: slow_qtests.get(test, 60), |
| 518 | priority: slow_qtests.get(test, 60), |
| 519 | suite: ['qtest', 'qtest-' + target_base] + |
| 520 | (slow_qtests.has_key(test) ? ['slow'] : [])) |
| 521 | endforeach |
| 522 | endforeach |