mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-29 17:33:09 +00:00
tests: further isolate a test that runs libvirtd
* tests/daemon-conf: Specify a non-default socket directory. Specify test-specific log directory and pid file, too.
This commit is contained in:
parent
d15549aee0
commit
0c85c384fa
@ -1,3 +1,9 @@
|
|||||||
|
Mon Mar 2 21:00:00 +0100 2009 Jim Meyering <meyering@redhat.com>
|
||||||
|
|
||||||
|
tests: further isolate a test that runs libvirtd
|
||||||
|
* tests/daemon-conf: Specify a non-default socket directory.
|
||||||
|
Specify test-specific log directory and pid file, too.
|
||||||
|
|
||||||
Mon Mar 2 21:00:00 +0100 2009 Jim Meyering <meyering@redhat.com>
|
Mon Mar 2 21:00:00 +0100 2009 Jim Meyering <meyering@redhat.com>
|
||||||
|
|
||||||
add two tests
|
add two tests
|
||||||
|
@ -67,8 +67,18 @@ done
|
|||||||
|
|
||||||
# Run with the unmodified config file.
|
# Run with the unmodified config file.
|
||||||
sleep_secs=2
|
sleep_secs=2
|
||||||
|
|
||||||
|
# Be careful to specify a non-default socket directory:
|
||||||
|
sed 's,^unix_sock_dir.*,unix_sock_dir="'"$(pwd)"'",' tmp.conf > k || fail=1
|
||||||
|
mv k tmp.conf || fail=1
|
||||||
|
|
||||||
|
# Also, specify a test-specific log directory:
|
||||||
|
sed 's,^log_outputs.*,log_outputs="3:file:'"$(pwd)/log"'",' tmp.conf > k \
|
||||||
|
|| fail=1
|
||||||
|
mv k tmp.conf || fail=1
|
||||||
|
|
||||||
printf "running libvirtd with a valid config file ($sleep_secs seconds)\n" 1>&2
|
printf "running libvirtd with a valid config file ($sleep_secs seconds)\n" 1>&2
|
||||||
libvirtd --config=tmp.conf > log 2>&1 & pid=$!
|
libvirtd --pid-file=pid-file --config=tmp.conf > log 2>&1 & pid=$!
|
||||||
sleep $sleep_secs
|
sleep $sleep_secs
|
||||||
kill $pid
|
kill $pid
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user