diff options
author | Guido Günther <agx@sigxcpu.org> | 2013-08-04 20:34:00 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2013-08-04 20:34:00 +0200 |
commit | 58c2a296d9378f246f58b5abb2ec75d70ae2be78 (patch) | |
tree | 32776d58fd1e027a271b5aaaceca6d8358ea1c43 /tests | |
parent | 97ba16c1e12111c63fd1d38814dcc46eb9affc28 (diff) |
New upstream version 1.1.1
Diffstat (limited to 'tests')
146 files changed, 5089 insertions, 844 deletions
diff --git a/tests/.valgrind.supp b/tests/.valgrind.supp index 10cc3c0dc..f04912d0a 100644 --- a/tests/.valgrind.supp +++ b/tests/.valgrind.supp @@ -75,3 +75,63 @@ ... obj:*/lib*/libc-2.*so* } +# +# commandtest validates the various threaded commands. The +# virThreadCreate() routine allocates and passes args to the +# new thread which now owns the 'args' and thus cannot be free'd +# +{ + commandtestLeak1 + Memcheck:Leak + fun:calloc + fun:virAlloc + fun:virThreadCreate + fun:mymain + fun:virtTestMain +} +# +# The Error code requires static memory that is never free'd +# for thread local storage to store error message/data +# +{ + commandtestLeak2 + Memcheck:Leak + fun:calloc + fun:virAlloc + ... + fun:vir*LastError* + fun:virEventRunDefaultImpl + fun:virCommandThreadWorker + fun:virThreadHelper + fun:start_thread + fun:clone +} +# +# Some of the commandtests (test0, test1, test4, & test18) cause the +# following traceback although it appears the memory is properly freed +# +{ + commandtestLeak3 + Memcheck:Leak + fun:calloc + fun:virAllocN + fun:virEventPollRunOnce + fun:virEventRunDefaultImpl + fun:virCommandThreadWorker + fun:virThreadHelper + fun:start_thread + fun:clone +} +# +# seclabeltest relies on 'selabel_close' which is not in libvirt +# +{ + seclabeltestcond1 + Memcheck:Cond + obj:/usr/lib64/libselinux.so.1 + fun:selabel_close + fun:virSecuritySELinuxSecurityDriverClose + fun:virSecurityManagerDispose + fun:virObjectUnref + fun:main +} diff --git a/tests/Makefile.am b/tests/Makefile.am index 4c4915141..5ea806e8d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -128,6 +128,11 @@ test_programs = virshtest sockettest \ fchosttest \ $(NULL) +if WITH_DBUS +test_programs += virdbustest \ + virsystemdtest +endif + if WITH_GNUTLS test_programs += virnettlscontexttest endif @@ -276,6 +281,10 @@ if WITH_QEMU test_libraries += libqemumonitortestutils.la endif +if WITH_DBUS +test_libraries += virsystemdmock.la +endif + if WITH_TESTS noinst_PROGRAMS = $(test_programs) $(test_helpers) noinst_LTLIBRARIES = $(test_libraries) @@ -294,7 +303,8 @@ TESTS = $(test_programs) \ # intermediate shell variable, but must do all the expansion in make lv_abs_top_builddir=`cd '$(top_builddir)'; pwd` -path_add = $(lv_abs_top_builddir)/daemon$(PATH_SEPARATOR)$(lv_abs_top_builddir)/tools$(PATH_SEPARATOR)$(lv_abs_top_builddir)/tests +path_add = $(subst :,$(PATH_SEPARATOR),\ + $(subst !,$(lv_abs_top_builddir)/,!daemon:!tools:!tests)) TESTS_ENVIRONMENT = \ abs_top_builddir=$(lv_abs_top_builddir) \ @@ -310,8 +320,10 @@ TESTS_ENVIRONMENT = \ $(VG) +VALGRIND = valgrind --quiet --leak-check=full \ + --suppressions=$(srcdir)/.valgrind.supp valgrind: - $(MAKE) check VG="libtool --mode=execute valgrind --quiet --leak-check=full --suppressions=$(srcdir)/.valgrind.supp" + $(MAKE) check VG="libtool --mode=execute $(VALGRIND)" sockettest_SOURCES = \ sockettest.c \ @@ -637,6 +649,26 @@ vircgroupmock_la_CFLAGS = $(AM_CFLAGS) vircgroupmock_la_LDFLAGS = -module -avoid-version \ -rpath /evil/libtool/hack/to/force/shared/lib/creation +if WITH_DBUS +virdbustest_SOURCES = \ + virdbustest.c testutils.h testutils.c +virdbustest_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) +virdbustest_LDADD = $(LDADDS) + +virsystemdtest_SOURCES = \ + virsystemdtest.c testutils.h testutils.c +virsystemdtest_CFLAGS = $(AM_CFLAGS) +virsystemdtest_LDADD = $(LDADDS) + +virsystemdmock_la_SOURCES = \ + virsystemdmock.c +virsystemdmock_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) +virsystemdmock_la_LDFLAGS = -module -avoid-version \ + -rpath /evil/libtool/hack/to/force/shared/lib/creation + +else +EXTRA_DIST += virdbustest.c virsystemdtest.c virsystemdmock.c +endif viruritest_SOURCES = \ viruritest.c testutils.h testutils.c @@ -669,7 +701,8 @@ libsecurityselinuxhelper_la_LDFLAGS = -module -avoid-version \ securityselinuxtest_SOURCES = \ securityselinuxtest.c testutils.h testutils.c securityselinuxtest_LDADD = $(LDADDS) -securityselinuxtest_DEPENDENCIES = libsecurityselinuxhelper.la ../src/libvirt.la +securityselinuxtest_DEPENDENCIES = libsecurityselinuxhelper.la \ + ../src/libvirt.la if WITH_QEMU if WITH_ATTR @@ -677,11 +710,13 @@ securityselinuxlabeltest_SOURCES = \ securityselinuxlabeltest.c testutils.h testutils.c \ testutilsqemu.h testutilsqemu.c securityselinuxlabeltest_LDADD = $(qemu_LDADDS) -securityselinuxlabeltest_DEPENDENCIES = libsecurityselinuxhelper.la ../src/libvirt.la +securityselinuxlabeltest_DEPENDENCIES = libsecurityselinuxhelper.la \ + ../src/libvirt.la endif endif endif -EXTRA_DIST += securityselinuxtest.c securityselinuxlabeltest.c securityselinuxhelper.c +EXTRA_DIST += securityselinuxtest.c securityselinuxlabeltest.c \ + securityselinuxhelper.c virbuftest_SOURCES = \ virbuftest.c testutils.h testutils.c @@ -725,7 +760,8 @@ endif libshunload_la_SOURCES = shunloadhelper.c libshunload_la_LIBADD = ../src/libvirt.la -libshunload_la_LDFLAGS = -module -avoid-version -rpath /evil/libtool/hack/to/force/shared/lib/creation +libshunload_la_LDFLAGS = -module -avoid-version \ + -rpath /evil/libtool/hack/to/force/shared/lib/creation shunloadtest_SOURCES = \ shunloadtest.c @@ -756,7 +792,8 @@ object_locking_SOURCES = object-locking.ml ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) -c $< object-locking: object-locking.cmx object-locking-files.txt - ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) $(CILOPTLIBS) $< -o $@ + ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) \ + $(CILOPTLIBS) $< -o $@ object-locking-files.txt: find $(top_builddir)/src/ -name '*.i' > $@ @@ -765,4 +802,5 @@ else EXTRA_DIST += object-locking.ml endif -CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.cmi *.cmx object-locking-files.txt +CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.cmi *.cmx \ + object-locking-files.txt diff --git a/tests/Makefile.in b/tests/Makefile.in index 01bb2150b..60594631a 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,23 +16,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -55,27 +82,30 @@ host_triplet = @host@ @WITH_DRIVER_MODULES_TRUE@ -DTEST_DRIVER_DIR=\"$(top_builddir)/src/.libs\" @WITH_DTRACE_PROBES_TRUE@am__append_2 = ../src/libvirt_probes.lo -@WITH_GNUTLS_TRUE@am__append_3 = virnettlscontexttest -@WITH_SECDRIVER_SELINUX_TRUE@am__append_4 = securityselinuxtest -@WITH_ATTR_TRUE@@WITH_QEMU_TRUE@@WITH_SECDRIVER_SELINUX_TRUE@am__append_5 = securityselinuxlabeltest -@WITH_DRIVER_MODULES_TRUE@am__append_6 = virdrivermoduletest -@WITH_XEN_TRUE@am__append_7 = xml2sexprtest sexpr2xmltest \ +@WITH_DBUS_TRUE@am__append_3 = virdbustest \ +@WITH_DBUS_TRUE@ virsystemdtest + +@WITH_GNUTLS_TRUE@am__append_4 = virnettlscontexttest +@WITH_SECDRIVER_SELINUX_TRUE@am__append_5 = securityselinuxtest +@WITH_ATTR_TRUE@@WITH_QEMU_TRUE@@WITH_SECDRIVER_SELINUX_TRUE@am__append_6 = securityselinuxlabeltest +@WITH_DRIVER_MODULES_TRUE@am__append_7 = virdrivermoduletest +@WITH_XEN_TRUE@am__append_8 = xml2sexprtest sexpr2xmltest \ @WITH_XEN_TRUE@ xmconfigtest xencapstest statstest reconnect -@WITH_QEMU_TRUE@am__append_8 = qemuxml2argvtest qemuxml2xmltest qemuxmlnstest \ +@WITH_QEMU_TRUE@am__append_9 = qemuxml2argvtest qemuxml2xmltest qemuxmlnstest \ @WITH_QEMU_TRUE@ qemuargv2xmltest qemuhelptest domainsnapshotxml2xmltest \ @WITH_QEMU_TRUE@ qemumonitortest qemumonitorjsontest qemuhotplugtest -@WITH_LXC_TRUE@am__append_9 = lxcxml2xmltest -@WITH_OPENVZ_TRUE@am__append_10 = openvzutilstest -@WITH_ESX_TRUE@am__append_11 = esxutilstest -@WITH_VMX_TRUE@am__append_12 = vmx2xmltest xml2vmxtest -@WITH_CIL_TRUE@am__append_13 = object-locking -@WITH_YAJL_TRUE@am__append_14 = jsontest -@WITH_NETWORK_TRUE@am__append_15 = networkxml2conftest -@WITH_STORAGE_SHEEPDOG_TRUE@am__append_16 = storagebackendsheepdogtest -@WITH_STORAGE_TRUE@am__append_17 = storagevolxml2argvtest -@WITH_LIBVIRTD_TRUE@am__append_18 = \ +@WITH_LXC_TRUE@am__append_10 = lxcxml2xmltest +@WITH_OPENVZ_TRUE@am__append_11 = openvzutilstest +@WITH_ESX_TRUE@am__append_12 = esxutilstest +@WITH_VMX_TRUE@am__append_13 = vmx2xmltest xml2vmxtest +@WITH_CIL_TRUE@am__append_14 = object-locking +@WITH_YAJL_TRUE@am__append_15 = jsontest +@WITH_NETWORK_TRUE@am__append_16 = networkxml2conftest +@WITH_STORAGE_SHEEPDOG_TRUE@am__append_17 = storagebackendsheepdogtest +@WITH_STORAGE_TRUE@am__append_18 = storagevolxml2argvtest +@WITH_LIBVIRTD_TRUE@am__append_19 = \ @WITH_LIBVIRTD_TRUE@ test_conf.sh \ @WITH_LIBVIRTD_TRUE@ cpuset \ @WITH_LIBVIRTD_TRUE@ define-dev-segfault \ @@ -93,11 +123,11 @@ host_triplet = @host@ @WITH_LIBVIRTD_TRUE@ virsh-undefine \ @WITH_LIBVIRTD_TRUE@ $(NULL) -@WITH_LIBVIRTD_TRUE@am__append_19 = \ +@WITH_LIBVIRTD_TRUE@am__append_20 = \ @WITH_LIBVIRTD_TRUE@ eventtest \ @WITH_LIBVIRTD_TRUE@ libvirtdconftest -@WITH_LIBVIRTD_FALSE@am__append_20 = \ +@WITH_LIBVIRTD_FALSE@am__append_21 = \ @WITH_LIBVIRTD_FALSE@ test_conf.sh \ @WITH_LIBVIRTD_FALSE@ cpuset \ @WITH_LIBVIRTD_FALSE@ define-dev-segfault \ @@ -115,44 +145,49 @@ host_triplet = @host@ @WITH_LIBVIRTD_FALSE@ virsh-undefine \ @WITH_LIBVIRTD_FALSE@ $(NULL) -@WITH_SECDRIVER_APPARMOR_TRUE@am__append_21 = virt-aa-helper-test -@WITH_SECDRIVER_APPARMOR_FALSE@am__append_22 = virt-aa-helper-test -@WITH_QEMU_TRUE@am__append_23 = libqemumonitortestutils.la -@WITH_TESTS_TRUE@noinst_PROGRAMS = $(am__EXEEXT_17) $(am__EXEEXT_18) -@WITH_TESTS_FALSE@check_PROGRAMS = $(am__EXEEXT_17) $(am__EXEEXT_18) -TESTS = $(am__EXEEXT_17) $(am__EXEEXT_20) -@WITH_XEN_FALSE@am__append_24 = xml2sexprtest.c sexpr2xmltest.c xmconfigtest.c \ +@WITH_SECDRIVER_APPARMOR_TRUE@am__append_22 = virt-aa-helper-test +@WITH_SECDRIVER_APPARMOR_FALSE@am__append_23 = virt-aa-helper-test +@WITH_QEMU_TRUE@am__append_24 = libqemumonitortestutils.la +@WITH_DBUS_TRUE@am__append_25 = virsystemdmock.la +@WITH_TESTS_TRUE@noinst_PROGRAMS = $(am__EXEEXT_18) $(am__EXEEXT_19) +@WITH_TESTS_FALSE@check_PROGRAMS = $(am__EXEEXT_18) $(am__EXEEXT_19) +TESTS = $(am__EXEEXT_18) $(am__EXEEXT_21) +@WITH_XEN_FALSE@am__append_26 = xml2sexprtest.c sexpr2xmltest.c xmconfigtest.c \ @WITH_XEN_FALSE@ xencapstest.c reconnect.c \ @WITH_XEN_FALSE@ testutilsxen.c testutilsxen.h -@WITH_NETWORK_TRUE@@WITH_QEMU_TRUE@am__append_25 = ../src/libvirt_driver_network_impl.la -@WITH_DTRACE_PROBES_TRUE@@WITH_QEMU_TRUE@am__append_26 = ../src/libvirt_qemu_probes.lo -@WITH_QEMU_FALSE@am__append_27 = qemuxml2argvtest.c qemuxml2xmltest.c qemuargv2xmltest.c \ +@WITH_NETWORK_TRUE@@WITH_QEMU_TRUE@am__append_27 = ../src/libvirt_driver_network_impl.la +@WITH_DTRACE_PROBES_TRUE@@WITH_QEMU_TRUE@am__append_28 = ../src/libvirt_qemu_probes.lo +@WITH_QEMU_FALSE@am__append_29 = qemuxml2argvtest.c qemuxml2xmltest.c qemuargv2xmltest.c \ @WITH_QEMU_FALSE@ qemuxmlnstest.c qemuhelptest.c domainsnapshotxml2xmltest.c \ @WITH_QEMU_FALSE@ qemumonitortest.c testutilsqemu.c testutilsqemu.h \ @WITH_QEMU_FALSE@ qemumonitorjsontest.c qemuhotplugtest.c \ @WITH_QEMU_FALSE@ $(QEMUMONITORTESTUTILS_SOURCES) -@WITH_LXC_TRUE@@WITH_NETWORK_TRUE@am__append_28 = ../src/libvirt_driver_network_impl.la -@WITH_LXC_FALSE@am__append_29 = lxcxml2xmltest.c testutilslxc.c testutilslxc.h -@WITH_OPENVZ_FALSE@am__append_30 = openvzutilstest.c -@WITH_ESX_FALSE@am__append_31 = esxutilstest.c -@WITH_VMX_FALSE@am__append_32 = vmx2xmltest.c xml2vmxtest.c -@WITH_NETWORK_FALSE@am__append_33 = networkxml2conftest.c -@WITH_STORAGE_SHEEPDOG_FALSE@am__append_34 = storagebackendsheepdogtest.c -@WITH_STORAGE_FALSE@am__append_35 = storagevolxml2argvtest.c -@WITH_LIBVIRTD_FALSE@am__append_36 = libvirtdconftest.c -@HAVE_LIBTASN1_TRUE@@WITH_GNUTLS_TRUE@am__append_37 = pkix_asn1_tab.c -@HAVE_LIBTASN1_TRUE@@WITH_GNUTLS_TRUE@am__append_38 = -ltasn1 -@HAVE_LIBTASN1_FALSE@@WITH_GNUTLS_TRUE@am__append_39 = pkix_asn1_tab.c -@WITH_GNUTLS_FALSE@am__append_40 = \ +@WITH_LXC_TRUE@@WITH_NETWORK_TRUE@am__append_30 = ../src/libvirt_driver_network_impl.la +@WITH_LXC_FALSE@am__append_31 = lxcxml2xmltest.c testutilslxc.c testutilslxc.h +@WITH_OPENVZ_FALSE@am__append_32 = openvzutilstest.c +@WITH_ESX_FALSE@am__append_33 = esxutilstest.c +@WITH_VMX_FALSE@am__append_34 = vmx2xmltest.c xml2vmxtest.c +@WITH_NETWORK_FALSE@am__append_35 = networkxml2conftest.c +@WITH_STORAGE_SHEEPDOG_FALSE@am__append_36 = storagebackendsheepdogtest.c +@WITH_STORAGE_FALSE@am__append_37 = storagevolxml2argvtest.c +@WITH_LIBVIRTD_FALSE@am__append_38 = libvirtdconftest.c +@HAVE_LIBTASN1_TRUE@@WITH_GNUTLS_TRUE@am__append_39 = pkix_asn1_tab.c +@HAVE_LIBTASN1_TRUE@@WITH_GNUTLS_TRUE@am__append_40 = -ltasn1 +@HAVE_LIBTASN1_FALSE@@WITH_GNUTLS_TRUE@am__append_41 = pkix_asn1_tab.c +@WITH_GNUTLS_FALSE@am__append_42 = \ @WITH_GNUTLS_FALSE@ virnettlscontexttest.c testutils.h testutils.c pkix_asn1_tab.c -@WITH_SECDRIVER_SELINUX_TRUE@@WITH_TESTS_TRUE@am__append_41 = libsecurityselinuxhelper.la -@WITH_SECDRIVER_SELINUX_TRUE@@WITH_TESTS_FALSE@am__append_42 = libsecurityselinuxhelper.la -@WITH_CIL_FALSE@am__append_43 = object-locking.ml +@WITH_DBUS_FALSE@am__append_43 = virdbustest.c virsystemdtest.c virsystemdmock.c +@WITH_SECDRIVER_SELINUX_TRUE@@WITH_TESTS_TRUE@am__append_44 = libsecurityselinuxhelper.la +@WITH_SECDRIVER_SELINUX_TRUE@@WITH_TESTS_FALSE@am__append_45 = libsecurityselinuxhelper.la +@WITH_CIL_FALSE@am__append_46 = object-locking.ml subdir = tests -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/build-aux/mkinstalldirs \ + $(top_srcdir)/build-aux/depcomp \ + $(top_srcdir)/build-aux/test-driver ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/alloca.m4 \ @@ -428,6 +463,7 @@ libqemumonitortestutils_la_OBJECTS = \ AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = @WITH_QEMU_TRUE@@WITH_TESTS_FALSE@am_libqemumonitortestutils_la_rpath = @WITH_QEMU_TRUE@@WITH_TESTS_TRUE@am_libqemumonitortestutils_la_rpath = libsecurityselinuxhelper_la_LIBADD = @@ -472,16 +508,29 @@ vircgroupmock_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(vircgroupmock_la_LDFLAGS) $(LDFLAGS) -o $@ @WITH_TESTS_FALSE@am_vircgroupmock_la_rpath = @WITH_TESTS_TRUE@am_vircgroupmock_la_rpath = -@WITH_GNUTLS_TRUE@am__EXEEXT_1 = virnettlscontexttest$(EXEEXT) -@WITH_SECDRIVER_SELINUX_TRUE@am__EXEEXT_2 = \ +virsystemdmock_la_LIBADD = +am__virsystemdmock_la_SOURCES_DIST = virsystemdmock.c +@WITH_DBUS_TRUE@am_virsystemdmock_la_OBJECTS = \ +@WITH_DBUS_TRUE@ virsystemdmock_la-virsystemdmock.lo +virsystemdmock_la_OBJECTS = $(am_virsystemdmock_la_OBJECTS) +virsystemdmock_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(virsystemdmock_la_CFLAGS) $(CFLAGS) \ + $(virsystemdmock_la_LDFLAGS) $(LDFLAGS) -o $@ +@WITH_DBUS_TRUE@@WITH_TESTS_FALSE@am_virsystemdmock_la_rpath = +@WITH_DBUS_TRUE@@WITH_TESTS_TRUE@am_virsystemdmock_la_rpath = +@WITH_DBUS_TRUE@am__EXEEXT_1 = virdbustest$(EXEEXT) \ +@WITH_DBUS_TRUE@ virsystemdtest$(EXEEXT) +@WITH_GNUTLS_TRUE@am__EXEEXT_2 = virnettlscontexttest$(EXEEXT) +@WITH_SECDRIVER_SELINUX_TRUE@am__EXEEXT_3 = \ @WITH_SECDRIVER_SELINUX_TRUE@ securityselinuxtest$(EXEEXT) -@WITH_ATTR_TRUE@@WITH_QEMU_TRUE@@WITH_SECDRIVER_SELINUX_TRUE@am__EXEEXT_3 = securityselinuxlabeltest$(EXEEXT) -@WITH_DRIVER_MODULES_TRUE@am__EXEEXT_4 = virdrivermoduletest$(EXEEXT) -@WITH_XEN_TRUE@am__EXEEXT_5 = xml2sexprtest$(EXEEXT) \ +@WITH_ATTR_TRUE@@WITH_QEMU_TRUE@@WITH_SECDRIVER_SELINUX_TRUE@am__EXEEXT_4 = securityselinuxlabeltest$(EXEEXT) +@WITH_DRIVER_MODULES_TRUE@am__EXEEXT_5 = virdrivermoduletest$(EXEEXT) +@WITH_XEN_TRUE@am__EXEEXT_6 = xml2sexprtest$(EXEEXT) \ @WITH_XEN_TRUE@ sexpr2xmltest$(EXEEXT) xmconfigtest$(EXEEXT) \ @WITH_XEN_TRUE@ xencapstest$(EXEEXT) statstest$(EXEEXT) \ @WITH_XEN_TRUE@ reconnect$(EXEEXT) -@WITH_QEMU_TRUE@am__EXEEXT_6 = qemuxml2argvtest$(EXEEXT) \ +@WITH_QEMU_TRUE@am__EXEEXT_7 = qemuxml2argvtest$(EXEEXT) \ @WITH_QEMU_TRUE@ qemuxml2xmltest$(EXEEXT) \ @WITH_QEMU_TRUE@ qemuxmlnstest$(EXEEXT) \ @WITH_QEMU_TRUE@ qemuargv2xmltest$(EXEEXT) \ @@ -490,19 +539,19 @@ vircgroupmock_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ @WITH_QEMU_TRUE@ qemumonitortest$(EXEEXT) \ @WITH_QEMU_TRUE@ qemumonitorjsontest$(EXEEXT) \ @WITH_QEMU_TRUE@ qemuhotplugtest$(EXEEXT) -@WITH_LXC_TRUE@am__EXEEXT_7 = lxcxml2xmltest$(EXEEXT) -@WITH_OPENVZ_TRUE@am__EXEEXT_8 = openvzutilstest$(EXEEXT) -@WITH_ESX_TRUE@am__EXEEXT_9 = esxutilstest$(EXEEXT) -@WITH_VMX_TRUE@am__EXEEXT_10 = vmx2xmltest$(EXEEXT) \ +@WITH_LXC_TRUE@am__EXEEXT_8 = lxcxml2xmltest$(EXEEXT) +@WITH_OPENVZ_TRUE@am__EXEEXT_9 = openvzutilstest$(EXEEXT) +@WITH_ESX_TRUE@am__EXEEXT_10 = esxutilstest$(EXEEXT) +@WITH_VMX_TRUE@am__EXEEXT_11 = vmx2xmltest$(EXEEXT) \ @WITH_VMX_TRUE@ xml2vmxtest$(EXEEXT) -@WITH_CIL_TRUE@am__EXEEXT_11 = object-locking$(EXEEXT) -@WITH_YAJL_TRUE@am__EXEEXT_12 = jsontest$(EXEEXT) -@WITH_NETWORK_TRUE@am__EXEEXT_13 = networkxml2conftest$(EXEEXT) -@WITH_STORAGE_SHEEPDOG_TRUE@am__EXEEXT_14 = storagebackendsheepdogtest$(EXEEXT) -@WITH_STORAGE_TRUE@am__EXEEXT_15 = storagevolxml2argvtest$(EXEEXT) -@WITH_LIBVIRTD_TRUE@am__EXEEXT_16 = eventtest$(EXEEXT) \ +@WITH_CIL_TRUE@am__EXEEXT_12 = object-locking$(EXEEXT) +@WITH_YAJL_TRUE@am__EXEEXT_13 = jsontest$(EXEEXT) +@WITH_NETWORK_TRUE@am__EXEEXT_14 = networkxml2conftest$(EXEEXT) +@WITH_STORAGE_SHEEPDOG_TRUE@am__EXEEXT_15 = storagebackendsheepdogtest$(EXEEXT) +@WITH_STORAGE_TRUE@am__EXEEXT_16 = storagevolxml2argvtest$(EXEEXT) +@WITH_LIBVIRTD_TRUE@am__EXEEXT_17 = eventtest$(EXEEXT) \ @WITH_LIBVIRTD_TRUE@ libvirtdconftest$(EXEEXT) -am__EXEEXT_17 = virshtest$(EXEEXT) sockettest$(EXEEXT) \ +am__EXEEXT_18 = virshtest$(EXEEXT) sockettest$(EXEEXT) \ nodeinfotest$(EXEEXT) virbuftest$(EXEEXT) commandtest$(EXEEXT) \ seclabeltest$(EXEEXT) virhashtest$(EXEEXT) \ virnetmessagetest$(EXEEXT) virnetsockettest$(EXEEXT) \ @@ -518,13 +567,13 @@ am__EXEEXT_17 = virshtest$(EXEEXT) sockettest$(EXEEXT) \ $(am__EXEEXT_2) $(am__EXEEXT_3) $(am__EXEEXT_4) \ $(am__EXEEXT_5) $(am__EXEEXT_6) $(am__EXEEXT_7) \ $(am__EXEEXT_8) $(am__EXEEXT_9) $(am__EXEEXT_10) \ - $(am__EXEEXT_11) $(am__EXEEXT_12) networkxml2xmltest$(EXEEXT) \ - $(am__EXEEXT_13) $(am__EXEEXT_14) nwfilterxml2xmltest$(EXEEXT) \ - $(am__EXEEXT_15) storagevolxml2xmltest$(EXEEXT) \ - storagepoolxml2xmltest$(EXEEXT) nodedevxml2xmltest$(EXEEXT) \ - interfacexml2xmltest$(EXEEXT) cputest$(EXEEXT) \ - $(am__EXEEXT_16) -am__EXEEXT_18 = commandhelper$(EXEEXT) ssh$(EXEEXT) test_conf$(EXEEXT) + $(am__EXEEXT_11) $(am__EXEEXT_12) $(am__EXEEXT_13) \ + networkxml2xmltest$(EXEEXT) $(am__EXEEXT_14) $(am__EXEEXT_15) \ + nwfilterxml2xmltest$(EXEEXT) $(am__EXEEXT_16) \ + storagevolxml2xmltest$(EXEEXT) storagepoolxml2xmltest$(EXEEXT) \ + nodedevxml2xmltest$(EXEEXT) interfacexml2xmltest$(EXEEXT) \ + cputest$(EXEEXT) $(am__EXEEXT_17) +am__EXEEXT_19 = commandhelper$(EXEEXT) ssh$(EXEEXT) test_conf$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) am_commandhelper_OBJECTS = commandhelper.$(OBJEXT) commandhelper_OBJECTS = $(am_commandhelper_OBJECTS) @@ -551,7 +600,7 @@ domainsnapshotxml2xmltest_OBJECTS = \ $(am_domainsnapshotxml2xmltest_OBJECTS) @WITH_QEMU_TRUE@am__DEPENDENCIES_3 = \ @WITH_QEMU_TRUE@ ../src/libvirt_driver_qemu_impl.la \ -@WITH_QEMU_TRUE@ $(am__append_25) $(am__append_26) \ +@WITH_QEMU_TRUE@ $(am__append_27) $(am__append_28) \ @WITH_QEMU_TRUE@ $(am__DEPENDENCIES_2) @WITH_QEMU_TRUE@domainsnapshotxml2xmltest_DEPENDENCIES = \ @WITH_QEMU_TRUE@ $(am__DEPENDENCIES_3) @@ -593,7 +642,7 @@ am__lxcxml2xmltest_SOURCES_DIST = lxcxml2xmltest.c testutilslxc.c \ @WITH_LXC_TRUE@ testutilslxc.$(OBJEXT) testutils.$(OBJEXT) lxcxml2xmltest_OBJECTS = $(am_lxcxml2xmltest_OBJECTS) @WITH_LXC_TRUE@am__DEPENDENCIES_4 = ../src/libvirt_driver_lxc_impl.la \ -@WITH_LXC_TRUE@ $(am__append_28) $(am__DEPENDENCIES_2) +@WITH_LXC_TRUE@ $(am__append_30) $(am__DEPENDENCIES_2) @WITH_LXC_TRUE@lxcxml2xmltest_DEPENDENCIES = $(am__DEPENDENCIES_4) am__networkxml2conftest_SOURCES_DIST = networkxml2conftest.c \ testutils.c testutils.h @@ -779,6 +828,15 @@ virbuftest_DEPENDENCIES = $(am__DEPENDENCIES_2) am_vircgrouptest_OBJECTS = vircgrouptest.$(OBJEXT) testutils.$(OBJEXT) vircgrouptest_OBJECTS = $(am_vircgrouptest_OBJECTS) vircgrouptest_DEPENDENCIES = $(am__DEPENDENCIES_2) +am__virdbustest_SOURCES_DIST = virdbustest.c testutils.h testutils.c +@WITH_DBUS_TRUE@am_virdbustest_OBJECTS = \ +@WITH_DBUS_TRUE@ virdbustest-virdbustest.$(OBJEXT) \ +@WITH_DBUS_TRUE@ virdbustest-testutils.$(OBJEXT) +virdbustest_OBJECTS = $(am_virdbustest_OBJECTS) +@WITH_DBUS_TRUE@virdbustest_DEPENDENCIES = $(am__DEPENDENCIES_2) +virdbustest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(virdbustest_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__virdrivermoduletest_SOURCES_DIST = virdrivermoduletest.c \ testutils.h testutils.c @WITH_DRIVER_MODULES_TRUE@am_virdrivermoduletest_OBJECTS = \ @@ -846,6 +904,17 @@ virstoragetest_DEPENDENCIES = $(am__DEPENDENCIES_2) am_virstringtest_OBJECTS = virstringtest.$(OBJEXT) testutils.$(OBJEXT) virstringtest_OBJECTS = $(am_virstringtest_OBJECTS) virstringtest_DEPENDENCIES = $(am__DEPENDENCIES_2) +am__virsystemdtest_SOURCES_DIST = virsystemdtest.c testutils.h \ + testutils.c +@WITH_DBUS_TRUE@am_virsystemdtest_OBJECTS = \ +@WITH_DBUS_TRUE@ virsystemdtest-virsystemdtest.$(OBJEXT) \ +@WITH_DBUS_TRUE@ virsystemdtest-testutils.$(OBJEXT) +virsystemdtest_OBJECTS = $(am_virsystemdtest_OBJECTS) +@WITH_DBUS_TRUE@virsystemdtest_DEPENDENCIES = $(am__DEPENDENCIES_2) +virsystemdtest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(virsystemdtest_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ am_virtimetest_OBJECTS = virtimetest.$(OBJEXT) testutils.$(OBJEXT) virtimetest_OBJECTS = $(am_virtimetest_OBJECTS) virtimetest_DEPENDENCIES = $(am__DEPENDENCIES_2) @@ -879,6 +948,18 @@ am__xml2vmxtest_SOURCES_DIST = xml2vmxtest.c testutils.c testutils.h @WITH_VMX_TRUE@ testutils.$(OBJEXT) xml2vmxtest_OBJECTS = $(am_xml2vmxtest_OBJECTS) @WITH_VMX_TRUE@xml2vmxtest_DEPENDENCIES = $(am__DEPENDENCIES_2) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -891,40 +972,36 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libqemumonitortestutils_la_SOURCES) \ $(libsecurityselinuxhelper_la_SOURCES) \ $(libshunload_la_SOURCES) \ $(libvirportallocatormock_la_SOURCES) \ - $(vircgroupmock_la_SOURCES) $(commandhelper_SOURCES) \ - $(commandtest_SOURCES) $(cputest_SOURCES) \ - $(domainsnapshotxml2xmltest_SOURCES) $(esxutilstest_SOURCES) \ - $(eventtest_SOURCES) $(fchosttest_SOURCES) \ - $(fdstreamtest_SOURCES) $(interfacexml2xmltest_SOURCES) \ - $(jsontest_SOURCES) $(libvirtdconftest_SOURCES) \ - $(lxcxml2xmltest_SOURCES) $(networkxml2conftest_SOURCES) \ - $(networkxml2xmltest_SOURCES) $(nodedevxml2xmltest_SOURCES) \ - $(nodeinfotest_SOURCES) $(nwfilterxml2xmltest_SOURCES) \ - $(object_locking_SOURCES) $(openvzutilstest_SOURCES) \ - $(qemuargv2xmltest_SOURCES) $(qemuhelptest_SOURCES) \ - $(qemuhotplugtest_SOURCES) $(qemumonitorjsontest_SOURCES) \ - $(qemumonitortest_SOURCES) $(qemuxml2argvtest_SOURCES) \ - $(qemuxml2xmltest_SOURCES) $(qemuxmlnstest_SOURCES) \ - $(reconnect_SOURCES) $(seclabeltest_SOURCES) \ - $(securityselinuxlabeltest_SOURCES) \ + $(vircgroupmock_la_SOURCES) $(virsystemdmock_la_SOURCES) \ + $(commandhelper_SOURCES) $(commandtest_SOURCES) \ + $(cputest_SOURCES) $(domainsnapshotxml2xmltest_SOURCES) \ + $(esxutilstest_SOURCES) $(eventtest_SOURCES) \ + $(fchosttest_SOURCES) $(fdstreamtest_SOURCES) \ + $(interfacexml2xmltest_SOURCES) $(jsontest_SOURCES) \ + $(libvirtdconftest_SOURCES) $(lxcxml2xmltest_SOURCES) \ + $(networkxml2conftest_SOURCES) $(networkxml2xmltest_SOURCES) \ + $(nodedevxml2xmltest_SOURCES) $(nodeinfotest_SOURCES) \ + $(nwfilterxml2xmltest_SOURCES) $(object_locking_SOURCES) \ + $(openvzutilstest_SOURCES) $(qemuargv2xmltest_SOURCES) \ + $(qemuhelptest_SOURCES) $(qemuhotplugtest_SOURCES) \ + $(qemumonitorjsontest_SOURCES) $(qemumonitortest_SOURCES) \ + $(qemuxml2argvtest_SOURCES) $(qemuxml2xmltest_SOURCES) \ + $(qemuxmlnstest_SOURCES) $(reconnect_SOURCES) \ + $(seclabeltest_SOURCES) $(securityselinuxlabeltest_SOURCES) \ $(securityselinuxtest_SOURCES) $(sexpr2xmltest_SOURCES) \ $(shunloadtest_SOURCES) $(sockettest_SOURCES) $(ssh_SOURCES) \ $(statstest_SOURCES) $(storagebackendsheepdogtest_SOURCES) \ @@ -934,23 +1011,24 @@ SOURCES = $(libqemumonitortestutils_la_SOURCES) \ $(test_conf_SOURCES) $(utiltest_SOURCES) \ $(viratomictest_SOURCES) $(virauthconfigtest_SOURCES) \ $(virbitmaptest_SOURCES) $(virbuftest_SOURCES) \ - $(vircgrouptest_SOURCES) $(virdrivermoduletest_SOURCES) \ - $(virendiantest_SOURCES) $(virhashtest_SOURCES) \ - $(viridentitytest_SOURCES) $(virkeycodetest_SOURCES) \ - $(virkeyfiletest_SOURCES) $(virlockspacetest_SOURCES) \ - $(virnetmessagetest_SOURCES) $(virnetsockettest_SOURCES) \ - $(virnettlscontexttest_SOURCES) \ + $(vircgrouptest_SOURCES) $(virdbustest_SOURCES) \ + $(virdrivermoduletest_SOURCES) $(virendiantest_SOURCES) \ + $(virhashtest_SOURCES) $(viridentitytest_SOURCES) \ + $(virkeycodetest_SOURCES) $(virkeyfiletest_SOURCES) \ + $(virlockspacetest_SOURCES) $(virnetmessagetest_SOURCES) \ + $(virnetsockettest_SOURCES) $(virnettlscontexttest_SOURCES) \ $(virportallocatortest_SOURCES) $(virshtest_SOURCES) \ $(virstoragetest_SOURCES) $(virstringtest_SOURCES) \ - $(virtimetest_SOURCES) $(viruritest_SOURCES) \ - $(vmx2xmltest_SOURCES) $(xencapstest_SOURCES) \ - $(xmconfigtest_SOURCES) $(xml2sexprtest_SOURCES) \ - $(xml2vmxtest_SOURCES) + $(virsystemdtest_SOURCES) $(virtimetest_SOURCES) \ + $(viruritest_SOURCES) $(vmx2xmltest_SOURCES) \ + $(xencapstest_SOURCES) $(xmconfigtest_SOURCES) \ + $(xml2sexprtest_SOURCES) $(xml2vmxtest_SOURCES) DIST_SOURCES = $(am__libqemumonitortestutils_la_SOURCES_DIST) \ $(am__libsecurityselinuxhelper_la_SOURCES_DIST) \ $(libshunload_la_SOURCES) \ $(libvirportallocatormock_la_SOURCES) \ - $(vircgroupmock_la_SOURCES) $(commandhelper_SOURCES) \ + $(vircgroupmock_la_SOURCES) \ + $(am__virsystemdmock_la_SOURCES_DIST) $(commandhelper_SOURCES) \ $(commandtest_SOURCES) $(cputest_SOURCES) \ $(am__domainsnapshotxml2xmltest_SOURCES_DIST) \ $(am__esxutilstest_SOURCES_DIST) $(am__eventtest_SOURCES_DIST) \ @@ -984,7 +1062,7 @@ DIST_SOURCES = $(am__libqemumonitortestutils_la_SOURCES_DIST) \ $(test_conf_SOURCES) $(utiltest_SOURCES) \ $(viratomictest_SOURCES) $(virauthconfigtest_SOURCES) \ $(virbitmaptest_SOURCES) $(virbuftest_SOURCES) \ - $(vircgrouptest_SOURCES) \ + $(vircgrouptest_SOURCES) $(am__virdbustest_SOURCES_DIST) \ $(am__virdrivermoduletest_SOURCES_DIST) \ $(virendiantest_SOURCES) $(virhashtest_SOURCES) \ $(viridentitytest_SOURCES) $(virkeycodetest_SOURCES) \ @@ -993,8 +1071,8 @@ DIST_SOURCES = $(am__libqemumonitortestutils_la_SOURCES_DIST) \ $(am__virnettlscontexttest_SOURCES_DIST) \ $(virportallocatortest_SOURCES) $(virshtest_SOURCES) \ $(virstoragetest_SOURCES) $(virstringtest_SOURCES) \ - $(virtimetest_SOURCES) $(viruritest_SOURCES) \ - $(am__vmx2xmltest_SOURCES_DIST) \ + $(am__virsystemdtest_SOURCES_DIST) $(virtimetest_SOURCES) \ + $(viruritest_SOURCES) $(am__vmx2xmltest_SOURCES_DIST) \ $(am__xencapstest_SOURCES_DIST) \ $(am__xmconfigtest_SOURCES_DIST) \ $(am__xml2sexprtest_SOURCES_DIST) \ @@ -1004,20 +1082,239 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -am__tty_colors = \ -red=; grn=; lgn=; blu=; std= -@WITH_LIBVIRTD_TRUE@am__EXEEXT_19 = test_conf.sh cpuset \ +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +@WITH_LIBVIRTD_TRUE@am__EXEEXT_20 = test_conf.sh cpuset \ @WITH_LIBVIRTD_TRUE@ define-dev-segfault int-overflow \ @WITH_LIBVIRTD_TRUE@ libvirtd-fail libvirtd-pool read-bufsiz \ @WITH_LIBVIRTD_TRUE@ read-non-seekable start vcpupin virsh-all \ @WITH_LIBVIRTD_TRUE@ virsh-optparse virsh-schedinfo \ @WITH_LIBVIRTD_TRUE@ virsh-synopsis virsh-undefine -am__EXEEXT_20 = capabilityschematest interfaceschematest \ +am__EXEEXT_21 = capabilityschematest interfaceschematest \ networkschematest storagepoolschematest storagevolschematest \ domainschematest nodedevschematest nwfilterschematest \ - domainsnapshotschematest $(am__EXEEXT_19) $(am__append_21) + domainsnapshotschematest $(am__EXEEXT_20) $(am__append_22) +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ @@ -2481,14 +2778,15 @@ EXTRA_DIST = capabilityschemadata capabilityschematest commanddata \ storagevolxml2argvdata storagevolschemadata \ storagevolschematest storagevolxml2xmlin storagevolxml2xmlout \ sysinfodata test-lib.sh vmx2xmldata xencapsdata xmconfigdata \ - xml2sexprdata xml2vmxdata .valgrind.supp $(am__append_20) \ - $(am__append_22) $(test_scripts) $(am__append_24) \ - $(am__append_27) $(am__append_29) $(am__append_30) \ - openvzutilstest.conf $(am__append_31) $(am__append_32) \ - $(am__append_33) $(am__append_34) $(am__append_35) \ - $(am__append_36) $(am__append_39) $(am__append_40) \ - securityselinuxtest.c securityselinuxlabeltest.c \ - securityselinuxhelper.c $(am__append_43) + xml2sexprdata xml2vmxdata .valgrind.supp $(am__append_21) \ + $(am__append_23) $(test_scripts) $(am__append_26) \ + $(am__append_29) $(am__append_31) $(am__append_32) \ + openvzutilstest.conf $(am__append_33) $(am__append_34) \ + $(am__append_35) $(am__append_36) $(am__append_37) \ + $(am__append_38) $(am__append_41) $(am__append_42) \ + $(am__append_43) securityselinuxtest.c \ + securityselinuxlabeltest.c securityselinuxhelper.c \ + $(am__append_46) test_helpers = commandhelper ssh test_conf test_programs = virshtest sockettest nodeinfotest virbuftest \ commandtest seclabeltest virhashtest virnetmessagetest \ @@ -2501,11 +2799,11 @@ test_programs = virshtest sockettest nodeinfotest virbuftest \ $(am__append_5) $(am__append_6) $(am__append_7) \ $(am__append_8) $(am__append_9) $(am__append_10) \ $(am__append_11) $(am__append_12) $(am__append_13) \ - $(am__append_14) networkxml2xmltest $(am__append_15) \ - $(am__append_16) nwfilterxml2xmltest $(am__append_17) \ - storagevolxml2xmltest storagepoolxml2xmltest \ + $(am__append_14) $(am__append_15) networkxml2xmltest \ + $(am__append_16) $(am__append_17) nwfilterxml2xmltest \ + $(am__append_18) storagevolxml2xmltest storagepoolxml2xmltest \ nodedevxml2xmltest interfacexml2xmltest cputest \ - $(am__append_19) + $(am__append_20) # This is a fake SSH we use from virnetsockettest ssh_SOURCES = ssh.c @@ -2513,13 +2811,13 @@ ssh_LDADD = $(COVERAGE_LDFLAGS) test_scripts = capabilityschematest interfaceschematest \ networkschematest storagepoolschematest storagevolschematest \ domainschematest nodedevschematest nwfilterschematest \ - domainsnapshotschematest $(am__append_18) $(am__append_21) + domainsnapshotschematest $(am__append_19) $(am__append_22) test_libraries = libshunload.la libvirportallocatormock.la \ - vircgroupmock.la $(NULL) $(am__append_23) + vircgroupmock.la $(NULL) $(am__append_24) $(am__append_25) @WITH_TESTS_TRUE@noinst_LTLIBRARIES = $(test_libraries) \ -@WITH_TESTS_TRUE@ $(am__append_41) +@WITH_TESTS_TRUE@ $(am__append_44) @WITH_TESTS_FALSE@check_LTLIBRARIES = $(test_libraries) \ -@WITH_TESTS_FALSE@ $(am__append_42) +@WITH_TESTS_FALSE@ $(am__append_45) # NB, automake < 1.10 does not provide the real # abs_top_{src/build}dir or builddir variables, so don't rely @@ -2527,7 +2825,9 @@ test_libraries = libshunload.la libvirportallocatormock.la \ # Also, BSD sh doesn't like 'a=b b=$$a', so we can't use an # intermediate shell variable, but must do all the expansion in make lv_abs_top_builddir = `cd '$(top_builddir)'; pwd` -path_add = $(lv_abs_top_builddir)/daemon$(PATH_SEPARATOR)$(lv_abs_top_builddir)/tools$(PATH_SEPARATOR)$(lv_abs_top_builddir)/tests +path_add = $(subst :,$(PATH_SEPARATOR),\ + $(subst !,$(lv_abs_top_builddir)/,!daemon:!tools:!tests)) + TESTS_ENVIRONMENT = \ abs_top_builddir=$(lv_abs_top_builddir) \ abs_top_srcdir=`cd '$(top_srcdir)'; pwd` \ @@ -2541,6 +2841,9 @@ TESTS_ENVIRONMENT = \ LC_ALL=C \ $(VG) +VALGRIND = valgrind --quiet --leak-check=full \ + --suppressions=$(srcdir)/.valgrind.supp + sockettest_SOURCES = \ sockettest.c \ testutils.c testutils.h @@ -2582,7 +2885,7 @@ QEMUMONITORTESTUTILS_SOURCES = \ @WITH_QEMU_TRUE@libqemumonitortestutils_la_SOURCES = $(QEMUMONITORTESTUTILS_SOURCES) @WITH_QEMU_TRUE@qemu_LDADDS = ../src/libvirt_driver_qemu_impl.la \ -@WITH_QEMU_TRUE@ $(am__append_25) $(am__append_26) $(LDADDS) +@WITH_QEMU_TRUE@ $(am__append_27) $(am__append_28) $(LDADDS) @WITH_QEMU_TRUE@qemuxml2argvtest_SOURCES = \ @WITH_QEMU_TRUE@ qemuxml2argvtest.c testutilsqemu.c testutilsqemu.h \ @WITH_QEMU_TRUE@ testutils.c testutils.h @@ -2627,7 +2930,7 @@ QEMUMONITORTESTUTILS_SOURCES = \ @WITH_QEMU_TRUE@domainsnapshotxml2xmltest_LDADD = $(qemu_LDADDS) @WITH_LXC_TRUE@lxc_LDADDS = ../src/libvirt_driver_lxc_impl.la \ -@WITH_LXC_TRUE@ $(am__append_28) $(LDADDS) +@WITH_LXC_TRUE@ $(am__append_30) $(LDADDS) @WITH_LXC_TRUE@lxcxml2xmltest_SOURCES = \ @WITH_LXC_TRUE@ lxcxml2xmltest.c testutilslxc.c testutilslxc.h \ @WITH_LXC_TRUE@ testutils.c testutils.h @@ -2745,9 +3048,9 @@ virnetsockettest_SOURCES = \ virnetsockettest_LDADD = $(LDADDS) @WITH_GNUTLS_TRUE@virnettlscontexttest_SOURCES = \ @WITH_GNUTLS_TRUE@ virnettlscontexttest.c testutils.h \ -@WITH_GNUTLS_TRUE@ testutils.c $(am__append_37) +@WITH_GNUTLS_TRUE@ testutils.c $(am__append_39) @WITH_GNUTLS_TRUE@virnettlscontexttest_LDADD = $(LDADDS) \ -@WITH_GNUTLS_TRUE@ $(am__append_38) +@WITH_GNUTLS_TRUE@ $(am__append_40) virtimetest_SOURCES = \ virtimetest.c testutils.h testutils.c @@ -2794,6 +3097,23 @@ vircgroupmock_la_CFLAGS = $(AM_CFLAGS) vircgroupmock_la_LDFLAGS = -module -avoid-version \ -rpath /evil/libtool/hack/to/force/shared/lib/creation +@WITH_DBUS_TRUE@virdbustest_SOURCES = \ +@WITH_DBUS_TRUE@ virdbustest.c testutils.h testutils.c + +@WITH_DBUS_TRUE@virdbustest_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) +@WITH_DBUS_TRUE@virdbustest_LDADD = $(LDADDS) +@WITH_DBUS_TRUE@virsystemdtest_SOURCES = \ +@WITH_DBUS_TRUE@ virsystemdtest.c testutils.h testutils.c + +@WITH_DBUS_TRUE@virsystemdtest_CFLAGS = $(AM_CFLAGS) +@WITH_DBUS_TRUE@virsystemdtest_LDADD = $(LDADDS) +@WITH_DBUS_TRUE@virsystemdmock_la_SOURCES = \ +@WITH_DBUS_TRUE@ virsystemdmock.c + +@WITH_DBUS_TRUE@virsystemdmock_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) +@WITH_DBUS_TRUE@virsystemdmock_la_LDFLAGS = -module -avoid-version \ +@WITH_DBUS_TRUE@ -rpath /evil/libtool/hack/to/force/shared/lib/creation + viruritest_SOURCES = \ viruritest.c testutils.h testutils.c @@ -2820,13 +3140,17 @@ seclabeltest_LDADD = $(LDADDS) @WITH_SECDRIVER_SELINUX_TRUE@ securityselinuxtest.c testutils.h testutils.c @WITH_SECDRIVER_SELINUX_TRUE@securityselinuxtest_LDADD = $(LDADDS) -@WITH_SECDRIVER_SELINUX_TRUE@securityselinuxtest_DEPENDENCIES = libsecurityselinuxhelper.la ../src/libvirt.la +@WITH_SECDRIVER_SELINUX_TRUE@securityselinuxtest_DEPENDENCIES = libsecurityselinuxhelper.la \ +@WITH_SECDRIVER_SELINUX_TRUE@ ../src/libvirt.la + @WITH_ATTR_TRUE@@WITH_QEMU_TRUE@@WITH_SECDRIVER_SELINUX_TRUE@securityselinuxlabeltest_SOURCES = \ @WITH_ATTR_TRUE@@WITH_QEMU_TRUE@@WITH_SECDRIVER_SELINUX_TRUE@ securityselinuxlabeltest.c testutils.h testutils.c \ @WITH_ATTR_TRUE@@WITH_QEMU_TRUE@@WITH_SECDRIVER_SELINUX_TRUE@ testutilsqemu.h testutilsqemu.c @WITH_ATTR_TRUE@@WITH_QEMU_TRUE@@WITH_SECDRIVER_SELINUX_TRUE@securityselinuxlabeltest_LDADD = $(qemu_LDADDS) -@WITH_ATTR_TRUE@@WITH_QEMU_TRUE@@WITH_SECDRIVER_SELINUX_TRUE@securityselinuxlabeltest_DEPENDENCIES = libsecurityselinuxhelper.la ../src/libvirt.la +@WITH_ATTR_TRUE@@WITH_QEMU_TRUE@@WITH_SECDRIVER_SELINUX_TRUE@securityselinuxlabeltest_DEPENDENCIES = libsecurityselinuxhelper.la \ +@WITH_ATTR_TRUE@@WITH_QEMU_TRUE@@WITH_SECDRIVER_SELINUX_TRUE@ ../src/libvirt.la + virbuftest_SOURCES = \ virbuftest.c testutils.h testutils.c @@ -2865,7 +3189,9 @@ utiltest_LDADD = $(LDADDS) @WITH_LIBVIRTD_TRUE@eventtest_LDADD = -lrt $(LDADDS) libshunload_la_SOURCES = shunloadhelper.c libshunload_la_LIBADD = ../src/libvirt.la -libshunload_la_LDFLAGS = -module -avoid-version -rpath /evil/libtool/hack/to/force/shared/lib/creation +libshunload_la_LDFLAGS = -module -avoid-version \ + -rpath /evil/libtool/hack/to/force/shared/lib/creation + shunloadtest_SOURCES = \ shunloadtest.c @@ -2888,11 +3214,13 @@ fchosttest_LDADD = $(LDADDS) @WITH_CIL_TRUE@CILOPTPACKAGES = -package unix,str,cil @WITH_CIL_TRUE@CILOPTLIBS = -linkpkg @WITH_CIL_TRUE@object_locking_SOURCES = object-locking.ml -CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.cmi *.cmx object-locking-files.txt +CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.cmi *.cmx \ + object-locking-files.txt + all: all-am .SUFFIXES: -.SUFFIXES: .c .lo .o .obj +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -2926,32 +3254,44 @@ $(am__aclocal_m4_deps): clean-checkLTLIBRARIES: -test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES) - @list='$(check_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(check_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + libqemumonitortestutils.la: $(libqemumonitortestutils_la_OBJECTS) $(libqemumonitortestutils_la_DEPENDENCIES) $(EXTRA_libqemumonitortestutils_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(am_libqemumonitortestutils_la_rpath) $(libqemumonitortestutils_la_OBJECTS) $(libqemumonitortestutils_la_LIBADD) $(LIBS) + libsecurityselinuxhelper.la: $(libsecurityselinuxhelper_la_OBJECTS) $(libsecurityselinuxhelper_la_DEPENDENCIES) $(EXTRA_libsecurityselinuxhelper_la_DEPENDENCIES) $(AM_V_CCLD)$(libsecurityselinuxhelper_la_LINK) $(am_libsecurityselinuxhelper_la_rpath) $(libsecurityselinuxhelper_la_OBJECTS) $(libsecurityselinuxhelper_la_LIBADD) $(LIBS) + libshunload.la: $(libshunload_la_OBJECTS) $(libshunload_la_DEPENDENCIES) $(EXTRA_libshunload_la_DEPENDENCIES) $(AM_V_CCLD)$(libshunload_la_LINK) $(am_libshunload_la_rpath) $(libshunload_la_OBJECTS) $(libshunload_la_LIBADD) $(LIBS) + libvirportallocatormock.la: $(libvirportallocatormock_la_OBJECTS) $(libvirportallocatormock_la_DEPENDENCIES) $(EXTRA_libvirportallocatormock_la_DEPENDENCIES) $(AM_V_CCLD)$(libvirportallocatormock_la_LINK) $(am_libvirportallocatormock_la_rpath) $(libvirportallocatormock_la_OBJECTS) $(libvirportallocatormock_la_LIBADD) $(LIBS) + vircgroupmock.la: $(vircgroupmock_la_OBJECTS) $(vircgroupmock_la_DEPENDENCIES) $(EXTRA_vircgroupmock_la_DEPENDENCIES) $(AM_V_CCLD)$(vircgroupmock_la_LINK) $(am_vircgroupmock_la_rpath) $(vircgroupmock_la_OBJECTS) $(vircgroupmock_la_LIBADD) $(LIBS) +virsystemdmock.la: $(virsystemdmock_la_OBJECTS) $(virsystemdmock_la_DEPENDENCIES) $(EXTRA_virsystemdmock_la_DEPENDENCIES) + $(AM_V_CCLD)$(virsystemdmock_la_LINK) $(am_virsystemdmock_la_rpath) $(virsystemdmock_la_OBJECTS) $(virsystemdmock_la_LIBADD) $(LIBS) + clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ @@ -2969,210 +3309,287 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + commandhelper$(EXEEXT): $(commandhelper_OBJECTS) $(commandhelper_DEPENDENCIES) $(EXTRA_commandhelper_DEPENDENCIES) @rm -f commandhelper$(EXEEXT) $(AM_V_CCLD)$(commandhelper_LINK) $(commandhelper_OBJECTS) $(commandhelper_LDADD) $(LIBS) + commandtest$(EXEEXT): $(commandtest_OBJECTS) $(commandtest_DEPENDENCIES) $(EXTRA_commandtest_DEPENDENCIES) @rm -f commandtest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(commandtest_OBJECTS) $(commandtest_LDADD) $(LIBS) + cputest$(EXEEXT): $(cputest_OBJECTS) $(cputest_DEPENDENCIES) $(EXTRA_cputest_DEPENDENCIES) @rm -f cputest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(cputest_OBJECTS) $(cputest_LDADD) $(LIBS) + domainsnapshotxml2xmltest$(EXEEXT): $(domainsnapshotxml2xmltest_OBJECTS) $(domainsnapshotxml2xmltest_DEPENDENCIES) $(EXTRA_domainsnapshotxml2xmltest_DEPENDENCIES) @rm -f domainsnapshotxml2xmltest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(domainsnapshotxml2xmltest_OBJECTS) $(domainsnapshotxml2xmltest_LDADD) $(LIBS) + esxutilstest$(EXEEXT): $(esxutilstest_OBJECTS) $(esxutilstest_DEPENDENCIES) $(EXTRA_esxutilstest_DEPENDENCIES) @rm -f esxutilstest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esxutilstest_OBJECTS) $(esxutilstest_LDADD) $(LIBS) + eventtest$(EXEEXT): $(eventtest_OBJECTS) $(eventtest_DEPENDENCIES) $(EXTRA_eventtest_DEPENDENCIES) @rm -f eventtest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(eventtest_OBJECTS) $(eventtest_LDADD) $(LIBS) + fchosttest$(EXEEXT): $(fchosttest_OBJECTS) $(fchosttest_DEPENDENCIES) $(EXTRA_fchosttest_DEPENDENCIES) @rm -f fchosttest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fchosttest_OBJECTS) $(fchosttest_LDADD) $(LIBS) + fdstreamtest$(EXEEXT): $(fdstreamtest_OBJECTS) $(fdstreamtest_DEPENDENCIES) $(EXTRA_fdstreamtest_DEPENDENCIES) @rm -f fdstreamtest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fdstreamtest_OBJECTS) $(fdstreamtest_LDADD) $(LIBS) + interfacexml2xmltest$(EXEEXT): $(interfacexml2xmltest_OBJECTS) $(interfacexml2xmltest_DEPENDENCIES) $(EXTRA_interfacexml2xmltest_DEPENDENCIES) @rm -f interfacexml2xmltest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(interfacexml2xmltest_OBJECTS) $(interfacexml2xmltest_LDADD) $(LIBS) + jsontest$(EXEEXT): $(jsontest_OBJECTS) $(jsontest_DEPENDENCIES) $(EXTRA_jsontest_DEPENDENCIES) @rm -f jsontest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(jsontest_OBJECTS) $(jsontest_LDADD) $(LIBS) + libvirtdconftest$(EXEEXT): $(libvirtdconftest_OBJECTS) $(libvirtdconftest_DEPENDENCIES) $(EXTRA_libvirtdconftest_DEPENDENCIES) @rm -f libvirtdconftest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(libvirtdconftest_OBJECTS) $(libvirtdconftest_LDADD) $(LIBS) + lxcxml2xmltest$(EXEEXT): $(lxcxml2xmltest_OBJECTS) $(lxcxml2xmltest_DEPENDENCIES) $(EXTRA_lxcxml2xmltest_DEPENDENCIES) @rm -f lxcxml2xmltest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(lxcxml2xmltest_OBJECTS) $(lxcxml2xmltest_LDADD) $(LIBS) + networkxml2conftest$(EXEEXT): $(networkxml2conftest_OBJECTS) $(networkxml2conftest_DEPENDENCIES) $(EXTRA_networkxml2conftest_DEPENDENCIES) @rm -f networkxml2conftest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(networkxml2conftest_OBJECTS) $(networkxml2conftest_LDADD) $(LIBS) + networkxml2xmltest$(EXEEXT): $(networkxml2xmltest_OBJECTS) $(networkxml2xmltest_DEPENDENCIES) $(EXTRA_networkxml2xmltest_DEPENDENCIES) @rm -f networkxml2xmltest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(networkxml2xmltest_OBJECTS) $(networkxml2xmltest_LDADD) $(LIBS) + nodedevxml2xmltest$(EXEEXT): $(nodedevxml2xmltest_OBJECTS) $(nodedevxml2xmltest_DEPENDENCIES) $(EXTRA_nodedevxml2xmltest_DEPENDENCIES) @rm -f nodedevxml2xmltest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(nodedevxml2xmltest_OBJECTS) $(nodedevxml2xmltest_LDADD) $(LIBS) + nodeinfotest$(EXEEXT): $(nodeinfotest_OBJECTS) $(nodeinfotest_DEPENDENCIES) $(EXTRA_nodeinfotest_DEPENDENCIES) @rm -f nodeinfotest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(nodeinfotest_OBJECTS) $(nodeinfotest_LDADD) $(LIBS) + nwfilterxml2xmltest$(EXEEXT): $(nwfilterxml2xmltest_OBJECTS) $(nwfilterxml2xmltest_DEPENDENCIES) $(EXTRA_nwfilterxml2xmltest_DEPENDENCIES) @rm -f nwfilterxml2xmltest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(nwfilterxml2xmltest_OBJECTS) $(nwfilterxml2xmltest_LDADD) $(LIBS) + @WITH_CIL_FALSE@object-locking$(EXEEXT): $(object_locking_OBJECTS) $(object_locking_DEPENDENCIES) $(EXTRA_object_locking_DEPENDENCIES) @WITH_CIL_FALSE@ @rm -f object-locking$(EXEEXT) @WITH_CIL_FALSE@ $(AM_V_CCLD)$(LINK) $(object_locking_OBJECTS) $(object_locking_LDADD) $(LIBS) + openvzutilstest$(EXEEXT): $(openvzutilstest_OBJECTS) $(openvzutilstest_DEPENDENCIES) $(EXTRA_openvzutilstest_DEPENDENCIES) @rm -f openvzutilstest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(openvzutilstest_OBJECTS) $(openvzutilstest_LDADD) $(LIBS) + qemuargv2xmltest$(EXEEXT): $(qemuargv2xmltest_OBJECTS) $(qemuargv2xmltest_DEPENDENCIES) $(EXTRA_qemuargv2xmltest_DEPENDENCIES) @rm -f qemuargv2xmltest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(qemuargv2xmltest_OBJECTS) $(qemuargv2xmltest_LDADD) $(LIBS) + qemuhelptest$(EXEEXT): $(qemuhelptest_OBJECTS) $(qemuhelptest_DEPENDENCIES) $(EXTRA_qemuhelptest_DEPENDENCIES) @rm -f qemuhelptest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(qemuhelptest_OBJECTS) $(qemuhelptest_LDADD) $(LIBS) + qemuhotplugtest$(EXEEXT): $(qemuhotplugtest_OBJECTS) $(qemuhotplugtest_DEPENDENCIES) $(EXTRA_qemuhotplugtest_DEPENDENCIES) @rm -f qemuhotplugtest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(qemuhotplugtest_OBJECTS) $(qemuhotplugtest_LDADD) $(LIBS) + qemumonitorjsontest$(EXEEXT): $(qemumonitorjsontest_OBJECTS) $(qemumonitorjsontest_DEPENDENCIES) $(EXTRA_qemumonitorjsontest_DEPENDENCIES) @rm -f qemumonitorjsontest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(qemumonitorjsontest_OBJECTS) $(qemumonitorjsontest_LDADD) $(LIBS) + qemumonitortest$(EXEEXT): $(qemumonitortest_OBJECTS) $(qemumonitortest_DEPENDENCIES) $(EXTRA_qemumonitortest_DEPENDENCIES) @rm -f qemumonitortest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(qemumonitortest_OBJECTS) $(qemumonitortest_LDADD) $(LIBS) + qemuxml2argvtest$(EXEEXT): $(qemuxml2argvtest_OBJECTS) $(qemuxml2argvtest_DEPENDENCIES) $(EXTRA_qemuxml2argvtest_DEPENDENCIES) @rm -f qemuxml2argvtest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(qemuxml2argvtest_OBJECTS) $(qemuxml2argvtest_LDADD) $(LIBS) + qemuxml2xmltest$(EXEEXT): $(qemuxml2xmltest_OBJECTS) $(qemuxml2xmltest_DEPENDENCIES) $(EXTRA_qemuxml2xmltest_DEPENDENCIES) @rm -f qemuxml2xmltest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(qemuxml2xmltest_OBJECTS) $(qemuxml2xmltest_LDADD) $(LIBS) + qemuxmlnstest$(EXEEXT): $(qemuxmlnstest_OBJECTS) $(qemuxmlnstest_DEPENDENCIES) $(EXTRA_qemuxmlnstest_DEPENDENCIES) @rm -f qemuxmlnstest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(qemuxmlnstest_OBJECTS) $(qemuxmlnstest_LDADD) $(LIBS) + reconnect$(EXEEXT): $(reconnect_OBJECTS) $(reconnect_DEPENDENCIES) $(EXTRA_reconnect_DEPENDENCIES) @rm -f reconnect$(EXEEXT) $(AM_V_CCLD)$(LINK) $(reconnect_OBJECTS) $(reconnect_LDADD) $(LIBS) + seclabeltest$(EXEEXT): $(seclabeltest_OBJECTS) $(seclabeltest_DEPENDENCIES) $(EXTRA_seclabeltest_DEPENDENCIES) @rm -f seclabeltest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(seclabeltest_OBJECTS) $(seclabeltest_LDADD) $(LIBS) + securityselinuxlabeltest$(EXEEXT): $(securityselinuxlabeltest_OBJECTS) $(securityselinuxlabeltest_DEPENDENCIES) $(EXTRA_securityselinuxlabeltest_DEPENDENCIES) @rm -f securityselinuxlabeltest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(securityselinuxlabeltest_OBJECTS) $(securityselinuxlabeltest_LDADD) $(LIBS) + securityselinuxtest$(EXEEXT): $(securityselinuxtest_OBJECTS) $(securityselinuxtest_DEPENDENCIES) $(EXTRA_securityselinuxtest_DEPENDENCIES) @rm -f securityselinuxtest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(securityselinuxtest_OBJECTS) $(securityselinuxtest_LDADD) $(LIBS) + sexpr2xmltest$(EXEEXT): $(sexpr2xmltest_OBJECTS) $(sexpr2xmltest_DEPENDENCIES) $(EXTRA_sexpr2xmltest_DEPENDENCIES) @rm -f sexpr2xmltest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sexpr2xmltest_OBJECTS) $(sexpr2xmltest_LDADD) $(LIBS) + shunloadtest$(EXEEXT): $(shunloadtest_OBJECTS) $(shunloadtest_DEPENDENCIES) $(EXTRA_shunloadtest_DEPENDENCIES) @rm -f shunloadtest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(shunloadtest_OBJECTS) $(shunloadtest_LDADD) $(LIBS) + sockettest$(EXEEXT): $(sockettest_OBJECTS) $(sockettest_DEPENDENCIES) $(EXTRA_sockettest_DEPENDENCIES) @rm -f sockettest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sockettest_OBJECTS) $(sockettest_LDADD) $(LIBS) + ssh$(EXEEXT): $(ssh_OBJECTS) $(ssh_DEPENDENCIES) $(EXTRA_ssh_DEPENDENCIES) @rm -f ssh$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ssh_OBJECTS) $(ssh_LDADD) $(LIBS) + statstest$(EXEEXT): $(statstest_OBJECTS) $(statstest_DEPENDENCIES) $(EXTRA_statstest_DEPENDENCIES) @rm -f statstest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(statstest_OBJECTS) $(statstest_LDADD) $(LIBS) + storagebackendsheepdogtest$(EXEEXT): $(storagebackendsheepdogtest_OBJECTS) $(storagebackendsheepdogtest_DEPENDENCIES) $(EXTRA_storagebackendsheepdogtest_DEPENDENCIES) @rm -f storagebackendsheepdogtest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(storagebackendsheepdogtest_OBJECTS) $(storagebackendsheepdogtest_LDADD) $(LIBS) + storagepoolxml2xmltest$(EXEEXT): $(storagepoolxml2xmltest_OBJECTS) $(storagepoolxml2xmltest_DEPENDENCIES) $(EXTRA_storagepoolxml2xmltest_DEPENDENCIES) @rm -f storagepoolxml2xmltest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(storagepoolxml2xmltest_OBJECTS) $(storagepoolxml2xmltest_LDADD) $(LIBS) + storagevolxml2argvtest$(EXEEXT): $(storagevolxml2argvtest_OBJECTS) $(storagevolxml2argvtest_DEPENDENCIES) $(EXTRA_storagevolxml2argvtest_DEPENDENCIES) @rm -f storagevolxml2argvtest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(storagevolxml2argvtest_OBJECTS) $(storagevolxml2argvtest_LDADD) $(LIBS) + storagevolxml2xmltest$(EXEEXT): $(storagevolxml2xmltest_OBJECTS) $(storagevolxml2xmltest_DEPENDENCIES) $(EXTRA_storagevolxml2xmltest_DEPENDENCIES) @rm -f storagevolxml2xmltest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(storagevolxml2xmltest_OBJECTS) $(storagevolxml2xmltest_LDADD) $(LIBS) + sysinfotest$(EXEEXT): $(sysinfotest_OBJECTS) $(sysinfotest_DEPENDENCIES) $(EXTRA_sysinfotest_DEPENDENCIES) @rm -f sysinfotest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sysinfotest_OBJECTS) $(sysinfotest_LDADD) $(LIBS) + test_conf$(EXEEXT): $(test_conf_OBJECTS) $(test_conf_DEPENDENCIES) $(EXTRA_test_conf_DEPENDENCIES) @rm -f test_conf$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_conf_OBJECTS) $(test_conf_LDADD) $(LIBS) + utiltest$(EXEEXT): $(utiltest_OBJECTS) $(utiltest_DEPENDENCIES) $(EXTRA_utiltest_DEPENDENCIES) @rm -f utiltest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(utiltest_OBJECTS) $(utiltest_LDADD) $(LIBS) + viratomictest$(EXEEXT): $(viratomictest_OBJECTS) $(viratomictest_DEPENDENCIES) $(EXTRA_viratomictest_DEPENDENCIES) @rm -f viratomictest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(viratomictest_OBJECTS) $(viratomictest_LDADD) $(LIBS) + virauthconfigtest$(EXEEXT): $(virauthconfigtest_OBJECTS) $(virauthconfigtest_DEPENDENCIES) $(EXTRA_virauthconfigtest_DEPENDENCIES) @rm -f virauthconfigtest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(virauthconfigtest_OBJECTS) $(virauthconfigtest_LDADD) $(LIBS) + virbitmaptest$(EXEEXT): $(virbitmaptest_OBJECTS) $(virbitmaptest_DEPENDENCIES) $(EXTRA_virbitmaptest_DEPENDENCIES) @rm -f virbitmaptest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(virbitmaptest_OBJECTS) $(virbitmaptest_LDADD) $(LIBS) + virbuftest$(EXEEXT): $(virbuftest_OBJECTS) $(virbuftest_DEPENDENCIES) $(EXTRA_virbuftest_DEPENDENCIES) @rm -f virbuftest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(virbuftest_OBJECTS) $(virbuftest_LDADD) $(LIBS) + vircgrouptest$(EXEEXT): $(vircgrouptest_OBJECTS) $(vircgrouptest_DEPENDENCIES) $(EXTRA_vircgrouptest_DEPENDENCIES) @rm -f vircgrouptest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(vircgrouptest_OBJECTS) $(vircgrouptest_LDADD) $(LIBS) + +virdbustest$(EXEEXT): $(virdbustest_OBJECTS) $(virdbustest_DEPENDENCIES) $(EXTRA_virdbustest_DEPENDENCIES) + @rm -f virdbustest$(EXEEXT) + $(AM_V_CCLD)$(virdbustest_LINK) $(virdbustest_OBJECTS) $(virdbustest_LDADD) $(LIBS) + virdrivermoduletest$(EXEEXT): $(virdrivermoduletest_OBJECTS) $(virdrivermoduletest_DEPENDENCIES) $(EXTRA_virdrivermoduletest_DEPENDENCIES) @rm -f virdrivermoduletest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(virdrivermoduletest_OBJECTS) $(virdrivermoduletest_LDADD) $(LIBS) + virendiantest$(EXEEXT): $(virendiantest_OBJECTS) $(virendiantest_DEPENDENCIES) $(EXTRA_virendiantest_DEPENDENCIES) @rm -f virendiantest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(virendiantest_OBJECTS) $(virendiantest_LDADD) $(LIBS) + virhashtest$(EXEEXT): $(virhashtest_OBJECTS) $(virhashtest_DEPENDENCIES) $(EXTRA_virhashtest_DEPENDENCIES) @rm -f virhashtest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(virhashtest_OBJECTS) $(virhashtest_LDADD) $(LIBS) + viridentitytest$(EXEEXT): $(viridentitytest_OBJECTS) $(viridentitytest_DEPENDENCIES) $(EXTRA_viridentitytest_DEPENDENCIES) @rm -f viridentitytest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(viridentitytest_OBJECTS) $(viridentitytest_LDADD) $(LIBS) + virkeycodetest$(EXEEXT): $(virkeycodetest_OBJECTS) $(virkeycodetest_DEPENDENCIES) $(EXTRA_virkeycodetest_DEPENDENCIES) @rm -f virkeycodetest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(virkeycodetest_OBJECTS) $(virkeycodetest_LDADD) $(LIBS) + virkeyfiletest$(EXEEXT): $(virkeyfiletest_OBJECTS) $(virkeyfiletest_DEPENDENCIES) $(EXTRA_virkeyfiletest_DEPENDENCIES) @rm -f virkeyfiletest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(virkeyfiletest_OBJECTS) $(virkeyfiletest_LDADD) $(LIBS) + virlockspacetest$(EXEEXT): $(virlockspacetest_OBJECTS) $(virlockspacetest_DEPENDENCIES) $(EXTRA_virlockspacetest_DEPENDENCIES) @rm -f virlockspacetest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(virlockspacetest_OBJECTS) $(virlockspacetest_LDADD) $(LIBS) + virnetmessagetest$(EXEEXT): $(virnetmessagetest_OBJECTS) $(virnetmessagetest_DEPENDENCIES) $(EXTRA_virnetmessagetest_DEPENDENCIES) @rm -f virnetmessagetest$(EXEEXT) $(AM_V_CCLD)$(virnetmessagetest_LINK) $(virnetmessagetest_OBJECTS) $(virnetmessagetest_LDADD) $(LIBS) + virnetsockettest$(EXEEXT): $(virnetsockettest_OBJECTS) $(virnetsockettest_DEPENDENCIES) $(EXTRA_virnetsockettest_DEPENDENCIES) @rm -f virnetsockettest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(virnetsockettest_OBJECTS) $(virnetsockettest_LDADD) $(LIBS) + virnettlscontexttest$(EXEEXT): $(virnettlscontexttest_OBJECTS) $(virnettlscontexttest_DEPENDENCIES) $(EXTRA_virnettlscontexttest_DEPENDENCIES) @rm -f virnettlscontexttest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(virnettlscontexttest_OBJECTS) $(virnettlscontexttest_LDADD) $(LIBS) + virportallocatortest$(EXEEXT): $(virportallocatortest_OBJECTS) $(virportallocatortest_DEPENDENCIES) $(EXTRA_virportallocatortest_DEPENDENCIES) @rm -f virportallocatortest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(virportallocatortest_OBJECTS) $(virportallocatortest_LDADD) $(LIBS) + virshtest$(EXEEXT): $(virshtest_OBJECTS) $(virshtest_DEPENDENCIES) $(EXTRA_virshtest_DEPENDENCIES) @rm -f virshtest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(virshtest_OBJECTS) $(virshtest_LDADD) $(LIBS) + virstoragetest$(EXEEXT): $(virstoragetest_OBJECTS) $(virstoragetest_DEPENDENCIES) $(EXTRA_virstoragetest_DEPENDENCIES) @rm -f virstoragetest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(virstoragetest_OBJECTS) $(virstoragetest_LDADD) $(LIBS) + virstringtest$(EXEEXT): $(virstringtest_OBJECTS) $(virstringtest_DEPENDENCIES) $(EXTRA_virstringtest_DEPENDENCIES) @rm -f virstringtest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(virstringtest_OBJECTS) $(virstringtest_LDADD) $(LIBS) + +virsystemdtest$(EXEEXT): $(virsystemdtest_OBJECTS) $(virsystemdtest_DEPENDENCIES) $(EXTRA_virsystemdtest_DEPENDENCIES) + @rm -f virsystemdtest$(EXEEXT) + $(AM_V_CCLD)$(virsystemdtest_LINK) $(virsystemdtest_OBJECTS) $(virsystemdtest_LDADD) $(LIBS) + virtimetest$(EXEEXT): $(virtimetest_OBJECTS) $(virtimetest_DEPENDENCIES) $(EXTRA_virtimetest_DEPENDENCIES) @rm -f virtimetest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(virtimetest_OBJECTS) $(virtimetest_LDADD) $(LIBS) + viruritest$(EXEEXT): $(viruritest_OBJECTS) $(viruritest_DEPENDENCIES) $(EXTRA_viruritest_DEPENDENCIES) @rm -f viruritest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(viruritest_OBJECTS) $(viruritest_LDADD) $(LIBS) + vmx2xmltest$(EXEEXT): $(vmx2xmltest_OBJECTS) $(vmx2xmltest_DEPENDENCIES) $(EXTRA_vmx2xmltest_DEPENDENCIES) @rm -f vmx2xmltest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(vmx2xmltest_OBJECTS) $(vmx2xmltest_LDADD) $(LIBS) + xencapstest$(EXEEXT): $(xencapstest_OBJECTS) $(xencapstest_DEPENDENCIES) $(EXTRA_xencapstest_DEPENDENCIES) @rm -f xencapstest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(xencapstest_OBJECTS) $(xencapstest_LDADD) $(LIBS) + xmconfigtest$(EXEEXT): $(xmconfigtest_OBJECTS) $(xmconfigtest_DEPENDENCIES) $(EXTRA_xmconfigtest_DEPENDENCIES) @rm -f xmconfigtest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(xmconfigtest_OBJECTS) $(xmconfigtest_LDADD) $(LIBS) + xml2sexprtest$(EXEEXT): $(xml2sexprtest_OBJECTS) $(xml2sexprtest_DEPENDENCIES) $(EXTRA_xml2sexprtest_DEPENDENCIES) @rm -f xml2sexprtest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(xml2sexprtest_OBJECTS) $(xml2sexprtest_LDADD) $(LIBS) + xml2vmxtest$(EXEEXT): $(xml2vmxtest_OBJECTS) $(xml2vmxtest_DEPENDENCIES) $(EXTRA_xml2vmxtest_DEPENDENCIES) @rm -f xml2vmxtest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(xml2vmxtest_OBJECTS) $(xml2vmxtest_LDADD) $(LIBS) @@ -3241,6 +3658,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virbuftest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vircgroupmock_la-vircgroupmock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vircgrouptest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virdbustest-testutils.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virdbustest-virdbustest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virdrivermoduletest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virendiantest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virhashtest.Po@am__quote@ @@ -3256,6 +3675,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virshtest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virstoragetest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virstringtest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virsystemdmock_la-virsystemdmock.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virsystemdtest-testutils.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virsystemdtest-virsystemdtest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virtimetest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/viruritest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmx2xmltest.Po@am__quote@ @@ -3299,6 +3721,13 @@ vircgroupmock_la-vircgroupmock.lo: vircgroupmock.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vircgroupmock_la_CFLAGS) $(CFLAGS) -c -o vircgroupmock_la-vircgroupmock.lo `test -f 'vircgroupmock.c' || echo '$(srcdir)/'`vircgroupmock.c +virsystemdmock_la-virsystemdmock.lo: virsystemdmock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virsystemdmock_la_CFLAGS) $(CFLAGS) -MT virsystemdmock_la-virsystemdmock.lo -MD -MP -MF $(DEPDIR)/virsystemdmock_la-virsystemdmock.Tpo -c -o virsystemdmock_la-virsystemdmock.lo `test -f 'virsystemdmock.c' || echo '$(srcdir)/'`virsystemdmock.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virsystemdmock_la-virsystemdmock.Tpo $(DEPDIR)/virsystemdmock_la-virsystemdmock.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='virsystemdmock.c' object='virsystemdmock_la-virsystemdmock.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virsystemdmock_la_CFLAGS) $(CFLAGS) -c -o virsystemdmock_la-virsystemdmock.lo `test -f 'virsystemdmock.c' || echo '$(srcdir)/'`virsystemdmock.c + libvirtd-config.o: ../daemon/libvirtd-config.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvirtd-config.o -MD -MP -MF $(DEPDIR)/libvirtd-config.Tpo -c -o libvirtd-config.o `test -f '../daemon/libvirtd-config.c' || echo '$(srcdir)/'`../daemon/libvirtd-config.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvirtd-config.Tpo $(DEPDIR)/libvirtd-config.Po @@ -3313,6 +3742,34 @@ libvirtd-config.obj: ../daemon/libvirtd-config.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvirtd-config.obj `if test -f '../daemon/libvirtd-config.c'; then $(CYGPATH_W) '../daemon/libvirtd-config.c'; else $(CYGPATH_W) '$(srcdir)/../daemon/libvirtd-config.c'; fi` +virdbustest-virdbustest.o: virdbustest.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virdbustest_CFLAGS) $(CFLAGS) -MT virdbustest-virdbustest.o -MD -MP -MF $(DEPDIR)/virdbustest-virdbustest.Tpo -c -o virdbustest-virdbustest.o `test -f 'virdbustest.c' || echo '$(srcdir)/'`virdbustest.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virdbustest-virdbustest.Tpo $(DEPDIR)/virdbustest-virdbustest.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='virdbustest.c' object='virdbustest-virdbustest.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virdbustest_CFLAGS) $(CFLAGS) -c -o virdbustest-virdbustest.o `test -f 'virdbustest.c' || echo '$(srcdir)/'`virdbustest.c + +virdbustest-virdbustest.obj: virdbustest.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virdbustest_CFLAGS) $(CFLAGS) -MT virdbustest-virdbustest.obj -MD -MP -MF $(DEPDIR)/virdbustest-virdbustest.Tpo -c -o virdbustest-virdbustest.obj `if test -f 'virdbustest.c'; then $(CYGPATH_W) 'virdbustest.c'; else $(CYGPATH_W) '$(srcdir)/virdbustest.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virdbustest-virdbustest.Tpo $(DEPDIR)/virdbustest-virdbustest.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='virdbustest.c' object='virdbustest-virdbustest.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virdbustest_CFLAGS) $(CFLAGS) -c -o virdbustest-virdbustest.obj `if test -f 'virdbustest.c'; then $(CYGPATH_W) 'virdbustest.c'; else $(CYGPATH_W) '$(srcdir)/virdbustest.c'; fi` + +virdbustest-testutils.o: testutils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virdbustest_CFLAGS) $(CFLAGS) -MT virdbustest-testutils.o -MD -MP -MF $(DEPDIR)/virdbustest-testutils.Tpo -c -o virdbustest-testutils.o `test -f 'testutils.c' || echo '$(srcdir)/'`testutils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virdbustest-testutils.Tpo $(DEPDIR)/virdbustest-testutils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testutils.c' object='virdbustest-testutils.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virdbustest_CFLAGS) $(CFLAGS) -c -o virdbustest-testutils.o `test -f 'testutils.c' || echo '$(srcdir)/'`testutils.c + +virdbustest-testutils.obj: testutils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virdbustest_CFLAGS) $(CFLAGS) -MT virdbustest-testutils.obj -MD -MP -MF $(DEPDIR)/virdbustest-testutils.Tpo -c -o virdbustest-testutils.obj `if test -f 'testutils.c'; then $(CYGPATH_W) 'testutils.c'; else $(CYGPATH_W) '$(srcdir)/testutils.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virdbustest-testutils.Tpo $(DEPDIR)/virdbustest-testutils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testutils.c' object='virdbustest-testutils.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virdbustest_CFLAGS) $(CFLAGS) -c -o virdbustest-testutils.obj `if test -f 'testutils.c'; then $(CYGPATH_W) 'testutils.c'; else $(CYGPATH_W) '$(srcdir)/testutils.c'; fi` + virnetmessagetest-virnetmessagetest.o: virnetmessagetest.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virnetmessagetest_CFLAGS) $(CFLAGS) -MT virnetmessagetest-virnetmessagetest.o -MD -MP -MF $(DEPDIR)/virnetmessagetest-virnetmessagetest.Tpo -c -o virnetmessagetest-virnetmessagetest.o `test -f 'virnetmessagetest.c' || echo '$(srcdir)/'`virnetmessagetest.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virnetmessagetest-virnetmessagetest.Tpo $(DEPDIR)/virnetmessagetest-virnetmessagetest.Po @@ -3341,32 +3798,49 @@ virnetmessagetest-testutils.obj: testutils.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virnetmessagetest_CFLAGS) $(CFLAGS) -c -o virnetmessagetest-testutils.obj `if test -f 'testutils.c'; then $(CYGPATH_W) 'testutils.c'; else $(CYGPATH_W) '$(srcdir)/testutils.c'; fi` +virsystemdtest-virsystemdtest.o: virsystemdtest.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virsystemdtest_CFLAGS) $(CFLAGS) -MT virsystemdtest-virsystemdtest.o -MD -MP -MF $(DEPDIR)/virsystemdtest-virsystemdtest.Tpo -c -o virsystemdtest-virsystemdtest.o `test -f 'virsystemdtest.c' || echo '$(srcdir)/'`virsystemdtest.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virsystemdtest-virsystemdtest.Tpo $(DEPDIR)/virsystemdtest-virsystemdtest.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='virsystemdtest.c' object='virsystemdtest-virsystemdtest.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virsystemdtest_CFLAGS) $(CFLAGS) -c -o virsystemdtest-virsystemdtest.o `test -f 'virsystemdtest.c' || echo '$(srcdir)/'`virsystemdtest.c + +virsystemdtest-virsystemdtest.obj: virsystemdtest.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virsystemdtest_CFLAGS) $(CFLAGS) -MT virsystemdtest-virsystemdtest.obj -MD -MP -MF $(DEPDIR)/virsystemdtest-virsystemdtest.Tpo -c -o virsystemdtest-virsystemdtest.obj `if test -f 'virsystemdtest.c'; then $(CYGPATH_W) 'virsystemdtest.c'; else $(CYGPATH_W) '$(srcdir)/virsystemdtest.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virsystemdtest-virsystemdtest.Tpo $(DEPDIR)/virsystemdtest-virsystemdtest.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='virsystemdtest.c' object='virsystemdtest-virsystemdtest.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virsystemdtest_CFLAGS) $(CFLAGS) -c -o virsystemdtest-virsystemdtest.obj `if test -f 'virsystemdtest.c'; then $(CYGPATH_W) 'virsystemdtest.c'; else $(CYGPATH_W) '$(srcdir)/virsystemdtest.c'; fi` + +virsystemdtest-testutils.o: testutils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virsystemdtest_CFLAGS) $(CFLAGS) -MT virsystemdtest-testutils.o -MD -MP -MF $(DEPDIR)/virsystemdtest-testutils.Tpo -c -o virsystemdtest-testutils.o `test -f 'testutils.c' || echo '$(srcdir)/'`testutils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virsystemdtest-testutils.Tpo $(DEPDIR)/virsystemdtest-testutils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testutils.c' object='virsystemdtest-testutils.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virsystemdtest_CFLAGS) $(CFLAGS) -c -o virsystemdtest-testutils.o `test -f 'testutils.c' || echo '$(srcdir)/'`testutils.c + +virsystemdtest-testutils.obj: testutils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virsystemdtest_CFLAGS) $(CFLAGS) -MT virsystemdtest-testutils.obj -MD -MP -MF $(DEPDIR)/virsystemdtest-testutils.Tpo -c -o virsystemdtest-testutils.obj `if test -f 'testutils.c'; then $(CYGPATH_W) 'testutils.c'; else $(CYGPATH_W) '$(srcdir)/testutils.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virsystemdtest-testutils.Tpo $(DEPDIR)/virsystemdtest-testutils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testutils.c' object='virsystemdtest-testutils.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virsystemdtest_CFLAGS) $(CFLAGS) -c -o virsystemdtest-testutils.obj `if test -f 'testutils.c'; then $(CYGPATH_W) 'testutils.c'; else $(CYGPATH_W) '$(srcdir)/testutils.c'; fi` + mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -3378,15 +3852,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -3395,102 +3865,831 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ else \ - skipped="($$skip tests were not run)"; \ + color_start= color_end=; \ fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - fi; \ - echo "$${col}$$dashes$${std}"; \ - echo "$${col}$$banner$${std}"; \ - test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ - test -z "$$report" || echo "$${col}$$report$${std}"; \ - echo "$${col}$$dashes$${std}"; \ - test "$$failed" -eq 0; \ - else :; fi + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_LTLIBRARIES) $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +virshtest.log: virshtest$(EXEEXT) + @p='virshtest$(EXEEXT)'; \ + b='virshtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +sockettest.log: sockettest$(EXEEXT) + @p='sockettest$(EXEEXT)'; \ + b='sockettest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +nodeinfotest.log: nodeinfotest$(EXEEXT) + @p='nodeinfotest$(EXEEXT)'; \ + b='nodeinfotest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virbuftest.log: virbuftest$(EXEEXT) + @p='virbuftest$(EXEEXT)'; \ + b='virbuftest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +commandtest.log: commandtest$(EXEEXT) + @p='commandtest$(EXEEXT)'; \ + b='commandtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +seclabeltest.log: seclabeltest$(EXEEXT) + @p='seclabeltest$(EXEEXT)'; \ + b='seclabeltest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virhashtest.log: virhashtest$(EXEEXT) + @p='virhashtest$(EXEEXT)'; \ + b='virhashtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virnetmessagetest.log: virnetmessagetest$(EXEEXT) + @p='virnetmessagetest$(EXEEXT)'; \ + b='virnetmessagetest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virnetsockettest.log: virnetsockettest$(EXEEXT) + @p='virnetsockettest$(EXEEXT)'; \ + b='virnetsockettest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +viratomictest.log: viratomictest$(EXEEXT) + @p='viratomictest$(EXEEXT)'; \ + b='viratomictest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +utiltest.log: utiltest$(EXEEXT) + @p='utiltest$(EXEEXT)'; \ + b='utiltest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +shunloadtest.log: shunloadtest$(EXEEXT) + @p='shunloadtest$(EXEEXT)'; \ + b='shunloadtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virtimetest.log: virtimetest$(EXEEXT) + @p='virtimetest$(EXEEXT)'; \ + b='virtimetest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +viruritest.log: viruritest$(EXEEXT) + @p='viruritest$(EXEEXT)'; \ + b='viruritest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virkeyfiletest.log: virkeyfiletest$(EXEEXT) + @p='virkeyfiletest$(EXEEXT)'; \ + b='virkeyfiletest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virauthconfigtest.log: virauthconfigtest$(EXEEXT) + @p='virauthconfigtest$(EXEEXT)'; \ + b='virauthconfigtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virbitmaptest.log: virbitmaptest$(EXEEXT) + @p='virbitmaptest$(EXEEXT)'; \ + b='virbitmaptest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +vircgrouptest.log: vircgrouptest$(EXEEXT) + @p='vircgrouptest$(EXEEXT)'; \ + b='vircgrouptest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virendiantest.log: virendiantest$(EXEEXT) + @p='virendiantest$(EXEEXT)'; \ + b='virendiantest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +viridentitytest.log: viridentitytest$(EXEEXT) + @p='viridentitytest$(EXEEXT)'; \ + b='viridentitytest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virkeycodetest.log: virkeycodetest$(EXEEXT) + @p='virkeycodetest$(EXEEXT)'; \ + b='virkeycodetest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virlockspacetest.log: virlockspacetest$(EXEEXT) + @p='virlockspacetest$(EXEEXT)'; \ + b='virlockspacetest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virstringtest.log: virstringtest$(EXEEXT) + @p='virstringtest$(EXEEXT)'; \ + b='virstringtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virportallocatortest.log: virportallocatortest$(EXEEXT) + @p='virportallocatortest$(EXEEXT)'; \ + b='virportallocatortest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +sysinfotest.log: sysinfotest$(EXEEXT) + @p='sysinfotest$(EXEEXT)'; \ + b='sysinfotest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virstoragetest.log: virstoragetest$(EXEEXT) + @p='virstoragetest$(EXEEXT)'; \ + b='virstoragetest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +fdstreamtest.log: fdstreamtest$(EXEEXT) + @p='fdstreamtest$(EXEEXT)'; \ + b='fdstreamtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +fchosttest.log: fchosttest$(EXEEXT) + @p='fchosttest$(EXEEXT)'; \ + b='fchosttest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virdbustest.log: virdbustest$(EXEEXT) + @p='virdbustest$(EXEEXT)'; \ + b='virdbustest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virsystemdtest.log: virsystemdtest$(EXEEXT) + @p='virsystemdtest$(EXEEXT)'; \ + b='virsystemdtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virnettlscontexttest.log: virnettlscontexttest$(EXEEXT) + @p='virnettlscontexttest$(EXEEXT)'; \ + b='virnettlscontexttest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +securityselinuxtest.log: securityselinuxtest$(EXEEXT) + @p='securityselinuxtest$(EXEEXT)'; \ + b='securityselinuxtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +securityselinuxlabeltest.log: securityselinuxlabeltest$(EXEEXT) + @p='securityselinuxlabeltest$(EXEEXT)'; \ + b='securityselinuxlabeltest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virdrivermoduletest.log: virdrivermoduletest$(EXEEXT) + @p='virdrivermoduletest$(EXEEXT)'; \ + b='virdrivermoduletest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +xml2sexprtest.log: xml2sexprtest$(EXEEXT) + @p='xml2sexprtest$(EXEEXT)'; \ + b='xml2sexprtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +sexpr2xmltest.log: sexpr2xmltest$(EXEEXT) + @p='sexpr2xmltest$(EXEEXT)'; \ + b='sexpr2xmltest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +xmconfigtest.log: xmconfigtest$(EXEEXT) + @p='xmconfigtest$(EXEEXT)'; \ + b='xmconfigtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +xencapstest.log: xencapstest$(EXEEXT) + @p='xencapstest$(EXEEXT)'; \ + b='xencapstest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +statstest.log: statstest$(EXEEXT) + @p='statstest$(EXEEXT)'; \ + b='statstest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +reconnect.log: reconnect$(EXEEXT) + @p='reconnect$(EXEEXT)'; \ + b='reconnect'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +qemuxml2argvtest.log: qemuxml2argvtest$(EXEEXT) + @p='qemuxml2argvtest$(EXEEXT)'; \ + b='qemuxml2argvtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +qemuxml2xmltest.log: qemuxml2xmltest$(EXEEXT) + @p='qemuxml2xmltest$(EXEEXT)'; \ + b='qemuxml2xmltest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +qemuxmlnstest.log: qemuxmlnstest$(EXEEXT) + @p='qemuxmlnstest$(EXEEXT)'; \ + b='qemuxmlnstest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +qemuargv2xmltest.log: qemuargv2xmltest$(EXEEXT) + @p='qemuargv2xmltest$(EXEEXT)'; \ + b='qemuargv2xmltest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +qemuhelptest.log: qemuhelptest$(EXEEXT) + @p='qemuhelptest$(EXEEXT)'; \ + b='qemuhelptest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +domainsnapshotxml2xmltest.log: domainsnapshotxml2xmltest$(EXEEXT) + @p='domainsnapshotxml2xmltest$(EXEEXT)'; \ + b='domainsnapshotxml2xmltest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +qemumonitortest.log: qemumonitortest$(EXEEXT) + @p='qemumonitortest$(EXEEXT)'; \ + b='qemumonitortest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +qemumonitorjsontest.log: qemumonitorjsontest$(EXEEXT) + @p='qemumonitorjsontest$(EXEEXT)'; \ + b='qemumonitorjsontest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +qemuhotplugtest.log: qemuhotplugtest$(EXEEXT) + @p='qemuhotplugtest$(EXEEXT)'; \ + b='qemuhotplugtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +lxcxml2xmltest.log: lxcxml2xmltest$(EXEEXT) + @p='lxcxml2xmltest$(EXEEXT)'; \ + b='lxcxml2xmltest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +openvzutilstest.log: openvzutilstest$(EXEEXT) + @p='openvzutilstest$(EXEEXT)'; \ + b='openvzutilstest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +esxutilstest.log: esxutilstest$(EXEEXT) + @p='esxutilstest$(EXEEXT)'; \ + b='esxutilstest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +vmx2xmltest.log: vmx2xmltest$(EXEEXT) + @p='vmx2xmltest$(EXEEXT)'; \ + b='vmx2xmltest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +xml2vmxtest.log: xml2vmxtest$(EXEEXT) + @p='xml2vmxtest$(EXEEXT)'; \ + b='xml2vmxtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +object-locking.log: object-locking$(EXEEXT) + @p='object-locking$(EXEEXT)'; \ + b='object-locking'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +jsontest.log: jsontest$(EXEEXT) + @p='jsontest$(EXEEXT)'; \ + b='jsontest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +networkxml2xmltest.log: networkxml2xmltest$(EXEEXT) + @p='networkxml2xmltest$(EXEEXT)'; \ + b='networkxml2xmltest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +networkxml2conftest.log: networkxml2conftest$(EXEEXT) + @p='networkxml2conftest$(EXEEXT)'; \ + b='networkxml2conftest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +storagebackendsheepdogtest.log: storagebackendsheepdogtest$(EXEEXT) + @p='storagebackendsheepdogtest$(EXEEXT)'; \ + b='storagebackendsheepdogtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +nwfilterxml2xmltest.log: nwfilterxml2xmltest$(EXEEXT) + @p='nwfilterxml2xmltest$(EXEEXT)'; \ + b='nwfilterxml2xmltest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +storagevolxml2argvtest.log: storagevolxml2argvtest$(EXEEXT) + @p='storagevolxml2argvtest$(EXEEXT)'; \ + b='storagevolxml2argvtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +storagevolxml2xmltest.log: storagevolxml2xmltest$(EXEEXT) + @p='storagevolxml2xmltest$(EXEEXT)'; \ + b='storagevolxml2xmltest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +storagepoolxml2xmltest.log: storagepoolxml2xmltest$(EXEEXT) + @p='storagepoolxml2xmltest$(EXEEXT)'; \ + b='storagepoolxml2xmltest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +nodedevxml2xmltest.log: nodedevxml2xmltest$(EXEEXT) + @p='nodedevxml2xmltest$(EXEEXT)'; \ + b='nodedevxml2xmltest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +interfacexml2xmltest.log: interfacexml2xmltest$(EXEEXT) + @p='interfacexml2xmltest$(EXEEXT)'; \ + b='interfacexml2xmltest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +cputest.log: cputest$(EXEEXT) + @p='cputest$(EXEEXT)'; \ + b='cputest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +eventtest.log: eventtest$(EXEEXT) + @p='eventtest$(EXEEXT)'; \ + b='eventtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +libvirtdconftest.log: libvirtdconftest$(EXEEXT) + @p='libvirtdconftest$(EXEEXT)'; \ + b='libvirtdconftest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +capabilityschematest.log: capabilityschematest + @p='capabilityschematest'; \ + b='capabilityschematest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +interfaceschematest.log: interfaceschematest + @p='interfaceschematest'; \ + b='interfaceschematest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +networkschematest.log: networkschematest + @p='networkschematest'; \ + b='networkschematest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +storagepoolschematest.log: storagepoolschematest + @p='storagepoolschematest'; \ + b='storagepoolschematest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +storagevolschematest.log: storagevolschematest + @p='storagevolschematest'; \ + b='storagevolschematest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +domainschematest.log: domainschematest + @p='domainschematest'; \ + b='domainschematest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +nodedevschematest.log: nodedevschematest + @p='nodedevschematest'; \ + b='nodedevschematest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +nwfilterschematest.log: nwfilterschematest + @p='nwfilterschematest'; \ + b='nwfilterschematest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +domainsnapshotschematest.log: domainsnapshotschematest + @p='domainsnapshotschematest'; \ + b='domainsnapshotschematest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_conf.sh.log: test_conf.sh + @p='test_conf.sh'; \ + b='test_conf.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +cpuset.log: cpuset + @p='cpuset'; \ + b='cpuset'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +define-dev-segfault.log: define-dev-segfault + @p='define-dev-segfault'; \ + b='define-dev-segfault'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +int-overflow.log: int-overflow + @p='int-overflow'; \ + b='int-overflow'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +libvirtd-fail.log: libvirtd-fail + @p='libvirtd-fail'; \ + b='libvirtd-fail'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +libvirtd-pool.log: libvirtd-pool + @p='libvirtd-pool'; \ + b='libvirtd-pool'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +read-bufsiz.log: read-bufsiz + @p='read-bufsiz'; \ + b='read-bufsiz'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +read-non-seekable.log: read-non-seekable + @p='read-non-seekable'; \ + b='read-non-seekable'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +start.log: start + @p='start'; \ + b='start'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +vcpupin.log: vcpupin + @p='vcpupin'; \ + b='vcpupin'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virsh-all.log: virsh-all + @p='virsh-all'; \ + b='virsh-all'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virsh-optparse.log: virsh-optparse + @p='virsh-optparse'; \ + b='virsh-optparse'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virsh-schedinfo.log: virsh-schedinfo + @p='virsh-schedinfo'; \ + b='virsh-schedinfo'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virsh-synopsis.log: virsh-synopsis + @p='virsh-synopsis'; \ + b='virsh-synopsis'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virsh-undefine.log: virsh-undefine + @p='virsh-undefine'; \ + b='virsh-undefine'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +virt-aa-helper-test.log: virt-aa-helper-test + @p='virt-aa-helper-test'; \ + b='virt-aa-helper-test'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -3548,6 +4747,9 @@ install-strip: "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) @@ -3633,30 +4835,30 @@ uninstall-am: .MAKE: check-am install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ clean-checkLTLIBRARIES clean-checkPROGRAMS clean-generic \ clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ - ctags distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am - + recheck tags tags-am uninstall uninstall-am valgrind: - $(MAKE) check VG="libtool --mode=execute valgrind --quiet --leak-check=full --suppressions=$(srcdir)/.valgrind.supp" + $(MAKE) check VG="libtool --mode=execute $(VALGRIND)" @WITH_CIL_TRUE@%.cmx: %.ml @WITH_CIL_TRUE@ ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) -c $< @WITH_CIL_TRUE@object-locking: object-locking.cmx object-locking-files.txt -@WITH_CIL_TRUE@ ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) $(CILOPTLIBS) $< -o $@ +@WITH_CIL_TRUE@ ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) \ +@WITH_CIL_TRUE@ $(CILOPTLIBS) $< -o $@ @WITH_CIL_TRUE@object-locking-files.txt: @WITH_CIL_TRUE@ find $(top_builddir)/src/ -name '*.i' > $@ diff --git a/tests/capabilityschemadata/caps-qemu-kvm.xml b/tests/capabilityschemadata/caps-qemu-kvm.xml index 36c4b4947..1fbc22bc8 100644 --- a/tests/capabilityschemadata/caps-qemu-kvm.xml +++ b/tests/capabilityschemadata/caps-qemu-kvm.xml @@ -33,18 +33,18 @@ <arch name='i686'> <wordsize>32</wordsize> <emulator>/usr/bin/qemu</emulator> - <machine>pc-0.11</machine> - <machine canonical='pc-0.11'>pc</machine> - <machine>pc-0.10</machine> - <machine>isapc</machine> + <machine maxCpus='255'>pc-0.11</machine> + <machine canonical='pc-0.11' maxCpus='255'>pc</machine> + <machine maxCpus='255'>pc-0.10</machine> + <machine maxCpus='1'>isapc</machine> <domain type='qemu'> </domain> <domain type='kvm'> <emulator>/usr/bin/qemu-kvm</emulator> - <machine>pc-0.11</machine> - <machine canonical='pc-0.11'>pc</machine> - <machine>pc-0.10</machine> - <machine>isapc</machine> + <machine maxCpus='255'>pc-0.11</machine> + <machine canonical='pc-0.11' maxCpus='255'>pc</machine> + <machine maxCpus='255'>pc-0.10</machine> + <machine maxCpus='1'>isapc</machine> </domain> </arch> <features> diff --git a/tests/commandhelper.c b/tests/commandhelper.c index e4cc5d20b..296fbbb3d 100644 --- a/tests/commandhelper.c +++ b/tests/commandhelper.c @@ -35,6 +35,7 @@ #ifndef WIN32 +# define VIR_FROM_THIS VIR_FROM_NONE static int envsort(const void *a, const void *b) { const char *const*astrptr = a; @@ -56,7 +57,8 @@ static int envsort(const void *a, const void *b) { } int main(int argc, char **argv) { - int i, n; + size_t i, n; + int open_max; char **origenv; char **newenv; char *cwd; @@ -76,7 +78,7 @@ int main(int argc, char **argv) { origenv++; } - if (VIR_ALLOC_N(newenv, n) < 0) + if (VIR_ALLOC_N_QUIET(newenv, n) < 0) return EXIT_FAILURE; origenv = environ; @@ -95,7 +97,10 @@ int main(int argc, char **argv) { fprintf(log, "ENV:%s\n", newenv[i]); } - for (i = 0; i < sysconf(_SC_OPEN_MAX); i++) { + open_max = sysconf(_SC_OPEN_MAX); + if (open_max < 0) + return EXIT_FAILURE; + for (i = 0; i < open_max; i++) { int f; int closed; if (i == fileno(log)) @@ -103,7 +108,7 @@ int main(int argc, char **argv) { closed = fcntl(i, F_GETFD, &f) == -1 && errno == EBADF; if (!closed) - fprintf(log, "FD:%d\n", i); + fprintf(log, "FD:%zu\n", i); } fprintf(log, "DAEMON:%s\n", getpgrp() == getsid(0) ? "yes" : "no"); diff --git a/tests/commandtest.c b/tests/commandtest.c index ec69dbda1..eeb6d1e13 100644 --- a/tests/commandtest.c +++ b/tests/commandtest.c @@ -194,8 +194,9 @@ static int test3(const void *unused ATTRIBUTE_UNUSED) int newfd3 = dup(STDERR_FILENO); int ret = -1; - virCommandPreserveFD(cmd, newfd1); - virCommandTransferFD(cmd, newfd3); + virCommandPassFD(cmd, newfd1, 0); + virCommandPassFD(cmd, newfd3, + VIR_COMMAND_PASS_FD_CLOSE_PARENT); if (virCommandRun(cmd, NULL) < 0) { virErrorPtr err = virGetLastError(); @@ -820,10 +821,8 @@ static int test20(const void *unused ATTRIBUTE_UNUSED) sigaction(SIGPIPE, &sig_action, NULL); - if (virAsprintf(&buf, "1\n%100000d\n", 2) < 0) { - virReportOOMError(); + if (virAsprintf(&buf, "1\n%100000d\n", 2) < 0) goto cleanup; - } virCommandSetInputBuffer(cmd, buf); if (virCommandRun(cmd, NULL) < 0) { @@ -996,10 +995,8 @@ mymain(void) return EXIT_FAILURE; virEventRegisterDefaultImpl(); - if (VIR_ALLOC(test) < 0) { - virReportOOMError(); + if (VIR_ALLOC(test) < 0) goto cleanup; - } if (virMutexInit(&test->lock) < 0) { printf("Unable to init mutex: %d\n", errno); diff --git a/tests/cputest.c b/tests/cputest.c index 010544077..2e5f0cdfb 100644 --- a/tests/cputest.c +++ b/tests/cputest.c @@ -114,7 +114,7 @@ cpuTestLoadMultiXML(const char *arch, xmlNodePtr *nodes = NULL; virCPUDefPtr *cpus = NULL; int n; - int i; + size_t i; if (virAsprintf(&xml, "%s/cputestdata/%s-%s.xml", abs_srcdir, arch, name) < 0) goto cleanup; @@ -261,7 +261,7 @@ cpuTestGuestData(const void *arg) virCPUDefPtr host = NULL; virCPUDefPtr cpu = NULL; virCPUDefPtr guest = NULL; - union cpuData *guestData = NULL; + virCPUDataPtr guestData = NULL; virCPUCompareResult cmpResult; virBuffer buf = VIR_BUFFER_INITIALIZER; char *result = NULL; @@ -308,8 +308,7 @@ cpuTestGuestData(const void *arg) cleanup: VIR_FREE(result); - if (host) - cpuDataFree(host->arch, guestData); + cpuDataFree(guestData); virCPUDefFree(host); virCPUDefFree(cpu); virCPUDefFree(guest); @@ -326,7 +325,7 @@ cpuTestBaseline(const void *arg) virCPUDefPtr baseline = NULL; unsigned int ncpus = 0; char *result = NULL; - unsigned int i; + size_t i; if (!(cpus = cpuTestLoadMultiXML(data->arch, data->name, &ncpus))) goto cleanup; @@ -359,7 +358,7 @@ cpuTestBaseline(const void *arg) cmp != VIR_CPU_COMPARE_IDENTICAL) { if (virTestGetVerbose()) { fprintf(stderr, - "\nbaseline CPU is incompatible with CPU %u\n", i); + "\nbaseline CPU is incompatible with CPU %zu\n", i); fprintf(stderr, "%74s", "... "); } ret = -1; @@ -417,7 +416,7 @@ cpuTestHasFeature(const void *arg) const struct data *data = arg; int ret = -1; virCPUDefPtr host = NULL; - union cpuData *hostData = NULL; + virCPUDataPtr hostData = NULL; int result; if (!(host = cpuTestLoadXML(data->arch, data->host))) @@ -427,7 +426,7 @@ cpuTestHasFeature(const void *arg) NULL, NULL, NULL, NULL) < 0) goto cleanup; - result = cpuHasFeature(host->arch, hostData, data->name); + result = cpuHasFeature(hostData, data->name); if (data->result == -1) virResetLastError(); @@ -445,8 +444,7 @@ cpuTestHasFeature(const void *arg) ret = 0; cleanup: - if (host) - cpuDataFree(host->arch, hostData); + cpuDataFree(hostData); virCPUDefFree(host); return ret; } @@ -583,6 +581,7 @@ mymain(void) DO_TEST_COMPARE("x86", "host", "pentium3-amd", VIR_CPU_COMPARE_INCOMPATIBLE); DO_TEST_COMPARE("x86", "host-amd", "pentium3-amd", VIR_CPU_COMPARE_SUPERSET); DO_TEST_COMPARE("x86", "host-worse", "nehalem-force", VIR_CPU_COMPARE_IDENTICAL); + DO_TEST_COMPARE("x86", "host-SandyBridge", "exact-force-Haswell", VIR_CPU_COMPARE_IDENTICAL); /* guest updates for migration * automatically compares host CPU with the result */ diff --git a/tests/cputestdata/x86-exact-force-Haswell.xml b/tests/cputestdata/x86-exact-force-Haswell.xml new file mode 100644 index 000000000..614ed7ecd --- /dev/null +++ b/tests/cputestdata/x86-exact-force-Haswell.xml @@ -0,0 +1,15 @@ +<cpu mode='custom' match='exact'> + <model fallback='allow'>Haswell</model> + <feature policy='force' name='pcid'/> + <feature policy='force' name='rtm'/> + <feature policy='force' name='invpcid'/> + <feature policy='force' name='erms'/> + <feature policy='force' name='bmi2'/> + <feature policy='optional' name='smep'/> + <feature policy='optional' name='avx2'/> + <feature policy='optional' name='hle'/> + <feature policy='force' name='bmi1'/> + <feature policy='force' name='fsgsbase'/> + <feature policy='disable' name='movbe'/> + <feature policy='disable' name='fma'/> +</cpu> diff --git a/tests/cputestdata/x86-host-SandyBridge.xml b/tests/cputestdata/x86-host-SandyBridge.xml new file mode 100644 index 000000000..7f26b7bc4 --- /dev/null +++ b/tests/cputestdata/x86-host-SandyBridge.xml @@ -0,0 +1,6 @@ +<cpu> + <arch>x86_64</arch> + <model>SandyBridge</model> + <vendor>Intel</vendor> + <topology sockets='1' cores='2' threads='2'/> +</cpu> diff --git a/tests/domainsnapshotxml2xmltest.c b/tests/domainsnapshotxml2xmltest.c index 9eddf458f..defa9553e 100644 --- a/tests/domainsnapshotxml2xmltest.c +++ b/tests/domainsnapshotxml2xmltest.c @@ -18,6 +18,8 @@ # include "testutilsqemu.h" # include "virstring.h" +# define VIR_FROM_THIS VIR_FROM_NONE + static virQEMUDriver driver; static int diff --git a/tests/esxutilstest.c b/tests/esxutilstest.c index bb58a3ab2..221c46ac5 100644 --- a/tests/esxutilstest.c +++ b/tests/esxutilstest.c @@ -47,7 +47,8 @@ static struct testPath paths[] = { static int testParseDatastorePath(const void *data ATTRIBUTE_UNUSED) { - int i, result = 0; + int result = 0; + size_t i; char *datastoreName = NULL; char *directoryName = NULL; char *directoryAndFileName = NULL; @@ -135,7 +136,7 @@ static struct testDateTime times[] = { static int testConvertDateTimeToCalendarTime(const void *data ATTRIBUTE_UNUSED) { - int i; + size_t i; esxVI_DateTime dateTime; long long calendarTime; @@ -187,7 +188,7 @@ static struct testDatastoreItem datastoreItems[] = { static int testEscapeDatastoreItem(const void *data ATTRIBUTE_UNUSED) { - int i; + size_t i; char *escaped = NULL; for (i = 0; i < ARRAY_CARDINALITY(datastoreItems); ++i) { @@ -228,7 +229,7 @@ static struct testWindows1252ToUTF8 windows1252ToUTF8[] = { static int testConvertWindows1252ToUTF8(const void *data ATTRIBUTE_UNUSED) { - int i; + size_t i; char *utf8 = NULL; for (i = 0; i < ARRAY_CARDINALITY(windows1252ToUTF8); ++i) { diff --git a/tests/eventtest.c b/tests/eventtest.c index 97d805a3e..821745faf 100644 --- a/tests/eventtest.c +++ b/tests/eventtest.c @@ -143,18 +143,18 @@ verifyFired(const char *name, int handle, int timer) { int handleFired = 0; int timerFired = 0; - int i; + size_t i; for (i = 0; i < NUM_FDS; i++) { if (handles[i].fired) { if (i != handle) { virtTestResult(name, 1, - "Handle %d fired, but expected %d\n", i, + "Handle %zu fired, but expected %d\n", i, handle); return EXIT_FAILURE; } else { if (handles[i].error != EV_ERROR_NONE) { virtTestResult(name, 1, - "Handle %d fired, but had error %d\n", i, + "Handle %zu fired, but had error %d\n", i, handles[i].error); return EXIT_FAILURE; } @@ -181,12 +181,12 @@ verifyFired(const char *name, int handle, int timer) if (timers[i].fired) { if (i != timer) { virtTestResult(name, 1, - "Timer %d fired, but expected %d\n", i, timer); + "Timer %zu fired, but expected %d\n", i, timer); return EXIT_FAILURE; } else { if (timers[i].error != EV_ERROR_NONE) { virtTestResult(name, 1, - "Timer %d fired, but had error %d\n", i, + "Timer %zu fired, but had error %d\n", i, timers[i].error); return EXIT_FAILURE; } @@ -247,7 +247,7 @@ finishJob(const char *name, int handle, int timer) static void resetAll(void) { - int i; + size_t i; for (i = 0; i < NUM_FDS; i++) { handles[i].fired = 0; handles[i].error = EV_ERROR_NONE; @@ -261,7 +261,7 @@ resetAll(void) static int mymain(void) { - int i; + size_t i; pthread_t eventThread; char one = '1'; diff --git a/tests/fchosttest.c b/tests/fchosttest.c index 76d1795f7..05ff20ba6 100644 --- a/tests/fchosttest.c +++ b/tests/fchosttest.c @@ -23,6 +23,8 @@ #include "virutil.h" #include "testutils.h" +#define VIR_FROM_THIS VIR_FROM_NONE + static char *fchost_prefix; #define TEST_FC_HOST_PREFIX fchost_prefix diff --git a/tests/interfacexml2xmltest.c b/tests/interfacexml2xmltest.c index 9d86198bc..8092a5964 100644 --- a/tests/interfacexml2xmltest.c +++ b/tests/interfacexml2xmltest.c @@ -14,6 +14,8 @@ #include "testutilsqemu.h" #include "virstring.h" +#define VIR_FROM_THIS VIR_FROM_NONE + static int testCompareXMLToXMLFiles(const char *xml) { diff --git a/tests/libvirtdconftest.c b/tests/libvirtdconftest.c index d45c31a81..ba61a0fd3 100644 --- a/tests/libvirtdconftest.c +++ b/tests/libvirtdconftest.c @@ -78,10 +78,8 @@ munge_param(const char *datain, strlen(replace) + strlen(eol) + 1; - if (VIR_ALLOC_N(dataout, dataoutlen) < 0) { - virReportOOMError(); + if (VIR_ALLOC_N(dataout, dataoutlen) < 0) return NULL; - } memcpy(dataout, datain, (eq - datain) + 1); memcpy(dataout + (eq - datain) + 1, replace, strlen(replace)); diff --git a/tests/lxcxml2xmltest.c b/tests/lxcxml2xmltest.c index 97f792c25..ca05d291f 100644 --- a/tests/lxcxml2xmltest.c +++ b/tests/lxcxml2xmltest.c @@ -17,6 +17,8 @@ # include "testutilslxc.h" # include "virstring.h" +# define VIR_FROM_THIS VIR_FROM_NONE + static virCapsPtr caps; static virDomainXMLOptionPtr xmlopt; diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c index 520febace..b234b306a 100644 --- a/tests/networkxml2conftest.c +++ b/tests/networkxml2conftest.c @@ -16,6 +16,8 @@ #include "network/bridge_driver.h" #include "virstring.h" +#define VIR_FROM_THIS VIR_FROM_NONE + static int testCompareXMLToConfFiles(const char *inxml, const char *outconf, dnsmasqCapsPtr caps) { diff --git a/tests/networkxml2xmltest.c b/tests/networkxml2xmltest.c index 5eca143cc..0dfed161a 100644 --- a/tests/networkxml2xmltest.c +++ b/tests/networkxml2xmltest.c @@ -14,6 +14,8 @@ #include "testutilsqemu.h" #include "virstring.h" +#define VIR_FROM_THIS VIR_FROM_NONE + static int testCompareXMLToXMLFiles(const char *inxml, const char *outxml, unsigned int flags) diff --git a/tests/nodedevxml2xmltest.c b/tests/nodedevxml2xmltest.c index ed4985708..d4f7ee742 100644 --- a/tests/nodedevxml2xmltest.c +++ b/tests/nodedevxml2xmltest.c @@ -14,6 +14,8 @@ #include "testutilsqemu.h" #include "virstring.h" +#define VIR_FROM_THIS VIR_FROM_NONE + static int testCompareXMLToXMLFiles(const char *xml) { diff --git a/tests/nodeinfotest.c b/tests/nodeinfotest.c index bce56f3f5..db637cec1 100644 --- a/tests/nodeinfotest.c +++ b/tests/nodeinfotest.c @@ -11,6 +11,8 @@ #include "virfile.h" #include "virstring.h" +#define VIR_FROM_THIS VIR_FROM_NONE + #if ! (defined __linux__ && (defined(__x86_64__) || \ defined(__amd64__) || \ defined(__i386__) || \ @@ -121,7 +123,7 @@ static int mymain(void) { int ret = 0; - int i; + size_t i; const char *nodeData[] = { "test1", # if !(defined(__powerpc__) || \ diff --git a/tests/nwfilterxml2xmltest.c b/tests/nwfilterxml2xmltest.c index 158bc9f4c..5476284d7 100644 --- a/tests/nwfilterxml2xmltest.c +++ b/tests/nwfilterxml2xmltest.c @@ -17,6 +17,8 @@ #include "testutilsqemu.h" #include "virstring.h" +#define VIR_FROM_THIS VIR_FROM_NONE + static int testCompareXMLToXMLFiles(const char *inxml, const char *outxml, bool expect_error) diff --git a/tests/openvzutilstest.c b/tests/openvzutilstest.c index 48500177c..ee68c06ad 100644 --- a/tests/openvzutilstest.c +++ b/tests/openvzutilstest.c @@ -38,7 +38,7 @@ static int testReadConfigParam(const void *data ATTRIBUTE_UNUSED) { int result = -1; - int i; + size_t i; char *conf = NULL; char *value = NULL; diff --git a/tests/qemuargv2xmltest.c b/tests/qemuargv2xmltest.c index 652cd0921..5cf782898 100644 --- a/tests/qemuargv2xmltest.c +++ b/tests/qemuargv2xmltest.c @@ -17,6 +17,8 @@ # include "testutilsqemu.h" # include "virstring.h" +# define VIR_FROM_THIS VIR_FROM_NONE + static virQEMUDriver driver; static int blankProblemElements(char *data) diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c index 2a3b01906..d6cc04bd5 100644 --- a/tests/qemuhelptest.c +++ b/tests/qemuhelptest.c @@ -11,6 +11,8 @@ # include "viralloc.h" # include "virstring.h" +# define VIR_FROM_THIS VIR_FROM_NONE + struct testInfo { const char *name; virQEMUCapsPtr flags; @@ -22,15 +24,15 @@ struct testInfo { static void printMismatchedFlags(virQEMUCapsPtr got, virQEMUCapsPtr expect) { - int i; + size_t i; for (i = 0; i < QEMU_CAPS_LAST; i++) { bool gotFlag = virQEMUCapsGet(got, i); bool expectFlag = virQEMUCapsGet(expect, i); if (gotFlag && !expectFlag) - fprintf(stderr, "Extra flag %i\n", i); + fprintf(stderr, "Extra flag %zu\n", i); if (!gotFlag && expectFlag) - fprintf(stderr, "Missing flag %i\n", i); + fprintf(stderr, "Missing flag %zu\n", i); } } @@ -927,7 +929,6 @@ mymain(void) QEMU_CAPS_DEVICE_VGA, QEMU_CAPS_DEVICE_CIRRUS_VGA, QEMU_CAPS_DEVICE_VMWARE_SVGA, - QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_USB_SERIAL, QEMU_CAPS_DEVICE_USB_NET, QEMU_CAPS_DTB, @@ -1039,7 +1040,6 @@ mymain(void) QEMU_CAPS_DEVICE_VGA, QEMU_CAPS_DEVICE_CIRRUS_VGA, QEMU_CAPS_DEVICE_VMWARE_SVGA, - QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_USB_SERIAL, QEMU_CAPS_DEVICE_USB_NET, QEMU_CAPS_DTB, diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 15d70d21a..c7be5f653 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -33,11 +33,20 @@ static virQEMUDriver driver; +enum { + ATTACH, + DETACH, + UPDATE +}; + struct qemuHotplugTestData { const char *domain_filename; const char *device_filename; bool fail; const char *const *mon; + int action; + bool keep; + virDomainObjPtr vm; }; static int @@ -46,6 +55,7 @@ qemuHotplugCreateObjects(virDomainXMLOptionPtr xmlopt, const char *filename) { int ret = -1; + qemuDomainObjPrivatePtr priv = NULL; if (!(*vm = virDomainObjNew(xmlopt))) goto cleanup; @@ -57,12 +67,89 @@ qemuHotplugCreateObjects(virDomainXMLOptionPtr xmlopt, 0))) goto cleanup; + priv = (*vm)->privateData; + + if (!(priv->qemuCaps = virQEMUCapsNew())) + goto cleanup; + + /* for attach & detach qemu must support -device */ + virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE); + ret = 0; cleanup: return ret; } static int +testQemuHotplugAttach(virDomainObjPtr vm, + virDomainDeviceDefPtr dev) +{ + int ret = -1; + + switch (dev->type) { + case VIR_DOMAIN_DEVICE_CHR: + ret = qemuDomainAttachChrDevice(&driver, vm, dev->data.chr); + if (!ret) { + /* vm->def stolen dev->data.chr so we ought to avoid freeing it */ + dev->data.chr = NULL; + } + break; + default: + if (virTestGetVerbose()) + fprintf(stderr, "device type '%s' cannot be attached", + virDomainDeviceTypeToString(dev->type)); + break; + } + + return ret; +} + +static int +testQemuHotplugDetach(virDomainObjPtr vm, + virDomainDeviceDefPtr dev) +{ + int ret = -1; + + switch (dev->type) { + case VIR_DOMAIN_DEVICE_CHR: + ret = qemuDomainDetachChrDevice(&driver, vm, dev->data.chr); + break; + default: + if (virTestGetVerbose()) + fprintf(stderr, "device type '%s' cannot be attached", + virDomainDeviceTypeToString(dev->type)); + break; + } + + return ret; +} + +static int +testQemuHotplugUpdate(virDomainObjPtr vm, + virDomainDeviceDefPtr dev) +{ + int ret = -1; + + /* XXX Ideally, we would call qemuDomainUpdateDeviceLive here. But that + * would require us to provide virConnectPtr and virDomainPtr (they're used + * in case of updating a disk device. So for now, we will proceed with + * breaking the function into pieces. If we ever learn how to fake those + * required object, we can replace this code then. */ + switch (dev->type) { + case VIR_DOMAIN_DEVICE_GRAPHICS: + ret = qemuDomainChangeGraphics(&driver, vm, dev->data.graphics); + break; + default: + if (virTestGetVerbose()) + fprintf(stderr, "device type '%s' cannot be updated", + virDomainDeviceTypeToString(dev->type)); + break; + } + + return ret; +} + +static int testQemuHotplug(const void *data) { int ret = -1; @@ -72,6 +159,7 @@ testQemuHotplug(const void *data) char *device_xml = NULL; const char *const *tmp; bool fail = test->fail; + bool keep = test->keep; virDomainObjPtr vm = NULL; virDomainDeviceDefPtr dev = NULL; virCapsPtr caps = NULL; @@ -87,17 +175,18 @@ testQemuHotplug(const void *data) if (!(caps = virQEMUDriverGetCapabilities(&driver, false))) goto cleanup; - if (qemuHotplugCreateObjects(driver.xmlopt, &vm, domain_filename) < 0) - goto cleanup; - - priv = vm->privateData; + if (test->vm) { + vm = test->vm; + } else { + if (qemuHotplugCreateObjects(driver.xmlopt, &vm, domain_filename) < 0) + goto cleanup; + } if (virtTestLoadFile(device_filename, &device_xml) < 0) goto cleanup; if (!(dev = virDomainDeviceDefParse(device_xml, vm->def, - caps, driver.xmlopt, - VIR_DOMAIN_XML_INACTIVE))) + caps, driver.xmlopt, 0))) goto cleanup; /* Now is the best time to feed the spoofed monitor with predefined @@ -117,6 +206,7 @@ testQemuHotplug(const void *data) goto cleanup; } + priv = vm->privateData; priv->mon = qemuMonitorTestGetMonitor(test_mon); priv->monJSON = true; @@ -125,20 +215,17 @@ testQemuHotplug(const void *data) * tries to lock it again */ virObjectUnlock(priv->mon); - /* XXX Ideally, we would call qemuDomainUpdateDeviceLive here. But that - * would require us to provide virConnectPtr and virDomainPtr (they're used - * in case of updating a disk device. So for now, we will proceed with - * breaking the function into pieces. If we ever learn how to fake those - * required object, we can replace this code then. */ - switch (dev->type) { - case VIR_DOMAIN_DEVICE_GRAPHICS: - ret = qemuDomainChangeGraphics(&driver, vm, dev->data.graphics); + switch (test->action) { + case ATTACH: + ret = testQemuHotplugAttach(vm, dev); break; - default: - if (virTestGetVerbose()) - fprintf(stderr, "device type '%s' cannot be updated", - virDomainDeviceTypeToString(dev->type)); + + case DETACH: + ret = testQemuHotplugDetach(vm, dev); break; + + case UPDATE: + ret = testQemuHotplugUpdate(vm, dev); } cleanup: @@ -148,7 +235,12 @@ cleanup: /* don't dispose test monitor with VM */ if (priv) priv->mon = NULL; - virObjectUnref(vm); + if (keep) { + test->vm = vm; + } else { + virObjectUnref(vm); + test->vm = NULL; + } virDomainDeviceDefFree(dev); virObjectUnref(caps); qemuMonitorTestFree(test_mon); @@ -159,6 +251,7 @@ static int mymain(void) { int ret = 0; + struct qemuHotplugTestData data = {0}; #if !WITH_YAJL fputs("libvirt not compiled with yajl, skipping this test\n", stderr); @@ -176,33 +269,63 @@ mymain(void) VIR_FREE(driver.config->spiceListen); VIR_FREE(driver.config->vncListen); + if (!(driver.domainEventState = virDomainEventStateNew())) + return EXIT_FAILURE; + /* some dummy values from 'config file' */ if (VIR_STRDUP_QUIET(driver.config->spicePassword, "123456") < 0) return EXIT_FAILURE; -#define DO_TEST(file, dev, fial, ...) \ - do { \ - const char *my_mon[] = { __VA_ARGS__, NULL}; \ - struct qemuHotplugTestData data = \ - {.domain_filename = file, .device_filename = dev, .fail = fial, \ - .mon = my_mon}; \ - if (virtTestRun(#file, 1, testQemuHotplug, &data) < 0) \ - ret = -1; \ +#define DO_TEST(file, dev, fial, kep, ...) \ + const char *my_mon[] = { __VA_ARGS__, NULL}; \ + data.domain_filename = file; \ + data.device_filename = dev; \ + data.fail = fial; \ + data.mon = my_mon; \ + data.keep = kep; \ + if (virtTestRun(#file, 1, testQemuHotplug, &data) < 0) \ + ret = -1; \ + +#define DO_TEST_ATTACH(file, dev, fial, kep, ...) \ + do { \ + data.action = ATTACH; \ + DO_TEST(file, dev, fial, kep, __VA_ARGS__) \ + } while (0) + +#define DO_TEST_DETACH(file, dev, fial, kep, ...) \ + do { \ + data.action = DETACH; \ + DO_TEST(file, dev, fial, kep, __VA_ARGS__) \ + } while (0) + +#define DO_TEST_UPDATE(file, dev, fial, kep, ...) \ + do { \ + data.action = UPDATE; \ + DO_TEST(file, dev, fial, kep, __VA_ARGS__) \ } while (0) - DO_TEST("graphics-spice", "graphics-spice-nochange", false, NULL); - DO_TEST("graphics-spice-timeout", "graphics-spice-timeout-nochange", false, - "set_password", "{\"return\":{}}", "expire_password", "{\"return\":{}}"); - DO_TEST("graphics-spice-timeout", "graphics-spice-timeout-password", false, - "set_password", "{\"return\":{}}", "expire_password", "{\"return\":{}}"); - DO_TEST("graphics-spice", "graphics-spice-listen", true, NULL); - DO_TEST("graphics-spice-listen-network", "graphics-spice-listen-network", false, - "set_password", "{\"return\":{}}", "expire_password", "{\"return\":{}}"); - /* Strange huh? Currently, only graphics can be testet :-P */ - DO_TEST("disk-cdrom", "disk-cdrom-nochange", true, NULL); + DO_TEST_UPDATE("graphics-spice", "graphics-spice-nochange", false, false, NULL); + DO_TEST_UPDATE("graphics-spice-timeout", "graphics-spice-timeout-nochange", false, false, + "set_password", "{\"return\":{}}", "expire_password", "{\"return\":{}}"); + DO_TEST_UPDATE("graphics-spice-timeout", "graphics-spice-timeout-password", false, false, + "set_password", "{\"return\":{}}", "expire_password", "{\"return\":{}}"); + DO_TEST_UPDATE("graphics-spice", "graphics-spice-listen", true, false, NULL); + DO_TEST_UPDATE("graphics-spice-listen-network", "graphics-spice-listen-network", false, false, + "set_password", "{\"return\":{}}", "expire_password", "{\"return\":{}}"); + /* Strange huh? Currently, only graphics can be updated :-P */ + DO_TEST_UPDATE("disk-cdrom", "disk-cdrom-nochange", true, false, NULL); + + DO_TEST_ATTACH("console-compat-2", "console-virtio", false, true, + "chardev-add", "{\"return\": {\"pty\": \"/dev/pts/26\"}}", + "device_add", "{\"return\": {}}"); + + DO_TEST_DETACH("console-compat-2", "console-virtio", false, false, + "device_del", "{\"return\": {}}", + "chardev-remove", "{\"return\": {}}"); virObjectUnref(driver.caps); virObjectUnref(driver.xmlopt); + virObjectUnref(driver.config); return (ret == 0) ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/tests/qemuhotplugtestdata/qemuhotplug-console-virtio.xml b/tests/qemuhotplugtestdata/qemuhotplug-console-virtio.xml new file mode 100644 index 000000000..bfab6ff05 --- /dev/null +++ b/tests/qemuhotplugtestdata/qemuhotplug-console-virtio.xml @@ -0,0 +1,5 @@ + <console type='pty'> + <source path='/dev/pts/26'/> + <target type='virtio' port='1'/> + <alias name='console1'/> + </console> diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index acc94ca61..9e6605948 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -23,6 +23,7 @@ #include "testutilsqemu.h" #include "qemumonitortestutils.h" #include "qemu/qemu_conf.h" +#include "qemu/qemu_monitor_json.h" #include "virthread.h" #include "virerror.h" #include "virstring.h" @@ -236,7 +237,7 @@ testQemuMonitorJSONGetMachines(const void *data) qemuMonitorMachineInfoPtr *info; int ninfo = 0; const char *null = NULL; - int i; + size_t i; if (!test) return -1; @@ -317,7 +318,7 @@ testQemuMonitorJSONGetCPUDefinitions(const void *data) int ret = -1; char **cpus = NULL; int ncpus = 0; - int i; + size_t i; if (!test) return -1; @@ -383,7 +384,7 @@ testQemuMonitorJSONGetCommands(const void *data) int ret = -1; char **commands = NULL; int ncommands = 0; - int i; + size_t i; if (!test) return -1; @@ -594,6 +595,353 @@ cleanup: return ret; } +static int +testQemuMonitorJSONAttachChardev(const void *data) +{ + const virDomainXMLOptionPtr xmlopt = (virDomainXMLOptionPtr)data; + qemuMonitorTestPtr test = qemuMonitorTestNew(true, xmlopt); + virDomainChrSourceDef chr; + int ret = 0; + + if (!test) + return -1; + +#define DO_CHECK(chrID, reply, fail) \ + if (qemuMonitorTestAddItem(test, "chardev-add", reply) < 0) \ + goto cleanup; \ + if (qemuMonitorAttachCharDev(qemuMonitorTestGetMonitor(test), \ + chrID, &chr) < 0) \ + ret = fail ? ret : -1; \ + else \ + ret = fail ? -1 : ret; \ + +#define CHECK(chrID, reply) \ + DO_CHECK(chrID, reply, false) + +#define CHECK_FAIL(chrID, reply) \ + DO_CHECK(chrID, reply, true) + + chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_NULL }; + CHECK("chr_null", "{\"return\": {}}"); + + chr = (virDomainChrSourceDef) { .type =VIR_DOMAIN_CHR_TYPE_VC }; + CHECK("chr_vc", "{\"return\": {}}"); + +#define PTY_PATH "/dev/ttyS0" + chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_PTY }; + CHECK("chr_pty", "{\"return\": {\"pty\" : \"" PTY_PATH "\"}}"); + if (STRNEQ_NULLABLE(PTY_PATH, chr.data.file.path)) { + VIR_FREE(chr.data.file.path); + virReportError(VIR_ERR_INTERNAL_ERROR, + "expected PTY path: %s got: %s", + PTY_PATH, NULLSTR(chr.data.file.path)); + ret = -1; + } + VIR_FREE(chr.data.file.path); + + chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_PTY }; + CHECK_FAIL("chr_pty_fail", "{\"return\": {}}"); +#undef PTY_PATH + + chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_FILE }; + CHECK("chr_file", "{\"return\": {}}"); + + chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_DEV }; + CHECK("chr_dev", "{\"return\": {}}"); + + chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_TCP }; + CHECK("chr_tcp", "{\"return\": {}}"); + + chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_UDP }; + CHECK("chr_udp", "{\"return\": {}}"); + + chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_UNIX }; + CHECK("chr_unix", "{\"return\": {}}"); + + chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_SPICEVMC }; + CHECK_FAIL("chr_spicevmc", "{\"return\": {}}"); + + chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_PIPE }; + CHECK_FAIL("chr_pipe", "{\"return\": {}}"); + + chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_STDIO }; + CHECK_FAIL("chr_stdio", "{\"return\": {}}"); + +#undef CHECK +#undef CHECK_FAIL +#undef DO_CHECK + +cleanup: + qemuMonitorTestFree(test); + return ret; +} + +static int +testQemuMonitorJSONDetachChardev(const void *data) +{ + const virDomainXMLOptionPtr xmlopt = (virDomainXMLOptionPtr)data; + qemuMonitorTestPtr test = qemuMonitorTestNew(true, xmlopt); + int ret = -1; + + if (!test) + return ret; + + if (qemuMonitorTestAddItem(test, "chardev-remove", "{\"return\": {}}") < 0) + goto cleanup; + + if (qemuMonitorDetachCharDev(qemuMonitorTestGetMonitor(test), + "dummy_chrID") < 0) + goto cleanup; + + ret = 0; + +cleanup: + qemuMonitorTestFree(test); + return ret; +} + +/* + * This test will request to return a list of paths for "/". It should be + * a simple list of 1 real element that being the "machine". The following + * is the execution and expected return: + * + * {"execute":"qom-list", "arguments": { "path": "/"}}" + * {"return": [{"name": "machine", "type": "child<container>"}, \ + * {"name": "type", "type": "string"}]} + */ +static int +testQemuMonitorJSONGetListPaths(const void *data) +{ + const virDomainXMLOptionPtr xmlopt = (virDomainXMLOptionPtr)data; + qemuMonitorTestPtr test = qemuMonitorTestNew(true, xmlopt); + int ret = -1; + qemuMonitorJSONListPathPtr *paths; + int npaths = 0; + size_t i; + + if (!test) + return -1; + + if (qemuMonitorTestAddItem(test, "qom-list", + "{ " + " \"return\": [ " + " {\"name\": \"machine\", " + " \"type\": \"child<container>\"}, " + " {\"name\": \"type\", " + " \"type\": \"string\"} " + " ]" + "}") < 0) + goto cleanup; + + /* present with path */ + if ((npaths = qemuMonitorJSONGetObjectListPaths( + qemuMonitorTestGetMonitor(test), + "/", + &paths)) < 0) + goto cleanup; + + if (npaths != 2) { + virReportError(VIR_ERR_INTERNAL_ERROR, + "npaths was %d, expected 1", npaths); + goto cleanup; + } + +#define CHECK(i, wantname, wanttype) \ + do { \ + if (STRNEQ(paths[i]->name, (wantname))) { \ + virReportError(VIR_ERR_INTERNAL_ERROR, \ + "name was %s, expected %s", \ + paths[i]->name, (wantname)); \ + goto cleanup; \ + } \ + if (STRNEQ_NULLABLE(paths[i]->type, (wanttype))) { \ + virReportError(VIR_ERR_INTERNAL_ERROR, \ + "type was %s, expected %s", \ + NULLSTR(paths[i]->type), (wanttype)); \ + goto cleanup; \ + } \ + } while (0) + + CHECK(0, "machine", "child<container>"); + +#undef CHECK + + ret = 0; + +cleanup: + qemuMonitorTestFree(test); + for (i = 0; i < npaths; i++) + qemuMonitorJSONListPathFree(paths[i]); + VIR_FREE(paths); + return ret; +} + + +/* + * This test will use a path to /machine/i440fx which should exist in order + * to ensure that the qom-get property fetch works properly. The following + * is the execution and expected return: + * + * + * { "execute": "qom-get","arguments": \ + * { "path": "/machine/i440fx","property": "realized"}} + * {"return": true} + */ +static int +testQemuMonitorJSONGetObjectProperty(const void *data) +{ + const virDomainXMLOptionPtr xmlopt = (virDomainXMLOptionPtr)data; + qemuMonitorTestPtr test = qemuMonitorTestNew(true, xmlopt); + int ret = -1; + qemuMonitorJSONObjectProperty prop; + + if (!test) + return -1; + + if (qemuMonitorTestAddItem(test, "qom-get", + "{ \"return\": true }") < 0) + goto cleanup; + + /* Present with path and property */ + memset(&prop, 0, sizeof(qemuMonitorJSONObjectProperty)); + prop.type = QEMU_MONITOR_OBJECT_PROPERTY_BOOLEAN; + if (qemuMonitorJSONGetObjectProperty(qemuMonitorTestGetMonitor(test), + "/machine/i440fx", + "realized", + &prop) < 0) + goto cleanup; + + if (!prop.val.b) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + "expected true, but false returned"); + goto cleanup; + } + + ret = 0; +cleanup: + qemuMonitorTestFree(test); + return ret; +} + + +/* + * This test will use a path to /machine/i440fx which should exist in order + * to ensure that the qom-set property set works properly. The test will + * set a true property to true just as a proof of concept. Setting it to + * false is not a good idea... + */ +static int +testQemuMonitorJSONSetObjectProperty(const void *data) +{ + const virDomainXMLOptionPtr xmlopt = (virDomainXMLOptionPtr)data; + qemuMonitorTestPtr test = qemuMonitorTestNew(true, xmlopt); + int ret = -1; + qemuMonitorJSONObjectProperty prop; + + if (!test) + return -1; + + if (qemuMonitorTestAddItem(test, "qom-set", + "{ \"return\": {} }") < 0) + goto cleanup; + if (qemuMonitorTestAddItem(test, "qom-get", + "{ \"return\": true }") < 0) + goto cleanup; + + /* Let's attempt the setting */ + memset(&prop, 0, sizeof(qemuMonitorJSONObjectProperty)); + prop.type = QEMU_MONITOR_OBJECT_PROPERTY_BOOLEAN; + prop.val.b = true; + if (qemuMonitorJSONSetObjectProperty(qemuMonitorTestGetMonitor(test), + "/machine/i440fx", + "realized", + &prop) < 0) + goto cleanup; + + /* To make sure it worked, fetch the property - if this succeeds then + * we didn't hose things + */ + memset(&prop, 0, sizeof(qemuMonitorJSONObjectProperty)); + prop.type = QEMU_MONITOR_OBJECT_PROPERTY_BOOLEAN; + if (qemuMonitorJSONGetObjectProperty(qemuMonitorTestGetMonitor(test), + "/machine/i440fx", + "realized", + &prop) < 0) + goto cleanup; + + if (!prop.val.b) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + "expected true, but false returned"); + goto cleanup; + } + + ret = 0; +cleanup: + qemuMonitorTestFree(test); + return ret; +} + + +static int +testQemuMonitorJSONGetDeviceAliases(const void *data) +{ + const virDomainXMLOptionPtr xmlopt = (virDomainXMLOptionPtr)data; + qemuMonitorTestPtr test = qemuMonitorTestNew(true, xmlopt); + int ret = -1; + char **aliases = NULL; + char **alias; + const char *expected[] = { + "virtio-disk25", "video0", "serial0", "ide0-0-0", "usb", NULL }; + + if (!test) + return -1; + + if (qemuMonitorTestAddItem(test, + "qom-list", + "{\"return\": [" + " {\"name\": \"virtio-disk25\"," + " \"type\": \"child<virtio-blk-pci>\"}," + " {\"name\": \"video0\"," + " \"type\": \"child<VGA>\"}," + " {\"name\": \"serial0\"," + " \"type\": \"child<isa-serial>\"}," + " {\"name\": \"ide0-0-0\"," + " \"type\": \"child<ide-cd>\"}," + " {\"name\": \"usb\"," + " \"type\": \"child<piix3-usb-uhci>\"}," + " {\"name\": \"type\", \"type\": \"string\"}" + "]}") < 0) + goto cleanup; + + if (qemuMonitorJSONGetDeviceAliases(qemuMonitorTestGetMonitor(test), + &aliases) < 0) + goto cleanup; + + if (!aliases) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", "no aliases returned"); + goto cleanup; + } + + ret = 0; + for (alias = aliases; *alias; alias++) { + if (!virStringArrayHasString((char **) expected, *alias)) { + fprintf(stderr, "got unexpected device alias '%s'\n", *alias); + ret = -1; + } + } + for (alias = (char **) expected; *alias; alias++) { + if (!virStringArrayHasString(aliases, *alias)) { + fprintf(stderr, "missing expected alias '%s'\n", *alias); + ret = -1; + } + } + +cleanup: + virStringFreeList(aliases); + qemuMonitorTestFree(test); + return ret; +} + static int mymain(void) @@ -623,6 +971,12 @@ mymain(void) DO_TEST(GetCommands); DO_TEST(GetTPMModels); DO_TEST(GetCommandLineOptionParameters); + DO_TEST(AttachChardev); + DO_TEST(DetachChardev); + DO_TEST(GetListPaths); + DO_TEST(GetObjectProperty); + DO_TEST(SetObjectProperty); + DO_TEST(GetDeviceAliases); virObjectUnref(xmlopt); diff --git a/tests/qemumonitortest.c b/tests/qemumonitortest.c index 61ac2d69f..3851251fe 100644 --- a/tests/qemumonitortest.c +++ b/tests/qemumonitortest.c @@ -34,7 +34,7 @@ static struct testEscapeString escapeStrings[] = { static int testEscapeArg(const void *data ATTRIBUTE_UNUSED) { - int i; + size_t i; char *escaped = NULL; for (i = 0; i < ARRAY_CARDINALITY(escapeStrings); ++i) { escaped = qemuMonitorEscapeArg(escapeStrings[i].unescaped); @@ -61,7 +61,7 @@ static int testEscapeArg(const void *data ATTRIBUTE_UNUSED) static int testUnescapeArg(const void *data ATTRIBUTE_UNUSED) { - int i; + size_t i; char *unescaped = NULL; for (i = 0; i < ARRAY_CARDINALITY(escapeStrings); ++i) { unescaped = qemuMonitorUnescapeArg(escapeStrings[i].escaped); diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index 1a4bb883a..56368a2b3 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -87,10 +87,8 @@ static int qemuMonitorTestAddReponse(qemuMonitorTestPtr test, if (have < want) { size_t need = want - have; - if (VIR_EXPAND_N(test->outgoing, test->outgoingCapacity, need) < 0) { - virReportOOMError(); + if (VIR_EXPAND_N(test->outgoing, test->outgoingCapacity, need) < 0) return -1; - } } want -= 2; @@ -403,7 +401,7 @@ qemuMonitorTestAddItem(qemuMonitorTestPtr test, qemuMonitorTestItemPtr item; if (VIR_ALLOC(item) < 0) - goto no_memory; + goto error; if (VIR_STRDUP(item->command_name, command_name) < 0 || VIR_STRDUP(item->response, response) < 0) @@ -412,7 +410,7 @@ qemuMonitorTestAddItem(qemuMonitorTestPtr test, virMutexLock(&test->lock); if (VIR_EXPAND_N(test->items, test->nitems, 1) < 0) { virMutexUnlock(&test->lock); - goto no_memory; + goto error; } test->items[test->nitems - 1] = item; @@ -420,8 +418,6 @@ qemuMonitorTestAddItem(qemuMonitorTestPtr test, return 0; -no_memory: - virReportOOMError(); error: qemuMonitorTestItemFree(item); return -1; @@ -457,7 +453,7 @@ qemuMonitorTestPtr qemuMonitorTestNew(bool json, virDomainXMLOptionPtr xmlopt) char *tmpdir_template = NULL; if (VIR_ALLOC(test) < 0) - goto no_memory; + goto error; if (virMutexInit(&test->lock) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", @@ -478,7 +474,7 @@ qemuMonitorTestPtr qemuMonitorTestNew(bool json, virDomainXMLOptionPtr xmlopt) tmpdir_template = NULL; if (virAsprintf(&path, "%s/qemumonitorjsontest.sock", test->tmpdir) < 0) - goto no_memory; + goto error; test->json = json; if (!(test->vm = virDomainObjNew(xmlopt))) @@ -538,9 +534,6 @@ cleanup: VIR_FREE(path); return test; -no_memory: - virReportOOMError(); - error: VIR_FREE(tmpdir_template); qemuMonitorTestFree(test); diff --git a/tests/qemuxml2argvdata/qemuxml2argv-balloon-device-period.args b/tests/qemuxml2argvdata/qemuxml2argv-balloon-device-period.args new file mode 100644 index 000000000..48af1c42f --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-balloon-device-period.args @@ -0,0 +1,5 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \ +pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -monitor \ +unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb -hda \ +/dev/HostVG/QEMUGuest1 -device virtio-balloon-pci,id=balloon0,bus=pci.0,\ +addr=0x12 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-balloon-device-period.xml b/tests/qemuxml2argvdata/qemuxml2argv-balloon-device-period.xml new file mode 100644 index 000000000..c47c9bfae --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-balloon-device-period.xml @@ -0,0 +1,26 @@ +<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'> + <source dev='/dev/HostVG/QEMUGuest1'/> + <target dev='hda' bus='ide'/> + </disk> + <memballoon model='virtio'> + <address type='pci' domain='0' bus='0' slot='18' function='0'/> + <stats period='10'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-complex-bootindex.args b/tests/qemuxml2argvdata/qemuxml2argv-boot-complex-bootindex.args index 2fde757aa..a2f906752 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-complex-bootindex.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-complex-bootindex.args @@ -10,21 +10,26 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ -no-acpi \ -usb \ -drive file=/tmp/vda.img,if=none,id=drive-virtio-disk0 \ --device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=3 \ +-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,\ +id=virtio-disk0,bootindex=3 \ -drive file=/tmp/vdb.img,if=none,id=drive-virtio-disk1 \ --device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk1,id=virtio-disk1 \ +-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk1,\ +id=virtio-disk1 \ -drive file=/dev/HostVG/hda,if=none,id=drive-ide0-0-0 \ -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ -drive file=/dev/HostVG/hdb,if=none,id=drive-ide0-0-1 \ -device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 \ -drive file=/dev/HostVG/hdc,if=none,media=cdrom,id=drive-ide0-1-0 \ --device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 \ +-device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,\ +bootindex=1 \ -drive file=/dev/fd0,if=none,id=drive-fdc0-0-0 \ -global isa-fdc.driveA=drive-fdc0-0-0 \ -global isa-fdc.bootindexA=4 \ -drive file=/dev/fd1,if=none,id=drive-fdc0-0-1 \ -global isa-fdc.driveB=drive-fdc0-0-1 \ --device virtio-net-pci,vlan=0,id=net0,mac=00:11:22:33:44:11,bus=pci.0,addr=0x3,bootindex=2 \ +-device virtio-net-pci,vlan=0,id=net0,mac=00:11:22:33:44:11,bus=pci.0,\ +addr=0x3,bootindex=2 \ -net user,vlan=0,name=hostnet0 \ --device virtio-net-pci,vlan=1,id=net1,mac=00:11:22:33:44:22,bus=pci.0,addr=0x4 \ +-device virtio-net-pci,vlan=1,id=net1,mac=00:11:22:33:44:22,bus=pci.0,\ +addr=0x4 \ -net user,vlan=1,name=hostnet1 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-complex.args b/tests/qemuxml2argvdata/qemuxml2argv-boot-complex.args index e335ba957..15b0b7cd8 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-complex.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-complex.args @@ -11,9 +11,11 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ -boot dnca \ -usb \ -drive file=/tmp/vda.img,if=none,id=drive-virtio-disk0,boot=on \ --device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0 \ +-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,\ +id=virtio-disk0 \ -drive file=/tmp/vdb.img,if=none,id=drive-virtio-disk1 \ --device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk1,id=virtio-disk1 \ +-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk1,\ +id=virtio-disk1 \ -drive file=/dev/HostVG/hda,if=none,id=drive-ide0-0-0 \ -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ -drive file=/dev/HostVG/hdb,if=none,id=drive-ide0-0-1 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-order.args b/tests/qemuxml2argvdata/qemuxml2argv-boot-order.args index 75e3357cc..3caece835 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-order.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-order.args @@ -11,12 +11,15 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu \ -drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-ide0-0-0 \ -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ -drive file=/root/boot.iso,if=none,media=cdrom,id=drive-ide0-1-0 \ --device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 \ +-device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,\ +bootindex=1 \ -drive file=sheepdog:example.org:6000:image,if=none,id=drive-virtio-disk0 \ --device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=3 \ +-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\ +id=virtio-disk0,bootindex=3 \ -drive file=/dev/null,if=none,id=drive-fdc0-0-1 \ -global isa-fdc.driveB=drive-fdc0-0-1 \ -global isa-fdc.bootindexB=4 \ --device virtio-net-pci,vlan=0,id=net0,mac=00:11:22:33:44:55,bus=pci.0,addr=0x3,bootindex=2 \ +-device virtio-net-pci,vlan=0,id=net0,mac=00:11:22:33:44:55,bus=pci.0,\ +addr=0x3,bootindex=2 \ -net user,vlan=0,name=hostnet0 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-compat-2.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-2.xml new file mode 100644 index 000000000..3fc115356 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-2.xml @@ -0,0 +1,122 @@ +<domain type='kvm' id='2'> + <name>f17</name> + <uuid>a1cd52eb-d37f-4717-fc6e-972f0774f4c9</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <resource> + <partition>/machine</partition> + </resource> + <os> + <type arch='x86_64' machine='pc-i440fx-1.4'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <acpi/> + <apic/> + <pae/> + </features> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>restart</on_crash> + <pm> + <suspend-to-mem enabled='yes'/> + <suspend-to-disk enabled='yes'/> + </pm> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2' cache='none'/> + <source file='/var/lib/libvirt/images/f17.qcow2'/> + <target dev='vda' bus='virtio'/> + <alias name='virtio-disk0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> + </disk> + <disk type='file' device='cdrom'> + <driver name='qemu' type='raw' cache='none'/> + <source file='/home/user/tmp/Fedora-17-x86_64-Live-KDE.iso'/> + <target dev='hdc' bus='ide'/> + <readonly/> + <alias name='ide0-1-0'/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> + </disk> + <controller type='ide' index='0'> + <alias name='ide0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> + </controller> + <controller type='usb' index='0'> + <alias name='usb0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> + <controller type='pci' index='0' model='pci-root'> + <alias name='pci0'/> + </controller> + <controller type='virtio-serial' index='0'> + <alias name='virtio-serial0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> + </controller> + <interface type='network'> + <mac address='52:54:00:ea:35:6f'/> + <source network='default'/> + <target dev='vnet0'/> + <model type='virtio'/> + <bandwidth> + <inbound average='4000' peak='8000' floor='200' burst='1024'/> + <outbound average='4000' peak='8000' burst='1024'/> + </bandwidth> + <alias name='net0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </interface> + <serial type='pty'> + <source path='/dev/pts/22'/> + <target type='isa-serial' port='0'/> + <alias name='serial0'/> + </serial> + <serial type='pty'> + <source path='/dev/pts/25'/> + <target port='0'/> + <alias name='serial1'/> + </serial> + <serial type='tcp'> + <source mode='bind' host='0.0.0.0' service='2445'/> + <protocol type='raw'/> + <target port='1'/> + <alias name='serial2'/> + </serial> + <console type='pty' tty='/dev/pts/22'> + <source path='/dev/pts/22'/> + <target type='serial' port='0'/> + <alias name='serial0'/> + </console> + <channel type='unix'> + <source mode='bind' path='/var/lib/libvirt/qemu/f17x86_64.agent'/> + <target type='virtio' name='org.qemu.guest_agent.0'/> + <alias name='channel0'/> + <address type='virtio-serial' controller='0' bus='0' port='1'/> + </channel> + <input type='tablet' bus='usb'> + <alias name='input0'/> + </input> + <input type='mouse' bus='ps2'/> + <graphics type='vnc' port='5900' autoport='yes' listen='0.0.0.0'> + <listen type='address' address='0.0.0.0'/> + </graphics> + <sound model='ich6'> + <alias name='sound0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </sound> + <video> + <model type='cirrus' vram='9216' heads='1'/> + <alias name='video0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </video> + <memballoon model='virtio'> + <alias name='balloon0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> + </memballoon> + </devices> + <seclabel type='static' model='dac' relabel='no'> + <label>root:root</label> + </seclabel> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-ccw.args b/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-ccw.args index 3e6f9f16e..ea4cc10b0 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-ccw.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-ccw.args @@ -4,7 +4,8 @@ socket,id=charmonitor,path=/tmp/test-monitor,server,nowait -mon \ chardev=charmonitor,id=monitor,mode=readline -no-acpi \ -device virtio-serial-ccw,id=virtio-serial0,devno=fe.0.0001 \ -drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 \ --device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ +-device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,\ +id=virtio-disk0,bootindex=1 \ -chardev pty,id=charconsole0 \ -device virtconsole,chardev=charconsole0,id=console0 \ -device virtio-balloon-ccw,id=balloon0,devno=fe.0.000a diff --git a/tests/qemuxml2argvdata/qemuxml2argv-controller-order.args b/tests/qemuxml2argvdata/qemuxml2argv-controller-order.args index e6ed47f60..d68011dc5 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-controller-order.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-controller-order.args @@ -10,7 +10,8 @@ file=/tmp/fdr.img,if=none,id=drive-virtio-disk0,cache=off,aio=native \ -device \ virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0 \ -drive \ -file=/tmp/Fedora-17-x86_64-Live-Desktop.iso,if=none,media=cdrom,id=drive-ide0-1-0 \ +file=/tmp/Fedora-17-x86_64-Live-Desktop.iso,if=none,media=cdrom,\ +id=drive-ide0-1-0 \ -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -device \ virtio-net-pci,vlan=0,id=net0,mac=52:54:00:4d:4b:19,bus=pci.0,addr=0x3 -net \ user,vlan=0,name=hostnet0 -chardev \ @@ -18,8 +19,9 @@ spicevmc,id=charsmartcard0,name=smartcard -device \ ccid-card-passthru,chardev=charsmartcard0,id=smartcard0,bus=ccid0.0 \ -chardev pty,id=charserial0 -device \ isa-serial,chardev=charserial0,id=serial0 -chardev \ -spicevmc,id=charchannel0,name=vdagent -device \ -virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 \ +spicevmc,id=charchannel0,name=vdagent \ +-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,\ +id=channel0,name=com.redhat.spice.0 \ -device usb-tablet,id=input0 -spice \ port=0,addr=0.0.0.0 -device \ intel-hda,id=sound0,bus=pci.0,addr=0x4 -device \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-fallback.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-fallback.args index fd3ae585a..4aba51f69 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-fallback.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-fallback.args @@ -6,7 +6,8 @@ LOGNAME=test \ /usr/bin/qemu \ -S \ -M pc \ --cpu Penryn,+xtpr,+tm2,+est,+vmx,+ds_cpl,+monitor,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme,-sse4.1 \ +-cpu Penryn,+xtpr,+tm2,+est,+vmx,+ds_cpl,+monitor,+pbe,+tm,+ht,+ss,+acpi,\ ++ds,+vme,-sse4.1 \ -m 214 \ -smp 6 \ -nographic \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-tray.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-tray.args index 2d9ba8f57..ac0fbe52d 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-tray.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-tray.args @@ -2,8 +2,10 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ /usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nographic -nodefaults \ -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot dc -usb \ -drive file=/var/lib/libvirt/images/f14.img,if=none,id=drive-virtio-disk0 \ --device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 \ --drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,media=cdrom,id=drive-ide0-1-0 \ +-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\ +id=virtio-disk0 \ +-drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,\ +media=cdrom,id=drive-ide0-1-0 \ -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \ -drive if=none,media=cdrom,id=drive-ide0-1-1 \ -device ide-drive,bus=ide.1,unit=1,drive=drive-ide0-1-1,id=ide0-1-1 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.args index 0202fd291..cf917fcca 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.args @@ -2,10 +2,14 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ /usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nographic -nodefaults \ -monitor unix:/tmp/test-monitor,server,nowait -no-acpi \ -boot dc -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \ --usb -drive file=/var/lib/libvirt/images/f14.img,if=none,id=drive-virtio-disk0,copy-on-read=on \ --device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 \ --drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,media=cdrom,id=drive-ide0-1-0 \ +-usb -drive file=/var/lib/libvirt/images/f14.img,if=none,\ +id=drive-virtio-disk0,copy-on-read=on \ +-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\ +id=virtio-disk0 \ +-drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,\ +media=cdrom,id=drive-ide0-1-0 \ -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \ --device virtio-net-pci,tx=bh,vlan=0,id=net0,mac=52:54:00:e5:48:58,bus=pci.0,addr=0x3 \ +-device virtio-net-pci,tx=bh,vlan=0,id=net0,mac=52:54:00:e5:48:58,bus=pci.0,\ +addr=0x3 \ -net user,vlan=0,name=hostnet0 -serial pty \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.args index 3c4687e76..0e3fdf0cc 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.args @@ -1,8 +1,11 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ /usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nographic -nodefaults \ -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot dc -usb \ --drive file=/var/lib/libvirt/images/f14.img,if=none,id=drive-virtio-disk0,discard=unmap \ --device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 \ --drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,media=cdrom,id=drive-ide0-1-0,discard=ignore \ +-drive file=/var/lib/libvirt/images/f14.img,if=none,id=drive-virtio-disk0,\ +discard=unmap \ +-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\ +id=virtio-disk0 \ +-drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,\ +media=cdrom,id=drive-ide0-1-0,discard=ignore \ -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.args index 9d70586b4..4274e2387 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.args @@ -1 +1,7 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb -drive file=gluster://example.org:6000/Volume1/Image,if=virtio,format=raw -drive 'file=gluster+unix:///Volume2/Image?socket=/path/to/sock,if=virtio,format=raw' -net none -serial none -parallel none +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \ +-M pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait \ +-no-acpi -boot c -usb \ +-drive file=gluster://example.org:6000/Volume1/Image,if=virtio,format=raw \ +-drive 'file=gluster+unix:///Volume2/Image?socket=/path/to/sock,\ +if=virtio,format=raw' \ +-net none -serial none -parallel none diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.args index fd2660a21..c82a299b4 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.args @@ -1 +1,6 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb -drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org/iqn.1992-01.com.example,if=virtio,format=raw -net none -serial none -parallel none +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \ +-M pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait \ +-no-acpi -boot c -usb \ +-drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org\ +/iqn.1992-01.com.example,if=virtio,format=raw \ +-net none -serial none -parallel none diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi.args index b8bc9c614..84f8d468f 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi.args @@ -1 +1,8 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb -drive file=iscsi://example.org:6000/iqn.1992-01.com.example,if=virtio,format=raw -drive file=iscsi://example.org:6000/iqn.1992-01.com.example/1,if=virtio,format=raw -net none -serial none -parallel none +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \ +-M pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait \ +-no-acpi -boot c -usb \ +-drive file=iscsi://example.org:6000/iqn.1992-01.com.example,if=virtio,\ +format=raw \ +-drive file=iscsi://example.org:6000/iqn.1992-01.com.example/1,if=virtio,\ +format=raw \ +-net none -serial none -parallel none diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.args index 35809fe36..89a3f96b6 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.args @@ -3,9 +3,12 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ -monitor unix:/tmp/test-monitor,server,nowait -no-acpi \ -boot dc -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \ -usb -drive file=/var/lib/libvirt/images/f14.img,if=none,id=drive-virtio-disk0 \ --device virtio-blk-pci,ioeventfd=on,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 \ --drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,media=cdrom,id=drive-ide0-1-0 \ +-device virtio-blk-pci,ioeventfd=on,scsi=off,bus=pci.0,addr=0x4,\ +drive=drive-virtio-disk0,id=virtio-disk0 \ +-drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,\ +media=cdrom,id=drive-ide0-1-0 \ -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \ --device virtio-net-pci,tx=bh,ioeventfd=off,vlan=0,id=net0,mac=52:54:00:e5:48:58,bus=pci.0,addr=0x3 \ +-device virtio-net-pci,tx=bh,ioeventfd=off,vlan=0,id=net0,\ +mac=52:54:00:e5:48:58,bus=pci.0,addr=0x3 \ -net user,vlan=0,name=hostnet0 -serial pty \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-order.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-order.args index cee7051e2..09c0b4ceb 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-order.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-order.args @@ -14,7 +14,9 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu \ -drive file=/dev/HostVG/QEMUGuest2,if=none,media=cdrom,id=drive-ide0-1-0 \ -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \ -drive file=/tmp/data.img,if=none,id=drive-virtio-disk0 \ --device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0 \ +-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,\ +id=virtio-disk0 \ -drive file=/tmp/logs.img,if=none,id=drive-virtio-disk1 \ --device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,id=virtio-disk1 \ +-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,\ +id=virtio-disk1 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-split.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-split.args index 2553c9b76..d33407bb5 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-split.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-split.args @@ -7,11 +7,15 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ -device virtio-scsi-pci,id=scsi3,bus=pci.0,addr=0x6 \ -usb \ -drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-scsi0-0-1-0 \ --device scsi-cd,bus=scsi0.0,channel=0,scsi-id=1,lun=0,drive=drive-scsi0-0-1-0,id=scsi0-0-1-0 \ +-device scsi-cd,bus=scsi0.0,channel=0,scsi-id=1,lun=0,drive=drive-scsi0-0-1-0,\ +id=scsi0-0-1-0 \ -drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-scsi0-0-0-0 \ --device scsi-cd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0 \ +-device scsi-cd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,\ +id=scsi0-0-0-0 \ -drive file=/tmp/scsidisk.img,if=none,id=drive-scsi0-0-0-1 \ --device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi0-0-0-1,id=scsi0-0-0-1 \ +-device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi0-0-0-1,\ +id=scsi0-0-0-1 \ -drive file=/tmp/scsidisk.img,if=none,id=drive-scsi0-0-1-1 \ --device scsi-hd,bus=scsi0.0,channel=0,scsi-id=1,lun=1,drive=drive-scsi0-0-1-1,id=scsi0-0-1-1 \ +-device scsi-hd,bus=scsi0.0,channel=0,scsi-id=1,lun=1,drive=drive-scsi0-0-1-1,\ +id=scsi0-0-1-1 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-wwn.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-wwn.args index 0dd2aa9d8..4cf9dc1a1 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-wwn.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-wwn.args @@ -5,7 +5,9 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ -device lsi,id=scsi1,bus=pci.0,addr=0x4 \ -usb \ -drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-scsi0-0-1-0 \ --device scsi-cd,bus=scsi0.0,channel=0,scsi-id=1,lun=0,drive=drive-scsi0-0-1-0,id=scsi0-0-1-0,wwn=0x5000c50015ea71ac \ +-device scsi-cd,bus=scsi0.0,channel=0,scsi-id=1,lun=0,drive=drive-scsi0-0-1-0,\ +id=scsi0-0-1-0,wwn=0x5000c50015ea71ac \ -drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-scsi0-0-0-0 \ --device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,wwn=0x5000c50015ea71ad \ +-device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,\ +id=scsi0-0-0-0,wwn=0x5000c50015ea71ad \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-lun-passthrough.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-lun-passthrough.args index 79af2fe4e..cf855c3d8 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-lun-passthrough.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-lun-passthrough.args @@ -5,7 +5,9 @@ pc -m 214 -smp 1 -nographic -nodefaults \ -device lsi,id=scsi1,bus=pci.0,addr=0x4 \ -usb \ -drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-scsi0-0-0-0 \ --device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0 \ +-device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,\ +drive=drive-scsi0-0-0-0,id=scsi0-0-0-0 \ -drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-scsi0-0-1-1 \ --device scsi-block,bus=scsi0.0,channel=0,scsi-id=1,lun=1,drive=drive-scsi0-0-1-1,id=scsi0-0-1-1 \ +-device scsi-block,bus=scsi0.0,channel=0,scsi-id=1,lun=1,\ +drive=drive-scsi0-0-1-1,id=scsi0-0-1-1 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-vscsi.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-vscsi.args index db59d0e6d..1e61e15db 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-vscsi.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-vscsi.args @@ -1,8 +1,10 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \ pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -monitor \ -unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -device spapr-vscsi,id=scsi0,\ -reg=0x2000 -usb -drive file=/dev/HostVG/QEMUGuest1,if=none,\ -id=drive-ide0-0-0 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ +unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -device spapr-vscsi,\ +id=scsi0,reg=0x2000 -usb \ +-drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-ide0-0-0 \ +-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ -drive file=/tmp/scsidisk.img,if=none,id=drive-scsi0-0-3-0 \ --device scsi-disk,bus=scsi0.0,channel=0,scsi-id=3,lun=0,drive=drive-scsi0-0-3-0,id=scsi0-0-3-0 \ +-device scsi-disk,bus=scsi0.0,channel=0,scsi-id=3,lun=0,\ +drive=drive-scsi0-0-3-0,id=scsi0-0-3-0 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool-mode.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool-mode.xml new file mode 100644 index 000000000..b907633b9 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool-mode.xml @@ -0,0 +1,48 @@ +<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='volume' device='cdrom'> + <source pool='blk-pool0' volume='blk-pool0-vol0' mode='host' startupPolicy='optional'> + <seclabel model='selinux' relabel='yes'> + <label>system_u:system_r:public_content_t:s0</label> + </seclabel> + </source> + <target dev='hda' bus='ide'/> + <readonly/> + <address type='drive' controller='0' bus='0' target='0' unit='1'/> + </disk> + <disk type='volume' device='cdrom'> + <source pool='blk-pool0' volume='blk-pool0-vol1' mode='direct' startupPolicy='optional'> + <seclabel model='selinux' relabel='yes'> + <label>system_u:system_r:public_content_t:s0</label> + </seclabel> + </source> + <target dev='hda' bus='ide'/> + <readonly/> + <address type='drive' controller='0' bus='0' target='0' unit='2'/> + </disk> + <disk type='file' device='disk'> + <source file='/tmp/idedisk.img'/> + <target dev='hdc' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='3'/> + </disk> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='ide' index='1'/> + <controller type='pci' index='0' model='pci-root'/> + <memballoon model='virtio'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.args index 9ef68de20..01ceac2b4 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.args @@ -3,7 +3,9 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \ -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \ -device virtio-scsi-ccw,id=scsi0,devno=fe.0.0001 \ -drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 \ --device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,id=virtio-disk0 \ +-device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,\ +id=virtio-disk0 \ -drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-scsi0-0-4-0 \ --device scsi-disk,bus=scsi0.0,channel=0,scsi-id=4,lun=0,drive=drive-scsi0-0-4-0,id=scsi0-0-4-0 \ +-device scsi-disk,bus=scsi0.0,channel=0,scsi-id=4,lun=0,\ +drive=drive-scsi0-0-4-0,id=scsi0-0-4-0 \ -device virtio-balloon-ccw,id=balloon0,devno=fe.0.000a diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-num_queues.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-num_queues.args index 8d467995b..810bffcd5 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-num_queues.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-num_queues.args @@ -4,5 +4,6 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ -device virtio-scsi-pci,id=scsi0,num_queues=8,bus=pci.0,addr=0x3 \ -usb \ -drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-scsi0-0-0-0 \ --device scsi-disk,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0 \ +-device scsi-disk,bus=scsi0.0,channel=0,scsi-id=0,lun=0,\ +drive=drive-scsi0-0-0-0,id=scsi0-0-0-0 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-event_idx.args b/tests/qemuxml2argvdata/qemuxml2argv-event_idx.args index c7c88a0b2..6b3e79962 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-event_idx.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-event_idx.args @@ -3,9 +3,12 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ -monitor unix:/tmp/test-monitor,server,nowait -no-acpi \ -boot dc -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \ -usb -drive file=/var/lib/libvirt/images/f14.img,if=none,id=drive-virtio-disk0 \ --device virtio-blk-pci,event_idx=on,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 \ --drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,media=cdrom,id=drive-ide0-1-0 \ +-device virtio-blk-pci,event_idx=on,scsi=off,bus=pci.0,addr=0x4,\ +drive=drive-virtio-disk0,id=virtio-disk0 \ +-drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,\ +media=cdrom,id=drive-ide0-1-0 \ -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \ --device virtio-net-pci,event_idx=off,vlan=0,id=net0,mac=52:54:00:e5:48:58,bus=pci.0,addr=0x3 \ +-device virtio-net-pci,event_idx=off,vlan=0,id=net0,mac=52:54:00:e5:48:58,\ +bus=pci.0,addr=0x3 \ -net user,vlan=0,name=hostnet0 -serial pty \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-agentmouse.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-agentmouse.args index 6f5736b24..a9525d697 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-agentmouse.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-agentmouse.args @@ -2,7 +2,10 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=spice \ /usr/bin/qemu -S -M pc -m 214 -smp 1 -nodefconfig -nodefaults \ -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \ -device virtio-serial-pci,id=virtio-serial1,bus=pci.0,addr=0xa \ --usb -hda /dev/HostVG/QEMUGuest1 -chardev spicevmc,id=charchannel0,name=vdagent \ --device virtserialport,bus=virtio-serial1.0,nr=3,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 \ --spice port=5903,tls-port=5904,addr=127.0.0.1,agent-mouse=off,x509-dir=/etc/pki/libvirt-spice,tls-channel=main \ +-usb -hda /dev/HostVG/QEMUGuest1 -chardev spicevmc,id=charchannel0,\ +name=vdagent \ +-device virtserialport,bus=virtio-serial1.0,nr=3,chardev=charchannel0,\ +id=channel0,name=com.redhat.spice.0 \ +-spice port=5903,tls-port=5904,addr=127.0.0.1,agent-mouse=off,\ +x509-dir=/etc/pki/libvirt-spice,tls-channel=main \ -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args index 9df0eb178..48744b2f3 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args @@ -4,8 +4,10 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=spice \ -m 1024 -smp 2 -nodefaults -monitor unix:/tmp/test-monitor,server,nowait \ -boot dc -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \ -usb -drive file=/var/lib/libvirt/images/f14.img,if=none,id=drive-virtio-disk0 \ --device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 \ --drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,media=cdrom,id=drive-ide0-1-0 \ +-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\ +id=virtio-disk0 \ +-drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,\ +media=cdrom,id=drive-ide0-1-0 \ -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \ -device rtl8139,vlan=0,id=net0,mac=52:54:00:71:70:89,bus=pci.0,addr=0x7 \ -net tap,script=/etc/qemu-ifup,vlan=0,name=hostnet0 -serial pty \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.args index 35e51a7e8..8a61e9611 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.args @@ -1,12 +1,17 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=spice /usr/bin/qemu -S -M pc -m 214 -smp 1 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c \ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=spice \ +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nodefconfig -nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c \ -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x4.0x7 \ --device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x4 \ +-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,\ +multifunction=on,addr=0x4 \ -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x4.0x1 \ -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x4.0x2 \ -spice port=5903,tls-port=5904,addr=127.0.0.1,\ x509-dir=/etc/pki/libvirt-spice,tls-channel=main,plaintext-channel=inputs,\ tls-channel=usbredir,\ -image-compression=auto_glz,jpeg-wan-compression=auto,zlib-glz-wan-compression=auto,\ +image-compression=auto_glz,jpeg-wan-compression=auto,\ +zlib-glz-wan-compression=auto,\ playback-compression=on,streaming-video=filter,disable-copy-paste \ -vga cirrus \ -chardev socket,id=charredir0,host=localhost,port=4000 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args index d7cfae064..7ddfa6404 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args @@ -2,8 +2,10 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=spice \ /usr/bin/qemu -S -M pc -m 214 -smp 1 -nodefaults -monitor \ unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb -hda \ /dev/HostVG/QEMUGuest1 -spice port=5903,tls-port=5904,addr=127.0.0.1,\ -x509-dir=/etc/pki/libvirt-spice,tls-channel=default,tls-channel=main,plaintext-channel=inputs,\ -image-compression=auto_glz,jpeg-wan-compression=auto,zlib-glz-wan-compression=auto,\ +x509-dir=/etc/pki/libvirt-spice,tls-channel=default,tls-channel=main,\ +plaintext-channel=inputs,\ +image-compression=auto_glz,jpeg-wan-compression=auto,\ +zlib-glz-wan-compression=auto,\ playback-compression=on,streaming-video=filter,disable-copy-paste -vga \ qxl -global qxl.ram_size=67108864 -global qxl.vram_size=18874368 \ -device qxl,id=video1,ram_size=67108864,vram_size=33554432,bus=pci.0,addr=0x4 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-boot.args b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-boot.args index cd2267299..5cff24b58 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-boot.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-boot.args @@ -4,6 +4,7 @@ unix:/tmp/test-monitor,server,nowait -no-acpi \ -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 -usb \ -drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-ide0-0-0 \ -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ --drive file=/dev/sg0,if=none,id=drive-hostdev-scsi_host0-0-0-0 \ --device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=8,drive=drive-hostdev-scsi_host0-0-0-0,id=hostdev-scsi_host0-0-0-0,bootindex=1 \ +-drive file=/dev/sg0,if=none,id=drive-hostdev0 \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=8,\ +drive=drive-hostdev0,id=hostdev0,bootindex=1 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi.args b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi.args index 06f793818..39d5a58f0 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi.args @@ -1,9 +1,10 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc \ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \ +-M pc \ -m 214 -smp 1 -nographic -nodefaults -monitor \ unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \ -device lsi,id=scsi0,bus=pci.0,addr=0x3 -usb \ -drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-ide0-0-0 \ -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ --drive file=/dev/sg0,if=none,id=drive-hostdev-scsi_host0-0-0-0 \ --device scsi-generic,bus=scsi0.0,scsi-id=7,drive=drive-hostdev-scsi_host0-0-0-0,id=hostdev-scsi_host0-0-0-0 \ +-drive file=/dev/sg0,if=none,id=drive-hostdev0 \ +-device scsi-generic,bus=scsi0.0,scsi-id=7,drive=drive-hostdev0,id=hostdev0 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-readonly.args b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-readonly.args index ea2f7afb5..b2d7ea39f 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-readonly.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-readonly.args @@ -4,6 +4,7 @@ unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \ -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 -usb \ -drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-ide0-0-0 \ -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ --drive file=/dev/sg0,if=none,id=drive-hostdev-scsi_host0-0-0-0,readonly=on \ --device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=8,drive=drive-hostdev-scsi_host0-0-0-0,id=hostdev-scsi_host0-0-0-0 \ +-drive file=/dev/sg0,if=none,id=drive-hostdev0,readonly=on \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=8,\ +drive=drive-hostdev0,id=hostdev0 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-scsi.args b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-scsi.args index b92afc776..26b78bcf8 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-scsi.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-scsi.args @@ -4,6 +4,7 @@ unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \ -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 -usb \ -drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-ide0-0-0 \ -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ --drive file=/dev/sg0,if=none,id=drive-hostdev-scsi_host0-0-0-0 \ --device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=8,drive=drive-hostdev-scsi_host0-0-0-0,id=hostdev-scsi_host0-0-0-0 \ +-drive file=/dev/sg0,if=none,id=drive-hostdev0 \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=8,\ +drive=drive-hostdev0,id=hostdev0 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hyperv-off.args b/tests/qemuxml2argvdata/qemuxml2argv-hyperv-off.args new file mode 100644 index 000000000..23d9eccd8 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-hyperv-off.args @@ -0,0 +1,4 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu \ +-S -M pc -cpu qemu32 -m 214 -smp 6 -nographic \ +-monitor unix:/tmp/test-monitor,server,nowait \ +-boot n -usb -net none -serial none -parallel none diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hyperv-off.xml b/tests/qemuxml2argvdata/qemuxml2argv-hyperv-off.xml new file mode 100644 index 000000000..4ec16d511 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-hyperv-off.xml @@ -0,0 +1,29 @@ +<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='i686' machine='pc'>hvm</type> + <boot dev='network'/> + </os> + <features> + <acpi/> + <hyperv> + <relaxed state='off'/> + <vapic state='off'/> + <spinlocks state='off'/> + </hyperv> + </features> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu</emulator> + <controller type='usb' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <memballoon model='virtio'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse-addr.args b/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse-addr.args index 5151702ee..b43b20e49 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse-addr.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse-addr.args @@ -1 +1,5 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb -hda /dev/HostVG/QEMUGuest1 -device usb-mouse,id=input0,bus=usb.0,port=4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \ +-M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults \ +-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb \ +-hda /dev/HostVG/QEMUGuest1 -device usb-mouse,id=input0,bus=usb.0,port=4 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pci-bridge-duplicate-index.xml b/tests/qemuxml2argvdata/qemuxml2argv-pci-bridge-duplicate-index.xml new file mode 100644 index 000000000..0aea45d1c --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pci-bridge-duplicate-index.xml @@ -0,0 +1,16 @@ +<domain type='qemu'> + <name>fdr-br</name> + <memory unit='KiB'>2097152</memory> + <currentMemory unit='KiB'>2097152</currentMemory> + <vcpu placement='static' cpuset='0-1'>2</vcpu> + <os> + <type arch='x86_64' machine='pc-1.2'>hvm</type> + <boot dev='hd'/> + </os> + <devices> + <emulator>/usr/libexec/qemu-kvm</emulator> + <controller type='pci' index='0' model='pci-root'/> + <controller type='pci' index='1' model='pci-bridge'/> + <controller type='pci' index='1' model='pci-bridge'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pci-bridge-many-disks.args b/tests/qemuxml2argvdata/qemuxml2argv-pci-bridge-many-disks.args new file mode 100644 index 000000000..b2cf685fb --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pci-bridge-many-disks.args @@ -0,0 +1,217 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu-kvm \ +-S -M pc-i440fx-1.4 -cpu qemu64,-kvmclock -bios /usr/share/seabios/bios.bin \ +-m 3907 -smp 1 -nographic -nodefaults \ +-monitor unix:/tmp/test-monitor,server,nowait -boot c \ +-device pci-bridge,chassis_nr=1,id=pci.1,bus=pci.0,addr=0x3 \ +-device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.0,addr=0x4 \ +-device pci-bridge,chassis_nr=3,id=pci.3,bus=pci.0,addr=0x5 \ +-usb -drive file=/var/lib/libvirt/images/test.img,if=none,id=drive-virtio-disk0 \ +-device virtio-blk-pci,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0 \ +-drive file=/var/lib/libvirt/images/disk-a-a.img,if=none,id=drive-virtio-disk0 \ +-device virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-virtio-disk0,id=virtio-disk0 \ +-drive file=/var/lib/libvirt/images/disk-a-b.img,if=none,id=drive-virtio-disk27 \ +-device virtio-blk-pci,bus=pci.0,addr=0x8,drive=drive-virtio-disk27,id=virtio-disk27 \ +-drive file=/var/lib/libvirt/images/disk-a-c.img,if=none,id=drive-virtio-disk28 \ +-device virtio-blk-pci,bus=pci.0,addr=0x9,drive=drive-virtio-disk28,id=virtio-disk28 \ +-drive file=/var/lib/libvirt/images/disk-a-d.img,if=none,id=drive-virtio-disk29 \ +-device virtio-blk-pci,bus=pci.0,addr=0xa,drive=drive-virtio-disk29,id=virtio-disk29 \ +-drive file=/var/lib/libvirt/images/disk-b-a.img,if=none,id=drive-virtio-disk52 \ +-device virtio-blk-pci,bus=pci.0,addr=0xb,drive=drive-virtio-disk52,id=virtio-disk52 \ +-drive file=/var/lib/libvirt/images/disk-b-b.img,if=none,id=drive-virtio-disk53 \ +-device virtio-blk-pci,bus=pci.0,addr=0xc,drive=drive-virtio-disk53,id=virtio-disk53 \ +-drive file=/var/lib/libvirt/images/disk-b-c.img,if=none,id=drive-virtio-disk54 \ +-device virtio-blk-pci,bus=pci.0,addr=0xd,drive=drive-virtio-disk54,id=virtio-disk54 \ +-drive file=/var/lib/libvirt/images/disk-b-d.img,if=none,id=drive-virtio-disk55 \ +-device virtio-blk-pci,bus=pci.0,addr=0xe,drive=drive-virtio-disk55,id=virtio-disk55 \ +-drive file=/var/lib/libvirt/images/disk-c-a.img,if=none,id=drive-virtio-disk78 \ +-device virtio-blk-pci,bus=pci.0,addr=0xf,drive=drive-virtio-disk78,id=virtio-disk78 \ +-drive file=/var/lib/libvirt/images/disk-c-b.img,if=none,id=drive-virtio-disk79 \ +-device virtio-blk-pci,bus=pci.0,addr=0x10,drive=drive-virtio-disk79,id=virtio-disk79 \ +-drive file=/var/lib/libvirt/images/disk-c-c.img,if=none,id=drive-virtio-disk80 \ +-device virtio-blk-pci,bus=pci.0,addr=0x11,drive=drive-virtio-disk80,id=virtio-disk80 \ +-drive file=/var/lib/libvirt/images/disk-c-d.img,if=none,id=drive-virtio-disk81 \ +-device virtio-blk-pci,bus=pci.0,addr=0x12,drive=drive-virtio-disk81,id=virtio-disk81 \ +-drive file=/var/lib/libvirt/images/disk-d-a.img,if=none,id=drive-virtio-disk104 \ +-device virtio-blk-pci,bus=pci.0,addr=0x13,drive=drive-virtio-disk104,id=virtio-disk104 \ +-drive file=/var/lib/libvirt/images/disk-d-b.img,if=none,id=drive-virtio-disk105 \ +-device virtio-blk-pci,bus=pci.0,addr=0x14,drive=drive-virtio-disk105,id=virtio-disk105 \ +-drive file=/var/lib/libvirt/images/disk-d-c.img,if=none,id=drive-virtio-disk106 \ +-device virtio-blk-pci,bus=pci.0,addr=0x15,drive=drive-virtio-disk106,id=virtio-disk106 \ +-drive file=/var/lib/libvirt/images/disk-d-d.img,if=none,id=drive-virtio-disk107 \ +-device virtio-blk-pci,bus=pci.0,addr=0x16,drive=drive-virtio-disk107,id=virtio-disk107 \ +-drive file=/var/lib/libvirt/images/disk-e-a.img,if=none,id=drive-virtio-disk130 \ +-device virtio-blk-pci,bus=pci.0,addr=0x17,drive=drive-virtio-disk130,id=virtio-disk130 \ +-drive file=/var/lib/libvirt/images/disk-e-b.img,if=none,id=drive-virtio-disk131 \ +-device virtio-blk-pci,bus=pci.0,addr=0x18,drive=drive-virtio-disk131,id=virtio-disk131 \ +-drive file=/var/lib/libvirt/images/disk-e-c.img,if=none,id=drive-virtio-disk132 \ +-device virtio-blk-pci,bus=pci.0,addr=0x19,drive=drive-virtio-disk132,id=virtio-disk132 \ +-drive file=/var/lib/libvirt/images/disk-e-d.img,if=none,id=drive-virtio-disk133 \ +-device virtio-blk-pci,bus=pci.0,addr=0x1a,drive=drive-virtio-disk133,id=virtio-disk133 \ +-drive file=/var/lib/libvirt/images/disk-f-a.img,if=none,id=drive-virtio-disk156 \ +-device virtio-blk-pci,bus=pci.0,addr=0x1b,drive=drive-virtio-disk156,id=virtio-disk156 \ +-drive file=/var/lib/libvirt/images/disk-f-b.img,if=none,id=drive-virtio-disk157 \ +-device virtio-blk-pci,bus=pci.0,addr=0x1c,drive=drive-virtio-disk157,id=virtio-disk157 \ +-drive file=/var/lib/libvirt/images/disk-f-c.img,if=none,id=drive-virtio-disk158 \ +-device virtio-blk-pci,bus=pci.0,addr=0x1d,drive=drive-virtio-disk158,id=virtio-disk158 \ +-drive file=/var/lib/libvirt/images/disk-f-d.img,if=none,id=drive-virtio-disk159 \ +-device virtio-blk-pci,bus=pci.0,addr=0x1e,drive=drive-virtio-disk159,id=virtio-disk159 \ +-drive file=/var/lib/libvirt/images/disk-g-a.img,if=none,id=drive-virtio-disk182 \ +-device virtio-blk-pci,bus=pci.0,addr=0x1f,drive=drive-virtio-disk182,id=virtio-disk182 \ +-drive file=/var/lib/libvirt/images/disk-g-b.img,if=none,id=drive-virtio-disk183 \ +-device virtio-blk-pci,bus=pci.1,addr=0x1,drive=drive-virtio-disk183,id=virtio-disk183 \ +-drive file=/var/lib/libvirt/images/disk-g-c.img,if=none,id=drive-virtio-disk184 \ +-device virtio-blk-pci,bus=pci.1,addr=0x2,drive=drive-virtio-disk184,id=virtio-disk184 \ +-drive file=/var/lib/libvirt/images/disk-g-d.img,if=none,id=drive-virtio-disk185 \ +-device virtio-blk-pci,bus=pci.1,addr=0x3,drive=drive-virtio-disk185,id=virtio-disk185 \ +-drive file=/var/lib/libvirt/images/disk-h-a.img,if=none,id=drive-virtio-disk208 \ +-device virtio-blk-pci,bus=pci.1,addr=0x4,drive=drive-virtio-disk208,id=virtio-disk208 \ +-drive file=/var/lib/libvirt/images/disk-h-b.img,if=none,id=drive-virtio-disk209 \ +-device virtio-blk-pci,bus=pci.1,addr=0x5,drive=drive-virtio-disk209,id=virtio-disk209 \ +-drive file=/var/lib/libvirt/images/disk-h-c.img,if=none,id=drive-virtio-disk210 \ +-device virtio-blk-pci,bus=pci.1,addr=0x6,drive=drive-virtio-disk210,id=virtio-disk210 \ +-drive file=/var/lib/libvirt/images/disk-h-d.img,if=none,id=drive-virtio-disk211 \ +-device virtio-blk-pci,bus=pci.1,addr=0x7,drive=drive-virtio-disk211,id=virtio-disk211 \ +-drive file=/var/lib/libvirt/images/disk-i-a.img,if=none,id=drive-virtio-disk234 \ +-device virtio-blk-pci,bus=pci.1,addr=0x8,drive=drive-virtio-disk234,id=virtio-disk234 \ +-drive file=/var/lib/libvirt/images/disk-i-b.img,if=none,id=drive-virtio-disk235 \ +-device virtio-blk-pci,bus=pci.1,addr=0x9,drive=drive-virtio-disk235,id=virtio-disk235 \ +-drive file=/var/lib/libvirt/images/disk-i-c.img,if=none,id=drive-virtio-disk236 \ +-device virtio-blk-pci,bus=pci.1,addr=0xa,drive=drive-virtio-disk236,id=virtio-disk236 \ +-drive file=/var/lib/libvirt/images/disk-i-d.img,if=none,id=drive-virtio-disk237 \ +-device virtio-blk-pci,bus=pci.1,addr=0xb,drive=drive-virtio-disk237,id=virtio-disk237 \ +-drive file=/var/lib/libvirt/images/disk-j-a.img,if=none,id=drive-virtio-disk260 \ +-device virtio-blk-pci,bus=pci.1,addr=0xc,drive=drive-virtio-disk260,id=virtio-disk260 \ +-drive file=/var/lib/libvirt/images/disk-j-b.img,if=none,id=drive-virtio-disk261 \ +-device virtio-blk-pci,bus=pci.1,addr=0xd,drive=drive-virtio-disk261,id=virtio-disk261 \ +-drive file=/var/lib/libvirt/images/disk-j-c.img,if=none,id=drive-virtio-disk262 \ +-device virtio-blk-pci,bus=pci.1,addr=0xe,drive=drive-virtio-disk262,id=virtio-disk262 \ +-drive file=/var/lib/libvirt/images/disk-j-d.img,if=none,id=drive-virtio-disk263 \ +-device virtio-blk-pci,bus=pci.1,addr=0xf,drive=drive-virtio-disk263,id=virtio-disk263 \ +-drive file=/var/lib/libvirt/images/disk-k-a.img,if=none,id=drive-virtio-disk286 \ +-device virtio-blk-pci,bus=pci.1,addr=0x10,drive=drive-virtio-disk286,id=virtio-disk286 \ +-drive file=/var/lib/libvirt/images/disk-k-b.img,if=none,id=drive-virtio-disk287 \ +-device virtio-blk-pci,bus=pci.1,addr=0x11,drive=drive-virtio-disk287,id=virtio-disk287 \ +-drive file=/var/lib/libvirt/images/disk-k-c.img,if=none,id=drive-virtio-disk288 \ +-device virtio-blk-pci,bus=pci.1,addr=0x12,drive=drive-virtio-disk288,id=virtio-disk288 \ +-drive file=/var/lib/libvirt/images/disk-k-d.img,if=none,id=drive-virtio-disk289 \ +-device virtio-blk-pci,bus=pci.1,addr=0x13,drive=drive-virtio-disk289,id=virtio-disk289 \ +-drive file=/var/lib/libvirt/images/disk-l-a.img,if=none,id=drive-virtio-disk312 \ +-device virtio-blk-pci,bus=pci.1,addr=0x14,drive=drive-virtio-disk312,id=virtio-disk312 \ +-drive file=/var/lib/libvirt/images/disk-l-b.img,if=none,id=drive-virtio-disk313 \ +-device virtio-blk-pci,bus=pci.1,addr=0x15,drive=drive-virtio-disk313,id=virtio-disk313 \ +-drive file=/var/lib/libvirt/images/disk-l-c.img,if=none,id=drive-virtio-disk314 \ +-device virtio-blk-pci,bus=pci.1,addr=0x16,drive=drive-virtio-disk314,id=virtio-disk314 \ +-drive file=/var/lib/libvirt/images/disk-l-d.img,if=none,id=drive-virtio-disk315 \ +-device virtio-blk-pci,bus=pci.1,addr=0x17,drive=drive-virtio-disk315,id=virtio-disk315 \ +-drive file=/var/lib/libvirt/images/disk-m-a.img,if=none,id=drive-virtio-disk338 \ +-device virtio-blk-pci,bus=pci.1,addr=0x18,drive=drive-virtio-disk338,id=virtio-disk338 \ +-drive file=/var/lib/libvirt/images/disk-m-b.img,if=none,id=drive-virtio-disk339 \ +-device virtio-blk-pci,bus=pci.1,addr=0x19,drive=drive-virtio-disk339,id=virtio-disk339 \ +-drive file=/var/lib/libvirt/images/disk-m-c.img,if=none,id=drive-virtio-disk340 \ +-device virtio-blk-pci,bus=pci.1,addr=0x1a,drive=drive-virtio-disk340,id=virtio-disk340 \ +-drive file=/var/lib/libvirt/images/disk-m-d.img,if=none,id=drive-virtio-disk341 \ +-device virtio-blk-pci,bus=pci.1,addr=0x1b,drive=drive-virtio-disk341,id=virtio-disk341 \ +-drive file=/var/lib/libvirt/images/disk-n-a.img,if=none,id=drive-virtio-disk364 \ +-device virtio-blk-pci,bus=pci.1,addr=0x1c,drive=drive-virtio-disk364,id=virtio-disk364 \ +-drive file=/var/lib/libvirt/images/disk-n-b.img,if=none,id=drive-virtio-disk365 \ +-device virtio-blk-pci,bus=pci.1,addr=0x1d,drive=drive-virtio-disk365,id=virtio-disk365 \ +-drive file=/var/lib/libvirt/images/disk-n-c.img,if=none,id=drive-virtio-disk366 \ +-device virtio-blk-pci,bus=pci.1,addr=0x1e,drive=drive-virtio-disk366,id=virtio-disk366 \ +-drive file=/var/lib/libvirt/images/disk-n-d.img,if=none,id=drive-virtio-disk367 \ +-device virtio-blk-pci,bus=pci.1,addr=0x1f,drive=drive-virtio-disk367,id=virtio-disk367 \ +-drive file=/var/lib/libvirt/images/disk-o-a.img,if=none,id=drive-virtio-disk390 \ +-device virtio-blk-pci,bus=pci.2,addr=0x1,drive=drive-virtio-disk390,id=virtio-disk390 \ +-drive file=/var/lib/libvirt/images/disk-o-b.img,if=none,id=drive-virtio-disk391 \ +-device virtio-blk-pci,bus=pci.2,addr=0x2,drive=drive-virtio-disk391,id=virtio-disk391 \ +-drive file=/var/lib/libvirt/images/disk-o-c.img,if=none,id=drive-virtio-disk392 \ +-device virtio-blk-pci,bus=pci.2,addr=0x3,drive=drive-virtio-disk392,id=virtio-disk392 \ +-drive file=/var/lib/libvirt/images/disk-o-d.img,if=none,id=drive-virtio-disk393 \ +-device virtio-blk-pci,bus=pci.2,addr=0x4,drive=drive-virtio-disk393,id=virtio-disk393 \ +-drive file=/var/lib/libvirt/images/disk-p-a.img,if=none,id=drive-virtio-disk416 \ +-device virtio-blk-pci,bus=pci.2,addr=0x5,drive=drive-virtio-disk416,id=virtio-disk416 \ +-drive file=/var/lib/libvirt/images/disk-p-b.img,if=none,id=drive-virtio-disk417 \ +-device virtio-blk-pci,bus=pci.2,addr=0x6,drive=drive-virtio-disk417,id=virtio-disk417 \ +-drive file=/var/lib/libvirt/images/disk-p-c.img,if=none,id=drive-virtio-disk418 \ +-device virtio-blk-pci,bus=pci.2,addr=0x7,drive=drive-virtio-disk418,id=virtio-disk418 \ +-drive file=/var/lib/libvirt/images/disk-p-d.img,if=none,id=drive-virtio-disk419 \ +-device virtio-blk-pci,bus=pci.2,addr=0x8,drive=drive-virtio-disk419,id=virtio-disk419 \ +-drive file=/var/lib/libvirt/images/disk-q-a.img,if=none,id=drive-virtio-disk442 \ +-device virtio-blk-pci,bus=pci.2,addr=0x9,drive=drive-virtio-disk442,id=virtio-disk442 \ +-drive file=/var/lib/libvirt/images/disk-q-b.img,if=none,id=drive-virtio-disk443 \ +-device virtio-blk-pci,bus=pci.2,addr=0xa,drive=drive-virtio-disk443,id=virtio-disk443 \ +-drive file=/var/lib/libvirt/images/disk-q-c.img,if=none,id=drive-virtio-disk444 \ +-device virtio-blk-pci,bus=pci.2,addr=0xb,drive=drive-virtio-disk444,id=virtio-disk444 \ +-drive file=/var/lib/libvirt/images/disk-q-d.img,if=none,id=drive-virtio-disk445 \ +-device virtio-blk-pci,bus=pci.2,addr=0xc,drive=drive-virtio-disk445,id=virtio-disk445 \ +-drive file=/var/lib/libvirt/images/disk-r-a.img,if=none,id=drive-virtio-disk468 \ +-device virtio-blk-pci,bus=pci.2,addr=0xd,drive=drive-virtio-disk468,id=virtio-disk468 \ +-drive file=/var/lib/libvirt/images/disk-r-b.img,if=none,id=drive-virtio-disk469 \ +-device virtio-blk-pci,bus=pci.2,addr=0xe,drive=drive-virtio-disk469,id=virtio-disk469 \ +-drive file=/var/lib/libvirt/images/disk-r-c.img,if=none,id=drive-virtio-disk470 \ +-device virtio-blk-pci,bus=pci.2,addr=0xf,drive=drive-virtio-disk470,id=virtio-disk470 \ +-drive file=/var/lib/libvirt/images/disk-r-d.img,if=none,id=drive-virtio-disk471 \ +-device virtio-blk-pci,bus=pci.2,addr=0x10,drive=drive-virtio-disk471,id=virtio-disk471 \ +-drive file=/var/lib/libvirt/images/disk-s-a.img,if=none,id=drive-virtio-disk494 \ +-device virtio-blk-pci,bus=pci.2,addr=0x11,drive=drive-virtio-disk494,id=virtio-disk494 \ +-drive file=/var/lib/libvirt/images/disk-s-b.img,if=none,id=drive-virtio-disk495 \ +-device virtio-blk-pci,bus=pci.2,addr=0x12,drive=drive-virtio-disk495,id=virtio-disk495 \ +-drive file=/var/lib/libvirt/images/disk-s-c.img,if=none,id=drive-virtio-disk496 \ +-device virtio-blk-pci,bus=pci.2,addr=0x13,drive=drive-virtio-disk496,id=virtio-disk496 \ +-drive file=/var/lib/libvirt/images/disk-s-d.img,if=none,id=drive-virtio-disk497 \ +-device virtio-blk-pci,bus=pci.2,addr=0x14,drive=drive-virtio-disk497,id=virtio-disk497 \ +-drive file=/var/lib/libvirt/images/disk-t-a.img,if=none,id=drive-virtio-disk520 \ +-device virtio-blk-pci,bus=pci.2,addr=0x15,drive=drive-virtio-disk520,id=virtio-disk520 \ +-drive file=/var/lib/libvirt/images/disk-t-b.img,if=none,id=drive-virtio-disk521 \ +-device virtio-blk-pci,bus=pci.2,addr=0x16,drive=drive-virtio-disk521,id=virtio-disk521 \ +-drive file=/var/lib/libvirt/images/disk-t-c.img,if=none,id=drive-virtio-disk522 \ +-device virtio-blk-pci,bus=pci.2,addr=0x17,drive=drive-virtio-disk522,id=virtio-disk522 \ +-drive file=/var/lib/libvirt/images/disk-t-d.img,if=none,id=drive-virtio-disk523 \ +-device virtio-blk-pci,bus=pci.2,addr=0x18,drive=drive-virtio-disk523,id=virtio-disk523 \ +-drive file=/var/lib/libvirt/images/disk-u-a.img,if=none,id=drive-virtio-disk546 \ +-device virtio-blk-pci,bus=pci.2,addr=0x19,drive=drive-virtio-disk546,id=virtio-disk546 \ +-drive file=/var/lib/libvirt/images/disk-u-b.img,if=none,id=drive-virtio-disk547 \ +-device virtio-blk-pci,bus=pci.2,addr=0x1a,drive=drive-virtio-disk547,id=virtio-disk547 \ +-drive file=/var/lib/libvirt/images/disk-u-c.img,if=none,id=drive-virtio-disk548 \ +-device virtio-blk-pci,bus=pci.2,addr=0x1b,drive=drive-virtio-disk548,id=virtio-disk548 \ +-drive file=/var/lib/libvirt/images/disk-u-d.img,if=none,id=drive-virtio-disk549 \ +-device virtio-blk-pci,bus=pci.2,addr=0x1c,drive=drive-virtio-disk549,id=virtio-disk549 \ +-drive file=/var/lib/libvirt/images/disk-v-a.img,if=none,id=drive-virtio-disk572 \ +-device virtio-blk-pci,bus=pci.2,addr=0x1d,drive=drive-virtio-disk572,id=virtio-disk572 \ +-drive file=/var/lib/libvirt/images/disk-v-b.img,if=none,id=drive-virtio-disk573 \ +-device virtio-blk-pci,bus=pci.2,addr=0x1e,drive=drive-virtio-disk573,id=virtio-disk573 \ +-drive file=/var/lib/libvirt/images/disk-v-c.img,if=none,id=drive-virtio-disk574 \ +-device virtio-blk-pci,bus=pci.2,addr=0x1f,drive=drive-virtio-disk574,id=virtio-disk574 \ +-drive file=/var/lib/libvirt/images/disk-v-d.img,if=none,id=drive-virtio-disk575 \ +-device virtio-blk-pci,bus=pci.3,addr=0x1,drive=drive-virtio-disk575,id=virtio-disk575 \ +-drive file=/var/lib/libvirt/images/disk-w-a.img,if=none,id=drive-virtio-disk598 \ +-device virtio-blk-pci,bus=pci.3,addr=0x2,drive=drive-virtio-disk598,id=virtio-disk598 \ +-drive file=/var/lib/libvirt/images/disk-w-b.img,if=none,id=drive-virtio-disk599 \ +-device virtio-blk-pci,bus=pci.3,addr=0x3,drive=drive-virtio-disk599,id=virtio-disk599 \ +-drive file=/var/lib/libvirt/images/disk-w-c.img,if=none,id=drive-virtio-disk600 \ +-device virtio-blk-pci,bus=pci.3,addr=0x4,drive=drive-virtio-disk600,id=virtio-disk600 \ +-drive file=/var/lib/libvirt/images/disk-w-d.img,if=none,id=drive-virtio-disk601 \ +-device virtio-blk-pci,bus=pci.3,addr=0x5,drive=drive-virtio-disk601,id=virtio-disk601 \ +-drive file=/var/lib/libvirt/images/disk-x-a.img,if=none,id=drive-virtio-disk624 \ +-device virtio-blk-pci,bus=pci.3,addr=0x6,drive=drive-virtio-disk624,id=virtio-disk624 \ +-drive file=/var/lib/libvirt/images/disk-x-b.img,if=none,id=drive-virtio-disk625 \ +-device virtio-blk-pci,bus=pci.3,addr=0x7,drive=drive-virtio-disk625,id=virtio-disk625 \ +-drive file=/var/lib/libvirt/images/disk-x-c.img,if=none,id=drive-virtio-disk626 \ +-device virtio-blk-pci,bus=pci.3,addr=0x8,drive=drive-virtio-disk626,id=virtio-disk626 \ +-drive file=/var/lib/libvirt/images/disk-x-d.img,if=none,id=drive-virtio-disk627 \ +-device virtio-blk-pci,bus=pci.3,addr=0x9,drive=drive-virtio-disk627,id=virtio-disk627 \ +-drive file=/var/lib/libvirt/images/disk-y-a.img,if=none,id=drive-virtio-disk650 \ +-device virtio-blk-pci,bus=pci.3,addr=0xa,drive=drive-virtio-disk650,id=virtio-disk650 \ +-drive file=/var/lib/libvirt/images/disk-y-b.img,if=none,id=drive-virtio-disk651 \ +-device virtio-blk-pci,bus=pci.3,addr=0xb,drive=drive-virtio-disk651,id=virtio-disk651 \ +-drive file=/var/lib/libvirt/images/disk-y-c.img,if=none,id=drive-virtio-disk652 \ +-device virtio-blk-pci,bus=pci.3,addr=0xc,drive=drive-virtio-disk652,id=virtio-disk652 \ +-drive file=/var/lib/libvirt/images/disk-y-d.img,if=none,id=drive-virtio-disk653 \ +-device virtio-blk-pci,bus=pci.3,addr=0xd,drive=drive-virtio-disk653,id=virtio-disk653 \ +-drive file=/var/lib/libvirt/images/disk-z-a.img,if=none,id=drive-virtio-disk676 \ +-device virtio-blk-pci,bus=pci.3,addr=0xe,drive=drive-virtio-disk676,id=virtio-disk676 \ +-drive file=/var/lib/libvirt/images/disk-z-b.img,if=none,id=drive-virtio-disk677 \ +-device virtio-blk-pci,bus=pci.3,addr=0xf,drive=drive-virtio-disk677,id=virtio-disk677 \ +-drive file=/var/lib/libvirt/images/disk-z-c.img,if=none,id=drive-virtio-disk678 \ +-device virtio-blk-pci,bus=pci.3,addr=0x10,drive=drive-virtio-disk678,id=virtio-disk678 \ +-drive file=/var/lib/libvirt/images/disk-z-d.img,if=none,id=drive-virtio-disk679 \ +-device virtio-blk-pci,bus=pci.3,addr=0x11,drive=drive-virtio-disk679,id=virtio-disk679 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pci-bridge-many-disks.xml b/tests/qemuxml2argvdata/qemuxml2argv-pci-bridge-many-disks.xml new file mode 100644 index 000000000..1f3ad6ecb --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pci-bridge-many-disks.xml @@ -0,0 +1,551 @@ +<domain type='qemu'> + <name>lots-of-disks</name> + <uuid>04872dc1-e1de-434b-ab21-e3e80e416349</uuid> + <memory unit='KiB'>4000768</memory> + <currentMemory unit='KiB'>4000000</currentMemory> + <os> + <type arch='x86_64' machine='pc-i440fx-1.4'>hvm</type> + <loader>/usr/share/seabios/bios.bin</loader> + <boot dev='hd'/> + </os> + <features> + <acpi/> + <apic/> + <pae/> + </features> + <clock offset='utc'> + <timer name='kvmclock' present='no'/> + </clock> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>restart</on_crash> + <devices> + <emulator>/usr/bin/qemu-kvm</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/test.img'/> + <target dev='vda' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-a-a.img'/> + <target dev='vda' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-a-b.img'/> + <target dev='vdab' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-a-c.img'/> + <target dev='vdac' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-a-d.img'/> + <target dev='vdad' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-b-a.img'/> + <target dev='vdba' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-b-b.img'/> + <target dev='vdbb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-b-c.img'/> + <target dev='vdbc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-b-d.img'/> + <target dev='vdbd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-c-a.img'/> + <target dev='vdca' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-c-b.img'/> + <target dev='vdcb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-c-c.img'/> + <target dev='vdcc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-c-d.img'/> + <target dev='vdcd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-d-a.img'/> + <target dev='vdda' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-d-b.img'/> + <target dev='vddb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-d-c.img'/> + <target dev='vddc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-d-d.img'/> + <target dev='vddd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-e-a.img'/> + <target dev='vdea' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-e-b.img'/> + <target dev='vdeb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-e-c.img'/> + <target dev='vdec' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-e-d.img'/> + <target dev='vded' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-f-a.img'/> + <target dev='vdfa' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-f-b.img'/> + <target dev='vdfb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-f-c.img'/> + <target dev='vdfc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-f-d.img'/> + <target dev='vdfd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-g-a.img'/> + <target dev='vdga' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-g-b.img'/> + <target dev='vdgb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-g-c.img'/> + <target dev='vdgc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-g-d.img'/> + <target dev='vdgd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-h-a.img'/> + <target dev='vdha' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-h-b.img'/> + <target dev='vdhb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-h-c.img'/> + <target dev='vdhc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-h-d.img'/> + <target dev='vdhd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-i-a.img'/> + <target dev='vdia' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-i-b.img'/> + <target dev='vdib' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-i-c.img'/> + <target dev='vdic' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-i-d.img'/> + <target dev='vdid' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-j-a.img'/> + <target dev='vdja' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-j-b.img'/> + <target dev='vdjb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-j-c.img'/> + <target dev='vdjc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-j-d.img'/> + <target dev='vdjd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-k-a.img'/> + <target dev='vdka' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-k-b.img'/> + <target dev='vdkb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-k-c.img'/> + <target dev='vdkc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-k-d.img'/> + <target dev='vdkd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-l-a.img'/> + <target dev='vdla' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-l-b.img'/> + <target dev='vdlb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-l-c.img'/> + <target dev='vdlc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-l-d.img'/> + <target dev='vdld' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-m-a.img'/> + <target dev='vdma' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-m-b.img'/> + <target dev='vdmb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-m-c.img'/> + <target dev='vdmc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-m-d.img'/> + <target dev='vdmd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-n-a.img'/> + <target dev='vdna' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-n-b.img'/> + <target dev='vdnb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-n-c.img'/> + <target dev='vdnc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-n-d.img'/> + <target dev='vdnd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-o-a.img'/> + <target dev='vdoa' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-o-b.img'/> + <target dev='vdob' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-o-c.img'/> + <target dev='vdoc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-o-d.img'/> + <target dev='vdod' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-p-a.img'/> + <target dev='vdpa' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-p-b.img'/> + <target dev='vdpb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-p-c.img'/> + <target dev='vdpc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-p-d.img'/> + <target dev='vdpd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-q-a.img'/> + <target dev='vdqa' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-q-b.img'/> + <target dev='vdqb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-q-c.img'/> + <target dev='vdqc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-q-d.img'/> + <target dev='vdqd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-r-a.img'/> + <target dev='vdra' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-r-b.img'/> + <target dev='vdrb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-r-c.img'/> + <target dev='vdrc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-r-d.img'/> + <target dev='vdrd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-s-a.img'/> + <target dev='vdsa' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-s-b.img'/> + <target dev='vdsb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-s-c.img'/> + <target dev='vdsc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-s-d.img'/> + <target dev='vdsd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-t-a.img'/> + <target dev='vdta' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-t-b.img'/> + <target dev='vdtb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-t-c.img'/> + <target dev='vdtc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-t-d.img'/> + <target dev='vdtd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-u-a.img'/> + <target dev='vdua' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-u-b.img'/> + <target dev='vdub' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-u-c.img'/> + <target dev='vduc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-u-d.img'/> + <target dev='vdud' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-v-a.img'/> + <target dev='vdva' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-v-b.img'/> + <target dev='vdvb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-v-c.img'/> + <target dev='vdvc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-v-d.img'/> + <target dev='vdvd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-w-a.img'/> + <target dev='vdwa' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-w-b.img'/> + <target dev='vdwb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-w-c.img'/> + <target dev='vdwc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-w-d.img'/> + <target dev='vdwd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-x-a.img'/> + <target dev='vdxa' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-x-b.img'/> + <target dev='vdxb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-x-c.img'/> + <target dev='vdxc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-x-d.img'/> + <target dev='vdxd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-y-a.img'/> + <target dev='vdya' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-y-b.img'/> + <target dev='vdyb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-y-c.img'/> + <target dev='vdyc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-y-d.img'/> + <target dev='vdyd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-z-a.img'/> + <target dev='vdza' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-z-b.img'/> + <target dev='vdzb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-z-c.img'/> + <target dev='vdzc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-z-d.img'/> + <target dev='vdzd' bus='virtio'/> + </disk> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pci-bridge-negative-index-invalid.xml b/tests/qemuxml2argvdata/qemuxml2argv-pci-bridge-negative-index-invalid.xml new file mode 100644 index 000000000..be3d8f22e --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pci-bridge-negative-index-invalid.xml @@ -0,0 +1,15 @@ +<domain type='qemu'> + <name>fdr-br</name> + <memory unit='KiB'>2097152</memory> + <currentMemory unit='KiB'>2097152</currentMemory> + <vcpu placement='static' cpuset='0-1'>2</vcpu> + <os> + <type arch='x86_64' machine='pc-1.2'>hvm</type> + <boot dev='hd'/> + </os> + <devices> + <emulator>/usr/libexec/qemu-kvm</emulator> + <controller type='pci' index='0' model='pci-root'/> + <controller type='pci' index='-1' model='pci-bridge'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pci-root-address.xml b/tests/qemuxml2argvdata/qemuxml2argv-pci-root-address.xml new file mode 100644 index 000000000..7b43246d5 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pci-root-address.xml @@ -0,0 +1,16 @@ +<domain type='qemu'> + <name>fdr-br</name> + <memory unit='KiB'>2097152</memory> + <currentMemory unit='KiB'>2097152</currentMemory> + <vcpu placement='static' cpuset='0-1'>2</vcpu> + <os> + <type arch='x86_64' machine='pc-1.2'>hvm</type> + <boot dev='hd'/> + </os> + <devices> + <emulator>/usr/libexec/qemu-kvm</emulator> + <controller type='pci' index='0' model='pci-root'> + <address type='pci' domain='0' bus='0' slot='0' function='0'/> + </controller> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pci-root-nonzero-index.xml b/tests/qemuxml2argvdata/qemuxml2argv-pci-root-nonzero-index.xml new file mode 100644 index 000000000..1a21d3b63 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pci-root-nonzero-index.xml @@ -0,0 +1,14 @@ +<domain type='qemu'> + <name>fdr-br</name> + <memory unit='KiB'>2097152</memory> + <currentMemory unit='KiB'>2097152</currentMemory> + <vcpu placement='static' cpuset='0-1'>2</vcpu> + <os> + <type arch='x86_64' machine='pc-1.2'>hvm</type> + <boot dev='hd'/> + </os> + <devices> + <emulator>/usr/libexec/qemu-kvm</emulator> + <controller type='pci' index='7' model='pci-root'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-basic.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-basic.args index 745910b11..7b115ecaa 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-basic.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-basic.args @@ -1 +1,7 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu-system-ppc64 -S -M pseries -m 512 -smp 1 -nographic -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c -usb -chardev pty,id=charserial0 -device spapr-vty,chardev=charserial0,reg=0x30000000 +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ +/usr/bin/qemu-system-ppc64 -S -M pseries -m 512 -smp 1 -nographic \ +-nodefconfig -nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c -usb \ +-chardev pty,id=charserial0 \ +-device spapr-vty,chardev=charserial0,reg=0x30000000 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-multi.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-multi.args index 3cc6cc3ab..0d8c76145 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-multi.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-multi.args @@ -3,6 +3,6 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ -nographic -nodefconfig -nodefaults -chardev \ socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline -no-acpi \ --boot c -device piix3-usb-uhci,id=usb,bus=pci,addr=0x1.0x2 \ --device pci-ohci,id=usb1,bus=pci,addr=0x3 -chardev \ +-boot c -device piix3-usb-uhci,id=usb,bus=pci,addr=0x1 \ +-device pci-ohci,id=usb1,bus=pci,addr=0x2 -chardev \ pty,id=charserial0 -device spapr-vty,chardev=charserial0,reg=0x30000000 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-vio-user-assigned.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-vio-user-assigned.args index 16a4f10ff..d69526eb6 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-vio-user-assigned.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-vio-user-assigned.args @@ -1,11 +1,13 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu-system-ppc64 \ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ +/usr/bin/qemu-system-ppc64 \ -S -M pseries -m 512 -smp 1 -nographic -nodefconfig -nodefaults \ -chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c \ -device spapr-vscsi,id=scsi0,reg=0x2000 \ -device spapr-vscsi,id=scsi1,reg=0x30000000 \ -usb -drive file=/tmp/scsidisk.img,if=none,id=drive-scsi1-0-0-0 \ --device scsi-disk,bus=scsi1.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi1-0-0-0,id=scsi1-0-0-0 \ +-device scsi-disk,bus=scsi1.0,channel=0,scsi-id=0,lun=0,\ +drive=drive-scsi1-0-0-0,id=scsi1-0-0-0 \ -chardev pty,id=charserial0 \ -device spapr-vty,chardev=charserial0,reg=0x20000000 \ -chardev pty,id=charserial1 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-vio.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-vio.args index 9bbc66221..60b31c19d 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-vio.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-vio.args @@ -1,11 +1,13 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu-system-ppc64 \ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ +/usr/bin/qemu-system-ppc64 \ -S -M pseries -m 512 -smp 1 -nographic -nodefconfig -nodefaults \ -chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c \ -device spapr-vscsi,id=scsi0,reg=0x2000 \ -device spapr-vscsi,id=scsi1,reg=0x3000 \ -usb -drive file=/tmp/scsidisk.img,if=none,id=drive-scsi1-0-0-0 \ --device scsi-disk,bus=scsi1.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi1-0-0-0,id=scsi1-0-0-0 \ +-device scsi-disk,bus=scsi1.0,channel=0,scsi-id=0,lun=0,\ +drive=drive-scsi1-0-0-0,id=scsi1-0-0-0 \ -chardev pty,id=charserial0 \ -device spapr-vty,chardev=charserial0,reg=0x30000000 \ -chardev pty,id=charserial1 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-tpm-passthrough.args b/tests/qemuxml2argvdata/qemuxml2argv-tpm-passthrough.args index 1d0eb3a70..81cd95b0f 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-tpm-passthrough.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-tpm-passthrough.args @@ -1,6 +1,7 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ /usr/bin/qemu -S -M pc-0.12 -m 2048 -smp 1 -nographic -nodefaults \ -monitor unix:/tmp/test-monitor,server,nowait -boot c -usb \ --tpmdev passthrough,id=tpm-tpm0,path=/dev/tpm0,cancel-path=/sys/class/misc/tpm0/device/cancel \ +-tpmdev passthrough,id=tpm-tpm0,path=/dev/tpm0,\ +cancel-path=/sys/class/misc/tpm0/device/cancel \ -device tpm-tis,tpmdev=tpm-tpm0,id=tpm0 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller.args b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller.args index ff7a0809b..167f95099 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller.args @@ -1 +1,5 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c -usb -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \ +-M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c -usb \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-hub.args b/tests/qemuxml2argvdata/qemuxml2argv-usb-hub.args index 32c4c0eba..4252eed01 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-usb-hub.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-hub.args @@ -1 +1,6 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c -usb -device usb-hub,id=hub0,bus=usb.0,port=1 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \ +-M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c -usb \ +-device usb-hub,id=hub0,bus=usb.0,port=1 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-ports.args b/tests/qemuxml2argvdata/qemuxml2argv-usb-ports.args index 9c6589032..bde0ae122 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-usb-ports.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-ports.args @@ -1 +1,10 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c -usb -device usb-hub,id=hub0,bus=usb.0,port=1 -device usb-hub,id=hub1,bus=usb.0,port=1.2 -device usb-mouse,id=input0,bus=usb.0,port=1.1 -device usb-mouse,id=input1,bus=usb.0,port=1.2.1 -device usb-mouse,id=input2,bus=usb.0,port=1.2.2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \ +-M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c -usb \ +-device usb-hub,id=hub0,bus=usb.0,port=1 \ +-device usb-hub,id=hub1,bus=usb.0,port=1.2 \ +-device usb-mouse,id=input0,bus=usb.0,port=1.1 \ +-device usb-mouse,id=input1,bus=usb.0,port=1.2.1 \ +-device usb-mouse,id=input2,bus=usb.0,port=1.2.2 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-redir-filter.args b/tests/qemuxml2argvdata/qemuxml2argv-usb-redir-filter.args index 1141f7e24..05bb6ef3a 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-usb-redir-filter.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-redir-filter.args @@ -1,10 +1,16 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c \ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \ +-M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c \ -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x4.0x7 \ --device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x4 \ +-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,\ +multifunction=on,addr=0x4 \ -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x4.0x1 \ -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x4.0x2 \ -chardev spicevmc,id=charredir0,name=usbredir \ --device 'usb-redir,chardev=charredir0,id=redir0,filter=0x08:0x15E1:0x2007:0x0110:1|-1:-1:-1:-1:0,bus=usb.0,port=4' \ +-device 'usb-redir,chardev=charredir0,id=redir0,\ +filter=0x08:0x15E1:0x2007:0x0110:1|-1:-1:-1:-1:0,bus=usb.0,port=4' \ -chardev spicevmc,id=charredir1,name=usbredir \ --device 'usb-redir,chardev=charredir1,id=redir1,filter=0x08:0x15E1:0x2007:0x0110:1|-1:-1:-1:-1:0,bus=usb.0,port=5' \ +-device 'usb-redir,chardev=charredir1,id=redir1,\ +filter=0x08:0x15E1:0x2007:0x0110:1|-1:-1:-1:-1:0,bus=usb.0,port=5' \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-redir.args b/tests/qemuxml2argvdata/qemuxml2argv-usb-redir.args index 7d34c2a07..81d85ba11 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-usb-redir.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-redir.args @@ -1,6 +1,10 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c \ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \ +-M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c \ -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x4.0x7 \ --device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x4 \ +-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,\ +multifunction=on,addr=0x4 \ -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x4.0x1 \ -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x4.0x2 \ -chardev socket,id=charredir0,host=localhost,port=4000 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.args b/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.args index 67b50e3e3..ea743e441 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.args @@ -3,9 +3,11 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ -monitor unix:/tmp/test-monitor,server,nowait -no-acpi \ -boot dc -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \ -usb -drive file=/dev/sdfake,if=none,id=drive-virtio-disk0 \ --device virtio-blk-pci,scsi=on,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 \ +-device virtio-blk-pci,scsi=on,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\ +id=virtio-disk0 \ -drive file=/dev/sdfake2,if=none,id=drive-virtio-disk1 \ --device virtio-blk-pci,scsi=on,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1 \ +-device virtio-blk-pci,scsi=on,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,\ +id=virtio-disk1 \ -device virtio-net-pci,vlan=0,id=net0,mac=52:54:00:e5:48:58,bus=pci.0,addr=0x3 \ -net user,vlan=0,name=hostnet0 -serial pty \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args index bf88b2c8b..d2ac074dc 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args @@ -4,7 +4,8 @@ socket,id=charmonitor,path=/tmp/test-monitor,server,nowait -mon \ chardev=charmonitor,id=monitor,mode=readline -no-acpi \ -device virtio-serial-ccw,id=virtio-serial0,devno=fe.0.0001 \ -drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 \ --device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ +-device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,\ +id=virtio-disk0,bootindex=1 \ -chardev pty,id=charconsole0 \ -device virtconsole,chardev=charconsole0,id=console0 \ -device virtio-balloon-ccw,id=balloon0,devno=fe.0.000a \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-egd.args b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-egd.args index d40f0b52b..8a590117d 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-egd.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-egd.args @@ -1 +1,7 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefaults -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -chardev socket,id=charrng0,host=1.2.3.4,port=1234 -object rng-egd,chardev=charrng0,id=rng0 -device virtio-rng-pci,rng=rng0,bus=pci.0,addr=0x4 +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \ +-M pc -m 214 -smp 1 -nographic -nodefaults \ +-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ +-chardev socket,id=charrng0,host=1.2.3.4,port=1234 \ +-object rng-egd,chardev=charrng0,id=rng0 \ +-device virtio-rng-pci,rng=rng0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 2c7fd01e2..b7485fc99 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -438,6 +438,7 @@ mymain(void) DO_TEST("kvmclock+eoi-disabled", QEMU_CAPS_ENABLE_KVM); DO_TEST("hyperv", NONE); + DO_TEST("hyperv-off", NONE); DO_TEST("hugepages", QEMU_CAPS_MEM_PATH); DO_TEST("nosharepages", QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_MEM_MERGE); @@ -836,6 +837,7 @@ mymain(void) DO_TEST("balloon-device", QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG); DO_TEST("balloon-device-auto", QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG); + DO_TEST("balloon-device-period", QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG); DO_TEST("sound", NONE); DO_TEST("sound-device", QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, @@ -990,6 +992,8 @@ mymain(void) DO_TEST("pci-autoadd-addr", QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE); DO_TEST("pci-autoadd-idx", QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE); + DO_TEST("pci-bridge-many-disks", + QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE_PCI_BRIDGE); DO_TEST("hostdev-scsi-lsi", QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE, @@ -1014,6 +1018,15 @@ mymain(void) DO_TEST("mlock-off", QEMU_CAPS_MLOCK); DO_TEST("mlock-unsupported", NONE); + DO_TEST_PARSE_ERROR("pci-bridge-negative-index-invalid", + QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE); + DO_TEST_PARSE_ERROR("pci-bridge-duplicate-index", + QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE); + DO_TEST_PARSE_ERROR("pci-root-nonzero-index", + QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE); + DO_TEST_PARSE_ERROR("pci-root-address", + QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE); + virObjectUnref(driver.config); virObjectUnref(driver.caps); virObjectUnref(driver.xmlopt); diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-bridge-many-disks.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-bridge-many-disks.xml new file mode 100644 index 000000000..d469b8b56 --- /dev/null +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-bridge-many-disks.xml @@ -0,0 +1,554 @@ +<domain type='qemu'> + <name>lots-of-disks</name> + <uuid>04872dc1-e1de-434b-ab21-e3e80e416349</uuid> + <memory unit='KiB'>4000768</memory> + <currentMemory unit='KiB'>4000000</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc-i440fx-1.4'>hvm</type> + <loader>/usr/share/seabios/bios.bin</loader> + <boot dev='hd'/> + </os> + <features> + <acpi/> + <apic/> + <pae/> + </features> + <clock offset='utc'> + <timer name='kvmclock' present='no'/> + </clock> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>restart</on_crash> + <devices> + <emulator>/usr/bin/qemu-kvm</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/test.img'/> + <target dev='vda' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-a-a.img'/> + <target dev='vda' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-a-b.img'/> + <target dev='vdab' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-a-c.img'/> + <target dev='vdac' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-a-d.img'/> + <target dev='vdad' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-b-a.img'/> + <target dev='vdba' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-b-b.img'/> + <target dev='vdbb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-b-c.img'/> + <target dev='vdbc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-b-d.img'/> + <target dev='vdbd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-c-a.img'/> + <target dev='vdca' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-c-b.img'/> + <target dev='vdcb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-c-c.img'/> + <target dev='vdcc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-c-d.img'/> + <target dev='vdcd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-d-a.img'/> + <target dev='vdda' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-d-b.img'/> + <target dev='vddb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-d-c.img'/> + <target dev='vddc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-d-d.img'/> + <target dev='vddd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-e-a.img'/> + <target dev='vdea' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-e-b.img'/> + <target dev='vdeb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-e-c.img'/> + <target dev='vdec' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-e-d.img'/> + <target dev='vded' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-f-a.img'/> + <target dev='vdfa' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-f-b.img'/> + <target dev='vdfb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-f-c.img'/> + <target dev='vdfc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-f-d.img'/> + <target dev='vdfd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-g-a.img'/> + <target dev='vdga' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-g-b.img'/> + <target dev='vdgb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-g-c.img'/> + <target dev='vdgc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-g-d.img'/> + <target dev='vdgd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-h-a.img'/> + <target dev='vdha' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-h-b.img'/> + <target dev='vdhb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-h-c.img'/> + <target dev='vdhc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-h-d.img'/> + <target dev='vdhd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-i-a.img'/> + <target dev='vdia' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-i-b.img'/> + <target dev='vdib' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-i-c.img'/> + <target dev='vdic' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-i-d.img'/> + <target dev='vdid' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-j-a.img'/> + <target dev='vdja' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-j-b.img'/> + <target dev='vdjb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-j-c.img'/> + <target dev='vdjc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-j-d.img'/> + <target dev='vdjd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-k-a.img'/> + <target dev='vdka' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-k-b.img'/> + <target dev='vdkb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-k-c.img'/> + <target dev='vdkc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-k-d.img'/> + <target dev='vdkd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-l-a.img'/> + <target dev='vdla' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-l-b.img'/> + <target dev='vdlb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-l-c.img'/> + <target dev='vdlc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-l-d.img'/> + <target dev='vdld' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-m-a.img'/> + <target dev='vdma' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-m-b.img'/> + <target dev='vdmb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-m-c.img'/> + <target dev='vdmc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-m-d.img'/> + <target dev='vdmd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-n-a.img'/> + <target dev='vdna' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-n-b.img'/> + <target dev='vdnb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-n-c.img'/> + <target dev='vdnc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-n-d.img'/> + <target dev='vdnd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-o-a.img'/> + <target dev='vdoa' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-o-b.img'/> + <target dev='vdob' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-o-c.img'/> + <target dev='vdoc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-o-d.img'/> + <target dev='vdod' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-p-a.img'/> + <target dev='vdpa' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-p-b.img'/> + <target dev='vdpb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-p-c.img'/> + <target dev='vdpc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-p-d.img'/> + <target dev='vdpd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-q-a.img'/> + <target dev='vdqa' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-q-b.img'/> + <target dev='vdqb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-q-c.img'/> + <target dev='vdqc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-q-d.img'/> + <target dev='vdqd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-r-a.img'/> + <target dev='vdra' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-r-b.img'/> + <target dev='vdrb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-r-c.img'/> + <target dev='vdrc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-r-d.img'/> + <target dev='vdrd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-s-a.img'/> + <target dev='vdsa' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-s-b.img'/> + <target dev='vdsb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-s-c.img'/> + <target dev='vdsc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-s-d.img'/> + <target dev='vdsd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-t-a.img'/> + <target dev='vdta' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-t-b.img'/> + <target dev='vdtb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-t-c.img'/> + <target dev='vdtc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-t-d.img'/> + <target dev='vdtd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-u-a.img'/> + <target dev='vdua' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-u-b.img'/> + <target dev='vdub' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-u-c.img'/> + <target dev='vduc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-u-d.img'/> + <target dev='vdud' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-v-a.img'/> + <target dev='vdva' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-v-b.img'/> + <target dev='vdvb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-v-c.img'/> + <target dev='vdvc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-v-d.img'/> + <target dev='vdvd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-w-a.img'/> + <target dev='vdwa' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-w-b.img'/> + <target dev='vdwb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-w-c.img'/> + <target dev='vdwc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-w-d.img'/> + <target dev='vdwd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-x-a.img'/> + <target dev='vdxa' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-x-b.img'/> + <target dev='vdxb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-x-c.img'/> + <target dev='vdxc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-x-d.img'/> + <target dev='vdxd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-y-a.img'/> + <target dev='vdya' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-y-b.img'/> + <target dev='vdyb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-y-c.img'/> + <target dev='vdyc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-y-d.img'/> + <target dev='vdyd' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-z-a.img'/> + <target dev='vdza' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-z-b.img'/> + <target dev='vdzb' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-z-c.img'/> + <target dev='vdzc' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/var/lib/libvirt/images/disk-z-d.img'/> + <target dev='vdzd' bus='virtio'/> + </disk> + <controller type='usb' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 65e959114..66be40e64 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -18,6 +18,8 @@ # include "testutilsqemu.h" # include "virstring.h" +# define VIR_FROM_THIS VIR_FROM_NONE + static virQEMUDriver driver; static int @@ -156,6 +158,7 @@ mymain(void) DO_TEST("eoi-enabled"); DO_TEST("hyperv"); + DO_TEST("hyperv-off"); DO_TEST("hugepages"); DO_TEST("nosharepages"); @@ -261,6 +264,7 @@ mymain(void) DO_TEST("disk-scsi-disk-vpd"); DO_TEST("disk-source-pool"); + DO_TEST("disk-source-pool-mode"); DO_TEST("disk-drive-discard"); @@ -287,6 +291,7 @@ mymain(void) DO_TEST("tpm-passthrough"); DO_TEST("pci-bridge"); + DO_TEST_DIFFERENT("pci-bridge-many-disks"); DO_TEST_DIFFERENT("pci-autoadd-addr"); DO_TEST_DIFFERENT("pci-autoadd-idx"); diff --git a/tests/securityselinuxlabeltest.c b/tests/securityselinuxlabeltest.c index 5ae4f57b7..efe825a50 100644 --- a/tests/securityselinuxlabeltest.c +++ b/tests/securityselinuxlabeltest.c @@ -61,10 +61,8 @@ testSELinuxMungePath(char **path) char *tmp; if (virAsprintf(&tmp, "%s/securityselinuxlabeldata%s", - abs_builddir, *path) < 0) { - virReportOOMError(); + abs_builddir, *path) < 0) return -1; - } VIR_FREE(*path); *path = tmp; @@ -79,59 +77,58 @@ testSELinuxLoadFileList(const char *testname, int ret = -1; char *path = NULL; FILE *fp = NULL; + char *line = NULL; *files = NULL; *nfiles = 0; if (virAsprintf(&path, "%s/securityselinuxlabeldata/%s.txt", - abs_srcdir, testname) < 0) { - virReportOOMError(); + abs_srcdir, testname) < 0) goto cleanup; - } if (!(fp = fopen(path, "r"))) { goto cleanup; } + if (VIR_ALLOC_N(line, 1024) < 0) + goto cleanup; + while (!feof(fp)) { - char *line; - char *file, *context; - if (VIR_ALLOC_N(line, 1024) < 0) { - virReportOOMError(); - goto cleanup; - } + char *file, *context, *tmp; if (!fgets(line, 1024, fp)) { if (!feof(fp)) goto cleanup; break; } - char *tmp = strchr(line, ';'); + tmp = strchr(line, ';'); + if (!tmp) { + virReportError(VIR_ERR_INTERNAL_ERROR, + "unexpected format for line '%s'", + line); + goto cleanup; + } *tmp = '\0'; tmp++; - if (virAsprintf(&file, "%s/securityselinuxlabeldata%s", abs_builddir, line) < 0) { - VIR_FREE(line); - virReportOOMError(); + if (virAsprintf(&file, "%s/securityselinuxlabeldata%s", + abs_builddir, line) < 0) goto cleanup; - } if (*tmp != '\0' && *tmp != '\n') { if (VIR_STRDUP(context, tmp) < 0) { - VIR_FREE(line); VIR_FREE(file); goto cleanup; } tmp = strchr(context, '\n'); - *tmp = '\0'; + if (tmp) + *tmp = '\0'; } else { context = NULL; } - if (VIR_EXPAND_N(*files, *nfiles, 1) < 0) { - virReportOOMError(); + if (VIR_EXPAND_N(*files, *nfiles, 1) < 0) goto cleanup; - } (*files)[(*nfiles)-1].file = file; (*files)[(*nfiles)-1].context = context; @@ -142,6 +139,7 @@ testSELinuxLoadFileList(const char *testname, cleanup: VIR_FORCE_FCLOSE(fp); VIR_FREE(path); + VIR_FREE(line); return ret; } @@ -155,10 +153,8 @@ testSELinuxLoadDef(const char *testname) size_t i; if (virAsprintf(&xmlfile, "%s/securityselinuxlabeldata/%s.xml", - abs_srcdir, testname) < 0) { - virReportOOMError(); + abs_srcdir, testname) < 0) goto cleanup; - } if (virFileReadAll(xmlfile, 1024*1024, &xmlstr) < 0) { goto cleanup; diff --git a/tests/securityselinuxtest.c b/tests/securityselinuxtest.c index 8d85c6870..e2806c168 100644 --- a/tests/securityselinuxtest.c +++ b/tests/securityselinuxtest.c @@ -69,13 +69,13 @@ testBuildDomainDef(bool dynamic, virSecurityLabelDefPtr secdef; if (VIR_ALLOC(def) < 0) - goto no_memory; + goto error; if (VIR_ALLOC_N(def->seclabels, 1) < 0) - goto no_memory; + goto error; if (VIR_ALLOC(secdef) < 0) - goto no_memory; + goto error; def->virtType = VIR_DOMAIN_VIRT_KVM; def->seclabels[0] = secdef; @@ -91,8 +91,6 @@ testBuildDomainDef(bool dynamic, return def; -no_memory: - virReportOOMError(); error: virDomainDefFree(def); return NULL; diff --git a/tests/sexpr2xmltest.c b/tests/sexpr2xmltest.c index f4d119e3b..eafefda0c 100644 --- a/tests/sexpr2xmltest.c +++ b/tests/sexpr2xmltest.c @@ -14,6 +14,8 @@ #include "testutilsxen.h" #include "virstring.h" +#define VIR_FROM_THIS VIR_FROM_NONE + static virCapsPtr caps; static int diff --git a/tests/shunloadtest.c b/tests/shunloadtest.c index 8190e97a7..499b1be5d 100644 --- a/tests/shunloadtest.c +++ b/tests/shunloadtest.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Red Hat, Inc. + * Copyright (C) 2011, 2013 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -40,6 +40,7 @@ #include <config.h> +#define NO_LIBVIRT /* This file intentionally does not link to libvirt */ #include "testutils.h" #ifdef linux diff --git a/tests/ssh.c b/tests/ssh.c index 56b2e9b6c..31bd390db 100644 --- a/tests/ssh.c +++ b/tests/ssh.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Red Hat, Inc. + * Copyright (C) 2011, 2013 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,13 +22,14 @@ #include <stdio.h> #include "internal.h" +#define NO_LIBVIRT /* This file intentionally does not link to libvirt */ #include "testutils.h" #ifndef WIN32 int main(int argc, char **argv) { - int i; + size_t i; bool failConnect = false; /* Exit -1, with no data on stdout, msg on stderr */ bool dieEarly = false; /* Exit -1, with partial data on stdout, msg on stderr */ diff --git a/tests/storagepoolxml2xmlin/pool-iscsi-auth.xml b/tests/storagepoolxml2xmlin/pool-iscsi-auth.xml index f7d4d52aa..c81eb6094 100644 --- a/tests/storagepoolxml2xmlin/pool-iscsi-auth.xml +++ b/tests/storagepoolxml2xmlin/pool-iscsi-auth.xml @@ -4,7 +4,9 @@ <source> <host name="iscsi.example.com"/> <device path="demo-target"/> - <auth type='chap' login='foobar' passwd='frobbar'/> + <auth type='chap' username='admin'> + <secret uuid='2ec115d7-3a88-3ceb-bc12-0ac909a6fd87'/> + </auth> </source> <target> <path>/dev/disk/by-path</path> diff --git a/tests/storagepoolxml2xmlin/pool-iscsi-vendor-product.xml b/tests/storagepoolxml2xmlin/pool-iscsi-vendor-product.xml index 01fbd9b7c..821feb1c6 100644 --- a/tests/storagepoolxml2xmlin/pool-iscsi-vendor-product.xml +++ b/tests/storagepoolxml2xmlin/pool-iscsi-vendor-product.xml @@ -4,7 +4,9 @@ <source> <host name="iscsi.example.com"/> <device path="demo-target"/> - <auth type='chap' login='foobar' passwd='frobbar'/> + <auth type='chap' username='admin'> + <secret uuid='2ec115d7-3a88-3ceb-bc12-0ac909a6fd87'/> + </auth> <vendor name='test-vendor'/> <product name='test-product'/> </source> diff --git a/tests/storagepoolxml2xmlin/pool-logical-create.xml b/tests/storagepoolxml2xmlin/pool-logical-create.xml index 4c670899d..fd551e016 100644 --- a/tests/storagepoolxml2xmlin/pool-logical-create.xml +++ b/tests/storagepoolxml2xmlin/pool-logical-create.xml @@ -10,7 +10,7 @@ <device path="/dev/sdb3"/> </source> <target> - <path>/dev/HostVG</path> + <path>/invalid/nonexistent/path</path> <permissions> <mode>0700</mode> <owner>0</owner> diff --git a/tests/storagepoolxml2xmlin/pool-logical-nopath.xml b/tests/storagepoolxml2xmlin/pool-logical-nopath.xml new file mode 100644 index 000000000..e1bb4db48 --- /dev/null +++ b/tests/storagepoolxml2xmlin/pool-logical-nopath.xml @@ -0,0 +1,19 @@ +<pool type='logical'> + <name>HostVG</name> + <uuid>1c13165a-d0f4-3aee-b447-30fb38789091</uuid> + <capacity>99891544064</capacity> + <allocation>99220455424</allocation> + <available>671088640</available> + <source> + <device path="/dev/sdb1"/> + <device path="/dev/sdb2"/> + <device path="/dev/sdb3"/> + </source> + <target> + <permissions> + <mode>0700</mode> + <owner>0</owner> + <group>0</group> + </permissions> + </target> +</pool> diff --git a/tests/storagepoolxml2xmlout/pool-iscsi-auth.xml b/tests/storagepoolxml2xmlout/pool-iscsi-auth.xml index 4fa8f6493..3d84c1c10 100644 --- a/tests/storagepoolxml2xmlout/pool-iscsi-auth.xml +++ b/tests/storagepoolxml2xmlout/pool-iscsi-auth.xml @@ -7,7 +7,9 @@ <source> <host name='iscsi.example.com'/> <device path='demo-target'/> - <auth type='chap' login='foobar' passwd='frobbar'/> + <auth type='chap' username='admin'> + <secret uuid='2ec115d7-3a88-3ceb-bc12-0ac909a6fd87'/> + </auth> </source> <target> <path>/dev/disk/by-path</path> diff --git a/tests/storagepoolxml2xmlout/pool-iscsi-vendor-product.xml b/tests/storagepoolxml2xmlout/pool-iscsi-vendor-product.xml index 6ae1c393d..4fb19bb70 100644 --- a/tests/storagepoolxml2xmlout/pool-iscsi-vendor-product.xml +++ b/tests/storagepoolxml2xmlout/pool-iscsi-vendor-product.xml @@ -7,7 +7,9 @@ <source> <host name='iscsi.example.com'/> <device path='demo-target'/> - <auth type='chap' login='foobar' passwd='frobbar'/> + <auth type='chap' username='admin'> + <secret uuid='2ec115d7-3a88-3ceb-bc12-0ac909a6fd87'/> + </auth> <vendor name='test-vendor'/> <product name='test-product'/> </source> diff --git a/tests/storagepoolxml2xmlout/pool-logical-nopath.xml b/tests/storagepoolxml2xmlout/pool-logical-nopath.xml new file mode 100644 index 000000000..7413f1cfe --- /dev/null +++ b/tests/storagepoolxml2xmlout/pool-logical-nopath.xml @@ -0,0 +1,22 @@ +<pool type='logical'> + <name>HostVG</name> + <uuid>1c13165a-d0f4-3aee-b447-30fb38789091</uuid> + <capacity unit='bytes'>0</capacity> + <allocation unit='bytes'>0</allocation> + <available unit='bytes'>0</available> + <source> + <device path='/dev/sdb1'/> + <device path='/dev/sdb2'/> + <device path='/dev/sdb3'/> + <name>HostVG</name> + <format type='lvm2'/> + </source> + <target> + <path>/dev/HostVG</path> + <permissions> + <mode>0700</mode> + <owner>0</owner> + <group>0</group> + </permissions> + </target> +</pool> diff --git a/tests/storagepoolxml2xmlout/pool-rbd.xml b/tests/storagepoolxml2xmlout/pool-rbd.xml index 309a6d907..4fe2fce76 100644 --- a/tests/storagepoolxml2xmlout/pool-rbd.xml +++ b/tests/storagepoolxml2xmlout/pool-rbd.xml @@ -8,7 +8,7 @@ <name>rbd</name> <host name='localhost' port='6789'/> <host name='localhost' port='6790'/> - <auth username='admin' type='ceph'> + <auth type='ceph' username='admin'> <secret uuid='2ec115d7-3a88-3ceb-bc12-0ac909a6fd87'/> </auth> </source> diff --git a/tests/storagepoolxml2xmltest.c b/tests/storagepoolxml2xmltest.c index 0376e63b5..d59cff974 100644 --- a/tests/storagepoolxml2xmltest.c +++ b/tests/storagepoolxml2xmltest.c @@ -14,6 +14,8 @@ #include "testutilsqemu.h" #include "virstring.h" +#define VIR_FROM_THIS VIR_FROM_NONE + static int testCompareXMLToXMLFiles(const char *inxml, const char *outxml) { @@ -85,6 +87,7 @@ mymain(void) DO_TEST("pool-dir"); DO_TEST("pool-fs"); DO_TEST("pool-logical"); + DO_TEST("pool-logical-nopath"); DO_TEST("pool-logical-create"); DO_TEST("pool-disk"); DO_TEST("pool-iscsi"); diff --git a/tests/storagevolxml2argvdata/logical-from-qcow2.argv b/tests/storagevolxml2argvdata/logical-from-qcow2.argv new file mode 100644 index 000000000..7beded847 --- /dev/null +++ b/tests/storagevolxml2argvdata/logical-from-qcow2.argv @@ -0,0 +1,2 @@ +qemu-img convert -f qcow2 -O raw /var/lib/libvirt/images/OtherDemo.img \ +/dev/HostVG/Swap diff --git a/tests/storagevolxml2argvdata/pool-dir.xml b/tests/storagevolxml2argvdata/pool-dir.xml deleted file mode 100644 index e10ccb7ca..000000000 --- a/tests/storagevolxml2argvdata/pool-dir.xml +++ /dev/null @@ -1,18 +0,0 @@ -<pool type='dir'> - <name>virtimages</name> - <uuid>70a7eb15-6c34-ee9c-bf57-69e8e5ff3fb2</uuid> - <capacity>0</capacity> - <allocation>0</allocation> - <available>0</available> - <source> - </source> - <target> - <path>///var/////lib/libvirt/images//</path> - <permissions> - <mode>0700</mode> - <owner>-1</owner> - <group>-1</group> - <label>some_label_t</label> - </permissions> - </target> -</pool> diff --git a/tests/storagevolxml2argvdata/qcow2-1.1.argv b/tests/storagevolxml2argvdata/qcow2-1.1.argv index 797499f47..c4dcb1bc3 100644 --- a/tests/storagevolxml2argvdata/qcow2-1.1.argv +++ b/tests/storagevolxml2argvdata/qcow2-1.1.argv @@ -1 +1,3 @@ -qemu-img create -f qcow2 -b /dev/null -o backing_fmt=raw,encryption=on,compat=1.1 /var/lib/libvirt/images/OtherDemo.img 5242880K +qemu-img create -f qcow2 -b /dev/null \ +-o backing_fmt=raw,encryption=on,compat=1.1 \ +/var/lib/libvirt/images/OtherDemo.img 5242880K diff --git a/tests/storagevolxml2argvdata/qcow2-flag.argv b/tests/storagevolxml2argvdata/qcow2-flag.argv index 2be10a29e..5f87ad56d 100644 --- a/tests/storagevolxml2argvdata/qcow2-flag.argv +++ b/tests/storagevolxml2argvdata/qcow2-flag.argv @@ -1 +1,2 @@ -qemu-img create -f qcow2 -b /dev/null -F raw -e /var/lib/libvirt/images/OtherDemo.img 5242880K +qemu-img create -f qcow2 -b /dev/null -F raw \ +-e /var/lib/libvirt/images/OtherDemo.img 5242880K diff --git a/tests/storagevolxml2argvdata/qcow2-from-logical.argv b/tests/storagevolxml2argvdata/qcow2-from-logical.argv new file mode 100644 index 000000000..6a7581564 --- /dev/null +++ b/tests/storagevolxml2argvdata/qcow2-from-logical.argv @@ -0,0 +1,2 @@ +qemu-img convert -f raw -O qcow2 -o encryption=on /dev/HostVG/Swap \ +/var/lib/libvirt/images/OtherDemo.img diff --git a/tests/storagevolxml2argvdata/qcow2-lazy.argv b/tests/storagevolxml2argvdata/qcow2-lazy.argv index 9160d473b..b7058b84c 100644 --- a/tests/storagevolxml2argvdata/qcow2-lazy.argv +++ b/tests/storagevolxml2argvdata/qcow2-lazy.argv @@ -1 +1,3 @@ -qemu-img create -f qcow2 -b /dev/null -o backing_fmt=raw,encryption=on,compat=1.1,lazy_refcounts /var/lib/libvirt/images/OtherDemo.img 5242880K +qemu-img create -f qcow2 -b /dev/null \ +-o backing_fmt=raw,encryption=on,compat=1.1,lazy_refcounts \ +/var/lib/libvirt/images/OtherDemo.img 5242880K diff --git a/tests/storagevolxml2argvdata/qcow2-nobacking-convert-flag.argv b/tests/storagevolxml2argvdata/qcow2-nobacking-convert-flag.argv index 7add158f8..57bdd4aff 100644 --- a/tests/storagevolxml2argvdata/qcow2-nobacking-convert-flag.argv +++ b/tests/storagevolxml2argvdata/qcow2-nobacking-convert-flag.argv @@ -1 +1,2 @@ -qemu-img convert -f raw -O qcow2 -e /var/lib/libvirt/images/sparse.img /var/lib/libvirt/images/OtherDemo.img +qemu-img convert -f raw -O qcow2 -e /var/lib/libvirt/images/sparse.img \ +/var/lib/libvirt/images/OtherDemo.img diff --git a/tests/storagevolxml2argvdata/qcow2-nobacking-convert-none.argv b/tests/storagevolxml2argvdata/qcow2-nobacking-convert-none.argv index 7add158f8..57bdd4aff 100644 --- a/tests/storagevolxml2argvdata/qcow2-nobacking-convert-none.argv +++ b/tests/storagevolxml2argvdata/qcow2-nobacking-convert-none.argv @@ -1 +1,2 @@ -qemu-img convert -f raw -O qcow2 -e /var/lib/libvirt/images/sparse.img /var/lib/libvirt/images/OtherDemo.img +qemu-img convert -f raw -O qcow2 -e /var/lib/libvirt/images/sparse.img \ +/var/lib/libvirt/images/OtherDemo.img diff --git a/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc.argv b/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc.argv index 037e9f670..a49285f89 100644 --- a/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc.argv +++ b/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc.argv @@ -1 +1,2 @@ -qemu-img convert -f raw -O qcow2 -o encryption=on,preallocation=metadata /var/lib/libvirt/images/sparse.img /var/lib/libvirt/images/OtherDemo.img +qemu-img convert -f raw -O qcow2 -o encryption=on,preallocation=metadata \ +/var/lib/libvirt/images/sparse.img /var/lib/libvirt/images/OtherDemo.img diff --git a/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc.argv b/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc.argv index ebeabc894..c74258882 100644 --- a/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc.argv +++ b/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc.argv @@ -1 +1,2 @@ -qemu-img create -f qcow2 -o encryption=on,preallocation=metadata /var/lib/libvirt/images/OtherDemo.img 5242880K +qemu-img create -f qcow2 -o encryption=on,preallocation=metadata \ +/var/lib/libvirt/images/OtherDemo.img 5242880K diff --git a/tests/storagevolxml2argvdata/qcow2.argv b/tests/storagevolxml2argvdata/qcow2.argv index d6f4cb68a..6ca9a45f0 100644 --- a/tests/storagevolxml2argvdata/qcow2.argv +++ b/tests/storagevolxml2argvdata/qcow2.argv @@ -1 +1,2 @@ -qemu-img create -f qcow2 -b /dev/null -o backing_fmt=raw,encryption=on /var/lib/libvirt/images/OtherDemo.img 5242880K +qemu-img create -f qcow2 -b /dev/null -o backing_fmt=raw,encryption=on \ +/var/lib/libvirt/images/OtherDemo.img 5242880K diff --git a/tests/storagevolxml2argvdata/vol-file.xml b/tests/storagevolxml2argvdata/vol-file.xml deleted file mode 100644 index d3f65f654..000000000 --- a/tests/storagevolxml2argvdata/vol-file.xml +++ /dev/null @@ -1,20 +0,0 @@ -<volume> - <name>sparse.img</name> - <source/> - <capacity unit="TiB">1</capacity> - <allocation unit="bytes">0</allocation> - <target> - <path>/var/lib/libvirt/images/sparse.img</path> - <permissions> - <mode>0</mode> - <owner>0744</owner> - <group>0</group> - <label>virt_image_t</label> - </permissions> - <timestamps> - <atime>1341933637.273190990</atime> - <mtime>1341930622.047245868</mtime> - <ctime>1341930622.047245868</ctime> - </timestamps> - </target> -</volume> diff --git a/tests/storagevolxml2argvdata/vol-qcow2-1.1.xml b/tests/storagevolxml2argvdata/vol-qcow2-1.1.xml deleted file mode 100644 index 696e1e075..000000000 --- a/tests/storagevolxml2argvdata/vol-qcow2-1.1.xml +++ /dev/null @@ -1,32 +0,0 @@ -<volume> - <name>OtherDemo.img</name> - <key>/var/lib/libvirt/images/OtherDemo.img</key> - <source> - </source> - <capacity unit="G">5</capacity> - <allocation>294912</allocation> - <target> - <path>/var/lib/libvirt/images/OtherDemo.img</path> - <format type='qcow2'/> - <permissions> - <mode>0644</mode> - <owner>0</owner> - <group>0</group> - <label>unconfined_u:object_r:virt_image_t:s0</label> - </permissions> - <encryption format='qcow'> - <secret type='passphrase' uuid='e78d4b51-a2af-485f-b0f5-afca709a80f4'/> - </encryption> - <features/> - </target> - <backingStore> - <path>/dev/null</path> - <format type='raw'/> - <permissions> - <mode>0644</mode> - <owner>0</owner> - <group>0</group> - <label>unconfined_u:object_r:virt_image_t:s0</label> - </permissions> - </backingStore> -</volume> diff --git a/tests/storagevolxml2argvtest.c b/tests/storagevolxml2argvtest.c index 6a6c8e3e1..b1cf09f1d 100644 --- a/tests/storagevolxml2argvtest.c +++ b/tests/storagevolxml2argvtest.c @@ -7,12 +7,36 @@ #include "testutilsqemu.h" #include "virstring.h" +#define VIR_FROM_THIS VIR_FROM_NONE + const char create_tool[] = "qemu-img"; +/* createVol sets this on volume creation */ +static void +testSetVolumeType(virStorageVolDefPtr vol, + virStoragePoolDefPtr pool) +{ + if (!vol || !pool) + return; + + switch (pool->type) { + case VIR_STORAGE_POOL_DIR: + case VIR_STORAGE_POOL_FS: + case VIR_STORAGE_POOL_NETFS: + vol->type = VIR_STORAGE_VOL_FILE; + return; + + case VIR_STORAGE_POOL_LOGICAL: + vol->type = VIR_STORAGE_VOL_BLOCK; + return; + } +} + static int testCompareXMLToArgvFiles(bool shouldFail, const char *poolxml, const char *volxml, + const char *inputpoolxml, const char *inputvolxml, const char *cmdline, unsigned int flags, @@ -20,6 +44,7 @@ testCompareXMLToArgvFiles(bool shouldFail, { char *volXmlData = NULL; char *poolXmlData = NULL; + char *inputpoolXmlData = NULL; char *inputvolXmlData = NULL; char *expectedCmdline = NULL; char *actualCmdline = NULL; @@ -32,6 +57,7 @@ testCompareXMLToArgvFiles(bool shouldFail, virStorageVolDefPtr vol = NULL, inputvol = NULL; virStoragePoolDefPtr pool = NULL; + virStoragePoolDefPtr inputpool = NULL; virStoragePoolObj poolobj = {.def = NULL }; @@ -51,13 +77,23 @@ testCompareXMLToArgvFiles(bool shouldFail, poolobj.def = pool; + if (inputpoolxml) { + if (virtTestLoadFile(inputpoolxml, &inputpoolXmlData) < 0) + goto cleanup; + if (!(inputpool = virStoragePoolDefParseString(inputpoolXmlData))) + goto cleanup; + } + if (!(vol = virStorageVolDefParseString(pool, volXmlData))) goto cleanup; if (inputvolxml && - !(inputvol = virStorageVolDefParseString(pool, inputvolXmlData))) + !(inputvol = virStorageVolDefParseString(inputpool, inputvolXmlData))) goto cleanup; + testSetVolumeType(vol, pool); + testSetVolumeType(inputvol, inputpool); + cmd = virStorageBackendCreateQemuImgCmd(conn, &poolobj, vol, inputvol, flags, create_tool, imgformat); if (!cmd) { @@ -86,11 +122,13 @@ testCompareXMLToArgvFiles(bool shouldFail, cleanup: virStoragePoolDefFree(pool); + virStoragePoolDefFree(inputpool); virStorageVolDefFree(vol); virStorageVolDefFree(inputvol); virCommandFree(cmd); VIR_FREE(actualCmdline); VIR_FREE(expectedCmdline); + VIR_FREE(inputpoolXmlData); VIR_FREE(poolXmlData); VIR_FREE(volXmlData); VIR_FREE(inputvolXmlData); @@ -102,6 +140,7 @@ struct testInfo { bool shouldFail; const char *pool; const char *vol; + const char *inputpool; const char *inputvol; const char *cmdline; unsigned int flags; @@ -114,17 +153,22 @@ testCompareXMLToArgvHelper(const void *data) int result = -1; const struct testInfo *info = data; char *poolxml = NULL; + char *inputpoolxml = NULL; char *volxml = NULL; char *inputvolxml = NULL; char *cmdline = NULL; if (info->inputvol && - virAsprintf(&inputvolxml, "%s/storagevolxml2argvdata/%s.xml", + virAsprintf(&inputvolxml, "%s/storagevolxml2xmlin/%s.xml", abs_srcdir, info->inputvol) < 0) goto cleanup; - if (virAsprintf(&poolxml, "%s/storagevolxml2argvdata/%s.xml", + if (info->inputpool && + virAsprintf(&inputpoolxml, "%s/storagepoolxml2xmlin/%s.xml", + abs_srcdir, info->inputpool) < 0) + goto cleanup; + if (virAsprintf(&poolxml, "%s/storagepoolxml2xmlin/%s.xml", abs_srcdir, info->pool) < 0 || - virAsprintf(&volxml, "%s/storagevolxml2argvdata/%s.xml", + virAsprintf(&volxml, "%s/storagevolxml2xmlin/%s.xml", abs_srcdir, info->vol) < 0) { goto cleanup; } @@ -133,13 +177,15 @@ testCompareXMLToArgvHelper(const void *data) goto cleanup; result = testCompareXMLToArgvFiles(info->shouldFail, poolxml, volxml, - inputvolxml, cmdline, info->flags, + inputpoolxml, inputvolxml, + cmdline, info->flags, info->imgformat); cleanup: VIR_FREE(poolxml); VIR_FREE(volxml); VIR_FREE(inputvolxml); + VIR_FREE(inputpoolxml); VIR_FREE(cmdline); return result; @@ -159,41 +205,71 @@ mymain(void) int ret = 0; unsigned int flags = VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA; -#define DO_TEST(shouldFail, pool, vol, inputvol, cmdline, flags, imgformat) \ - do { \ - struct testInfo info = { shouldFail, pool, vol, inputvol, cmdline, \ - flags, imgformat }; \ - if (virtTestRun("Storage Vol XML-2-argv " cmdline, \ - 1, testCompareXMLToArgvHelper, &info) < 0) \ - ret = -1; \ - } \ +#define DO_TEST_FULL(shouldFail, pool, vol, inputpool, inputvol, cmdline, \ + flags, imgformat) \ + do { \ + struct testInfo info = { shouldFail, pool, vol, inputpool, inputvol, \ + cmdline, flags, imgformat }; \ + if (virtTestRun("Storage Vol XML-2-argv " cmdline, \ + 1, testCompareXMLToArgvHelper, &info) < 0) \ + ret = -1; \ + } \ while (0); - DO_TEST(false, "pool-dir", "vol-qcow2", NULL, "qcow2", 0, FMT_OPTIONS); - DO_TEST(true, "pool-dir", "vol-qcow2", NULL, "qcow2-prealloc", flags, - FMT_OPTIONS); - DO_TEST(false, "pool-dir", "vol-qcow2-nobacking", NULL, +#define DO_TEST(pool, ...) \ + DO_TEST_FULL(false, pool, __VA_ARGS__) + +#define DO_TEST_FAIL(pool, ...) \ + DO_TEST_FULL(true, pool, __VA_ARGS__) + + DO_TEST("pool-dir", "vol-qcow2", + NULL, NULL, + "qcow2", 0, FMT_OPTIONS); + DO_TEST_FAIL("pool-dir", "vol-qcow2", + NULL, NULL, + "qcow2-prealloc", flags, FMT_OPTIONS); + DO_TEST("pool-dir", "vol-qcow2-nobacking", + NULL, NULL, "qcow2-nobacking-prealloc", flags, FMT_OPTIONS); - DO_TEST(false, "pool-dir", "vol-qcow2-nobacking", "vol-file", + DO_TEST("pool-dir", "vol-qcow2-nobacking", + "pool-dir", "vol-file", "qcow2-nobacking-convert-prealloc", flags, FMT_OPTIONS); - DO_TEST(true, "pool-dir", "vol-qcow2", "vol-file", - "qcow2-convert-prealloc", flags, FMT_OPTIONS); - DO_TEST(false, "pool-dir", "vol-qcow2", NULL, "qcow2-flag", 0, FMT_FLAG); - DO_TEST(false, "pool-dir", "vol-qcow2-nobacking", NULL, + DO_TEST_FAIL("pool-dir", "vol-qcow2", + "pool-dir", "vol-file", + "qcow2-convert-prealloc", flags, FMT_OPTIONS); + DO_TEST("pool-dir", "vol-qcow2", + NULL, NULL, + "qcow2-flag", 0, FMT_FLAG); + DO_TEST("pool-dir", "vol-qcow2-nobacking", + NULL, NULL, "qcow2-nobacking-flag", 0, FMT_FLAG); - DO_TEST(false, "pool-dir", "vol-qcow2-nobacking", "vol-file", + DO_TEST("pool-dir", "vol-qcow2-nobacking", + "pool-dir", "vol-file", "qcow2-nobacking-convert-flag", 0, FMT_FLAG); - DO_TEST(false, "pool-dir", "vol-qcow2", NULL, "qcow2-none", 0, FMT_NONE); - DO_TEST(false, "pool-dir", "vol-qcow2-nobacking", NULL, + DO_TEST("pool-dir", "vol-qcow2", + NULL, NULL, + "qcow2-none", 0, FMT_NONE); + DO_TEST("pool-dir", "vol-qcow2-nobacking", + NULL, NULL, "qcow2-nobacking-none", 0, FMT_NONE); - DO_TEST(false, "pool-dir", "vol-qcow2-nobacking", "vol-file", + DO_TEST("pool-dir", "vol-qcow2-nobacking", + "pool-dir", "vol-file", "qcow2-nobacking-convert-none", 0, FMT_NONE); - DO_TEST(false, "pool-dir", "vol-qcow2-lazy", NULL, "qcow2-lazy", 0, - FMT_OPTIONS); - DO_TEST(false, "pool-dir", "vol-qcow2-1.1", NULL, "qcow2-1.1", 0, - FMT_OPTIONS); - DO_TEST(true, "pool-dir", "vol-qcow2-0.10-lazy", NULL, "qcow2-0.10-lazy", 0, - FMT_OPTIONS); + DO_TEST("pool-dir", "vol-qcow2-lazy", + NULL, NULL, + "qcow2-lazy", 0, FMT_OPTIONS); + DO_TEST("pool-dir", "vol-qcow2-1.1", + NULL, NULL, + "qcow2-1.1", 0, FMT_OPTIONS); + DO_TEST_FAIL("pool-dir", "vol-qcow2-0.10-lazy", + NULL, NULL, + "qcow2-0.10-lazy", 0, FMT_OPTIONS); + DO_TEST("pool-dir", "vol-qcow2-nobacking", + "pool-logical", "vol-logical", + "qcow2-from-logical", 0, FMT_OPTIONS); + DO_TEST("pool-logical", "vol-logical", + "pool-dir", "vol-qcow2-nobacking", + "logical-from-qcow2", 0, FMT_OPTIONS); return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/tests/storagevolxml2argvdata/vol-qcow2-0.10-lazy.xml b/tests/storagevolxml2xmlin/vol-qcow2-0.10-lazy.xml index 5bf98b7c8..5bf98b7c8 100644 --- a/tests/storagevolxml2argvdata/vol-qcow2-0.10-lazy.xml +++ b/tests/storagevolxml2xmlin/vol-qcow2-0.10-lazy.xml diff --git a/tests/storagevolxml2xmlin/vol-qcow2-1.1.xml b/tests/storagevolxml2xmlin/vol-qcow2-1.1.xml index e8df8b301..696e1e075 100644 --- a/tests/storagevolxml2xmlin/vol-qcow2-1.1.xml +++ b/tests/storagevolxml2xmlin/vol-qcow2-1.1.xml @@ -20,7 +20,7 @@ <features/> </target> <backingStore> - <path>/var/lib/libvirt/images/BaseDemo.img</path> + <path>/dev/null</path> <format type='raw'/> <permissions> <mode>0644</mode> diff --git a/tests/storagevolxml2xmlin/vol-qcow2-lazy.xml b/tests/storagevolxml2xmlin/vol-qcow2-lazy.xml index 336342a4f..c1d7875d6 100644 --- a/tests/storagevolxml2xmlin/vol-qcow2-lazy.xml +++ b/tests/storagevolxml2xmlin/vol-qcow2-lazy.xml @@ -23,7 +23,7 @@ </features> </target> <backingStore> - <path>/var/lib/libvirt/images/BaseDemo.img</path> + <path>/dev/null</path> <format type='raw'/> <permissions> <mode>0644</mode> diff --git a/tests/storagevolxml2argvdata/vol-qcow2-nobacking.xml b/tests/storagevolxml2xmlin/vol-qcow2-nobacking.xml index 6a6bd5bef..6a6bd5bef 100644 --- a/tests/storagevolxml2argvdata/vol-qcow2-nobacking.xml +++ b/tests/storagevolxml2xmlin/vol-qcow2-nobacking.xml diff --git a/tests/storagevolxml2xmlin/vol-qcow2.xml b/tests/storagevolxml2xmlin/vol-qcow2.xml index b4924de84..49a7de33d 100644 --- a/tests/storagevolxml2xmlin/vol-qcow2.xml +++ b/tests/storagevolxml2xmlin/vol-qcow2.xml @@ -19,7 +19,7 @@ </encryption> </target> <backingStore> - <path>/var/lib/libvirt/images/BaseDemo.img</path> + <path>/dev/null</path> <format type='raw'/> <permissions> <mode>0644</mode> diff --git a/tests/storagevolxml2argvdata/vol-qcow2-lazy.xml b/tests/storagevolxml2xmlout/vol-qcow2-0.10-lazy.xml index c1d7875d6..a7b5fedfb 100644 --- a/tests/storagevolxml2argvdata/vol-qcow2-lazy.xml +++ b/tests/storagevolxml2xmlout/vol-qcow2-0.10-lazy.xml @@ -1,10 +1,10 @@ <volume> <name>OtherDemo.img</name> - <key>/var/lib/libvirt/images/OtherDemo.img</key> + <key>(null)</key> <source> </source> - <capacity unit="G">5</capacity> - <allocation>294912</allocation> + <capacity unit='bytes'>5368709120</capacity> + <allocation unit='bytes'>294912</allocation> <target> <path>/var/lib/libvirt/images/OtherDemo.img</path> <format type='qcow2'/> @@ -17,7 +17,7 @@ <encryption format='qcow'> <secret type='passphrase' uuid='e78d4b51-a2af-485f-b0f5-afca709a80f4'/> </encryption> - <compat>1.1</compat> + <compat>0.10</compat> <features> <lazy_refcounts/> </features> diff --git a/tests/storagevolxml2xmlout/vol-qcow2-1.1.xml b/tests/storagevolxml2xmlout/vol-qcow2-1.1.xml index 454ac1129..b7df8a6ca 100644 --- a/tests/storagevolxml2xmlout/vol-qcow2-1.1.xml +++ b/tests/storagevolxml2xmlout/vol-qcow2-1.1.xml @@ -21,7 +21,7 @@ <features/> </target> <backingStore> - <path>/var/lib/libvirt/images/BaseDemo.img</path> + <path>/dev/null</path> <format type='raw'/> <permissions> <mode>0644</mode> diff --git a/tests/storagevolxml2xmlout/vol-qcow2-lazy.xml b/tests/storagevolxml2xmlout/vol-qcow2-lazy.xml index 4e30edef9..92b787566 100644 --- a/tests/storagevolxml2xmlout/vol-qcow2-lazy.xml +++ b/tests/storagevolxml2xmlout/vol-qcow2-lazy.xml @@ -23,7 +23,7 @@ </features> </target> <backingStore> - <path>/var/lib/libvirt/images/BaseDemo.img</path> + <path>/dev/null</path> <format type='raw'/> <permissions> <mode>0644</mode> diff --git a/tests/storagevolxml2argvdata/vol-qcow2.xml b/tests/storagevolxml2xmlout/vol-qcow2-nobacking.xml index 49a7de33d..e2da702bc 100644 --- a/tests/storagevolxml2argvdata/vol-qcow2.xml +++ b/tests/storagevolxml2xmlout/vol-qcow2-nobacking.xml @@ -1,10 +1,10 @@ <volume> <name>OtherDemo.img</name> - <key>/var/lib/libvirt/images/OtherDemo.img</key> + <key>(null)</key> <source> </source> - <capacity unit="G">5</capacity> - <allocation>294912</allocation> + <capacity unit='bytes'>5368709120</capacity> + <allocation unit='bytes'>294912</allocation> <target> <path>/var/lib/libvirt/images/OtherDemo.img</path> <format type='qcow2'/> @@ -18,14 +18,4 @@ <secret type='passphrase' uuid='e78d4b51-a2af-485f-b0f5-afca709a80f4'/> </encryption> </target> - <backingStore> - <path>/dev/null</path> - <format type='raw'/> - <permissions> - <mode>0644</mode> - <owner>0</owner> - <group>0</group> - <label>unconfined_u:object_r:virt_image_t:s0</label> - </permissions> - </backingStore> </volume> diff --git a/tests/storagevolxml2xmlout/vol-qcow2.xml b/tests/storagevolxml2xmlout/vol-qcow2.xml index 4490931f1..f931a629c 100644 --- a/tests/storagevolxml2xmlout/vol-qcow2.xml +++ b/tests/storagevolxml2xmlout/vol-qcow2.xml @@ -19,7 +19,7 @@ </encryption> </target> <backingStore> - <path>/var/lib/libvirt/images/BaseDemo.img</path> + <path>/dev/null</path> <format type='raw'/> <permissions> <mode>0644</mode> diff --git a/tests/storagevolxml2xmltest.c b/tests/storagevolxml2xmltest.c index e87b0163b..5b0a60b64 100644 --- a/tests/storagevolxml2xmltest.c +++ b/tests/storagevolxml2xmltest.c @@ -14,6 +14,8 @@ #include "testutilsqemu.h" #include "virstring.h" +#define VIR_FROM_THIS VIR_FROM_NONE + static int testCompareXMLToXMLFiles(const char *poolxml, const char *inxml, const char *outxml) @@ -112,6 +114,8 @@ mymain(void) DO_TEST("pool-dir", "vol-qcow2"); DO_TEST("pool-dir", "vol-qcow2-1.1"); DO_TEST("pool-dir", "vol-qcow2-lazy"); + DO_TEST("pool-dir", "vol-qcow2-0.10-lazy"); + DO_TEST("pool-dir", "vol-qcow2-nobacking"); DO_TEST("pool-disk", "vol-partition"); DO_TEST("pool-logical", "vol-logical"); DO_TEST("pool-logical", "vol-logical-backing"); diff --git a/tests/sysinfotest.c b/tests/sysinfotest.c index dc0451b8d..ba57a7a74 100644 --- a/tests/sysinfotest.c +++ b/tests/sysinfotest.c @@ -36,6 +36,8 @@ #include "virfile.h" #include "virstring.h" +#define VIR_FROM_THIS VIR_FROM_NONE + #if defined (__linux__) # if defined(__s390__) || defined(__s390x__) || \ diff --git a/tests/test_conf.c b/tests/test_conf.c index d5467e800..acf41c6d1 100644 --- a/tests/test_conf.c +++ b/tests/test_conf.c @@ -20,7 +20,7 @@ int main(int argc, char **argv) goto cleanup; } - if (VIR_ALLOC_N(buffer, len) < 0) { + if (VIR_ALLOC_N_QUIET(buffer, len) < 0) { fprintf(stderr, "out of memory\n"); goto cleanup; } diff --git a/tests/testutils.c b/tests/testutils.c index 528e43242..72aa5b3ae 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -68,7 +68,9 @@ static unsigned int testDebug = -1; static unsigned int testVerbose = -1; static unsigned int testOOM = 0; -static unsigned int testCounter = 0; +static size_t testCounter = 0; +static size_t testStart = 0; +static size_t testEnd = 0; char *progname; char *abs_srcdir; @@ -77,7 +79,7 @@ double virtTestCountAverage(double *items, int nitems) { long double sum = 0; - int i; + size_t i; for (i=1; i < nitems; i++) sum += items[i]; @@ -96,14 +98,14 @@ void virtTestResult(const char *name, int ret, const char *msg, ...) testCounter++; if (virTestGetVerbose()) { - fprintf(stderr, "%3d) %-60s ", testCounter, name); + fprintf(stderr, "%3zu) %-60s ", testCounter, name); if (ret == 0) fprintf(stderr, "OK\n"); else { fprintf(stderr, "FAILED\n"); if (msg) { char *str; - if (virVasprintf(&str, msg, vargs) == 0) { + if (virVasprintfQuiet(&str, msg, vargs) == 0) { fprintf(stderr, "%s", str); VIR_FREE(str); } @@ -112,7 +114,7 @@ void virtTestResult(const char *name, int ret, const char *msg, ...) } else { if (testCounter != 1 && !((testCounter-1) % 40)) { - fprintf(stderr, " %-3d\n", (testCounter-1)); + fprintf(stderr, " %-3zu\n", (testCounter-1)); fprintf(stderr, " "); } if (ret == 0) @@ -132,7 +134,8 @@ void virtTestResult(const char *name, int ret, const char *msg, ...) int virtTestRun(const char *title, int nloops, int (*body)(const void *data), const void *data) { - int i, ret = 0; + int ret = 0; + size_t i; double *ts = NULL; if (testCounter == 0 && !virTestGetVerbose()) @@ -140,9 +143,16 @@ virtTestRun(const char *title, int nloops, int (*body)(const void *data), const testCounter++; + + /* Skip tests if out of range */ + if ((testStart != 0) && + (testCounter < testStart || + testCounter > testEnd)) + return 0; + if (testOOM < 2) { if (virTestGetVerbose()) - fprintf(stderr, "%2d) %-65s ... ", testCounter, title); + fprintf(stderr, "%2zu) %-65s ... ", testCounter, title); } if (nloops > 1 && (VIR_ALLOC_N(ts, nloops) < 0)) @@ -185,7 +195,7 @@ virtTestRun(const char *title, int nloops, int (*body)(const void *data), const } else { if (testCounter != 1 && !((testCounter-1) % 40)) { - fprintf(stderr, " %-3d\n", (testCounter-1)); + fprintf(stderr, " %-3zu\n", (testCounter-1)); fprintf(stderr, " "); } if (ret == 0) @@ -265,7 +275,7 @@ virtTestLoadFile(const char *file, char **buf) static void virtTestCaptureProgramExecChild(const char *const argv[], int pipefd) { - int i; + size_t i; int open_max; int stdinfd = -1; const char *const env[] = { @@ -280,10 +290,14 @@ void virtTestCaptureProgramExecChild(const char *const argv[], goto cleanup; open_max = sysconf(_SC_OPEN_MAX); + if (open_max < 0) + goto cleanup; + for (i = 0; i < open_max; i++) { if (i != stdinfd && i != pipefd) { - int tmpfd = i; + int tmpfd; + tmpfd = i; VIR_FORCE_CLOSE(tmpfd); } } @@ -523,7 +537,7 @@ virtTestErrorHook(int n, void *data ATTRIBUTE_UNUSED) { void *trace[30]; int ntrace = ARRAY_CARDINALITY(trace); - int i; + size_t i; char **symbols = NULL; ntrace = backtrace(trace, ntrace); @@ -573,6 +587,7 @@ int virtTestMain(int argc, { int ret; bool abs_srcdir_cleanup = false; + char *testRange = NULL; #if TEST_OOM int approxAlloc = 0; int n; @@ -615,6 +630,33 @@ int virtTestMain(int argc, return EXIT_FAILURE; } + if ((testRange = getenv("VIR_TEST_RANGE")) != NULL) { + char *end = NULL; + unsigned int iv; + if (virStrToLong_ui(testRange, &end, 10, &iv) < 0) { + fprintf(stderr, "Cannot parse range %s\n", testRange); + return EXIT_FAILURE; + } + testStart = testEnd = iv; + if (end && *end) { + if (*end != '-') { + fprintf(stderr, "Cannot parse range %s\n", testRange); + return EXIT_FAILURE; + } + end++; + if (virStrToLong_ui(end, NULL, 10, &iv) < 0) { + fprintf(stderr, "Cannot parse range %s\n", testRange); + return EXIT_FAILURE; + } + testEnd = iv; + + if (testEnd < testStart) { + fprintf(stderr, "Test range end %zu must be >= %zu\n", testEnd, testStart); + return EXIT_FAILURE; + } + } + } + #if TEST_OOM if ((oomStr = getenv("VIR_TEST_OOM")) != NULL) { if (virStrToLong_i(oomStr, NULL, 10, &oomCount) < 0) @@ -665,7 +707,7 @@ int virtTestMain(int argc, fprintf(stderr, "%d) OOM of %d allocs ", testCounter, approxAlloc); if (mp) { - int i; + size_t i; for (i = 0; i < mp; i++) { workers[i] = fork(); if (workers[i] == 0) { @@ -700,7 +742,7 @@ int virtTestMain(int argc, if (worker) { _exit(ret); } else { - int i; + size_t i; for (i = 0; i < mp; i++) { if (virProcessWait(workers[i], NULL) < 0) ret = EXIT_FAILURE; @@ -727,8 +769,8 @@ cleanup: virResetLastError(); if (!virTestGetVerbose() && ret != EXIT_AM_SKIP) { if (testCounter == 0 || testCounter % 40) - fprintf(stderr, "%*s", 40 - (testCounter % 40), ""); - fprintf(stderr, " %-3d %s\n", testCounter, ret == 0 ? "OK" : "FAIL"); + fprintf(stderr, "%*s", 40 - (int)(testCounter % 40), ""); + fprintf(stderr, " %-3zu %s\n", testCounter, ret == 0 ? "OK" : "FAIL"); } return ret; } diff --git a/tests/testutils.h b/tests/testutils.h index 3647487c9..27af5da69 100644 --- a/tests/testutils.h +++ b/tests/testutils.h @@ -25,10 +25,18 @@ # include <stdio.h> # include "viralloc.h" +# include "virfile.h" +# include "virstring.h" # define EXIT_AM_SKIP 77 /* tell Automake we're skipping a test */ # define EXIT_AM_HARDFAIL 99 /* tell Automake that the framework is broken */ +/* Work around lack of gnulib support for fprintf %z */ +# ifndef NO_LIBVIRT +# undef fprintf +# define fprintf virFilePrintf +# endif + extern char *progname; extern char *abs_srcdir; diff --git a/tests/utiltest.c b/tests/utiltest.c index 9d1865267..0cbf3f3dc 100644 --- a/tests/utiltest.c +++ b/tests/utiltest.c @@ -36,7 +36,7 @@ static const char* diskNames[] = { static int testIndexToDiskName(const void *data ATTRIBUTE_UNUSED) { - int i; + size_t i; char *diskName = NULL; for (i = 0; i < ARRAY_CARDINALITY(diskNames); ++i) { @@ -62,19 +62,20 @@ testIndexToDiskName(const void *data ATTRIBUTE_UNUSED) static int testDiskNameToIndex(const void *data ATTRIBUTE_UNUSED) { - int i, k; + size_t i; + int idx; char *diskName = NULL; for (i = 0; i < 100000; ++i) { VIR_FREE(diskName); diskName = virIndexToDiskName(i, "sd"); - k = virDiskNameToIndex(diskName); + idx = virDiskNameToIndex(diskName); - if (k != i) { + if (idx < 0 || idx != i) { if (virTestGetDebug() > 0) { - fprintf(stderr, "\nExpect [%d]\n", i); - fprintf(stderr, "Actual [%d]\n", k); + fprintf(stderr, "\nExpect [%zu]\n", i); + fprintf(stderr, "Actual [%d]\n", idx); } VIR_FREE(diskName); @@ -115,7 +116,8 @@ static struct testVersionString versions[] = { static int testParseVersionString(const void *data ATTRIBUTE_UNUSED) { - int i, result; + int result; + size_t i; unsigned long version; for (i = 0; i < ARRAY_CARDINALITY(versions); ++i) { diff --git a/tests/viratomictest.c b/tests/viratomictest.c index 1ed1707c5..40a05b84d 100644 --- a/tests/viratomictest.c +++ b/tests/viratomictest.c @@ -115,7 +115,7 @@ static void thread_func(void *data) { int idx = (intptr_t)data; - int i; + size_t i; int d; for (i = 0; i < ROUNDS; i++) { @@ -134,7 +134,7 @@ static int testThreads(const void *data ATTRIBUTE_UNUSED) { int sum; - int i; + size_t i; virThread threads[THREADS]; atomic = 0; diff --git a/tests/virbitmaptest.c b/tests/virbitmaptest.c index 2464c33bf..9c7329ea4 100644 --- a/tests/virbitmaptest.c +++ b/tests/virbitmaptest.c @@ -65,7 +65,7 @@ testBit(virBitmapPtr bitmap, unsigned int end, bool expected) { - int i; + size_t i; bool result; for (i = start; i <= end; i++) { @@ -145,7 +145,7 @@ static int test3(const void *data ATTRIBUTE_UNUSED) virBitmapPtr bitmap = NULL; int ret = -1; int size = 5; - int i; + size_t i; if ((bitmap = virBitmapNew(size)) == NULL) goto error; @@ -180,7 +180,7 @@ static int test4(const void *data ATTRIBUTE_UNUSED) 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 }; virBitmapPtr bitmap = NULL; - int i, j; + ssize_t i, j; if (ARRAY_CARDINALITY(bitsPos) + ARRAY_CARDINALITY(bitsPosInv) != size) goto error; @@ -268,7 +268,8 @@ static int test5(const void *v ATTRIBUTE_UNUSED) int len2; int bits[] = {0, 9, 34}; virBitmapPtr bitmap; - int i, j; + size_t i; + ssize_t j; int ret = -1; bitmap = virBitmapNewData(data, sizeof(data)); diff --git a/tests/virbuftest.c b/tests/virbuftest.c index 3938f0df5..febe6e456 100644 --- a/tests/virbuftest.c +++ b/tests/virbuftest.c @@ -10,6 +10,8 @@ #include "viralloc.h" #include "virstring.h" +#define VIR_FROM_THIS VIR_FROM_NONE + #define TEST_ERROR(...) \ do { \ if (virTestGetDebug()) \ diff --git a/tests/vircgrouptest.c b/tests/vircgrouptest.c index 262eb8ba6..20ac4949a 100644 --- a/tests/vircgrouptest.c +++ b/tests/vircgrouptest.c @@ -41,7 +41,7 @@ static int validateCgroup(virCgroupPtr cgroup, const char **expectLinkPoint, const char **expectPlacement) { - int i; + size_t i; if (STRNEQ(cgroup->path, expectPath)) { fprintf(stderr, "Wrong path '%s', expected '%s'\n", @@ -136,108 +136,16 @@ cleanup: } -static int testCgroupNewForDriver(const void *args ATTRIBUTE_UNUSED) -{ - virCgroupPtr cgroup = NULL; - int ret = -1; - int rv; - const char *placementSmall[VIR_CGROUP_CONTROLLER_LAST] = { - [VIR_CGROUP_CONTROLLER_CPU] = "/system/libvirt/lxc", - [VIR_CGROUP_CONTROLLER_CPUACCT] = "/system/libvirt/lxc", - [VIR_CGROUP_CONTROLLER_CPUSET] = NULL, - [VIR_CGROUP_CONTROLLER_MEMORY] = "/libvirt/lxc", - [VIR_CGROUP_CONTROLLER_DEVICES] = NULL, - [VIR_CGROUP_CONTROLLER_FREEZER] = NULL, - [VIR_CGROUP_CONTROLLER_BLKIO] = NULL, - }; - const char *placementFull[VIR_CGROUP_CONTROLLER_LAST] = { - [VIR_CGROUP_CONTROLLER_CPU] = "/system/libvirt/lxc", - [VIR_CGROUP_CONTROLLER_CPUACCT] = "/system/libvirt/lxc", - [VIR_CGROUP_CONTROLLER_CPUSET] = "/libvirt/lxc", - [VIR_CGROUP_CONTROLLER_MEMORY] = "/libvirt/lxc", - [VIR_CGROUP_CONTROLLER_DEVICES] = NULL, - [VIR_CGROUP_CONTROLLER_FREEZER] = "/libvirt/lxc", - [VIR_CGROUP_CONTROLLER_BLKIO] = "/libvirt/lxc", - }; - - if ((rv = virCgroupNewDriver("lxc", false, -1, &cgroup)) != -ENOENT) { - fprintf(stderr, "Unexpected found LXC cgroup: %d\n", -rv); - goto cleanup; - } +# define ENSURE_ERRNO(en) \ + do { \ + if (!virLastErrorIsSystemErrno(en)) { \ + virErrorPtr err = virGetLastError(); \ + fprintf(stderr, "Did not get " #en " error code: %d:%d\n", \ + err ? err->code : 0, err ? err->int1 : 0); \ + goto cleanup; \ + } } while (0) /* Asking for impossible combination since CPU is co-mounted */ - if ((rv = virCgroupNewDriver("lxc", true, - (1 << VIR_CGROUP_CONTROLLER_CPU), - &cgroup)) != -EINVAL) { - fprintf(stderr, "Should not have created LXC cgroup: %d\n", -rv); - goto cleanup; - } - - /* Asking for impossible combination since devices is not mounted */ - if ((rv = virCgroupNewDriver("lxc", true, - (1 << VIR_CGROUP_CONTROLLER_DEVICES), - &cgroup)) != -ENXIO) { - fprintf(stderr, "Should not have created LXC cgroup: %d\n", -rv); - goto cleanup; - } - - /* Asking for small combination since devices is not mounted */ - if ((rv = virCgroupNewDriver("lxc", true, - (1 << VIR_CGROUP_CONTROLLER_CPU) | - (1 << VIR_CGROUP_CONTROLLER_CPUACCT) | - (1 << VIR_CGROUP_CONTROLLER_MEMORY), - &cgroup)) != 0) { - fprintf(stderr, "Cannot create LXC cgroup: %d\n", -rv); - goto cleanup; - } - ret = validateCgroup(cgroup, "libvirt/lxc", mountsSmall, links, placementSmall); - virCgroupFree(&cgroup); - - if ((rv = virCgroupNewDriver("lxc", true, -1, &cgroup)) != 0) { - fprintf(stderr, "Cannot create LXC cgroup: %d\n", -rv); - goto cleanup; - } - ret = validateCgroup(cgroup, "libvirt/lxc", mountsFull, links, placementFull); - -cleanup: - virCgroupFree(&cgroup); - return ret; -} - - -static int testCgroupNewForDriverDomain(const void *args ATTRIBUTE_UNUSED) -{ - virCgroupPtr drivercgroup = NULL; - virCgroupPtr domaincgroup = NULL; - int ret = -1; - int rv; - const char *placement[VIR_CGROUP_CONTROLLER_LAST] = { - [VIR_CGROUP_CONTROLLER_CPU] = "/system/libvirt/lxc/wibble", - [VIR_CGROUP_CONTROLLER_CPUACCT] = "/system/libvirt/lxc/wibble", - [VIR_CGROUP_CONTROLLER_CPUSET] = "/libvirt/lxc/wibble", - [VIR_CGROUP_CONTROLLER_MEMORY] = "/libvirt/lxc/wibble", - [VIR_CGROUP_CONTROLLER_DEVICES] = NULL, - [VIR_CGROUP_CONTROLLER_FREEZER] = "/libvirt/lxc/wibble", - [VIR_CGROUP_CONTROLLER_BLKIO] = "/libvirt/lxc/wibble", - }; - - if ((rv = virCgroupNewDriver("lxc", false, -1, &drivercgroup)) != 0) { - fprintf(stderr, "Cannot find LXC cgroup: %d\n", -rv); - goto cleanup; - } - - if ((rv = virCgroupNewDomainDriver(drivercgroup, "wibble", true, &domaincgroup)) != 0) { - fprintf(stderr, "Cannot create LXC cgroup: %d\n", -rv); - goto cleanup; - } - - ret = validateCgroup(domaincgroup, "libvirt/lxc/wibble", mountsFull, links, placement); - -cleanup: - virCgroupFree(&drivercgroup); - virCgroupFree(&domaincgroup); - return ret; -} static int testCgroupNewForPartition(const void *args ATTRIBUTE_UNUSED) @@ -264,26 +172,29 @@ static int testCgroupNewForPartition(const void *args ATTRIBUTE_UNUSED) [VIR_CGROUP_CONTROLLER_BLKIO] = "/virtualmachines.partition", }; - if ((rv = virCgroupNewPartition("/virtualmachines", false, -1, &cgroup)) != -ENOENT) { + if ((rv = virCgroupNewPartition("/virtualmachines", false, -1, &cgroup)) != -1) { fprintf(stderr, "Unexpected found /virtualmachines cgroup: %d\n", -rv); goto cleanup; } + ENSURE_ERRNO(ENOENT); /* Asking for impossible combination since CPU is co-mounted */ if ((rv = virCgroupNewPartition("/virtualmachines", true, (1 << VIR_CGROUP_CONTROLLER_CPU), - &cgroup)) != -EINVAL) { + &cgroup)) != -1) { fprintf(stderr, "Should not have created /virtualmachines cgroup: %d\n", -rv); goto cleanup; } + ENSURE_ERRNO(EINVAL); /* Asking for impossible combination since devices is not mounted */ if ((rv = virCgroupNewPartition("/virtualmachines", true, (1 << VIR_CGROUP_CONTROLLER_DEVICES), - &cgroup)) != -ENXIO) { + &cgroup)) != -1) { fprintf(stderr, "Should not have created /virtualmachines cgroup: %d\n", -rv); goto cleanup; } + ENSURE_ERRNO(ENXIO); /* Asking for small combination since devices is not mounted */ if ((rv = virCgroupNewPartition("/virtualmachines", true, @@ -324,16 +235,18 @@ static int testCgroupNewForPartitionNested(const void *args ATTRIBUTE_UNUSED) [VIR_CGROUP_CONTROLLER_BLKIO] = "/deployment.partition/production.partition", }; - if ((rv = virCgroupNewPartition("/deployment/production", false, -1, &cgroup)) != -ENOENT) { + if ((rv = virCgroupNewPartition("/deployment/production", false, -1, &cgroup)) != -1) { fprintf(stderr, "Unexpected found /deployment/production cgroup: %d\n", -rv); goto cleanup; } + ENSURE_ERRNO(ENOENT); /* Should not work, since we require /deployment to be pre-created */ - if ((rv = virCgroupNewPartition("/deployment/production", true, -1, &cgroup)) != -ENOENT) { + if ((rv = virCgroupNewPartition("/deployment/production", true, -1, &cgroup)) != -1) { fprintf(stderr, "Unexpected created /deployment/production cgroup: %d\n", -rv); goto cleanup; } + ENSURE_ERRNO(ENOENT); if ((rv = virCgroupNewPartition("/deployment", true, -1, &cgroup)) != 0) { fprintf(stderr, "Failed to create /deployment cgroup: %d\n", -rv); @@ -370,16 +283,18 @@ static int testCgroupNewForPartitionNestedDeep(const void *args ATTRIBUTE_UNUSED [VIR_CGROUP_CONTROLLER_BLKIO] = "/user/berrange.user/production.partition", }; - if ((rv = virCgroupNewPartition("/user/berrange.user/production", false, -1, &cgroup)) != -ENOENT) { + if ((rv = virCgroupNewPartition("/user/berrange.user/production", false, -1, &cgroup)) != -1) { fprintf(stderr, "Unexpected found /user/berrange.user/production cgroup: %d\n", -rv); goto cleanup; } + ENSURE_ERRNO(ENOENT); /* Should not work, since we require /user/berrange.user to be pre-created */ - if ((rv = virCgroupNewPartition("/user/berrange.user/production", true, -1, &cgroup)) != -ENOENT) { + if ((rv = virCgroupNewPartition("/user/berrange.user/production", true, -1, &cgroup)) != -1) { fprintf(stderr, "Unexpected created /user/berrange.user/production cgroup: %d\n", -rv); goto cleanup; } + ENSURE_ERRNO(ENOENT); if ((rv = virCgroupNewPartition("/user", true, -1, &cgroup)) != 0) { fprintf(stderr, "Failed to create /user/berrange.user cgroup: %d\n", -rv); @@ -516,12 +431,6 @@ mymain(void) if (virtTestRun("New cgroup for self", 1, testCgroupNewForSelf, NULL) < 0) ret = -1; - if (virtTestRun("New cgroup for driver", 1, testCgroupNewForDriver, NULL) < 0) - ret = -1; - - if (virtTestRun("New cgroup for domain driver", 1, testCgroupNewForDriverDomain, NULL) < 0) - ret = -1; - if (virtTestRun("New cgroup for partition", 1, testCgroupNewForPartition, NULL) < 0) ret = -1; diff --git a/tests/virdbustest.c b/tests/virdbustest.c new file mode 100644 index 000000000..61de93700 --- /dev/null +++ b/tests/virdbustest.c @@ -0,0 +1,393 @@ +/* + * Copyright (C) 2013 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + * + * Author: Daniel P. Berrange <berrange@redhat.com> + */ + +#include <config.h> + +#include <stdlib.h> + +#include "virdbuspriv.h" +#include "virlog.h" +#include "testutils.h" + +#define VERIFY(typname, valorig, valnew, fmt) \ + do { \ + VIR_DEBUG("Compare " typname " '" fmt "' to '" \ + fmt "'", valorig, valnew); \ + if (valorig != valnew) { \ + fprintf(stderr, "Failed to round-trip " typname " '" \ + fmt "' to '" fmt "'\n", valorig, valnew); \ + goto cleanup; \ + } \ + } while (0) + +#define VERIFY_STR(typname, valorig, valnew, fmt) \ + do { \ + VIR_DEBUG("Compare " typname " '" fmt "' to '" \ + fmt "'", valorig, valnew); \ + if (STRNEQ(valorig, valnew)) { \ + fprintf(stderr, "Failed to round-trip " typname " '" \ + fmt "' to '" fmt "'\n", valorig, valnew); \ + goto cleanup; \ + } \ + } while (0) + +static int testMessageSimple(const void *args ATTRIBUTE_UNUSED) +{ + DBusMessage *msg = NULL; + int ret = -1; + unsigned char in_byte = 200, out_byte = 0; + int in_bool = true, out_bool = false; + short in_int16 = 0xfefe, out_int16 = 0; + unsigned short in_uint16 = 32000, out_uint16 = 0; + int in_int32 = 100000000, out_int32 = 0; + unsigned int in_uint32 = 200000000, out_uint32 = 0; + long long in_int64 = 1000000000000, out_int64 = 0; + unsigned long long in_uint64 = 2000000000000, out_uint64 = 0; + double in_double = 3.14159265359, out_double = 0;; + const char *in_string = "Hello World"; + char *out_string = NULL; + const char *in_objectpath = "/org/libvirt/test"; + char *out_objectpath = NULL; + const char *in_signature = "ybnqiuxtdsog"; + char *out_signature = NULL; + + if (!(msg = dbus_message_new_method_call("org.libvirt.test", + "/org/libvirt/test", + "org.libvirt.test.astrochicken", + "cluck"))) { + VIR_DEBUG("Failed to allocate method call"); + goto cleanup; + } + + if (virDBusMessageEncode(msg, + "ybnqiuxtdsog", + in_byte, in_bool, + in_int16, in_uint16, + in_int32, in_uint32, + in_int64, in_uint64, + in_double, in_string, + in_objectpath, in_signature) < 0) { + VIR_DEBUG("Failed to encode arguments"); + goto cleanup; + } + + if (virDBusMessageDecode(msg, + "ybnqiuxtdsog", + &out_byte, &out_bool, + &out_int16, &out_uint16, + &out_int32, &out_uint32, + &out_int64, &out_uint64, + &out_double, &out_string, + &out_objectpath, &out_signature) < 0) { + VIR_DEBUG("Failed to decode arguments"); + goto cleanup; + } + + VERIFY("byte", in_byte, out_byte, "%d"); + VERIFY("bool", in_bool, out_bool, "%d"); + VERIFY("int16", in_int16, out_int16, "%d"); + VERIFY("uint16", in_int16, out_int16, "%d"); + VERIFY("int32", in_int32, out_int32, "%d"); + VERIFY("uint32", in_int32, out_int32, "%d"); + VERIFY("int64", in_int64, out_int64, "%lld"); + VERIFY("uint64", in_int64, out_int64, "%lld"); + VERIFY("double", in_double, out_double, "%lf"); + VERIFY_STR("string", in_string, out_string, "%s"); + VERIFY_STR("objectpath", in_objectpath, out_objectpath, "%s"); + VERIFY_STR("signature", in_signature, out_signature, "%s"); + + ret = 0; + +cleanup: + VIR_FREE(out_string); + VIR_FREE(out_signature); + VIR_FREE(out_objectpath); + dbus_message_unref(msg); + return ret; +} + + +static int testMessageVariant(const void *args ATTRIBUTE_UNUSED) +{ + DBusMessage *msg = NULL; + int ret = -1; + const char *in_str1 = "Hello"; + int in_int32 = 100000000, out_int32 = 0; + const char *in_str2 = "World"; + char *out_str1 = NULL, *out_str2 = NULL; + + if (!(msg = dbus_message_new_method_call("org.libvirt.test", + "/org/libvirt/test", + "org.libvirt.test.astrochicken", + "cluck"))) { + VIR_DEBUG("Failed to allocate method call"); + goto cleanup; + } + + if (virDBusMessageEncode(msg, + "svs", + in_str1, + "i", in_int32, + in_str2) < 0) { + VIR_DEBUG("Failed to encode arguments"); + goto cleanup; + } + + if (virDBusMessageDecode(msg, + "svs", + &out_str1, + "i", &out_int32, + &out_str2) < 0) { + VIR_DEBUG("Failed to decode arguments"); + goto cleanup; + } + + + VERIFY_STR("str1", in_str1, out_str1, "%s"); + VERIFY("int32", in_int32, out_int32, "%d"); + VERIFY_STR("str2", in_str2, out_str2, "%s"); + + ret = 0; + +cleanup: + VIR_FREE(out_str1); + VIR_FREE(out_str2); + dbus_message_unref(msg); + return ret; +} + +static int testMessageArray(const void *args ATTRIBUTE_UNUSED) +{ + DBusMessage *msg = NULL; + int ret = -1; + const char *in_str1 = "Hello"; + int in_int32a = 1000000000, out_int32a = 0; + int in_int32b = 2000000000, out_int32b = 0; + int in_int32c = 3000000000, out_int32c = 0; + const char *in_str2 = "World"; + char *out_str1 = NULL, *out_str2 = NULL; + + if (!(msg = dbus_message_new_method_call("org.libvirt.test", + "/org/libvirt/test", + "org.libvirt.test.astrochicken", + "cluck"))) { + VIR_DEBUG("Failed to allocate method call"); + goto cleanup; + } + + if (virDBusMessageEncode(msg, + "sais", + in_str1, + 3, in_int32a, in_int32b, in_int32c, + in_str2) < 0) { + VIR_DEBUG("Failed to encode arguments"); + goto cleanup; + } + + if (virDBusMessageDecode(msg, + "sais", + &out_str1, + 3, &out_int32a, &out_int32b, &out_int32c, + &out_str2) < 0) { + VIR_DEBUG("Failed to decode arguments"); + goto cleanup; + } + + + VERIFY_STR("str1", in_str1, out_str1, "%s"); + VERIFY("int32a", in_int32a, out_int32a, "%d"); + VERIFY("int32b", in_int32b, out_int32b, "%d"); + VERIFY("int32c", in_int32c, out_int32c, "%d"); + VERIFY_STR("str2", in_str2, out_str2, "%s"); + + ret = 0; + +cleanup: + VIR_FREE(out_str1); + VIR_FREE(out_str2); + dbus_message_unref(msg); + return ret; +} + +static int testMessageStruct(const void *args ATTRIBUTE_UNUSED) +{ + DBusMessage *msg = NULL; + int ret = -1; + unsigned char in_byte = 200, out_byte = 0; + int in_bool = true, out_bool = false; + short in_int16 = 12000, out_int16 = 0; + unsigned short in_uint16 = 32000, out_uint16 = 0; + int in_int32 = 100000000, out_int32 = 0; + unsigned int in_uint32 = 200000000, out_uint32 = 0; + long long in_int64 = 1000000000000, out_int64 = 0; + unsigned long long in_uint64 = 2000000000000, out_uint64 = 0; + double in_double = 3.14159265359, out_double = 0;; + const char *in_string = "Hello World"; + char *out_string = NULL; + const char *in_objectpath = "/org/libvirt/test"; + char *out_objectpath = NULL; + const char *in_signature = "ybnqiuxtdsog"; + char *out_signature = NULL; + + if (!(msg = dbus_message_new_method_call("org.libvirt.test", + "/org/libvirt/test", + "org.libvirt.test.astrochicken", + "cluck"))) { + VIR_DEBUG("Failed to allocate method call"); + goto cleanup; + } + + if (virDBusMessageEncode(msg, + "ybn(qiuxtds)og", + in_byte, in_bool, + in_int16, in_uint16, + in_int32, in_uint32, + in_int64, in_uint64, + in_double, in_string, + in_objectpath, in_signature) < 0) { + VIR_DEBUG("Failed to encode arguments"); + goto cleanup; + } + + if (virDBusMessageDecode(msg, + "ybn(qiuxtds)og", + &out_byte, &out_bool, + &out_int16, &out_uint16, + &out_int32, &out_uint32, + &out_int64, &out_uint64, + &out_double, &out_string, + &out_objectpath, &out_signature) < 0) { + VIR_DEBUG("Failed to decode arguments"); + goto cleanup; + } + + VERIFY("byte", in_byte, out_byte, "%d"); + VERIFY("bool", in_bool, out_bool, "%d"); + VERIFY("int16", in_int16, out_int16, "%d"); + VERIFY("uint16", in_int16, out_int16, "%d"); + VERIFY("int32", in_int32, out_int32, "%d"); + VERIFY("uint32", in_int32, out_int32, "%d"); + VERIFY("int64", in_int64, out_int64, "%lld"); + VERIFY("uint64", in_int64, out_int64, "%lld"); + VERIFY("double", in_double, out_double, "%lf"); + VERIFY_STR("string", in_string, out_string, "%s"); + VERIFY_STR("objectpath", in_objectpath, out_objectpath, "%s"); + VERIFY_STR("signature", in_signature, out_signature, "%s"); + + ret = 0; + +cleanup: + VIR_FREE(out_string); + VIR_FREE(out_signature); + VIR_FREE(out_objectpath); + dbus_message_unref(msg); + return ret; +} + + +static int testMessageDict(const void *args ATTRIBUTE_UNUSED) +{ + DBusMessage *msg = NULL; + int ret = -1; + const char *in_str1 = "Hello"; + int in_int32a = 100000000, out_int32a = 0; + const char *in_key1 = "turnover"; + int in_int32b = 200000000, out_int32b = 0; + const char *in_key2 = "revenue"; + int in_int32c = 300000000, out_int32c = 0; + const char *in_key3 = "debt"; + const char *in_str2 = "World"; + char *out_str1 = NULL, *out_str2 = NULL; + char *out_key1 = NULL, *out_key2 = NULL, *out_key3 = NULL; + + if (!(msg = dbus_message_new_method_call("org.libvirt.test", + "/org/libvirt/test", + "org.libvirt.test.astrochicken", + "cluck"))) { + VIR_DEBUG("Failed to allocate method call"); + goto cleanup; + } + + if (virDBusMessageEncode(msg, + "sa{si}s", + in_str1, + 3, + in_key1, in_int32a, + in_key2, in_int32b, + in_key3, in_int32c, + in_str2) < 0) { + VIR_DEBUG("Failed to encode arguments"); + goto cleanup; + } + + if (virDBusMessageDecode(msg, + "sa{si}s", + &out_str1, + 3, + &out_key1, &out_int32a, + &out_key2, &out_int32b, + &out_key3, &out_int32c, + &out_str2) < 0) { + VIR_DEBUG("Failed to decode arguments"); + goto cleanup; + } + + + VERIFY_STR("str1", in_str1, out_str1, "%s"); + VERIFY("int32a", in_int32a, out_int32a, "%d"); + VERIFY("int32b", in_int32b, out_int32b, "%d"); + VERIFY("int32c", in_int32c, out_int32c, "%d"); + VERIFY_STR("key1", in_key1, out_key1, "%s"); + VERIFY_STR("key1", in_key2, out_key2, "%s"); + VERIFY_STR("key1", in_key3, out_key3, "%s"); + VERIFY_STR("str2", in_str2, out_str2, "%s"); + + ret = 0; + +cleanup: + VIR_FREE(out_str1); + VIR_FREE(out_str2); + VIR_FREE(out_key1); + VIR_FREE(out_key2); + VIR_FREE(out_key3); + dbus_message_unref(msg); + return ret; +} + + +static int +mymain(void) +{ + int ret = 0; + + if (virtTestRun("Test message simple ", 1, testMessageSimple, NULL) < 0) + ret = -1; + if (virtTestRun("Test message variant ", 1, testMessageVariant, NULL) < 0) + ret = -1; + if (virtTestRun("Test message array ", 1, testMessageArray, NULL) < 0) + ret = -1; + if (virtTestRun("Test message struct ", 1, testMessageStruct, NULL) < 0) + ret = -1; + if (virtTestRun("Test message dict ", 1, testMessageDict, NULL) < 0) + ret = -1; + return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE; +} + +VIRT_TEST_MAIN(mymain) diff --git a/tests/virhashtest.c b/tests/virhashtest.c index f36fc76c7..dd2c948d1 100644 --- a/tests/virhashtest.c +++ b/tests/virhashtest.c @@ -13,10 +13,12 @@ #include "virlog.h" #include "virstring.h" +#define VIR_FROM_THIS VIR_FROM_NONE + #define testError(...) \ do { \ char *str; \ - if (virAsprintf(&str, __VA_ARGS__) == 0) { \ + if (virAsprintfQuiet(&str, __VA_ARGS__) >= 0) { \ fprintf(stderr, "%s", str); \ VIR_FREE(str); \ } \ @@ -128,7 +130,7 @@ testHashUpdate(const void *data ATTRIBUTE_UNUSED) { int count = ARRAY_CARDINALITY(uuids) + ARRAY_CARDINALITY(uuids_new); virHashTablePtr hash; - int i; + size_t i; int ret = -1; if (!(hash = testHashInit(0))) @@ -170,7 +172,7 @@ testHashRemove(const void *data ATTRIBUTE_UNUSED) { int count = ARRAY_CARDINALITY(uuids) - ARRAY_CARDINALITY(uuids_subset); virHashTablePtr hash; - int i; + size_t i; int ret = -1; if (!(hash = testHashInit(0))) @@ -206,7 +208,7 @@ testHashRemoveForEachSome(void *payload ATTRIBUTE_UNUSED, void *data) { virHashTablePtr hash = data; - int i; + size_t i; for (i = 0; i < ARRAY_CARDINALITY(uuids_subset); i++) { if (STREQ(uuids_subset[i], name)) { @@ -241,7 +243,7 @@ testHashRemoveForEachForbidden(void *payload ATTRIBUTE_UNUSED, void *data) { virHashTablePtr hash = data; - int i; + size_t i; for (i = 0; i < ARRAY_CARDINALITY(uuids_subset); i++) { if (STREQ(uuids_subset[i], name)) { @@ -297,7 +299,7 @@ testHashSteal(const void *data ATTRIBUTE_UNUSED) { int count = ARRAY_CARDINALITY(uuids) - ARRAY_CARDINALITY(uuids_subset); virHashTablePtr hash; - int i; + size_t i; int ret = -1; if (!(hash = testHashInit(0))) @@ -402,7 +404,7 @@ testHashRemoveSetIter(const void *payload ATTRIBUTE_UNUSED, { int *count = (int *) data; bool rem = false; - int i; + size_t i; for (i = 0; i < ARRAY_CARDINALITY(uuids_subset); i++) { if (STREQ(uuids_subset[i], name)) { diff --git a/tests/virnetmessagetest.c b/tests/virnetmessagetest.c index 062c3ff6b..1aa4c25a6 100644 --- a/tests/virnetmessagetest.c +++ b/tests/virnetmessagetest.c @@ -49,10 +49,8 @@ static int testMessageHeaderEncode(const void *args ATTRIBUTE_UNUSED) unsigned long msg_buf_size = VIR_NET_MESSAGE_INITIAL + VIR_NET_MESSAGE_LEN_MAX; int ret = -1; - if (!msg) { - virReportOOMError(); + if (!msg) return -1; - } msg->header.prog = 0x11223344; msg->header.vers = 0x01; @@ -101,16 +99,12 @@ static int testMessageHeaderDecode(const void *args ATTRIBUTE_UNUSED) }; int ret = -1; - if (!msg) { - virReportOOMError(); + if (!msg) return -1; - } msg->bufferLength = 4; - if (VIR_ALLOC_N(msg->buffer, msg->bufferLength) < 0) { - virReportOOMError(); + if (VIR_ALLOC_N(msg->buffer, msg->bufferLength) < 0) goto cleanup; - } memcpy(msg->buffer, input_buf, msg->bufferLength); msg->header.prog = 0x11223344; @@ -225,10 +219,8 @@ static int testMessagePayloadEncode(const void *args ATTRIBUTE_UNUSED) 0x00, 0x00, 0x00, 0x00, /* Error network pointer */ }; - if (!msg) { - virReportOOMError(); + if (!msg) return -1; - } memset(&err, 0, sizeof(err)); @@ -336,10 +328,8 @@ static int testMessagePayloadDecode(const void *args ATTRIBUTE_UNUSED) int ret = -1; msg->bufferLength = 4; - if (VIR_ALLOC_N(msg->buffer, msg->bufferLength) < 0) { - virReportOOMError(); + if (VIR_ALLOC_N(msg->buffer, msg->bufferLength) < 0) goto cleanup; - } memcpy(msg->buffer, input_buffer, msg->bufferLength); memset(&err, 0, sizeof(err)); diff --git a/tests/virnetsockettest.c b/tests/virnetsockettest.c index 4c5a0eab2..5b434ba9e 100644 --- a/tests/virnetsockettest.c +++ b/tests/virnetsockettest.c @@ -52,7 +52,7 @@ checkProtocols(bool *hasIPv4, bool *hasIPv6, struct sockaddr_in in4; struct sockaddr_in6 in6; int s4 = -1, s6 = -1; - int i; + size_t i; int ret = -1; memset(&hints, 0, sizeof(hints)); diff --git a/tests/virshtest.c b/tests/virshtest.c index fad67745b..ca35bb0ac 100644 --- a/tests/virshtest.c +++ b/tests/virshtest.c @@ -9,6 +9,8 @@ #include "testutils.h" #include "virstring.h" +#define VIR_FROM_THIS VIR_FROM_NONE + #ifdef WIN32 int diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index fef4b372f..a3c59efaa 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -98,10 +98,8 @@ testPrepImages(void) virAsprintf(&absqcow2, "%s/qcow2", datadir) < 0 || virAsprintf(&abswrap, "%s/wrap", datadir) < 0 || virAsprintf(&absqed, "%s/qed", datadir) < 0 || - virAsprintf(&abslink2, "%s/sub/link2", datadir) < 0) { - virReportOOMError(); + virAsprintf(&abslink2, "%s/sub/link2", datadir) < 0) goto cleanup; - } if (virFileMakePath(datadir "/sub") < 0) { fprintf(stderr, "unable to create directory %s\n", datadir "/sub"); @@ -220,7 +218,7 @@ testStorageChain(const void *args) int ret = -1; virStorageFileMetadataPtr meta; virStorageFileMetadataPtr elt; - int i = 0; + size_t i = 0; meta = virStorageFileGetMetadata(data->start, data->format, -1, -1, (data->flags & ALLOW_PROBE) != 0); @@ -271,7 +269,6 @@ testStorageChain(const void *args) NULLSTR(elt->directory), elt->backingStoreFormat, elt->backingStoreIsFile, elt->capacity, elt->encrypted) < 0) { - virReportOOMError(); VIR_FREE(expect); VIR_FREE(actual); goto cleanup; diff --git a/tests/virsystemdmock.c b/tests/virsystemdmock.c new file mode 100644 index 000000000..b6c36950f --- /dev/null +++ b/tests/virsystemdmock.c @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2013 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + * + * Author: Daniel P. Berrange <berrange@redhat.com> + */ + +#include <config.h> + +#ifdef __linux__ +# include "internal.h" + +# include <stdlib.h> + +# include <dbus/dbus.h> + +void dbus_connection_set_change_sigpipe(dbus_bool_t will_modify_sigpipe ATTRIBUTE_UNUSED) +{ +} + +dbus_bool_t dbus_threads_init_default(void) +{ + return 1; +} + +DBusConnection *dbus_bus_get(DBusBusType type ATTRIBUTE_UNUSED, + DBusError *error ATTRIBUTE_UNUSED) +{ + return (DBusConnection *)0x1; +} + +void dbus_connection_set_exit_on_disconnect(DBusConnection *connection ATTRIBUTE_UNUSED, + dbus_bool_t exit_on_disconnect ATTRIBUTE_UNUSED) +{ +} + + +dbus_bool_t dbus_connection_set_watch_functions(DBusConnection *connection ATTRIBUTE_UNUSED, + DBusAddWatchFunction add_function ATTRIBUTE_UNUSED, + DBusRemoveWatchFunction remove_function ATTRIBUTE_UNUSED, + DBusWatchToggledFunction toggled_function ATTRIBUTE_UNUSED, + void *data ATTRIBUTE_UNUSED, + DBusFreeFunction free_data_function ATTRIBUTE_UNUSED) +{ + return 1; +} + +DBusMessage *dbus_connection_send_with_reply_and_block(DBusConnection *connection ATTRIBUTE_UNUSED, + DBusMessage *message, + int timeout_milliseconds ATTRIBUTE_UNUSED, + DBusError *error) +{ + DBusMessage *reply = NULL; + + dbus_message_set_serial(message, 7); + + if (getenv("FAIL_BAD_SERVICE")) + reply = dbus_message_new_error(message, + "org.freedesktop.systemd.badthing", + "Something went wrong creating the machine"); + else if (getenv("FAIL_NO_SERVICE")) + dbus_set_error(error, + "org.freedesktop.DBus.Error.ServiceUnknown", + "%s", "The name org.freedesktop.machine1 was not provided by any .service files"); + else + reply = dbus_message_new_method_return(message); + + return reply; +} + +#else +/* Nothing to override on non-__linux__ platforms */ +#endif diff --git a/tests/virsystemdtest.c b/tests/virsystemdtest.c new file mode 100644 index 000000000..bcf3ad32f --- /dev/null +++ b/tests/virsystemdtest.c @@ -0,0 +1,158 @@ +/* + * Copyright (C) 2013 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + * + * Author: Daniel P. Berrange <berrange@redhat.com> + */ + +#include <config.h> + +#include <stdlib.h> + +#include "virsystemd.h" +#include "virlog.h" +#include "testutils.h" + +#define VIR_FROM_THIS VIR_FROM_NONE + +static int testCreateContainer(const void *opaque ATTRIBUTE_UNUSED) +{ + unsigned char uuid[VIR_UUID_BUFLEN] = { + 1, 1, 1, 1, + 2, 2, 2, 2, + 3, 3, 3, 3, + 4, 4, 4, 4 + }; + if (virSystemdCreateMachine("demo", + "lxc", + true, + uuid, + "/proc/123/root", + 123, + true, + "highpriority.slice") < 0) { + fprintf(stderr, "%s", "Failed to create LXC machine\n"); + return -1; + } + + return 0; +} + +static int testCreateMachine(const void *opaque ATTRIBUTE_UNUSED) +{ + unsigned char uuid[VIR_UUID_BUFLEN] = { + 1, 1, 1, 1, + 2, 2, 2, 2, + 3, 3, 3, 3, + 4, 4, 4, 4 + }; + if (virSystemdCreateMachine("demo", + "qemu", + false, + uuid, + NULL, + 123, + false, + NULL) < 0) { + fprintf(stderr, "%s", "Failed to create KVM machine\n"); + return -1; + } + + return 0; +} + +static int testCreateNoSystemd(const void *opaque ATTRIBUTE_UNUSED) +{ + unsigned char uuid[VIR_UUID_BUFLEN] = { + 1, 1, 1, 1, + 2, 2, 2, 2, + 3, 3, 3, 3, + 4, 4, 4, 4 + }; + int rv; + + setenv("FAIL_NO_SERVICE", "1", 1); + + if ((rv = virSystemdCreateMachine("demo", + "qemu", + true, + uuid, + NULL, + 123, + false, + NULL)) == 0) { + fprintf(stderr, "%s", "Unexpected create machine success\n"); + return -1; + } + + if (rv != -2) { + fprintf(stderr, "%s", "Unexpected create machine error\n"); + return -1; + } + + return 0; +} + +static int testCreateBadSystemd(const void *opaque ATTRIBUTE_UNUSED) +{ + unsigned char uuid[VIR_UUID_BUFLEN] = { + 1, 1, 1, 1, + 2, 2, 2, 2, + 3, 3, 3, 3, + 4, 4, 4, 4 + }; + int rv; + + setenv("FAIL_BAD_SERVICE", "1", 1); + + if ((rv = virSystemdCreateMachine("demo", + "qemu", + true, + uuid, + NULL, + 123, + false, + NULL)) == 0) { + fprintf(stderr, "%s", "Unexpected create machine success\n"); + return -1; + } + + if (rv != -1) { + fprintf(stderr, "%s", "Unexpected create machine error\n"); + return -1; + } + + return 0; +} + +static int +mymain(void) +{ + int ret = 0; + + if (virtTestRun("Test create container ", 1, testCreateContainer, NULL) < 0) + ret = -1; + if (virtTestRun("Test create machine ", 1, testCreateMachine, NULL) < 0) + ret = -1; + if (virtTestRun("Test create no systemd ", 1, testCreateNoSystemd, NULL) < 0) + ret = -1; + if (virtTestRun("Test create bad systemd ", 1, testCreateBadSystemd, NULL) < 0) + ret = -1; + + return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE; +} + +VIRT_TEST_MAIN_PRELOAD(mymain, abs_builddir "/.libs/virsystemdmock.so") diff --git a/tests/xencapstest.c b/tests/xencapstest.c index 8bdd6cde1..9de3919fe 100644 --- a/tests/xencapstest.c +++ b/tests/xencapstest.c @@ -12,6 +12,8 @@ #include "virfile.h" #include "virstring.h" +#define VIR_FROM_THIS VIR_FROM_NONE + static int testCompareFiles(virArch hostmachine, const char *xml_rel, const char *cpuinfo_rel, const char *capabilities_rel) diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c index 8e0c59e45..73e4a2d68 100644 --- a/tests/xmconfigtest.c +++ b/tests/xmconfigtest.c @@ -37,6 +37,8 @@ #include "viralloc.h" #include "virstring.h" +#define VIR_FROM_THIS VIR_FROM_NONE + static virCapsPtr caps; static virDomainXMLOptionPtr xmlopt; diff --git a/tests/xml2sexprtest.c b/tests/xml2sexprtest.c index ec196c41d..87ac2c3e2 100644 --- a/tests/xml2sexprtest.c +++ b/tests/xml2sexprtest.c @@ -16,6 +16,8 @@ #include "testutilsxen.h" #include "virstring.h" +#define VIR_FROM_THIS VIR_FROM_NONE + static virCapsPtr caps; static virDomainXMLOptionPtr xmlopt; |