static int mymain(void) { int ret = 0; if (!(caps = testXLInitCaps())) return EXIT_FAILURE; if (!(xmlopt = libxlCreateXMLConf())) return EXIT_FAILURE; #define DO_TEST_PARSE(name) \ do { \ struct testInfo info0 = { name, 0 }; \ if (virtTestRun("Xen XL-2-XML Parse " name, \ testCompareHelper, &info0) < 0) \ ret = -1; \ } while (0) #define DO_TEST_FORMAT(name) \ do { \ struct testInfo info1 = { name, 1 }; \ if (virtTestRun("Xen XL-2-XML Format " name, \ testCompareHelper, &info1) < 0) \ ret = -1; \ } while (0) #define DO_TEST(name) \ do { \ DO_TEST_PARSE(name); \ DO_TEST_FORMAT(name); \ } while (0) DO_TEST("paravirt-maxvcpus"); DO_TEST("new-disk"); DO_TEST_FORMAT("disk-positional-parms-full"); DO_TEST_FORMAT("disk-positional-parms-partial"); DO_TEST("spice"); DO_TEST("spice-features"); DO_TEST("vif-rate"); DO_TEST("paravirt-cmdline"); DO_TEST_FORMAT("paravirt-cmdline-extra-root"); DO_TEST_FORMAT("paravirt-cmdline-bogus-extra-root"); DO_TEST("rbd-multihost-noauth"); #ifdef LIBXL_HAVE_BUILDINFO_USBDEVICE_LIST DO_TEST("fullvirt-multiusb"); #endif #ifdef LIBXL_HAVE_BUILDINFO_KERNEL DO_TEST("fullvirt-direct-kernel-boot"); DO_TEST_FORMAT("fullvirt-direct-kernel-boot-extra"); DO_TEST_FORMAT("fullvirt-direct-kernel-boot-bogus-extra"); #endif virObjectUnref(caps); virObjectUnref(xmlopt); return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; }
static int mymain(void) { int ret = 0; if (!(caps = testXLInitCaps())) return EXIT_FAILURE; if (!(xmlopt = libxlCreateXMLConf())) return EXIT_FAILURE; #define DO_TEST(name, version) \ do { \ struct testInfo info0 = { name, version, 0 }; \ struct testInfo info1 = { name, version, 1 }; \ if (virtTestRun("Xen XM-2-XML Parse " name, \ testCompareHelper, &info0) < 0) \ ret = -1; \ if (virtTestRun("Xen XM-2-XML Format " name, \ testCompareHelper, &info1) < 0) \ ret = -1; \ } while (0) DO_TEST("new-disk", 3); DO_TEST("spice", 3); DO_TEST("spice-features", 3); #ifdef LIBXL_HAVE_BUILDINFO_USBDEVICE_LIST DO_TEST("fullvirt-multiusb", 3); #endif #ifdef LIBXL_HAVE_BUILDINFO_KERNEL DO_TEST("fullvirt-direct-kernel-boot", 3); #endif virObjectUnref(caps); virObjectUnref(xmlopt); return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; }
static int mymain(void) { int ret = 0; #define DO_TEST(in, out, name) \ do { \ struct testInfo info = { in, out, name }; \ virResetLastError(); \ if (virTestRun("Xen XML-2-SEXPR " in " -> " out, \ testCompareHelper, &info) < 0) \ ret = -1; \ } while (0) if (!(caps = testXLInitCaps())) return EXIT_FAILURE; if (!(xmlopt = libxlCreateXMLConf())) return EXIT_FAILURE; DO_TEST("pv", "pv", "pvtest"); DO_TEST("fv", "fv", "fvtest"); DO_TEST("pv", "pv", "pvtest"); DO_TEST("fv", "fv-v2", "fvtest"); DO_TEST("fv-vncunused", "fv-vncunused", "fvtest"); DO_TEST("pv-vfb-new", "pv-vfb-new", "pvtest"); DO_TEST("pv-vfb-new-auto", "pv-vfb-new-auto", "pvtest"); DO_TEST("pv-bootloader", "pv-bootloader", "pvtest"); DO_TEST("pv-bootloader-cmdline", "pv-bootloader-cmdline", "pvtest"); DO_TEST("pv-vcpus", "pv-vcpus", "pvtest"); DO_TEST("disk-file", "disk-file", "pvtest"); DO_TEST("disk-block", "disk-block", "pvtest"); DO_TEST("disk-block-shareable", "disk-block-shareable", "pvtest"); DO_TEST("disk-drv-loop", "disk-drv-loop", "pvtest"); DO_TEST("disk-drv-blkback", "disk-drv-blkback", "pvtest"); DO_TEST("disk-drv-blktap", "disk-drv-blktap", "pvtest"); DO_TEST("disk-drv-blktap-raw", "disk-drv-blktap-raw", "pvtest"); DO_TEST("disk-drv-blktap-qcow", "disk-drv-blktap-qcow", "pvtest"); DO_TEST("disk-drv-blktap2", "disk-drv-blktap2", "pvtest"); DO_TEST("disk-drv-blktap2-raw", "disk-drv-blktap2-raw", "pvtest"); DO_TEST("curmem", "curmem", "rhel5"); DO_TEST("net-routed", "net-routed", "pvtest"); DO_TEST("net-bridged", "net-bridged", "pvtest"); DO_TEST("net-e1000", "net-e1000", "pvtest"); DO_TEST("bridge-ipaddr", "bridge-ipaddr", "pvtest"); DO_TEST("no-source-cdrom", "no-source-cdrom", "test"); DO_TEST("pv-localtime", "pv-localtime", "pvtest"); DO_TEST("pci-devs", "pci-devs", "pvtest"); DO_TEST("fv-utc", "fv-utc", "fvtest"); DO_TEST("fv-localtime", "fv-localtime", "fvtest"); DO_TEST("fv-usbmouse", "fv-usbmouse", "fvtest"); DO_TEST("fv-usbmouse", "fv-usbmouse", "fvtest"); DO_TEST("fv-kernel", "fv-kernel", "fvtest"); DO_TEST("fv-force-hpet", "fv-force-hpet", "fvtest"); DO_TEST("fv-force-nohpet", "fv-force-nohpet", "fvtest"); DO_TEST("fv-serial-null", "fv-serial-null", "fvtest"); DO_TEST("fv-serial-file", "fv-serial-file", "fvtest"); DO_TEST("fv-serial-dev-2-ports", "fv-serial-dev-2-ports", "fvtest"); DO_TEST("fv-serial-dev-2nd-port", "fv-serial-dev-2nd-port", "fvtest"); DO_TEST("fv-serial-stdio", "fv-serial-stdio", "fvtest"); DO_TEST("fv-serial-pty", "fv-serial-pty", "fvtest"); DO_TEST("fv-serial-pipe", "fv-serial-pipe", "fvtest"); DO_TEST("fv-serial-tcp", "fv-serial-tcp", "fvtest"); DO_TEST("fv-serial-udp", "fv-serial-udp", "fvtest"); DO_TEST("fv-serial-tcp-telnet", "fv-serial-tcp-telnet", "fvtest"); DO_TEST("fv-serial-unix", "fv-serial-unix", "fvtest"); DO_TEST("fv-parallel-tcp", "fv-parallel-tcp", "fvtest"); DO_TEST("fv-sound", "fv-sound", "fvtest"); DO_TEST("fv-net-netfront", "fv-net-netfront", "fvtest"); DO_TEST("fv-net-rate", "fv-net-rate", "fvtest"); DO_TEST("boot-grub", "boot-grub", "fvtest"); DO_TEST("escape", "escape", "fvtest"); virObjectUnref(caps); virObjectUnref(xmlopt); return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; }