aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Allan <dallan@redhat.com>2010-02-19 18:37:00 +0100
committerDaniel Veillard <veillard@redhat.com>2010-02-20 15:26:53 +0100
commitb4bf51253b2f8c3c811a9681699a65871dc4ef2d (patch)
treec1babe865b56d61974e6bc22adc8502d15c361fa /tests
parentvirsh.c: avoid leak on OOM error path (diff)
downloadlibvirt-b4bf51253b2f8c3c811a9681699a65871dc4ef2d.tar.gz
libvirt-b4bf51253b2f8c3c811a9681699a65871dc4ef2d.tar.bz2
libvirt-b4bf51253b2f8c3c811a9681699a65871dc4ef2d.zip
Fix daemon-conf invalid failures
The daemon-conf test would fail on my system if there was a system libvirtd running. In the course of troubleshooting that problem, I discovered that the daemon-conf script would always fail if run by itself because it found the line: \# that each "PARAMETER = VALUE" line in this file have the parameter which it mistook for a line containing a parameter. I have changed the test to avoid mistaking a line containing \"PARAMETER = VALUE\" for a parameter line. The corrupted config tests turned out to be failing because the test daemon was discovering the pid file from the running daemon and exiting before it processed the test config file. Specifying the pid file for the corrupt config tests in the same way as for the valid config test solved that problem.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/daemon-conf4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/daemon-conf b/tests/daemon-conf
index 1eb4be17b..10c16284b 100755
--- a/tests/daemon-conf
+++ b/tests/daemon-conf
@@ -19,7 +19,7 @@ grep '^#define WITH_QEMU 1' "$CONFIG_HEADER" > /dev/null ||
conf="$abs_top_srcdir/daemon/libvirtd.conf"
# Ensure that each commented out PARAMETER = VALUE line has the expected form.
-grep '[a-z_] *= *[^ ]' "$conf" | grep -vE '^#[a-z_]+ = ' \
+grep -v '\"PARAMETER = VALUE\"' "$conf" | grep '[a-z_] *= *[^ ]' | grep -vE '^#[a-z_]+ = ' \
&& { echo "$0: found unexpected lines (above) in $conf" 1>&2; exit 1; }
# Start with the sample libvirtd.conf file, uncommenting all real directives.
@@ -45,7 +45,7 @@ while :; do
esac
# Run libvirtd, expecting it to fail.
- $abs_top_builddir/daemon/libvirtd --config=$f 2> err && fail=1
+ $abs_top_builddir/daemon/libvirtd --pid-file=pid-file --config=$f 2> err && fail=1
case $rhs in
# '"'*) msg='should be a string';;