[libvirt] PATCH: Fix libvirtd test cases

The libvirtd tests have a number of bugs causing them to fail & generally do bad things. They all currently fail on RHEL5 hosts. - daemon-conf - the abs_topbuild_dir env var was not being set correctly so it failed to find config.h. It also broken by changes in stderr debug output from libvirtd. This patch fixes the env var, and changes it to it just looks for the desired error message, not doing a diff across entire of stdout/err. - libvirtd-fail - again fails because it is diffing the whole of stdout/err and coming across warning messages its not expecting. Change it to look for daemon error exit status because that reliably indicates whether it quit as expected on bogus configs - libvirtd-pool - running the QEMU driver which does not exist, just to test virsh's XML generation capabilities. This adds a --print-xml arg to virsh and uses the test:///default driver for testing, so we avoid the QEMU driver & daemon during tests - libvirt-net-persist - again trying to rnu the QEMU driver which does not exist, and its writing config files into the user's home directory. There's no easy fix for this, so I'm killing it off. It can be tested in the separate integration test suite where you can be sure to arrange for correct pre-requisites and safe working environment src/virsh.c | 51 ++++++++++++++++++++++++--------------- tests/Makefile.am | 3 -- tests/daemon-conf | 13 +++------- tests/libvirtd-fail | 9 ++---- tests/libvirtd-net-persist | 58 --------------------------------------------- tests/libvirtd-pool | 41 ++++++------------------------- 6 files changed, 48 insertions(+), 127 deletions(-) Daniel Index: src/virsh.c =================================================================== RCS file: /data/cvs/libvirt/src/virsh.c,v retrieving revision 1.195 diff -u -p -u -p -r1.195 virsh.c --- src/virsh.c 3 Mar 2009 09:59:02 -0000 1.195 +++ src/virsh.c 3 Mar 2009 19:23:01 -0000 @@ -2923,6 +2923,7 @@ cmdPoolCreate(vshControl *ctl, const vsh */ static const vshCmdOptDef opts_pool_X_as[] = { {"name", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("name of the pool")}, + {"print-xml", VSH_OT_BOOL, 0, gettext_noop("print XML document, but don't define/create")}, {"type", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("type of the pool")}, {"source-host", VSH_OT_DATA, 0, gettext_noop("source-host for underlying storage")}, {"source-path", VSH_OT_DATA, 0, gettext_noop("source path for underlying storage")}, @@ -3002,6 +3003,7 @@ cmdPoolCreateAs(vshControl *ctl, const v { virStoragePoolPtr pool; char *xml, *name; + int printXML = vshCommandOptBool(cmd, "print-xml"); if (!vshConnectionUsability(ctl, ctl->conn, TRUE)) return FALSE; @@ -3009,18 +3011,22 @@ cmdPoolCreateAs(vshControl *ctl, const v if (!buildPoolXML(cmd, &name, &xml)) return FALSE; - pool = virStoragePoolCreateXML(ctl->conn, xml, 0); - free (xml); - - if (pool != NULL) { - vshPrint(ctl, _("Pool %s created\n"), name); - virStoragePoolFree(pool); - return TRUE; + if (printXML) { + printf("%s", xml); + free (xml); } else { - vshError(ctl, FALSE, _("Failed to create pool %s"), name); - } + pool = virStoragePoolCreateXML(ctl->conn, xml, 0); + free (xml); - return FALSE; + if (pool != NULL) { + vshPrint(ctl, _("Pool %s created\n"), name); + virStoragePoolFree(pool); + } else { + vshError(ctl, FALSE, _("Failed to create pool %s"), name); + return FALSE; + } + } + return TRUE; } @@ -3085,6 +3091,7 @@ cmdPoolDefineAs(vshControl *ctl, const v { virStoragePoolPtr pool; char *xml, *name; + int printXML = vshCommandOptBool(cmd, "print-xml"); if (!vshConnectionUsability(ctl, ctl->conn, TRUE)) return FALSE; @@ -3092,18 +3099,22 @@ cmdPoolDefineAs(vshControl *ctl, const v if (!buildPoolXML(cmd, &name, &xml)) return FALSE; - pool = virStoragePoolDefineXML(ctl->conn, xml, 0); - free (xml); - - if (pool != NULL) { - vshPrint(ctl, _("Pool %s defined\n"), name); - virStoragePoolFree(pool); - return TRUE; + if (printXML) { + printf("%s", xml); + free (xml); } else { - vshError(ctl, FALSE, _("Failed to define pool %s"), name); - } + pool = virStoragePoolDefineXML(ctl->conn, xml, 0); + free (xml); - return FALSE; + if (pool != NULL) { + vshPrint(ctl, _("Pool %s defined\n"), name); + virStoragePoolFree(pool); + } else { + vshError(ctl, FALSE, _("Failed to define pool %s"), name); + return FALSE; + } + } + return TRUE; } Index: tests/Makefile.am =================================================================== RCS file: /data/cvs/libvirt/tests/Makefile.am,v retrieving revision 1.76 diff -u -p -u -p -r1.76 Makefile.am --- tests/Makefile.am 3 Mar 2009 17:00:18 -0000 1.76 +++ tests/Makefile.am 3 Mar 2009 19:23:01 -0000 @@ -82,7 +82,6 @@ test_scripts += \ define-dev-segfault \ int-overflow \ libvirtd-fail \ - libvirtd-net-persist \ libvirtd-pool \ read-bufsiz \ read-non-seekable \ @@ -127,7 +126,7 @@ TESTS_ENVIRONMENT = \ abs_top_srcdir=`cd '$(top_srcdir)'; pwd` \ abs_builddir=`cd '$(builddir)'; pwd` \ abs_srcdir=`cd '$(srcdir)'; pwd` \ - CONFIG_HEADER='$(abs_top_builddir)/config.h' \ + CONFIG_HEADER="`cd '$(top_builddir)'; pwd`/config.h" \ PATH="$(path_add)$(PATH_SEPARATOR)$$PATH" \ SHELL="$(SHELL)" \ LIBVIRT_DRIVER_DIR="$(abs_top_builddir)/src/.libs" \ Index: tests/daemon-conf =================================================================== RCS file: /data/cvs/libvirt/tests/daemon-conf,v retrieving revision 1.6 diff -u -p -u -p -r1.6 daemon-conf --- tests/daemon-conf 2 Mar 2009 20:01:26 -0000 1.6 +++ tests/daemon-conf 3 Mar 2009 19:23:01 -0000 @@ -52,15 +52,10 @@ while :; do test $i = $n && break - # Filter out some ignorable diagnostics and drop timestamps - sed \ - -e 's/.*: error : //' \ - -e '/^Cannot set group when not running as root$/d' \ - -e '/^libnuma: Warning: .sys not mounted or no numa system/d' \ - err > k && mv k err - - printf '%s\n\n' "remoteReadConfigFile: $f: $param_name: $msg" > expected-err - diff -u expected-err err || fail=1 + # Check that the diagnostic we want appears + grep "$msg" err 1>/dev/null 2>&1 + RET=$? + test "$RET" = "0" || fail=1 i=$(expr $i + 1) done Index: tests/libvirtd-fail =================================================================== RCS file: /data/cvs/libvirt/tests/libvirtd-fail,v retrieving revision 1.1 diff -u -p -u -p -r1.1 libvirtd-fail --- tests/libvirtd-fail 2 Mar 2009 20:01:05 -0000 1.1 +++ tests/libvirtd-fail 3 Mar 2009 19:23:01 -0000 @@ -12,10 +12,7 @@ test -z "$abs_top_srcdir" && abs_top_src fail=0 -libvirtd --config=no-such-file > log 2>&1 && fail=1 -cat <<\EOF > exp -Failed to open file 'no-such-file': No such file or directory -EOF +libvirtd --config=no-such-conf --timeout=5 2> log +RET=$? -compare exp log || fail=1 -exit $fail +test "$RET" != "0" && exit 0 || exit 1 Index: tests/libvirtd-net-persist =================================================================== RCS file: tests/libvirtd-net-persist diff -N tests/libvirtd-net-persist --- tests/libvirtd-net-persist 2 Mar 2009 18:41:00 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,58 +0,0 @@ -#!/bin/sh -# ensure that net-destroy doesn't make network disappear (persistence-related) - -if test "$VERBOSE" = yes; then - set -x - libvirtd --version - virsh --version -fi - -test -z "$srcdir" && srcdir=$(pwd) -test -z "$abs_top_srcdir" && abs_top_srcdir=$(pwd)/.. -. "$srcdir/test-lib.sh" - -fail=0 - -pwd=$(pwd) || fail=1 -sock_dir="$pwd" -cat > conf <<EOF || fail=1 -unix_sock_dir = "$sock_dir" -log_outputs = "3:file:$pwd/log" -EOF - -cat > net.xml <<EOF || fail=1 -<network> - <name>N</name> - <ip address="192.168.199.1" netmask="255.255.255.0"></ip> -</network> -EOF - -cat > exp <<EOF || fail=1 -Network N defined from net.xml - -Network N destroyed - -Name State Autostart ------------------------------------------ -N inactive no - -EOF - -libvirtd --config=conf > libvirtd-log 2>&1 & pid=$! -sleep 1 - -url="qemu:///session?socket=@$sock_dir/libvirt-sock" -virsh -c "$url" \ - 'net-define net.xml; net-destroy N; net-list --all' > out 2>&1 \ - || fail=1 - -# if libvird's log is empty, sleep for a second before killing it -test -s libvirtd-log || sleep 1 -kill $pid - -compare exp out || fail=1 - -printf "Shutting down network 'N'\n" > log-exp -compare log-exp libvirtd-log || fail=1 - -exit $fail Index: tests/libvirtd-pool =================================================================== RCS file: /data/cvs/libvirt/tests/libvirtd-pool,v retrieving revision 1.1 diff -u -p -u -p -r1.1 libvirtd-pool --- tests/libvirtd-pool 2 Mar 2009 20:01:05 -0000 1.1 +++ tests/libvirtd-pool 3 Mar 2009 19:23:01 -0000 @@ -1,9 +1,8 @@ #!/bin/sh -# Get coverage of libvirtd's config-parsing code. +# Get coverage of virsh pool-define-as XML formatting if test "$VERBOSE" = yes; then set -x - libvirtd --version virsh --version fi @@ -14,50 +13,28 @@ test -z "$abs_top_srcdir" && abs_top_src fail=0 pwd=$(pwd) || fail=1 -sock_dir="$pwd" -cat > conf <<EOF || fail=1 -unix_sock_dir = "$sock_dir" -log_outputs = "3:file:$pwd/log" -EOF - -libvirtd --config=conf > libvirtd-log 2>&1 & pid=$! -sleep 1 - -url="qemu:///session?socket=@$sock_dir/libvirt-sock" -virsh --connect "$url" \ - pool-define-as P dir src-host /src/path /src/dev S /target-path > out 2>&1 \ - || fail=1 -virsh --connect "$url" pool-dumpxml P >> out 2>&1 || fail=1 -# remove random uuid -sed 's/<uuid>.*/-/' out > k && mv k out || fail=1 - -kill $pid +virsh --connect test:///default \ + pool-define-as --print-xml \ + P dir src-host /src/path /src/dev S /target-path \ + 1>out 2>&1 cat <<EOF > pool-list-exp -Pool P defined - <pool type='dir'> <name>P</name> - - - <capacity>0</capacity> - <allocation>0</allocation> - <available>0</available> <source> + <host name='src-host'/> + <dir path='/src/path'/> + <device path='/src/dev'/> + <name>S</name> </source> <target> <path>/target-path</path> - <permissions> - <mode>0700</mode> - <owner>500</owner> - <group>500</group> - </permissions> </target> </pool> EOF compare pool-list-exp out || fail=1 -compare /dev/null libvirtd-log || fail=1 exit $fail -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Daniel P. Berrange wrote:
The libvirtd tests have a number of bugs causing them to fail & generally do bad things. They all currently fail on RHEL5 hosts.
Odd that they'd all fail for you. Only one fails for me: libvirtd-pool and daemon-conf is mistakenly skipped due to use of ancient automake-1.9.
- daemon-conf - the abs_topbuild_dir env var was not being set correctly
As you know, that's because you're building with RHEL5's ancient version of automake. That is a no-no (for many reasons) but easy to work around. IMHO, no one should never build using such old autotools, but I do know how we're currently constrained. no choice. Your change to tests/Makefile.am is fine.
so it failed to find config.h. It also broken by changes in stderr debug output from libvirtd. This patch fixes the env var, and changes it to it just looks for the desired error message, not doing a diff across entire of stdout/err.
Once I worked around automake-1.9's lack of abs_top_builddir, daemon-conf passed. What error did you see? I want to keep the diffs strict. While sometimes more work, I've found that it's worthwhile because it helps detect unrelated bugs.
- libvirtd-fail - again fails because it is diffing the whole of stdout/err and coming across warning messages its not expecting. Change it to look for daemon error exit status because that reliably indicates whether it quit as expected on bogus configs
Didn't fail for me. Provide more detail (e.g., actual warnings) and I'll be happy to find a solution we can both accept.
- libvirtd-pool - running the QEMU driver which does not exist, just to test virsh's XML generation capabilities. This adds a --print-xml arg to virsh and uses the test:///default driver for testing, so we avoid the QEMU driver & daemon during tests
--- pool-list-exp 2009-03-03 14:54:35.000000000 -0500 +++ out 2009-03-03 14:54:35.000000000 -0500 @@ -12,8 +12,8 @@ <path>/target-path</path> <permissions> <mode>0700</mode> - <owner>500</owner> - <group>500</group> + <owner>508</owner> + <group>508</group> </permissions> </target> </pool> FAIL: libvirtd-pool It's easy to avoid that difference. With the following, it passes for me: diff --git a/tests/libvirtd-pool b/tests/libvirtd-pool index 370f3b1..bf838b0 100755 --- a/tests/libvirtd-pool +++ b/tests/libvirtd-pool @@ -31,6 +31,9 @@ virsh --connect "$url" pool-dumpxml P >> out 2>&1 || fail=1 # remove random uuid sed 's/<uuid>.*/-/' out > k && mv k out || fail=1 +# filter out actual owner and group numbers +sed 's/<owner>.*/-/' out > k && mv k out || fail=1 +sed 's/<group>.*/-/' out > k && mv k out || fail=1 kill $pid @@ -49,8 +52,8 @@ Pool P defined <path>/target-path</path> <permissions> <mode>0700</mode> - <owner>500</owner> - <group>500</group> + - + - </permissions> </target> </pool> While I like the idea of your new print-xml option, I don't want to decreasing coverage. If lack of QEMU is the problem, the solution is simply to skip the test.
- libvirt-net-persist - again trying to rnu the QEMU driver which does not exist, and its writing config files into the user's home directory. There's no easy fix for this, so I'm killing it off. It can be tested in the separate integration test suite where you can be sure to arrange for correct pre-requisites and safe working environment
NACK to removing this test. When built without qemu, this test should simply be skipped. Removing test coverage (no matter how much you dislike the current form) should be done only as a last resort. Just do what daemon-conf does: grep '^#define WITH_QEMU 1' $CONFIG_HEADER > /dev/null || skip_test_ "configured without QEMU support"
src/virsh.c | 51 ++++++++++++++++++++++++--------------- tests/Makefile.am | 3 -- tests/daemon-conf | 13 +++------- tests/libvirtd-fail | 9 ++---- tests/libvirtd-net-persist | 58 --------------------------------------------- tests/libvirtd-pool | 41 ++++++------------------------- 6 files changed, 48 insertions(+), 127 deletions(-)

Jim Meyering wrote:
Daniel P. Berrange wrote:
The libvirtd tests have a number of bugs causing them to fail & generally do bad things. They all currently fail on RHEL5 hosts.
Odd that they'd all fail for you. Only one fails for me: libvirtd-pool and daemon-conf is mistakenly skipped due to use of ancient automake-1.9.
- daemon-conf - the abs_topbuild_dir env var was not being set correctly
As you know, that's because you're building with RHEL5's ancient version of automake. That is a no-no (for many reasons) but easy to work around. IMHO, no one should never build using such old autotools, but I do know how we're currently constrained. no choice.
Your change to tests/Makefile.am is fine.
so it failed to find config.h. It also broken by changes in stderr debug output from libvirtd. This patch fixes the env var, and changes it to it just looks for the desired error message, not doing a diff across entire of stdout/err.
Once I worked around automake-1.9's lack of abs_top_builddir, daemon-conf passed.
What error did you see?
I've deduced that you were building --without-qemu. Here's a less invasive patch that fixes those problems. I've confirmed that it passes (or skips) all tests on RHEL5 when built both --with-qemu and --without-qemu. Of course, it still passes on F10/F11 and rawhide.
From c478463429e223976c5dcebcf02635624564fd74 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@redhat.com> Date: Wed, 4 Mar 2009 00:27:09 -0500 Subject: [PATCH] tests: accommodate building with automake-1.9 and --without-qemu
* tests/Makefile.am: Export replacement definitions of variables like $(abs_top_builddir) that are provided by reasonably recent versions of automake, but lacking in automake-1.9. * tests/test-lib.sh (require_qemu_): New function. * tests/daemon-conf: Use it. * tests/libvirtd-net-persist: Use it. * tests/libvirtd-pool: Use it. --- tests/Makefile.am | 13 +++++++------ tests/daemon-conf | 4 +--- tests/libvirtd-net-persist | 1 + tests/libvirtd-pool | 8 ++++++-- tests/test-lib.sh | 6 ++++++ 5 files changed, 21 insertions(+), 11 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 8b4bd0c..3f79516 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -117,16 +117,17 @@ endif TESTS += nodedevxml2xmltest -path_add = $$abs_top_builddir/src$(PATH_SEPARATOR)$$abs_top_builddir/qemud - # NB, automake < 1.10 does not provide the real # abs_top_{src/build}dir variables, so don't rely # on them here. Fake them with 'pwd' +export abs_top_builddir ?= $(shell cd '$(top_builddir)'; pwd) +export abs_top_srcdir ?= $(shell cd '$(top_srcdir)'; pwd) +export abs_builddir ?= $(shell cd '$(builddir)'; pwd) +export abs_srcdir ?= $(shell cd '$(srcdir)'; pwd) + +path_add = $(abs_top_builddir)/src$(PATH_SEPARATOR)$(abs_top_builddir)/qemud + TESTS_ENVIRONMENT = \ - abs_top_builddir=`cd '$(top_builddir)'; pwd` \ - abs_top_srcdir=`cd '$(top_srcdir)'; pwd` \ - abs_builddir=`cd '$(builddir)'; pwd` \ - abs_srcdir=`cd '$(srcdir)'; pwd` \ CONFIG_HEADER='$(abs_top_builddir)/config.h' \ PATH="$(path_add)$(PATH_SEPARATOR)$$PATH" \ SHELL="$(SHELL)" \ diff --git a/tests/daemon-conf b/tests/daemon-conf index a5e86ae..e63ce01 100755 --- a/tests/daemon-conf +++ b/tests/daemon-conf @@ -9,9 +9,7 @@ fi test -z "$srcdir" && srcdir=$(pwd) test -z "$abs_top_srcdir" && abs_top_srcdir=$(pwd)/.. . $srcdir/test-lib.sh - -grep '^#define WITH_QEMU 1' $CONFIG_HEADER > /dev/null || - skip_test_ "configured without QEMU support" +require_qemu_ conf="$abs_top_srcdir/qemud/libvirtd.conf" diff --git a/tests/libvirtd-net-persist b/tests/libvirtd-net-persist index 50a1ef4..f03e669 100755 --- a/tests/libvirtd-net-persist +++ b/tests/libvirtd-net-persist @@ -10,6 +10,7 @@ fi test -z "$srcdir" && srcdir=$(pwd) test -z "$abs_top_srcdir" && abs_top_srcdir=$(pwd)/.. . "$srcdir/test-lib.sh" +require_qemu_ fail=0 diff --git a/tests/libvirtd-pool b/tests/libvirtd-pool index 370f3b1..b38dbb2 100755 --- a/tests/libvirtd-pool +++ b/tests/libvirtd-pool @@ -10,6 +10,7 @@ fi test -z "$srcdir" && srcdir=$(pwd) test -z "$abs_top_srcdir" && abs_top_srcdir=$(pwd)/.. . "$srcdir/test-lib.sh" +require_qemu_ fail=0 @@ -31,6 +32,9 @@ virsh --connect "$url" pool-dumpxml P >> out 2>&1 || fail=1 # remove random uuid sed 's/<uuid>.*/-/' out > k && mv k out || fail=1 +# filter out actual owner and group numbers +sed 's/<owner>.*/-/' out > k && mv k out || fail=1 +sed 's/<group>.*/-/' out > k && mv k out || fail=1 kill $pid @@ -49,8 +53,8 @@ Pool P defined <path>/target-path</path> <permissions> <mode>0700</mode> - <owner>500</owner> - <group>500</group> + - + - </permissions> </target> </pool> diff --git a/tests/test-lib.sh b/tests/test-lib.sh index a007109..fd4cd2a 100644 --- a/tests/test-lib.sh +++ b/tests/test-lib.sh @@ -24,6 +24,12 @@ require_acl_() || skip_test_ "This test requires a local user named bin." } +require_qemu_() +{ + grep '^#define WITH_QEMU 1' $CONFIG_HEADER > /dev/null || + skip_test_ "configured without QEMU support" +} + require_ulimit_() { ulimit_works=yes -- 1.6.2.rc1.285.gc5f54

On Tue, Mar 03, 2009 at 09:20:03PM +0100, Jim Meyering wrote:
Daniel P. Berrange wrote:
The libvirtd tests have a number of bugs causing them to fail & generally do bad things. They all currently fail on RHEL5 hosts.
Odd that they'd all fail for you. Only one fails for me: libvirtd-pool and daemon-conf is mistakenly skipped due to use of ancient automake-1.9.
- daemon-conf - the abs_topbuild_dir env var was not being set correctly
As you know, that's because you're building with RHEL5's ancient version of automake. That is a no-no (for many reasons) but easy to work around. IMHO, no one should never build using such old autotools, but I do know how we're currently constrained. no choice.
That is not a no-no. It is fundamentally a requirement for libvirt that is not going to change.
so it failed to find config.h. It also broken by changes in stderr debug output from libvirtd. This patch fixes the env var, and changes it to it just looks for the desired error message, not doing a diff across entire of stdout/err.
Once I worked around automake-1.9's lack of abs_top_builddir, daemon-conf passed.
What error did you see?
I want to keep the diffs strict. While sometimes more work,
This has been a total PITA for the entire time this test has existed constantly breaking whenever something appears on stdout for reasons totally unrelated to the test case. It is just not maintainable as it is.
- libvirtd-fail - again fails because it is diffing the whole of stdout/err and coming across warning messages its not expecting. Change it to look for daemon error exit status because that reliably indicates whether it quit as expected on bogus configs
Didn't fail for me. Provide more detail (e.g., actual warnings) and I'll be happy to find a solution we can both accept.
- libvirtd-pool - running the QEMU driver which does not exist, just to test virsh's XML generation capabilities. This adds a --print-xml arg to virsh and uses the test:///default driver for testing, so we avoid the QEMU driver & daemon during tests
--- pool-list-exp 2009-03-03 14:54:35.000000000 -0500 +++ out 2009-03-03 14:54:35.000000000 -0500 @@ -12,8 +12,8 @@ <path>/target-path</path> <permissions> <mode>0700</mode> - <owner>500</owner> - <group>500</group> + <owner>508</owner> + <group>508</group> </permissions> </target> </pool> FAIL: libvirtd-pool
It's easy to avoid that difference. With the following, it passes for me:
This is still missing the point - the test is overengineered & unmaintainable. There is absolutely no need to run the daemon or run the QEMU driver in order to test the XML generation. This test should never have been committed since you didn't even wait for review or comments before committing.
While I like the idea of your new print-xml option, I don't want to decreasing coverage.
It is not decreasing the test coverage - it is focusing the test case on the thing that is actually being tested - the XML generation of the virsh command to produce a more reliable & maintainable test case which doesn't randomly fail & need disabling based on configure options.
- libvirt-net-persist - again trying to rnu the QEMU driver which does not exist, and its writing config files into the user's home directory. There's no easy fix for this, so I'm killing it off. It can be tested in the separate integration test suite where you can be sure to arrange for correct pre-requisites and safe working environment
NACK to removing this test.
When built without qemu, this test should simply be skipped. Removing test coverage (no matter how much you dislike the current form) should be done only as a last resort. Just do what daemon-conf does:
That is not sufficient. Even if the QEMU driver is compiled into libvirt you cannot expect that you will be able run the QEMU driver. We fundamentally *DO NOT* run the real hypervisor drivers in the test suite. This is what the "test:///default' driver was written to do. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Tue, Mar 03, 2009 at 07:30:27PM +0000, Daniel P. Berrange wrote:
The libvirtd tests have a number of bugs causing them to fail & generally do bad things. They all currently fail on RHEL5 hosts.
For the sake of the release (basically to not delay it further) and since the virsh new option is actually a good thing (IMHO) I suggest to go with the first patch from Dan, and reexamine the way we can improve testing and in general make it more reliable/portable. So ACK, please commit, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (3)
-
Daniel P. Berrange
-
Daniel Veillard
-
Jim Meyering