While running make check, I noticed that it was actually using the virsh binary from my system, in /usr/bin/virsh, and not the one that was just compiled. This doesn't seem to be the intent, so I changed all of the test scripts to point to the one built in-tree, not the system one. Signed-off-by: Chris Lalancette <clalance@xxxxxxxxxx> --- tests/cpuset | 6 +++--- tests/define-dev-segfault | 4 ++-- tests/libvirtd-pool | 4 ++-- tests/read-bufsiz | 6 +++--- tests/read-non-seekable | 6 +++--- tests/start | 4 ++-- tests/test_conf.sh | 2 +- tests/undefine | 8 ++++---- tests/vcpupin | 6 +++--- tests/virsh-all | 6 +++--- tests/virsh-synopsis | 6 +++--- 11 files changed, 29 insertions(+), 29 deletions(-) diff --git a/tests/cpuset b/tests/cpuset index eeb0ee2..a3abe14 100755 --- a/tests/cpuset +++ b/tests/cpuset @@ -18,7 +18,7 @@ if test "$VERBOSE" = yes; then set -x - virsh --version + $abs_top_builddir/tools/virsh --version fi . $srcdir/test-lib.sh @@ -26,7 +26,7 @@ fi fail=0 # generate input -virsh --connect test:///default dumpxml 1 > xml || fail=1 +$abs_top_builddir/tools/virsh --connect test:///default dumpxml 1 > xml || fail=1 # require the presence of the string we'll transform grep '<vcpu>' xml > /dev/null || fail=1 @@ -34,7 +34,7 @@ grep '<vcpu>' xml > /dev/null || fail=1 sed "s/vcpu>/vcpu cpuset='aaa'>/" xml > xml-invalid || fail=1 # Require failure and a diagnostic. -virsh --connect test:///default define xml-invalid > out 2>&1 && fail=1 +$abs_top_builddir/tools/virsh --connect test:///default define xml-invalid > out 2>&1 && fail=1 cat <<\EOF > exp || fail=1 error: Failed to define domain from xml-invalid error: failed Xen syscall topology cpuset syntax error diff --git a/tests/define-dev-segfault b/tests/define-dev-segfault index 4ae286f..cce1c07 100755 --- a/tests/define-dev-segfault +++ b/tests/define-dev-segfault @@ -4,7 +4,7 @@ if test "$VERBOSE" = yes; then set -x - virsh --version + $abs_top_builddir/tools/virsh --version fi test -z "$srcdir" && srcdir=$(pwd) @@ -62,7 +62,7 @@ cat <<\EOF > D.xml || fail=1 EOF url=test:///default -virsh --connect "$url" 'define D.xml; dumpxml D' > out 2>&1 || fail=1 +$abs_top_builddir/tools/virsh --connect "$url" 'define D.xml; dumpxml D' > out 2>&1 || fail=1 cat > exp <<EOF || fail=1 Domain D defined from D.xml diff --git a/tests/libvirtd-pool b/tests/libvirtd-pool index 59da5a6..96da111 100755 --- a/tests/libvirtd-pool +++ b/tests/libvirtd-pool @@ -3,7 +3,7 @@ if test "$VERBOSE" = yes; then set -x - virsh --version + $abs_top_builddir/tools/virsh --version fi test -z "$srcdir" && srcdir=$(pwd) @@ -14,7 +14,7 @@ fail=0 pwd=$(pwd) || fail=1 -virsh --connect test:///default \ +$abs_top_builddir/tools/virsh --connect test:///default \ pool-define-as --print-xml \ P dir src-host /src/path /src/dev S /target-path \ 1>out 2>&1 diff --git a/tests/read-bufsiz b/tests/read-bufsiz index 7d53735..9652817 100755 --- a/tests/read-bufsiz +++ b/tests/read-bufsiz @@ -18,7 +18,7 @@ if test "$VERBOSE" = yes; then set -x - virsh --version + $abs_top_builddir/tools/virsh --version fi test -z "$srcdir" && srcdir=`pwd` @@ -29,7 +29,7 @@ test -z "$abs_top_srcdir" && abs_top_srcdir=`pwd`/.. fail=0 # Output a valid definition, to be used as input. -virsh -c test:///default dumpxml 1 > xml || fail=1 +$abs_top_builddir/tools/virsh -c test:///default dumpxml 1 > xml || fail=1 for i in before after; do # The largest BUFSIZ I've seen is 128K. This is slightly larger. @@ -38,7 +38,7 @@ for i in before after; do # Append or prepend enough spaces to push the size over the limit: ( test $i = before && cat sp xml || cat xml sp ) > $in || fail=1 - virsh --connect test:///default define $in > out || fail=1 + $abs_top_builddir/tools/virsh --connect test:///default define $in > out || fail=1 printf "Domain test defined from $in\n\n" > exp || fail=1 compare exp out || fail=1 done diff --git a/tests/read-non-seekable b/tests/read-non-seekable index 8a7bdcd..648def6 100755 --- a/tests/read-non-seekable +++ b/tests/read-non-seekable @@ -18,7 +18,7 @@ if test "$VERBOSE" = yes; then set -x - virsh --version + $abs_top_builddir/tools/virsh --version fi . $srcdir/test-lib.sh @@ -40,11 +40,11 @@ cat <<\EOF > dom </domain> EOF -virsh -c test:///default define dom > /dev/null || fail=1 +$abs_top_builddir/tools/virsh -c test:///default define dom > /dev/null || fail=1 mkfifo_or_skip_ fifo cat dom > fifo & -virsh -c test:///default define fifo > /dev/null || fail=1 +$abs_top_builddir/tools/virsh -c test:///default define fifo > /dev/null || fail=1 (exit $fail); exit $fail diff --git a/tests/start b/tests/start index f457d59..6f7815a 100755 --- a/tests/start +++ b/tests/start @@ -18,7 +18,7 @@ if test "$VERBOSE" = yes; then set -x - virsh --version + $abs_top_builddir/tools/virsh --version fi test -z "$srcdir" && srcdir=$(pwd) @@ -30,7 +30,7 @@ fail=0 test_url=test:///default # expect this to fail -virsh -c $test_url start test > out 2> err && fail=1 +$abs_top_builddir/tools/virsh -c $test_url start test > out 2> err && fail=1 # stdout gets a newline echo > exp || fail=1 diff --git a/tests/test_conf.sh b/tests/test_conf.sh index 62c2324..2754765 100755 --- a/tests/test_conf.sh +++ b/tests/test_conf.sh @@ -2,7 +2,7 @@ if test "$VERBOSE" = yes; then set -x - virsh --version + $abs_top_builddir/tools/virsh --version fi . $srcdir/test-lib.sh diff --git a/tests/undefine b/tests/undefine index fafdae7..048a98b 100755 --- a/tests/undefine +++ b/tests/undefine @@ -18,7 +18,7 @@ if test "$VERBOSE" = yes; then set -x - virsh --version + $abs_top_builddir/tools/virsh --version fi . $srcdir/test-lib.sh @@ -26,7 +26,7 @@ fi fail=0 # Attempt to undefine a running domain, by domain name. -virsh -q -c test:///default undefine test > out 2>&1 +$abs_top_builddir/tools/virsh -q -c test:///default undefine test > out 2>&1 test $? = 1 || fail=1 cat <<\EOF > exp || fail=1 error: Failed to undefine domain test @@ -35,7 +35,7 @@ EOF compare exp out || fail=1 # A different diagnostic when specifying a domain ID -virsh -q -c test:///default undefine 1 > out 2>&1 +$abs_top_builddir/tools/virsh -q -c test:///default undefine 1 > out 2>&1 test $? = 1 || fail=1 cat <<\EOF > exp || fail=1 error: a running domain like 1 cannot be undefined; @@ -44,7 +44,7 @@ EOF compare exp out || fail=1 # Succeed, now: first shut down, then undefine, both via name. -virsh -q -c test:///default 'shutdown test; undefine test' > out 2>&1 +$abs_top_builddir/tools/virsh -q -c test:///default 'shutdown test; undefine test' > out 2>&1 test $? = 0 || fail=1 cat <<\EOF > exp || fail=1 Domain test is being shutdown diff --git a/tests/vcpupin b/tests/vcpupin index 79b02dc..c243d80 100755 --- a/tests/vcpupin +++ b/tests/vcpupin @@ -18,7 +18,7 @@ if test "$VERBOSE" = yes; then set -x - virsh --version + $abs_top_builddir/tools/virsh --version fi . $srcdir/test-lib.sh @@ -26,7 +26,7 @@ fi fail=0 # Invalid syntax. -virsh --connect test:///default vcpupin test a 0,1 > out 2>&1 +$abs_top_builddir/tools/virsh --connect test:///default vcpupin test a 0,1 > out 2>&1 test $? = 1 || fail=1 cat <<\EOF > exp || fail=1 error: vcpupin: Invalid or missing vCPU number. @@ -35,7 +35,7 @@ EOF compare exp out || fail=1 # An out-of-range vCPU number deserves a diagnostic, too. -virsh --connect test:///default vcpupin test 100 0,1 > out 2>&1 +$abs_top_builddir/tools/virsh --connect test:///default vcpupin test 100 0,1 > out 2>&1 test $? = 1 || fail=1 cat <<\EOF > exp || fail=1 error: vcpupin: Invalid vCPU number. diff --git a/tests/virsh-all b/tests/virsh-all index 03ea466..6accf44 100755 --- a/tests/virsh-all +++ b/tests/virsh-all @@ -18,7 +18,7 @@ if test "$VERBOSE" = yes; then set -x - virsh --version + $abs_top_builddir/tools/virsh --version fi test -z "$srcdir" && srcdir=$(pwd) @@ -29,14 +29,14 @@ fail=0 test_url=test:///default -virsh -c $test_url help > cmds || framework_failure +$abs_top_builddir/tools/virsh -c $test_url help > cmds || framework_failure cmds=$(sed -n 's/^ \([^ ][^ ]*\) .*/\1/p' cmds) || framework_failure test -n "$cmds" || framework_failure for i in $cmds; do echo testing $i... 1>&2 # For now, just run the command and ignore output and exit status. - virsh -c $test_url $i < /dev/null > /dev/null 2>&1 + $abs_top_builddir/tools/virsh -c $test_url $i < /dev/null > /dev/null 2>&1 done (exit $fail); exit $fail diff --git a/tests/virsh-synopsis b/tests/virsh-synopsis index 24038dd..e700993 100755 --- a/tests/virsh-synopsis +++ b/tests/virsh-synopsis @@ -18,7 +18,7 @@ if test "$VERBOSE" = yes; then set -x - virsh --version + $abs_top_builddir/tools/virsh --version fi test -z "$srcdir" && srcdir=$(pwd) @@ -28,12 +28,12 @@ fail=0 test_url=test:///default -virsh -c $test_url help > cmds || framework_failure +$abs_top_builddir/tools/virsh -c $test_url help > cmds || framework_failure cmds=$(sed -n 's/^ \([^ ][^ ]*\) .*/\1/p' cmds) || framework_failure test -n "$cmds" || framework_failure for i in $cmds; do - virsh -c $test_url help $i > help || fail=1 + $abs_top_builddir/tools/virsh -c $test_url help $i > help || fail=1 grep -A1 '^ SYNOPSIS$' help > synopsis \ || { echo 1>&2 missing or invalid help SYNOPSIS for $i; fail=1; } sed -n 2p synopsis > s2 || framework_failure -- 1.6.0.6 -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list