backup: Wire up qemu full pull backup commands over QMP
[libvirt/ericb.git] / tests / qemuxml2xmltest.c
blobd7850a89d3cc2f0b079c1fadb9799cf15eec7a4e
1 #include <config.h>
3 #include <unistd.h>
5 #include <sys/types.h>
6 #include <fcntl.h>
8 #include "testutils.h"
10 #ifdef WITH_QEMU
12 # include "internal.h"
13 # include "qemu/qemu_domain_address.h"
14 # include "qemu/qemu_domain.h"
15 # include "testutilsqemu.h"
16 # include "virstring.h"
17 # include "virfilewrapper.h"
18 # include "configmake.h"
20 # define VIR_FROM_THIS VIR_FROM_NONE
22 static virQEMUDriver driver;
24 enum {
25 WHEN_INACTIVE = 1,
26 WHEN_ACTIVE = 2,
27 WHEN_BOTH = 3,
31 static int
32 testXML2XMLActive(const void *opaque)
34 const struct testQemuInfo *info = opaque;
36 return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
37 info->infile, info->outfile, true, 0,
38 TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS);
42 static int
43 testXML2XMLInactive(const void *opaque)
45 const struct testQemuInfo *info = opaque;
47 return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
48 info->infile, info->outfile, false, 0,
49 TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS);
53 static int
54 testCompareStatusXMLToXMLFiles(const void *opaque)
56 const struct testQemuInfo *data = opaque;
57 virDomainObjPtr obj = NULL;
58 char *actual = NULL;
59 int ret = -1;
61 if (!(obj = virDomainObjParseFile(data->infile, driver.caps, driver.xmlopt,
62 VIR_DOMAIN_DEF_PARSE_STATUS |
63 VIR_DOMAIN_DEF_PARSE_ACTUAL_NET |
64 VIR_DOMAIN_DEF_PARSE_PCI_ORIG_STATES |
65 VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE |
66 VIR_DOMAIN_DEF_PARSE_ALLOW_POST_PARSE_FAIL))) {
67 VIR_TEST_DEBUG("\nfailed to parse '%s'\n", data->infile);
68 goto cleanup;
71 if (!(actual = virDomainObjFormat(driver.xmlopt, obj, NULL,
72 VIR_DOMAIN_DEF_FORMAT_SECURE |
73 VIR_DOMAIN_DEF_FORMAT_STATUS |
74 VIR_DOMAIN_DEF_FORMAT_ACTUAL_NET |
75 VIR_DOMAIN_DEF_FORMAT_PCI_ORIG_STATES |
76 VIR_DOMAIN_DEF_FORMAT_CLOCK_ADJUST))) {
77 VIR_TEST_DEBUG("\nfailed to format back '%s'\n", data->infile);
78 goto cleanup;
81 if (virTestCompareToFile(actual, data->outfile) < 0)
82 goto cleanup;
84 ret = 0;
86 cleanup:
87 virDomainObjEndAPI(&obj);
88 VIR_FREE(actual);
89 return ret;
93 static int
94 testInfoSetPaths(struct testQemuInfo *info,
95 const char *suffix,
96 int when)
98 VIR_FREE(info->infile);
99 VIR_FREE(info->outfile);
101 if (virAsprintf(&info->infile, "%s/qemuxml2argvdata/%s.xml",
102 abs_srcdir, info->name) < 0)
103 goto error;
105 if (virAsprintf(&info->outfile,
106 "%s/qemuxml2xmloutdata/%s-%s%s.xml",
107 abs_srcdir, info->name,
108 when == WHEN_ACTIVE ? "active" : "inactive",
109 suffix) < 0)
110 goto error;
112 if (!virFileExists(info->outfile)) {
113 VIR_FREE(info->outfile);
115 if (virAsprintf(&info->outfile,
116 "%s/qemuxml2xmloutdata/%s%s.xml",
117 abs_srcdir, info->name, suffix) < 0)
118 goto error;
121 return 0;
123 error:
124 testQemuInfoClear(info);
125 return -1;
129 static const char *statusPath = abs_srcdir "/qemustatusxml2xmldata/";
131 static int
132 testInfoSetStatusPaths(struct testQemuInfo *info)
134 if (virAsprintf(&info->infile, "%s%s-in.xml", statusPath, info->name) < 0 ||
135 virAsprintf(&info->outfile, "%s%s-out.xml", statusPath, info->name) < 0)
136 goto error;
138 return 0;
140 error:
141 testQemuInfoClear(info);
142 return -1;
146 # define FAKEROOTDIRTEMPLATE abs_builddir "/fakerootdir-XXXXXX"
148 static int
149 mymain(void)
151 int ret = 0;
152 char *fakerootdir;
153 virQEMUDriverConfigPtr cfg = NULL;
154 virHashTablePtr capslatest = NULL;
156 capslatest = testQemuGetLatestCaps();
157 if (!capslatest)
158 return EXIT_FAILURE;
160 if (VIR_STRDUP_QUIET(fakerootdir, FAKEROOTDIRTEMPLATE) < 0) {
161 fprintf(stderr, "Out of memory\n");
162 abort();
165 if (!mkdtemp(fakerootdir)) {
166 fprintf(stderr, "Cannot create fakerootdir");
167 abort();
170 setenv("LIBVIRT_FAKE_ROOT_DIR", fakerootdir, 1);
172 /* Required for tpm-emulator tests
174 virFileWrapperAddPrefix(SYSCONFDIR "/qemu/firmware",
175 abs_srcdir "/qemufirmwaredata/etc/qemu/firmware");
176 virFileWrapperAddPrefix(PREFIX "/share/qemu/firmware",
177 abs_srcdir "/qemufirmwaredata/usr/share/qemu/firmware");
178 virFileWrapperAddPrefix("/home/user/.config/qemu/firmware",
179 abs_srcdir "/qemufirmwaredata/home/user/.config/qemu/firmware");
181 if (qemuTestDriverInit(&driver) < 0)
182 return EXIT_FAILURE;
184 cfg = virQEMUDriverGetConfig(&driver);
186 # define DO_TEST_INTERNAL(_name, suffix, when, ...) \
187 do { \
188 static struct testQemuInfo info = { \
189 .name = _name, \
190 }; \
191 if (testQemuInfoSetArgs(&info, capslatest, \
192 __VA_ARGS__, \
193 ARG_END) < 0 || \
194 qemuTestCapsCacheInsert(driver.qemuCapsCache, info.qemuCaps) < 0) { \
195 VIR_TEST_DEBUG("Failed to generate test data for '%s'", _name); \
196 return -1; \
199 if (when & WHEN_INACTIVE) { \
200 if (testInfoSetPaths(&info, suffix, WHEN_INACTIVE) < 0) { \
201 VIR_TEST_DEBUG("Failed to generate inactive paths for '%s'", _name); \
202 return -1; \
204 if (virTestRun("QEMU XML-2-XML-inactive " _name, \
205 testXML2XMLInactive, &info) < 0) \
206 ret = -1; \
209 if (when & WHEN_ACTIVE) { \
210 if (testInfoSetPaths(&info, suffix, WHEN_ACTIVE) < 0) { \
211 VIR_TEST_DEBUG("Failed to generate active paths for '%s'", _name); \
212 return -1; \
214 if (virTestRun("QEMU XML-2-XML-active " _name, \
215 testXML2XMLActive, &info) < 0) \
216 ret = -1; \
218 testQemuInfoClear(&info); \
219 } while (0)
221 # define DO_TEST_CAPS_INTERNAL(name, arch, ver, ...) \
222 DO_TEST_INTERNAL(name, "." arch "-" ver, WHEN_BOTH, \
223 ARG_CAPS_ARCH, arch, \
224 ARG_CAPS_VER, ver, \
225 __VA_ARGS__)
227 # define DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ...) \
228 DO_TEST_CAPS_INTERNAL(name, arch, "latest", __VA_ARGS__)
230 # define DO_TEST_CAPS_ARCH_VER_FULL(name, arch, ver, ...) \
231 DO_TEST_CAPS_INTERNAL(name, arch, ver, __VA_ARGS__)
233 # define DO_TEST_CAPS_ARCH_LATEST(name, arch) \
234 DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ARG_END)
236 # define DO_TEST_CAPS_ARCH_VER(name, arch, ver) \
237 DO_TEST_CAPS_ARCH_VER_FULL(name, arch, ver, ARG_END)
239 # define DO_TEST_CAPS_LATEST(name) \
240 DO_TEST_CAPS_ARCH_LATEST(name, "x86_64")
242 # define DO_TEST_CAPS_VER(name, ver) \
243 DO_TEST_CAPS_ARCH_VER(name, "x86_64", ver)
245 # define DO_TEST_FULL(name, when, ...) \
246 DO_TEST_INTERNAL(name, "", when, __VA_ARGS__)
248 # define DO_TEST(name, ...) \
249 DO_TEST_FULL(name, WHEN_BOTH, \
250 ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST)
252 # define NONE QEMU_CAPS_LAST
254 /* Unset or set all envvars here that are copied in qemudBuildCommandLine
255 * using ADD_ENV_COPY, otherwise these tests may fail due to unexpected
256 * values for these envvars */
257 setenv("PATH", "/bin", 1);
259 DO_TEST("minimal", NONE);
260 DO_TEST_CAPS_LATEST("genid");
261 DO_TEST_CAPS_LATEST("genid-auto");
262 DO_TEST("machine-core-on", NONE);
263 DO_TEST("machine-core-off", NONE);
264 DO_TEST("machine-loadparm-multiple-disks-nets-s390", NONE);
265 DO_TEST("default-kvm-host-arch", NONE);
266 DO_TEST("default-qemu-host-arch", NONE);
267 DO_TEST("boot-cdrom", NONE);
268 DO_TEST("boot-network", NONE);
269 DO_TEST("boot-floppy", NONE);
270 DO_TEST("boot-floppy-q35",
271 QEMU_CAPS_DEVICE_IOH3420,
272 QEMU_CAPS_ICH9_AHCI);
273 DO_TEST("boot-multi", NONE);
274 DO_TEST("boot-menu-enable-with-timeout", NONE);
275 DO_TEST("boot-menu-disable", NONE);
276 DO_TEST("boot-menu-disable-with-timeout", NONE);
277 DO_TEST("boot-order", NONE);
279 DO_TEST("reboot-timeout-enabled", NONE);
280 DO_TEST("reboot-timeout-disabled", NONE);
282 DO_TEST("clock-utc", NONE);
283 DO_TEST("clock-localtime", NONE);
284 DO_TEST("cpu-empty", NONE);
285 DO_TEST("cpu-kvmclock", NONE);
286 DO_TEST("cpu-host-kvmclock", NONE);
287 DO_TEST("cpu-host-passthrough-features", NONE);
288 DO_TEST("cpu-host-model-features", NONE);
289 DO_TEST("clock-catchup", NONE);
290 DO_TEST("kvmclock", NONE);
291 DO_TEST("clock-timer-hyperv-rtc", NONE);
293 DO_TEST("cpu-eoi-disabled", NONE);
294 DO_TEST("cpu-eoi-enabled", NONE);
295 DO_TEST("eoi-disabled", NONE);
296 DO_TEST("eoi-enabled", NONE);
297 DO_TEST("pv-spinlock-disabled", NONE);
298 DO_TEST("pv-spinlock-enabled", NONE);
300 DO_TEST("hyperv", NONE);
301 DO_TEST("hyperv-off", NONE);
302 DO_TEST("hyperv-panic", NONE);
303 DO_TEST("hyperv-stimer-direct", NONE);
305 DO_TEST("kvm-features", NONE);
306 DO_TEST("kvm-features-off", NONE);
308 DO_TEST("pmu-feature", NONE);
309 DO_TEST("pmu-feature-off", NONE);
311 DO_TEST("pages-discard", NONE);
312 DO_TEST("pages-discard-hugepages", NONE);
313 DO_TEST("pages-dimm-discard", NONE);
314 DO_TEST("hugepages-default", NONE);
315 DO_TEST("hugepages-default-2M", NONE);
316 DO_TEST("hugepages-default-system-size", NONE);
317 DO_TEST("hugepages-nodeset", NONE);
318 DO_TEST("hugepages-numa-default-2M", NONE);
319 DO_TEST("hugepages-numa-default-dimm", NONE);
320 DO_TEST("hugepages-numa-nodeset", NONE);
321 DO_TEST("hugepages-numa-nodeset-part", NONE);
322 DO_TEST("hugepages-shared", NONE);
323 DO_TEST("hugepages-memaccess", NONE);
324 DO_TEST("hugepages-memaccess2", NONE);
325 DO_TEST("hugepages-nvdimm", NONE);
326 DO_TEST("nosharepages", NONE);
327 DO_TEST("restore-v2", NONE);
328 DO_TEST("migrate", NONE);
329 DO_TEST("qemu-ns-no-env", NONE);
330 DO_TEST("disk-aio", NONE);
331 DO_TEST("disk-cdrom", NONE);
332 DO_TEST("disk-cdrom-bus-other", NONE);
333 DO_TEST("disk-floppy", NONE);
334 DO_TEST("disk-usb-device", NONE);
335 DO_TEST("disk-virtio", NONE);
336 DO_TEST("floppy-drive-fat", NONE);
337 DO_TEST("disk-virtio-queues", QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES);
338 DO_TEST("disk-boot-disk", NONE);
339 DO_TEST("disk-boot-cdrom", NONE);
340 DO_TEST("disk-error-policy", NONE);
341 DO_TEST("disk-fmt-qcow", NONE);
342 DO_TEST("disk-cache", QEMU_CAPS_SCSI_LSI);
343 DO_TEST("disk-network-nbd", NONE);
344 DO_TEST("disk-network-iscsi", QEMU_CAPS_VIRTIO_SCSI);
345 DO_TEST("disk-network-gluster", NONE);
346 DO_TEST("disk-network-rbd", NONE);
347 DO_TEST("disk-network-source-auth", NONE);
348 DO_TEST("disk-network-sheepdog", NONE);
349 DO_TEST("disk-network-vxhs", NONE);
350 DO_TEST("disk-network-tlsx509", NONE);
351 DO_TEST("disk-scsi", QEMU_CAPS_SCSI_LSI, QEMU_CAPS_SCSI_MEGASAS,
352 QEMU_CAPS_SCSI_MPTSAS1068, QEMU_CAPS_SCSI_DISK_WWN);
353 DO_TEST("disk-virtio-scsi-reservations",
354 QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_PR_MANAGER_HELPER);
355 DO_TEST("controller-virtio-scsi", QEMU_CAPS_VIRTIO_SCSI);
356 DO_TEST("disk-virtio-s390-zpci",
357 QEMU_CAPS_DEVICE_ZPCI,
358 QEMU_CAPS_CCW);
359 DO_TEST("disk-mirror-old", NONE);
360 DO_TEST("disk-mirror", NONE);
361 DO_TEST("disk-active-commit", NONE);
362 DO_TEST("graphics-listen-network", NONE);
363 DO_TEST("graphics-vnc", NONE);
364 DO_TEST("graphics-vnc-websocket", NONE);
365 DO_TEST("graphics-vnc-sasl", NONE);
366 DO_TEST("graphics-vnc-tls", NONE);
367 DO_TEST("graphics-vnc-no-listen-attr", NONE);
368 DO_TEST("graphics-vnc-remove-generated-socket", NONE);
369 cfg->vncAutoUnixSocket = true;
370 DO_TEST("graphics-vnc-auto-socket-cfg", NONE);
371 cfg->vncAutoUnixSocket = false;
372 DO_TEST("graphics-vnc-socket", NONE);
373 DO_TEST("graphics-vnc-auto-socket", NONE);
374 DO_TEST("graphics-vnc-egl-headless",
375 QEMU_CAPS_EGL_HEADLESS);
377 DO_TEST("graphics-sdl", NONE);
378 DO_TEST("graphics-sdl-fullscreen", NONE);
379 DO_TEST("graphics-spice", NONE);
380 DO_TEST("graphics-spice-compression", NONE);
381 DO_TEST("graphics-spice-qxl-vga", NONE);
382 DO_TEST("graphics-spice-socket", NONE);
383 DO_TEST("graphics-spice-auto-socket", NONE);
384 cfg->spiceAutoUnixSocket = true;
385 DO_TEST("graphics-spice-auto-socket-cfg", NONE);
386 cfg->spiceAutoUnixSocket = false;
387 DO_TEST("graphics-spice-egl-headless",
388 QEMU_CAPS_EGL_HEADLESS);
390 DO_TEST("graphics-egl-headless-rendernode",
391 QEMU_CAPS_EGL_HEADLESS,
392 QEMU_CAPS_EGL_HEADLESS_RENDERNODE);
394 DO_TEST("input-usbmouse", NONE);
395 DO_TEST("input-usbtablet", NONE);
396 DO_TEST("misc-acpi", NONE);
397 DO_TEST("misc-disable-s3", NONE);
398 DO_TEST("misc-disable-suspends", NONE);
399 DO_TEST("misc-enable-s4", NONE);
400 DO_TEST("misc-no-reboot", NONE);
401 DO_TEST("misc-uuid", NONE);
402 DO_TEST("net-vhostuser", NONE);
403 DO_TEST("net-user", NONE);
404 DO_TEST("net-user-addr", NONE);
405 DO_TEST("net-virtio", NONE);
406 DO_TEST("net-virtio-device", NONE);
407 DO_TEST("net-virtio-disable-offloads", NONE);
408 DO_TEST("net-eth", NONE);
409 DO_TEST("net-eth-ifname", NONE);
410 DO_TEST("net-eth-hostip", NONE);
411 DO_TEST("net-virtio-network-portgroup", NONE);
412 DO_TEST("net-virtio-rxtxqueuesize", NONE);
413 DO_TEST("net-hostdev", NONE);
414 DO_TEST("net-hostdev-bootorder", NONE);
415 DO_TEST("net-hostdev-vfio", NONE);
416 DO_TEST("net-midonet", NONE);
417 DO_TEST("net-openvswitch", NONE);
418 DO_TEST("sound", NONE);
419 DO_TEST("sound-device", NONE);
420 DO_TEST("watchdog", NONE);
421 DO_TEST("net-bandwidth", NONE);
422 DO_TEST("net-bandwidth2", NONE);
423 DO_TEST("net-mtu", NONE);
424 DO_TEST("net-coalesce", NONE);
425 DO_TEST("net-many-models", NONE);
427 DO_TEST("serial-tcp-tlsx509-chardev", NONE);
428 DO_TEST("serial-tcp-tlsx509-chardev-notls", NONE);
429 DO_TEST("serial-spiceport", NONE);
430 DO_TEST("serial-spiceport-nospice", NONE);
431 DO_TEST("console-compat", NONE);
432 DO_TEST("console-compat2", NONE);
433 DO_TEST("console-virtio-many", NONE);
434 DO_TEST("channel-guestfwd", NONE);
435 DO_TEST("channel-virtio", NONE);
436 DO_TEST("channel-virtio-state", NONE);
438 DO_TEST("channel-unix-source-path", NONE);
440 DO_TEST("hostdev-usb-address", NONE);
441 DO_TEST("hostdev-pci-address", NONE);
442 DO_TEST("hostdev-vfio", NONE);
443 DO_TEST("hostdev-vfio-zpci",
444 QEMU_CAPS_DEVICE_ZPCI,
445 QEMU_CAPS_CCW);
446 DO_TEST("hostdev-vfio-zpci-multidomain-many",
447 QEMU_CAPS_DEVICE_VFIO_PCI,
448 QEMU_CAPS_DEVICE_PCI_BRIDGE,
449 QEMU_CAPS_DEVICE_ZPCI);
450 DO_TEST("hostdev-vfio-zpci-autogenerate",
451 QEMU_CAPS_DEVICE_VFIO_PCI,
452 QEMU_CAPS_DEVICE_ZPCI);
453 DO_TEST("hostdev-vfio-zpci-boundaries",
454 QEMU_CAPS_DEVICE_VFIO_PCI,
455 QEMU_CAPS_DEVICE_PCI_BRIDGE,
456 QEMU_CAPS_DEVICE_ZPCI);
457 DO_TEST("hostdev-mdev-precreated", NONE);
458 DO_TEST("hostdev-mdev-display", QEMU_CAPS_VFIO_PCI_DISPLAY);
459 DO_TEST("pci-rom", NONE);
460 DO_TEST("pci-rom-disabled", NONE);
461 DO_TEST("pci-rom-disabled-invalid", NONE);
462 DO_TEST("pci-serial-dev-chardev", NONE);
464 DO_TEST("encrypted-disk", QEMU_CAPS_QCOW2_LUKS);
465 DO_TEST("encrypted-disk-usage", QEMU_CAPS_QCOW2_LUKS);
466 DO_TEST("luks-disks", NONE);
467 DO_TEST("luks-disks-source", NONE);
468 DO_TEST("memtune", NONE);
469 DO_TEST("memtune-unlimited", NONE);
470 DO_TEST("blkiotune", NONE);
471 DO_TEST("blkiotune-device", NONE);
472 DO_TEST("cputune", NONE);
473 DO_TEST("cputune-zero-shares", NONE);
474 DO_TEST("cputune-iothreadsched", NONE);
475 DO_TEST("cputune-iothreadsched-zeropriority", NONE);
476 DO_TEST("cputune-numatune", NONE);
477 DO_TEST("vcpu-placement-static",
478 QEMU_CAPS_KVM,
479 QEMU_CAPS_OBJECT_IOTHREAD);
481 DO_TEST("smp", NONE);
482 DO_TEST("iothreads", NONE);
483 DO_TEST("iothreads-ids", NONE);
484 DO_TEST("iothreads-ids-partial", NONE);
485 DO_TEST("cputune-iothreads", NONE);
486 DO_TEST("iothreads-disk", NONE);
487 DO_TEST("iothreads-disk-virtio-ccw",
488 QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390);
489 DO_TEST("iothreads-virtio-scsi-pci",
490 QEMU_CAPS_VIRTIO_SCSI);
491 DO_TEST("iothreads-virtio-scsi-ccw",
492 QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_CCW,
493 QEMU_CAPS_VIRTIO_S390);
494 DO_TEST("lease", NONE);
495 DO_TEST("event_idx", NONE);
496 DO_TEST("vhost_queues", NONE);
497 DO_TEST("interface-driver", NONE);
498 DO_TEST("interface-server", NONE);
499 DO_TEST("virtio-lun", NONE);
501 DO_TEST("usb-none", NONE);
502 DO_TEST("usb-controller", NONE);
503 DO_TEST("usb-piix3-controller",
504 QEMU_CAPS_PIIX3_USB_UHCI);
505 DO_TEST("usb-controller-default-q35",
506 QEMU_CAPS_DEVICE_IOH3420,
507 QEMU_CAPS_PCI_OHCI,
508 QEMU_CAPS_PIIX3_USB_UHCI,
509 QEMU_CAPS_NEC_USB_XHCI);
510 DO_TEST("usb-controller-explicit-q35",
511 QEMU_CAPS_DEVICE_IOH3420,
512 QEMU_CAPS_PCI_OHCI,
513 QEMU_CAPS_PIIX3_USB_UHCI,
514 QEMU_CAPS_NEC_USB_XHCI);
515 DO_TEST("ppc64-usb-controller",
516 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
517 QEMU_CAPS_PCI_OHCI);
518 DO_TEST("ppc64-usb-controller-legacy",
519 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
520 QEMU_CAPS_PIIX3_USB_UHCI);
521 DO_TEST("usb-port-missing", NONE);
522 DO_TEST("usb-redir", NONE);
523 DO_TEST("usb-redir-filter", NONE);
524 DO_TEST("usb-redir-filter-version", NONE);
525 DO_TEST("blkdeviotune", NONE);
526 DO_TEST("blkdeviotune-max", NONE);
527 DO_TEST("blkdeviotune-group-num", NONE);
528 DO_TEST("blkdeviotune-max-length", NONE);
529 DO_TEST("controller-usb-order", NONE);
531 DO_TEST_FULL("seclabel-dynamic-baselabel", WHEN_INACTIVE,
532 ARG_QEMU_CAPS, NONE);
533 DO_TEST_FULL("seclabel-dynamic-override", WHEN_INACTIVE,
534 ARG_QEMU_CAPS, NONE);
535 DO_TEST_FULL("seclabel-dynamic-labelskip", WHEN_INACTIVE,
536 ARG_QEMU_CAPS, NONE);
537 DO_TEST_FULL("seclabel-dynamic-relabel", WHEN_INACTIVE,
538 ARG_QEMU_CAPS, NONE);
539 DO_TEST("seclabel-static", NONE);
540 DO_TEST("seclabel-static-labelskip", NONE);
541 DO_TEST("seclabel-none", NONE);
542 DO_TEST("seclabel-dac-none", NONE);
543 DO_TEST("seclabel-dynamic-none", NONE);
544 DO_TEST("seclabel-device-multiple", NONE);
545 DO_TEST_FULL("seclabel-dynamic-none-relabel", WHEN_INACTIVE,
546 ARG_QEMU_CAPS, NONE);
547 DO_TEST("numad-static-vcpu-no-numatune", NONE);
549 DO_TEST("disk-scsi-lun-passthrough-sgio",
550 QEMU_CAPS_SCSI_LSI, QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_DISK_WWN);
551 DO_TEST("disk-scsi-disk-vpd",
552 QEMU_CAPS_SCSI_LSI, QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_DISK_WWN);
553 DO_TEST("disk-source-pool", NONE);
554 DO_TEST("disk-source-pool-mode", NONE);
556 DO_TEST("disk-discard", NONE);
557 DO_TEST("disk-detect-zeroes", NONE);
559 DO_TEST("disk-serial", NONE);
561 DO_TEST("virtio-rng-random",
562 QEMU_CAPS_DEVICE_VIRTIO_RNG);
563 DO_TEST("virtio-rng-egd",
564 QEMU_CAPS_DEVICE_VIRTIO_RNG);
566 DO_TEST("pseries-nvram",
567 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
568 DO_TEST("pseries-panic-missing",
569 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
570 DO_TEST("pseries-panic-no-address",
571 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
573 DO_TEST("pseries-phb-simple",
574 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
575 DO_TEST("pseries-phb-default-missing",
576 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
577 DO_TEST("pseries-phb-numa-node",
578 QEMU_CAPS_NUMA,
579 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
580 QEMU_CAPS_SPAPR_PCI_HOST_BRIDGE_NUMA_NODE);
582 DO_TEST("pseries-many-devices",
583 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
584 QEMU_CAPS_VIRTIO_SCSI);
585 DO_TEST("pseries-many-buses-1",
586 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
587 QEMU_CAPS_VIRTIO_SCSI);
588 DO_TEST("pseries-many-buses-2",
589 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
590 QEMU_CAPS_VIRTIO_SCSI);
591 DO_TEST("pseries-hostdevs-1",
592 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
593 QEMU_CAPS_VIRTIO_SCSI,
594 QEMU_CAPS_DEVICE_VFIO_PCI);
595 DO_TEST("pseries-hostdevs-2",
596 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
597 QEMU_CAPS_VIRTIO_SCSI,
598 QEMU_CAPS_DEVICE_VFIO_PCI);
599 DO_TEST("pseries-hostdevs-3",
600 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
601 QEMU_CAPS_VIRTIO_SCSI,
602 QEMU_CAPS_DEVICE_VFIO_PCI);
604 DO_TEST("pseries-features",
605 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
606 QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_SIZE,
607 QEMU_CAPS_MACHINE_PSERIES_CAP_HTM,
608 QEMU_CAPS_MACHINE_PSERIES_CAP_NESTED_HV,
609 QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
611 DO_TEST("pseries-serial-native",
612 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
613 QEMU_CAPS_DEVICE_SPAPR_VTY);
614 DO_TEST("pseries-serial+console-native",
615 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
616 QEMU_CAPS_DEVICE_SPAPR_VTY);
617 DO_TEST("pseries-serial-compat",
618 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
619 QEMU_CAPS_DEVICE_SPAPR_VTY);
620 DO_TEST("pseries-serial-pci",
621 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
622 QEMU_CAPS_DEVICE_PCI_SERIAL);
623 DO_TEST("pseries-serial-usb",
624 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
625 QEMU_CAPS_DEVICE_QEMU_XHCI,
626 QEMU_CAPS_DEVICE_USB_SERIAL);
627 DO_TEST("pseries-console-native",
628 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
629 QEMU_CAPS_DEVICE_SPAPR_VTY);
630 DO_TEST("pseries-console-virtio",
631 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
633 DO_TEST("mach-virt-serial-native", NONE);
634 DO_TEST("mach-virt-serial+console-native", NONE);
635 DO_TEST("mach-virt-serial-compat", NONE);
636 DO_TEST("mach-virt-serial-pci",
637 QEMU_CAPS_OBJECT_GPEX,
638 QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
639 QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
640 QEMU_CAPS_DEVICE_PCI_BRIDGE,
641 QEMU_CAPS_DEVICE_PCI_SERIAL);
642 DO_TEST("mach-virt-serial-usb",
643 QEMU_CAPS_OBJECT_GPEX,
644 QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
645 QEMU_CAPS_DEVICE_QEMU_XHCI,
646 QEMU_CAPS_DEVICE_USB_SERIAL);
647 DO_TEST("mach-virt-console-native",
648 QEMU_CAPS_DEVICE_PL011);
649 DO_TEST("mach-virt-console-virtio",
650 QEMU_CAPS_DEVICE_VIRTIO_MMIO);
652 DO_TEST("balloon-device-auto", NONE);
653 DO_TEST("balloon-device-period", NONE);
654 DO_TEST("channel-virtio-auto", NONE);
655 DO_TEST("console-compat-auto", NONE);
656 DO_TEST("disk-scsi-device-auto",
657 QEMU_CAPS_SCSI_LSI);
658 DO_TEST("console-virtio", NONE);
659 DO_TEST("serial-target-port-auto", NONE);
660 DO_TEST("graphics-listen-network2", NONE);
661 DO_TEST("graphics-spice-timeout", NONE);
662 DO_TEST("numad-auto-vcpu-no-numatune", NONE);
663 DO_TEST("numad-auto-memory-vcpu-no-cpuset-and-placement", NONE);
664 DO_TEST("numad-auto-memory-vcpu-cpuset", NONE);
665 DO_TEST("usb-ich9-ehci-addr", NONE);
666 DO_TEST("disk-copy_on_read", NONE);
667 DO_TEST("tpm-passthrough", NONE);
668 DO_TEST("tpm-passthrough-crb", NONE);
669 DO_TEST("tpm-emulator", NONE);
670 DO_TEST("tpm-emulator-tpm2", NONE);
671 DO_TEST("tpm-emulator-tpm2-enc", NONE);
673 DO_TEST("metadata", NONE);
674 DO_TEST("metadata-duplicate", NONE);
676 DO_TEST("pci-bridge",
677 QEMU_CAPS_DEVICE_PCI_BRIDGE,
678 QEMU_CAPS_VNC,
679 QEMU_CAPS_DEVICE_CIRRUS_VGA);
680 DO_TEST("pci-many",
681 QEMU_CAPS_DEVICE_CIRRUS_VGA);
682 DO_TEST("pci-bridge-many-disks",
683 QEMU_CAPS_DEVICE_PCI_BRIDGE);
684 DO_TEST("pci-autoadd-addr",
685 QEMU_CAPS_DEVICE_PCI_BRIDGE,
686 QEMU_CAPS_DEVICE_CIRRUS_VGA);
687 DO_TEST("pci-autoadd-idx",
688 QEMU_CAPS_DEVICE_PCI_BRIDGE,
689 QEMU_CAPS_DEVICE_CIRRUS_VGA);
690 DO_TEST("pci-autofill-addr", NONE);
692 DO_TEST("q35",
693 QEMU_CAPS_DEVICE_PCI_BRIDGE,
694 QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
695 QEMU_CAPS_DEVICE_IOH3420,
696 QEMU_CAPS_ICH9_AHCI,
697 QEMU_CAPS_ICH9_USB_EHCI1,
698 QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
699 QEMU_CAPS_DEVICE_QXL);
700 DO_TEST("q35-usb2",
701 QEMU_CAPS_DEVICE_PCI_BRIDGE,
702 QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
703 QEMU_CAPS_DEVICE_IOH3420,
704 QEMU_CAPS_ICH9_AHCI,
705 QEMU_CAPS_ICH9_USB_EHCI1,
706 QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
707 QEMU_CAPS_DEVICE_QXL);
708 DO_TEST("q35-usb2-multi",
709 QEMU_CAPS_DEVICE_PCI_BRIDGE,
710 QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
711 QEMU_CAPS_DEVICE_IOH3420,
712 QEMU_CAPS_ICH9_AHCI,
713 QEMU_CAPS_ICH9_USB_EHCI1,
714 QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
715 QEMU_CAPS_DEVICE_QXL);
716 DO_TEST("q35-usb2-reorder",
717 QEMU_CAPS_DEVICE_PCI_BRIDGE,
718 QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
719 QEMU_CAPS_DEVICE_IOH3420,
720 QEMU_CAPS_ICH9_AHCI,
721 QEMU_CAPS_ICH9_USB_EHCI1,
722 QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
723 QEMU_CAPS_DEVICE_QXL);
724 DO_TEST("q35-pcie",
725 QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY,
726 QEMU_CAPS_DEVICE_VIRTIO_RNG,
727 QEMU_CAPS_OBJECT_RNG_RANDOM,
728 QEMU_CAPS_DEVICE_VIRTIO_NET,
729 QEMU_CAPS_DEVICE_VIRTIO_GPU,
730 QEMU_CAPS_VIRTIO_GPU_VIRGL,
731 QEMU_CAPS_VIRTIO_KEYBOARD,
732 QEMU_CAPS_VIRTIO_MOUSE,
733 QEMU_CAPS_VIRTIO_TABLET,
734 QEMU_CAPS_VIRTIO_INPUT_HOST,
735 QEMU_CAPS_VIRTIO_SCSI,
736 QEMU_CAPS_DEVICE_PCI_BRIDGE,
737 QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
738 QEMU_CAPS_DEVICE_IOH3420,
739 QEMU_CAPS_ICH9_AHCI,
740 QEMU_CAPS_ICH9_USB_EHCI1,
741 QEMU_CAPS_NEC_USB_XHCI,
742 QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
743 /* same XML as q35-pcie, but don't set
744 QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY */
745 DO_TEST("q35-virtio-pci",
746 QEMU_CAPS_DEVICE_VIRTIO_RNG,
747 QEMU_CAPS_OBJECT_RNG_RANDOM,
748 QEMU_CAPS_DEVICE_VIRTIO_NET,
749 QEMU_CAPS_DEVICE_VIRTIO_GPU,
750 QEMU_CAPS_VIRTIO_GPU_VIRGL,
751 QEMU_CAPS_VIRTIO_KEYBOARD,
752 QEMU_CAPS_VIRTIO_MOUSE,
753 QEMU_CAPS_VIRTIO_TABLET,
754 QEMU_CAPS_VIRTIO_INPUT_HOST,
755 QEMU_CAPS_VIRTIO_SCSI,
756 QEMU_CAPS_DEVICE_PCI_BRIDGE,
757 QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
758 QEMU_CAPS_DEVICE_IOH3420,
759 QEMU_CAPS_ICH9_AHCI,
760 QEMU_CAPS_ICH9_USB_EHCI1,
761 QEMU_CAPS_NEC_USB_XHCI,
762 QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
763 /* same as q35-pcie, but all PCI controllers are added automatically */
764 DO_TEST("q35-pcie-autoadd",
765 QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY,
766 QEMU_CAPS_DEVICE_VIRTIO_RNG,
767 QEMU_CAPS_OBJECT_RNG_RANDOM,
768 QEMU_CAPS_DEVICE_VIRTIO_NET,
769 QEMU_CAPS_DEVICE_VIRTIO_GPU,
770 QEMU_CAPS_VIRTIO_GPU_VIRGL,
771 QEMU_CAPS_VIRTIO_KEYBOARD,
772 QEMU_CAPS_VIRTIO_MOUSE,
773 QEMU_CAPS_VIRTIO_TABLET,
774 QEMU_CAPS_VIRTIO_INPUT_HOST,
775 QEMU_CAPS_VIRTIO_SCSI,
776 QEMU_CAPS_DEVICE_PCI_BRIDGE,
777 QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
778 QEMU_CAPS_DEVICE_IOH3420,
779 QEMU_CAPS_ICH9_AHCI,
780 QEMU_CAPS_ICH9_USB_EHCI1,
781 QEMU_CAPS_NEC_USB_XHCI,
782 QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
783 DO_TEST("q35-default-devices-only",
784 QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY,
785 QEMU_CAPS_DEVICE_VIRTIO_RNG,
786 QEMU_CAPS_OBJECT_RNG_RANDOM,
787 QEMU_CAPS_DEVICE_VIRTIO_NET,
788 QEMU_CAPS_DEVICE_VIRTIO_GPU,
789 QEMU_CAPS_VIRTIO_GPU_VIRGL,
790 QEMU_CAPS_VIRTIO_KEYBOARD,
791 QEMU_CAPS_VIRTIO_MOUSE,
792 QEMU_CAPS_VIRTIO_TABLET,
793 QEMU_CAPS_VIRTIO_INPUT_HOST,
794 QEMU_CAPS_VIRTIO_SCSI,
795 QEMU_CAPS_DEVICE_PCI_BRIDGE,
796 QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
797 QEMU_CAPS_DEVICE_IOH3420,
798 QEMU_CAPS_ICH9_AHCI,
799 QEMU_CAPS_ICH9_USB_EHCI1,
800 QEMU_CAPS_NEC_USB_XHCI,
801 QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
802 DO_TEST("q35-multifunction",
803 QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY,
804 QEMU_CAPS_DEVICE_VIRTIO_RNG,
805 QEMU_CAPS_OBJECT_RNG_RANDOM,
806 QEMU_CAPS_DEVICE_VIRTIO_NET,
807 QEMU_CAPS_DEVICE_VIRTIO_GPU,
808 QEMU_CAPS_VIRTIO_GPU_VIRGL,
809 QEMU_CAPS_VIRTIO_KEYBOARD,
810 QEMU_CAPS_VIRTIO_MOUSE,
811 QEMU_CAPS_VIRTIO_TABLET,
812 QEMU_CAPS_VIRTIO_INPUT_HOST,
813 QEMU_CAPS_VIRTIO_SCSI,
814 QEMU_CAPS_DEVICE_PCI_BRIDGE,
815 QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
816 QEMU_CAPS_DEVICE_IOH3420,
817 QEMU_CAPS_ICH9_AHCI,
818 QEMU_CAPS_ICH9_USB_EHCI1,
819 QEMU_CAPS_NEC_USB_XHCI,
820 QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
821 DO_TEST("q35-virt-manager-basic",
822 QEMU_CAPS_KVM,
823 QEMU_CAPS_ICH9_DISABLE_S3,
824 QEMU_CAPS_ICH9_DISABLE_S4,
825 QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY,
826 QEMU_CAPS_DEVICE_VIRTIO_RNG,
827 QEMU_CAPS_OBJECT_RNG_RANDOM,
828 QEMU_CAPS_DEVICE_VIRTIO_NET,
829 QEMU_CAPS_DEVICE_VIRTIO_GPU,
830 QEMU_CAPS_VIRTIO_GPU_VIRGL,
831 QEMU_CAPS_VIRTIO_KEYBOARD,
832 QEMU_CAPS_VIRTIO_MOUSE,
833 QEMU_CAPS_VIRTIO_TABLET,
834 QEMU_CAPS_VIRTIO_INPUT_HOST,
835 QEMU_CAPS_VIRTIO_SCSI,
836 QEMU_CAPS_DEVICE_PCI_BRIDGE,
837 QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
838 QEMU_CAPS_DEVICE_IOH3420,
839 QEMU_CAPS_ICH9_AHCI,
840 QEMU_CAPS_ICH9_USB_EHCI1,
841 QEMU_CAPS_NEC_USB_XHCI,
842 QEMU_CAPS_DEVICE_ICH9_INTEL_HDA,
843 QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
844 QEMU_CAPS_SPICE,
845 QEMU_CAPS_DEVICE_QXL,
846 QEMU_CAPS_HDA_DUPLEX,
847 QEMU_CAPS_USB_REDIR);
848 DO_TEST("pcie-root",
849 QEMU_CAPS_DEVICE_IOH3420,
850 QEMU_CAPS_ICH9_AHCI,
851 QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
852 QEMU_CAPS_DEVICE_QXL);
854 /* Test automatic and manual setting of pcie-root-port attributes */
855 DO_TEST("pcie-root-port",
856 QEMU_CAPS_DEVICE_IOH3420,
857 QEMU_CAPS_ICH9_AHCI,
858 QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
859 QEMU_CAPS_DEVICE_QXL);
861 /* Make sure the default model for PCIe Root Ports is picked correctly
862 * based on QEMU binary capabilities. We use x86/q35 for the test, but
863 * any PCIe machine type (such as aarch64/virt) will behave the same */
864 DO_TEST("pcie-root-port-model-generic",
865 QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
866 QEMU_CAPS_DEVICE_IOH3420);
867 DO_TEST("pcie-root-port-model-ioh3420",
868 QEMU_CAPS_DEVICE_IOH3420);
870 DO_TEST("pcie-switch-upstream-port",
871 QEMU_CAPS_DEVICE_IOH3420,
872 QEMU_CAPS_DEVICE_X3130_UPSTREAM,
873 QEMU_CAPS_ICH9_AHCI,
874 QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
875 QEMU_CAPS_DEVICE_QXL);
876 DO_TEST("pcie-switch-downstream-port",
877 QEMU_CAPS_DEVICE_IOH3420,
878 QEMU_CAPS_DEVICE_X3130_UPSTREAM,
879 QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM,
880 QEMU_CAPS_ICH9_AHCI,
881 QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
882 QEMU_CAPS_DEVICE_QXL);
883 DO_TEST("pci-expander-bus",
884 QEMU_CAPS_DEVICE_PXB);
885 DO_TEST("pcie-expander-bus",
886 QEMU_CAPS_DEVICE_IOH3420,
887 QEMU_CAPS_DEVICE_X3130_UPSTREAM,
888 QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM,
889 QEMU_CAPS_DEVICE_PXB_PCIE);
890 DO_TEST("autoindex",
891 QEMU_CAPS_DEVICE_PCI_BRIDGE,
892 QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
893 QEMU_CAPS_DEVICE_IOH3420,
894 QEMU_CAPS_DEVICE_X3130_UPSTREAM,
895 QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM,
896 QEMU_CAPS_ICH9_AHCI,
897 QEMU_CAPS_ICH9_USB_EHCI1,
898 QEMU_CAPS_NEC_USB_XHCI);
899 /* Make sure the user can always override libvirt's default device
900 * placement policy by providing an explicit PCI address */
901 DO_TEST("q35-pci-force-address",
902 QEMU_CAPS_DEVICE_PCI_BRIDGE,
903 QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
904 QEMU_CAPS_DEVICE_IOH3420,
905 QEMU_CAPS_HDA_DUPLEX);
907 DO_TEST("hostdev-scsi-vhost-scsi-ccw",
908 QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_VHOST_SCSI,
909 QEMU_CAPS_CCW);
910 DO_TEST("hostdev-scsi-vhost-scsi-pci",
911 QEMU_CAPS_VIRTIO_SCSI,
912 QEMU_CAPS_DEVICE_VHOST_SCSI);
913 DO_TEST("hostdev-scsi-vhost-scsi-pcie",
914 QEMU_CAPS_KVM,
915 QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_VHOST_SCSI,
916 QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
917 QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY);
918 DO_TEST("hostdev-scsi-lsi",
919 QEMU_CAPS_VIRTIO_SCSI,
920 QEMU_CAPS_SCSI_LSI);
921 DO_TEST("hostdev-scsi-virtio-scsi",
922 QEMU_CAPS_VIRTIO_SCSI,
923 QEMU_CAPS_SCSI_LSI);
924 DO_TEST("hostdev-scsi-readonly",
925 QEMU_CAPS_VIRTIO_SCSI,
926 QEMU_CAPS_SCSI_LSI);
928 DO_TEST("hostdev-scsi-shareable",
929 QEMU_CAPS_VIRTIO_SCSI,
930 QEMU_CAPS_SCSI_LSI);
931 DO_TEST("hostdev-scsi-sgio",
932 QEMU_CAPS_VIRTIO_SCSI,
933 QEMU_CAPS_SCSI_LSI);
934 DO_TEST("hostdev-scsi-rawio",
935 QEMU_CAPS_VIRTIO_SCSI,
936 QEMU_CAPS_SCSI_LSI);
938 DO_TEST("hostdev-scsi-autogen-address",
939 QEMU_CAPS_VIRTIO_SCSI,
940 QEMU_CAPS_SCSI_LSI);
941 DO_TEST("hostdev-scsi-large-unit",
942 QEMU_CAPS_VIRTIO_SCSI,
943 QEMU_CAPS_SCSI_LSI);
945 DO_TEST("hostdev-scsi-lsi-iscsi",
946 QEMU_CAPS_VIRTIO_SCSI,
947 QEMU_CAPS_SCSI_LSI);
948 DO_TEST("hostdev-scsi-lsi-iscsi-auth",
949 QEMU_CAPS_VIRTIO_SCSI,
950 QEMU_CAPS_SCSI_LSI);
951 DO_TEST("hostdev-scsi-virtio-iscsi",
952 QEMU_CAPS_VIRTIO_SCSI,
953 QEMU_CAPS_SCSI_LSI);
954 DO_TEST("hostdev-scsi-virtio-iscsi-auth",
955 QEMU_CAPS_VIRTIO_SCSI,
956 QEMU_CAPS_SCSI_LSI);
958 DO_TEST("hostdev-subsys-mdev-vfio-ccw",
959 QEMU_CAPS_CCW,
960 QEMU_CAPS_CCW_CSSID_UNRESTRICTED,
961 QEMU_CAPS_DEVICE_VFIO_CCW);
963 DO_TEST("s390-defaultconsole",
964 QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390);
965 DO_TEST("s390-panic",
966 QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390);
967 DO_TEST("s390-panic-missing",
968 QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390);
969 DO_TEST("s390-panic-no-address",
970 QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390);
971 DO_TEST("s390-serial",
972 QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390);
973 DO_TEST("s390-serial-2",
974 QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390);
975 DO_TEST("s390-serial-console",
976 QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390);
978 DO_TEST("pcihole64", NONE);
979 DO_TEST("pcihole64-gib", NONE);
980 DO_TEST("pcihole64-none", NONE);
981 DO_TEST("pcihole64-q35",
982 QEMU_CAPS_DEVICE_IOH3420,
983 QEMU_CAPS_ICH9_AHCI,
984 QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
985 QEMU_CAPS_DEVICE_QXL,
986 QEMU_CAPS_Q35_PCI_HOLE64_SIZE);
988 DO_TEST("panic", NONE);
989 DO_TEST("panic-isa", NONE);
990 DO_TEST("panic-pseries",
991 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
992 DO_TEST("panic-double", NONE);
993 DO_TEST("panic-no-address", NONE);
995 DO_TEST("disk-backing-chains", NONE);
996 DO_TEST("disk-backing-chains-index", NONE);
997 DO_TEST("disk-backing-chains-noindex", NONE);
999 DO_TEST("chardev-label",
1000 QEMU_CAPS_DEVICE_VIRTIO_RNG);
1002 DO_TEST("cpu-numa1", NONE);
1003 DO_TEST("cpu-numa2", NONE);
1004 DO_TEST("cpu-numa-no-memory-element", NONE);
1005 DO_TEST("cpu-numa-disordered", NONE);
1006 DO_TEST("cpu-numa-disjoint", NONE);
1007 DO_TEST("cpu-numa-memshared", NONE);
1009 DO_TEST("numatune-auto-prefer", NONE);
1010 DO_TEST("numatune-memnode", NONE);
1011 DO_TEST("numatune-memnode-no-memory", NONE);
1013 DO_TEST("bios-nvram", NONE);
1014 DO_TEST("bios-nvram-os-interleave", NONE);
1016 DO_TEST("tap-vhost", NONE);
1017 DO_TEST("tap-vhost-incorrect", NONE);
1018 DO_TEST("shmem", NONE);
1019 DO_TEST("shmem-plain-doorbell", NONE);
1020 DO_TEST("smbios", NONE);
1021 DO_TEST("smbios-multiple-type2", NONE);
1023 DO_TEST_CAPS_LATEST("os-firmware-bios");
1024 DO_TEST_CAPS_LATEST("os-firmware-efi");
1025 DO_TEST_CAPS_LATEST("os-firmware-efi-secboot");
1027 DO_TEST("aarch64-aavmf-virtio-mmio",
1028 QEMU_CAPS_DEVICE_VIRTIO_MMIO,
1029 QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM);
1030 DO_TEST_CAPS_ARCH_LATEST("aarch64-os-firmware-efi", "aarch64");
1031 DO_TEST("aarch64-virtio-pci-default",
1032 QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY,
1033 QEMU_CAPS_DEVICE_VIRTIO_MMIO,
1034 QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM,
1035 QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE,
1036 QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
1037 QEMU_CAPS_DEVICE_IOH3420,
1038 QEMU_CAPS_VIRTIO_SCSI);
1039 DO_TEST("aarch64-virtio-pci-manual-addresses",
1040 QEMU_CAPS_DEVICE_VIRTIO_MMIO,
1041 QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM,
1042 QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE,
1043 QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
1044 QEMU_CAPS_DEVICE_IOH3420,
1045 QEMU_CAPS_VIRTIO_SCSI);
1046 DO_TEST("aarch64-video-virtio-gpu-pci",
1047 QEMU_CAPS_OBJECT_GPEX,
1048 QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420,
1049 QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
1050 QEMU_CAPS_DEVICE_VIRTIO_GPU);
1051 DO_TEST("aarch64-pci-serial",
1052 QEMU_CAPS_DEVICE_PCI_SERIAL,
1053 QEMU_CAPS_CHARDEV_LOGFILE,
1054 QEMU_CAPS_OBJECT_GPEX,
1055 QEMU_CAPS_DEVICE_PCI_BRIDGE,
1056 QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
1057 QEMU_CAPS_DEVICE_PCIE_ROOT_PORT);
1058 DO_TEST("aarch64-traditional-pci",
1059 QEMU_CAPS_OBJECT_GPEX,
1060 QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
1061 QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
1062 QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE,
1063 QEMU_CAPS_DEVICE_PCI_BRIDGE,
1064 QEMU_CAPS_DEVICE_PCI_SERIAL);
1065 DO_TEST("aarch64-video-default",
1066 QEMU_CAPS_OBJECT_GPEX,
1067 QEMU_CAPS_DEVICE_PCI_BRIDGE,
1068 QEMU_CAPS_DEVICE_IOH3420,
1069 QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
1070 QEMU_CAPS_DEVICE_VIRTIO_GPU,
1071 QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
1072 QEMU_CAPS_VNC);
1074 DO_TEST_FULL("aarch64-gic-none", WHEN_BOTH,
1075 ARG_GIC, GIC_NONE,
1076 ARG_QEMU_CAPS, NONE);
1077 DO_TEST_FULL("aarch64-gic-none-v2", WHEN_BOTH,
1078 ARG_GIC, GIC_V2,
1079 ARG_QEMU_CAPS, NONE);
1080 DO_TEST_FULL("aarch64-gic-none-v3", WHEN_BOTH,
1081 ARG_GIC, GIC_V3,
1082 ARG_QEMU_CAPS, NONE);
1083 DO_TEST_FULL("aarch64-gic-none-both", WHEN_BOTH,
1084 ARG_GIC, GIC_BOTH,
1085 ARG_QEMU_CAPS, NONE);
1086 DO_TEST_FULL("aarch64-gic-none-tcg", WHEN_BOTH,
1087 ARG_GIC, GIC_BOTH,
1088 ARG_QEMU_CAPS, NONE);
1089 DO_TEST_FULL("aarch64-gic-default", WHEN_BOTH,
1090 ARG_GIC, GIC_NONE,
1091 ARG_QEMU_CAPS, NONE);
1092 DO_TEST_FULL("aarch64-gic-default-v2", WHEN_BOTH,
1093 ARG_GIC, GIC_V2,
1094 ARG_QEMU_CAPS, NONE);
1095 DO_TEST_FULL("aarch64-gic-default-v3", WHEN_BOTH,
1096 ARG_GIC, GIC_V3,
1097 ARG_QEMU_CAPS, NONE);
1098 DO_TEST_FULL("aarch64-gic-default-both", WHEN_BOTH,
1099 ARG_GIC, GIC_BOTH,
1100 ARG_QEMU_CAPS, NONE);
1101 DO_TEST_FULL("aarch64-gic-v2", WHEN_BOTH,
1102 ARG_GIC, GIC_NONE,
1103 ARG_QEMU_CAPS, NONE);
1104 DO_TEST_FULL("aarch64-gic-v2", WHEN_BOTH,
1105 ARG_GIC, GIC_V2,
1106 ARG_QEMU_CAPS, NONE);
1107 DO_TEST_FULL("aarch64-gic-v2", WHEN_BOTH,
1108 ARG_GIC, GIC_V3,
1109 ARG_QEMU_CAPS, NONE);
1110 DO_TEST_FULL("aarch64-gic-v2", WHEN_BOTH,
1111 ARG_GIC, GIC_BOTH,
1112 ARG_QEMU_CAPS, NONE);
1113 DO_TEST_FULL("aarch64-gic-v3", WHEN_BOTH,
1114 ARG_GIC, GIC_NONE,
1115 ARG_QEMU_CAPS, NONE);
1116 DO_TEST_FULL("aarch64-gic-v3", WHEN_BOTH,
1117 ARG_GIC, GIC_V2,
1118 ARG_QEMU_CAPS, NONE);
1119 DO_TEST_FULL("aarch64-gic-v3", WHEN_BOTH,
1120 ARG_GIC, GIC_V3,
1121 ARG_QEMU_CAPS, NONE);
1122 DO_TEST_FULL("aarch64-gic-v3", WHEN_BOTH,
1123 ARG_GIC, GIC_BOTH,
1124 ARG_QEMU_CAPS, NONE);
1125 DO_TEST_FULL("aarch64-gic-host", WHEN_BOTH,
1126 ARG_GIC, GIC_NONE,
1127 ARG_QEMU_CAPS, NONE);
1128 DO_TEST_FULL("aarch64-gic-host", WHEN_BOTH,
1129 ARG_GIC, GIC_V2,
1130 ARG_QEMU_CAPS, NONE);
1131 DO_TEST_FULL("aarch64-gic-host", WHEN_BOTH,
1132 ARG_GIC, GIC_V3,
1133 ARG_QEMU_CAPS, NONE);
1134 DO_TEST_FULL("aarch64-gic-host", WHEN_BOTH,
1135 ARG_GIC, GIC_BOTH,
1136 ARG_QEMU_CAPS, NONE);
1138 DO_TEST("memory-hotplug", NONE);
1139 DO_TEST("memory-hotplug-nonuma", NONE);
1140 DO_TEST("memory-hotplug-dimm", NONE);
1141 DO_TEST("memory-hotplug-nvdimm", NONE);
1142 DO_TEST("memory-hotplug-nvdimm-access", NONE);
1143 DO_TEST("memory-hotplug-nvdimm-label", NONE);
1144 DO_TEST("memory-hotplug-nvdimm-align", NONE);
1145 DO_TEST("memory-hotplug-nvdimm-pmem", NONE);
1146 DO_TEST("memory-hotplug-nvdimm-readonly", NONE);
1147 DO_TEST("net-udp", NONE);
1149 DO_TEST("video-virtio-gpu-device", NONE);
1150 DO_TEST("video-virtio-gpu-virgl", NONE);
1151 DO_TEST("video-virtio-gpu-spice-gl", NONE);
1152 DO_TEST("video-virtio-gpu-sdl-gl", NONE);
1154 DO_TEST("virtio-input",
1155 QEMU_CAPS_VIRTIO_KEYBOARD,
1156 QEMU_CAPS_VIRTIO_MOUSE,
1157 QEMU_CAPS_VIRTIO_TABLET);
1158 DO_TEST("virtio-input-passthrough",
1159 QEMU_CAPS_VIRTIO_INPUT_HOST);
1161 DO_TEST("memorybacking-set", NONE);
1162 DO_TEST("memorybacking-unset", NONE);
1164 DO_TEST("virtio-options",
1165 QEMU_CAPS_VIRTIO_SCSI,
1166 QEMU_CAPS_VIRTIO_KEYBOARD,
1167 QEMU_CAPS_VIRTIO_MOUSE,
1168 QEMU_CAPS_VIRTIO_TABLET,
1169 QEMU_CAPS_VIRTIO_INPUT_HOST,
1170 QEMU_CAPS_DEVICE_VIRTIO_GPU,
1171 QEMU_CAPS_VIRTIO_GPU_VIRGL,
1172 QEMU_CAPS_DEVICE_VIRTIO_RNG,
1173 QEMU_CAPS_OBJECT_RNG_RANDOM,
1174 QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
1175 QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM,
1176 QEMU_CAPS_VIRTIO_PCI_ATS);
1178 DO_TEST("fd-memory-numa-topology", QEMU_CAPS_OBJECT_MEMORY_FILE,
1179 QEMU_CAPS_KVM);
1180 DO_TEST("fd-memory-numa-topology2", QEMU_CAPS_OBJECT_MEMORY_FILE,
1181 QEMU_CAPS_KVM);
1182 DO_TEST("fd-memory-numa-topology3", QEMU_CAPS_OBJECT_MEMORY_FILE,
1183 QEMU_CAPS_KVM);
1185 DO_TEST("fd-memory-no-numa-topology", QEMU_CAPS_OBJECT_MEMORY_FILE,
1186 QEMU_CAPS_KVM);
1188 DO_TEST("memfd-memory-numa",
1189 QEMU_CAPS_OBJECT_MEMORY_MEMFD,
1190 QEMU_CAPS_OBJECT_MEMORY_MEMFD_HUGETLB);
1191 DO_TEST("memfd-memory-default-hugepage",
1192 QEMU_CAPS_OBJECT_MEMORY_MEMFD,
1193 QEMU_CAPS_OBJECT_MEMORY_MEMFD_HUGETLB);
1195 DO_TEST("acpi-table", NONE);
1197 DO_TEST("video-device-pciaddr-default",
1198 QEMU_CAPS_KVM,
1199 QEMU_CAPS_VNC,
1200 QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
1201 QEMU_CAPS_DEVICE_QXL);
1202 DO_TEST("video-qxl-heads", NONE);
1203 DO_TEST("video-qxl-noheads", NONE);
1204 DO_TEST("video-virtio-gpu-secondary", NONE);
1205 DO_TEST("video-virtio-gpu-ccw",
1206 QEMU_CAPS_CCW,
1207 QEMU_CAPS_DEVICE_VIRTIO_GPU,
1208 QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
1209 QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS,
1210 QEMU_CAPS_VNC,
1211 QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW);
1212 DO_TEST("video-virtio-gpu-ccw-auto",
1213 QEMU_CAPS_CCW,
1214 QEMU_CAPS_DEVICE_VIRTIO_GPU,
1215 QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
1216 QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS,
1217 QEMU_CAPS_VNC,
1218 QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW);
1219 DO_TEST("video-none-device", NONE);
1221 DO_TEST_CAPS_LATEST("intel-iommu");
1222 DO_TEST_CAPS_VER("intel-iommu", "2.6.0");
1223 DO_TEST_CAPS_LATEST("intel-iommu-caching-mode");
1224 DO_TEST_CAPS_LATEST("intel-iommu-eim");
1225 DO_TEST_CAPS_LATEST("intel-iommu-device-iotlb");
1226 DO_TEST_CAPS_ARCH_LATEST("iommu-smmuv3", "aarch64");
1228 DO_TEST("cpu-check-none", NONE);
1229 DO_TEST("cpu-check-partial", NONE);
1230 DO_TEST("cpu-check-full", NONE);
1231 DO_TEST("cpu-check-default-none", NONE);
1232 DO_TEST("cpu-check-default-none2", NONE);
1233 DO_TEST("cpu-check-default-partial", NONE);
1234 DO_TEST("cpu-check-default-partial2", NONE);
1235 DO_TEST("vmcoreinfo", NONE);
1237 DO_TEST("smartcard-host", NONE);
1238 DO_TEST("smartcard-host-certificates", NONE);
1239 DO_TEST("smartcard-host-certificates-database", NONE);
1240 DO_TEST("smartcard-passthrough-tcp", NONE);
1241 DO_TEST("smartcard-passthrough-spicevmc", NONE);
1242 DO_TEST("smartcard-controller", NONE);
1244 DO_TEST("pseries-cpu-compat-power9",
1245 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
1246 DO_TEST("pseries-cpu-compat",
1247 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
1248 DO_TEST("pseries-cpu-exact",
1249 QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
1251 DO_TEST("user-aliases", QEMU_CAPS_QCOW2_LUKS);
1252 DO_TEST("input-virtio-ccw",
1253 QEMU_CAPS_CCW,
1254 QEMU_CAPS_VIRTIO_KEYBOARD,
1255 QEMU_CAPS_VIRTIO_MOUSE,
1256 QEMU_CAPS_VIRTIO_TABLET,
1257 QEMU_CAPS_DEVICE_VIRTIO_KEYBOARD_CCW,
1258 QEMU_CAPS_DEVICE_VIRTIO_MOUSE_CCW,
1259 QEMU_CAPS_DEVICE_VIRTIO_TABLET_CCW);
1261 DO_TEST("tseg-explicit-size",
1262 QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
1263 QEMU_CAPS_DEVICE_PCI_BRIDGE,
1264 QEMU_CAPS_DEVICE_IOH3420,
1265 QEMU_CAPS_ICH9_AHCI,
1266 QEMU_CAPS_MACHINE_SMM_OPT,
1267 QEMU_CAPS_VIRTIO_SCSI,
1268 QEMU_CAPS_MCH_EXTENDED_TSEG_MBYTES);
1270 # define DO_TEST_STATUS(_name) \
1271 do { \
1272 static struct testQemuInfo info = { \
1273 .name = _name, \
1274 }; \
1275 if (testQemuInfoSetArgs(&info, capslatest, \
1276 ARG_QEMU_CAPS, QEMU_CAPS_LAST, \
1277 ARG_END) < 0 || \
1278 qemuTestCapsCacheInsert(driver.qemuCapsCache, info.qemuCaps) < 0 || \
1279 testInfoSetStatusPaths(&info) < 0) { \
1280 VIR_TEST_DEBUG("Failed to generate status test data for '%s'", _name); \
1281 return -1; \
1284 if (virTestRun("QEMU status XML-2-XML " _name, \
1285 testCompareStatusXMLToXMLFiles, &info) < 0) \
1286 ret = -1; \
1288 testQemuInfoClear(&info); \
1289 } while (0)
1292 DO_TEST_STATUS("blockjob-mirror");
1293 DO_TEST_STATUS("vcpus-multi");
1294 DO_TEST_STATUS("modern");
1295 DO_TEST_STATUS("migration-out-nbd");
1296 DO_TEST_STATUS("migration-in-params");
1297 DO_TEST_STATUS("migration-out-params");
1298 DO_TEST_STATUS("migration-out-nbd-tls");
1299 DO_TEST_STATUS("disk-secinfo-upgrade");
1301 DO_TEST_STATUS("blockjob-blockdev");
1303 DO_TEST("vhost-vsock", QEMU_CAPS_DEVICE_VHOST_VSOCK);
1304 DO_TEST("vhost-vsock-auto", QEMU_CAPS_DEVICE_VHOST_VSOCK);
1305 DO_TEST("vhost-vsock-ccw", QEMU_CAPS_DEVICE_VHOST_VSOCK,
1306 QEMU_CAPS_CCW);
1307 DO_TEST("vhost-vsock-ccw-auto", QEMU_CAPS_DEVICE_VHOST_VSOCK,
1308 QEMU_CAPS_CCW);
1310 DO_TEST("riscv64-virt",
1311 QEMU_CAPS_DEVICE_VIRTIO_MMIO);
1312 DO_TEST("riscv64-virt-pci",
1313 QEMU_CAPS_OBJECT_GPEX);
1315 DO_TEST_CAPS_LATEST("virtio-transitional");
1316 DO_TEST_CAPS_LATEST("virtio-non-transitional");
1318 /* Simple headless guests for various architectures */
1319 DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-headless", "aarch64");
1320 DO_TEST_CAPS_ARCH_LATEST("ppc64-pseries-headless", "ppc64");
1321 DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-headless", "riscv64");
1322 DO_TEST_CAPS_ARCH_LATEST("s390x-ccw-headless", "s390x");
1323 DO_TEST_CAPS_ARCH_LATEST("x86_64-pc-headless", "x86_64");
1324 DO_TEST_CAPS_ARCH_LATEST("x86_64-q35-headless", "x86_64");
1326 /* Simple guests with graphics for various architectures */
1327 DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-graphics", "aarch64");
1328 DO_TEST_CAPS_ARCH_LATEST("ppc64-pseries-graphics", "ppc64");
1329 DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-graphics", "riscv64");
1330 DO_TEST_CAPS_ARCH_LATEST("s390x-ccw-graphics", "s390x");
1331 DO_TEST_CAPS_ARCH_LATEST("x86_64-pc-graphics", "x86_64");
1332 DO_TEST_CAPS_ARCH_LATEST("x86_64-q35-graphics", "x86_64");
1334 if (getenv("LIBVIRT_SKIP_CLEANUP") == NULL)
1335 virFileDeleteTree(fakerootdir);
1337 virHashFree(capslatest);
1338 qemuTestDriverFree(&driver);
1339 VIR_FREE(fakerootdir);
1340 virFileWrapperClearPrefixes();
1342 return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
1345 VIR_TEST_MAIN_PRELOAD(mymain,
1346 abs_builddir "/.libs/virpcimock.so",
1347 abs_builddir "/.libs/virrandommock.so",
1348 abs_builddir "/.libs/virdeterministichashmock.so")
1350 #else
1353 main(void)
1355 return EXIT_AM_SKIP;
1358 #endif /* WITH_QEMU */