diff options
author | Guido Günther <agx@sigxcpu.org> | 2015-05-03 15:13:33 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2015-05-03 15:13:33 +0200 |
commit | 852e3c3e90cce50c3a2c2b1cfd28108505ed5570 (patch) | |
tree | 5a99fbeb017c88c04b24163d33e976826e8b74d9 /tests | |
parent | a544fac06f5bc2d90c925e03fcfd7a0e8b0ef75a (diff) |
New upstream version 1.2.15~rc2
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 1 | ||||
-rw-r--r-- | tests/Makefile.in | 3 | ||||
-rw-r--r-- | tests/qemumonitorjsontest.c | 18 | ||||
-rw-r--r-- | tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-vendor.args | 20 | ||||
-rw-r--r-- | tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-vendor.xml | 21 | ||||
-rw-r--r-- | tests/qemuxml2argvdata/qemuxml2argv-disk-usb-pci.xml | 34 | ||||
-rw-r--r-- | tests/qemuxml2argvtest.c | 4 | ||||
-rw-r--r-- | tests/vircapstest.c | 2 |
8 files changed, 92 insertions, 11 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index dc7daaa18..8e2dbec9a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -931,6 +931,7 @@ virnetserverclientmock_la_SOURCES = \ virnetserverclientmock.c virnetserverclientmock_la_CFLAGS = $(AM_CFLAGS) virnetserverclientmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS) +virnetserverclientmock_la_LIBADD = $(GNULIB_LIBS) if WITH_GNUTLS virnettlscontexttest_SOURCES = \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 10c516dd5..e67d36881 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -540,7 +540,7 @@ virnetdevmock_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(virnetdevmock_la_LDFLAGS) $(LDFLAGS) -o $@ @WITH_TESTS_FALSE@am_virnetdevmock_la_rpath = @WITH_TESTS_TRUE@am_virnetdevmock_la_rpath = -virnetserverclientmock_la_LIBADD = +virnetserverclientmock_la_DEPENDENCIES = $(GNULIB_LIBS) am_virnetserverclientmock_la_OBJECTS = \ virnetserverclientmock_la-virnetserverclientmock.lo virnetserverclientmock_la_OBJECTS = \ @@ -3675,6 +3675,7 @@ virnetserverclientmock_la_SOURCES = \ virnetserverclientmock_la_CFLAGS = $(AM_CFLAGS) virnetserverclientmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS) +virnetserverclientmock_la_LIBADD = $(GNULIB_LIBS) @WITH_GNUTLS_TRUE@virnettlscontexttest_SOURCES = \ @WITH_GNUTLS_TRUE@ virnettlscontexttest.c virnettlshelpers.h \ @WITH_GNUTLS_TRUE@ virnettlshelpers.c testutils.h testutils.c \ diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index f729c7c9d..0f82fd821 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -28,7 +28,7 @@ #include "virerror.h" #include "virstring.h" #include "cpu/cpu.h" - +#include "qemu/qemu_monitor.h" #define VIR_FROM_THIS VIR_FROM_NONE @@ -1782,7 +1782,7 @@ testQemuMonitorJSONqemuMonitorJSONGetChardevInfo(const void *data) if (!test) return -1; - if (!(info = virHashCreate(32, (virHashDataFree) free)) || + if (!(info = virHashCreate(32, qemuMonitorChardevInfoFree)) || !(expectedInfo = virHashCreate(32, NULL))) goto cleanup; @@ -2269,12 +2269,12 @@ testQemuMonitorJSONGetIOThreads(const void *data) goto cleanup; } -#define CHECK(i, wantname, wantthread_id) \ +#define CHECK(i, wantiothread_id, wantthread_id) \ do { \ - if (STRNEQ(info[i]->name, (wantname))) { \ + if (info[i]->iothread_id != (wantiothread_id)) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - "name %s is not %s", \ - info[i]->name, (wantname)); \ + "iothread_id %u is not %u", \ + info[i]->iothread_id, (wantiothread_id)); \ goto cleanup; \ } \ if (info[i]->thread_id != (wantthread_id)) { \ @@ -2285,8 +2285,8 @@ testQemuMonitorJSONGetIOThreads(const void *data) } \ } while (0) - CHECK(0, "iothread1", 30992); - CHECK(1, "iothread2", 30993); + CHECK(0, 1, 30992); + CHECK(1, 2, 30993); #undef CHECK @@ -2295,7 +2295,7 @@ testQemuMonitorJSONGetIOThreads(const void *data) cleanup: qemuMonitorTestFree(test); for (i = 0; i < ninfo; i++) - qemuMonitorIOThreadInfoFree(info[i]); + VIR_FREE(info[i]); VIR_FREE(info); return ret; diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-vendor.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-vendor.args new file mode 100644 index 000000000..5d67d554d --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-vendor.args @@ -0,0 +1,20 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test QEMU_AUDIO_DRV=none \ +/usr/bin/qemu \ +-S \ +-M pc \ +-cpu 'core2duo,vendor=Libvirt QEMU,+lahf_lm,+xtpr,+cx16,+tm2,+est,+vmx,\ ++ds_cpl,+pbe,+tm,+ht,+ss,+acpi,+ds' \ +-m 214 \ +-smp 6 \ +-nographic \ +-monitor unix:/tmp/test-monitor,server,nowait \ +-no-acpi \ +-boot n \ +-usb \ +-net none \ +-serial none \ +-parallel none diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-vendor.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-vendor.xml new file mode 100644 index 000000000..a33362f25 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-vendor.xml @@ -0,0 +1,21 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</currentMemory> + <vcpu placement='static'>6</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='network'/> + </os> + <cpu mode='host-model'> + <model vendor_id="Libvirt QEMU"/> + </cpu> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu</emulator> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-usb-pci.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-usb-pci.xml new file mode 100644 index 000000000..ad9655953 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-usb-pci.xml @@ -0,0 +1,34 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='i686' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu</emulator> + <disk type='block' device='disk'> + <driver name='qemu' type='raw'/> + <source dev='/dev/HostVG/QEMUGuest1'/> + <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/tmp/usbdisk.img'/> + <target dev='sda' bus='usb'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> + </disk> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 0763068c6..4acaa11b8 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -812,6 +812,9 @@ mymain(void) DO_TEST("disk-usb-device-removable", QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_USB_STORAGE, QEMU_CAPS_USB_STORAGE_REMOVABLE, QEMU_CAPS_NODEFCONFIG); + DO_TEST_FAILURE("disk-usb-pci", + QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, + QEMU_CAPS_DEVICE_USB_STORAGE, QEMU_CAPS_NODEFCONFIG); DO_TEST("disk-scsi-device", QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_SCSI_LSI); @@ -1245,6 +1248,7 @@ mymain(void) QEMU_CAPS_OBJECT_MEMORY_RAM); DO_TEST_FAILURE("cpu-numa-memshared", QEMU_CAPS_SMP_TOPOLOGY); DO_TEST("cpu-host-model", NONE); + DO_TEST("cpu-host-model-vendor", NONE); skipLegacyCPUs = true; DO_TEST("cpu-host-model-fallback", NONE); DO_TEST_FAILURE("cpu-host-model-nofallback", NONE); diff --git a/tests/vircapstest.c b/tests/vircapstest.c index 5a43d6345..0c79af8c3 100644 --- a/tests/vircapstest.c +++ b/tests/vircapstest.c @@ -250,7 +250,7 @@ test_virCapsDomainDataLookupQEMU(const void *data ATTRIBUTE_UNUSED) VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_PPC64LE, VIR_DOMAIN_VIRT_QEMU, "/usr/bin/qemu-system-ppc64", "pseries"); - CAPS_EXPECT_ERR(VIR_DOMAIN_OSTYPE_AIX, VIR_ARCH_NONE, -1, NULL, NULL); + CAPS_EXPECT_ERR(VIR_DOMAIN_OSTYPE_LINUX, VIR_ARCH_NONE, -1, NULL, NULL); CAPS_EXPECT_ERR(-1, VIR_ARCH_PPC64LE, -1, NULL, "pc"); CAPS_EXPECT_ERR(-1, VIR_ARCH_MIPS, -1, NULL, NULL); CAPS_EXPECT_ERR(-1, VIR_ARCH_AARCH64, VIR_DOMAIN_VIRT_KVM, |