diff --git a/ChangeLog b/ChangeLog index 9a0c3f4c02..e166eaa2a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Jan 20 12:03:53 GMT 2009 Daniel P. Berrange + + * tests/cpuset, tests/read-bufsiz, tests/start, tests/undefine, + tests/vcpupin: Switch order of expected vs actual data in diff + comparison, so output on failure makes sense. + Tue Jan 20 12:01:53 GMT 2009 Daniel P. Berrange Thread local error handling diff --git a/tests/cpuset b/tests/cpuset index 8722c81a34..75303e37e0 100755 --- a/tests/cpuset +++ b/tests/cpuset @@ -40,6 +40,6 @@ libvir: Domain Config error : failed Xen syscall topology cpuset syntax error error: Failed to define domain from xml-invalid EOF -compare out exp || fail=1 +compare exp out || fail=1 (exit $fail); exit $fail diff --git a/tests/read-bufsiz b/tests/read-bufsiz index 3037452e14..001bfa7d1a 100755 --- a/tests/read-bufsiz +++ b/tests/read-bufsiz @@ -37,7 +37,7 @@ for i in before after; do virsh --connect test:///default define $in > out || fail=1 printf "Domain test defined from $in\n\n" > exp || fail=1 - compare out exp || fail=1 + compare exp out || fail=1 done (exit $fail); exit $fail diff --git a/tests/start b/tests/start index a436f9b3ea..f457d5939e 100755 --- a/tests/start +++ b/tests/start @@ -34,9 +34,9 @@ virsh -c $test_url start test > out 2> err && fail=1 # stdout gets a newline echo > exp || fail=1 -compare out exp || fail=1 +compare exp out || fail=1 echo 'error: Domain is already active' > exp || fail=1 -compare err exp || fail=1 +compare exp err || fail=1 (exit $fail); exit $fail diff --git a/tests/undefine b/tests/undefine index d7452418e2..48e835681e 100755 --- a/tests/undefine +++ b/tests/undefine @@ -9,7 +9,7 @@ # (at your option) any later version. # This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of +# but WITHEXP ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. @@ -32,7 +32,7 @@ cat <<\EOF > exp || fail=1 libvir: Test error : internal error Domain 'test' is still running error: Failed to undefine domain test EOF -compare out exp || fail=1 +compare exp out || fail=1 # A different diagnostic when specifying a domain ID virsh -q -c test:///default undefine 1 > out 2>&1 @@ -41,7 +41,7 @@ cat <<\EOF > exp || fail=1 error: a running domain like 1 cannot be undefined; to undefine, first shutdown then undefine using its name or UUID EOF -compare out exp || fail=1 +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 @@ -50,6 +50,6 @@ cat <<\EOF > exp || fail=1 Domain test is being shutdown Domain test has been undefined EOF -compare out exp || fail=1 +compare exp out || fail=1 (exit $fail); exit $fail diff --git a/tests/vcpupin b/tests/vcpupin index 7b5f86cf96..79b02dc23b 100755 --- a/tests/vcpupin +++ b/tests/vcpupin @@ -32,7 +32,7 @@ cat <<\EOF > exp || fail=1 error: vcpupin: Invalid or missing vCPU number. EOF -compare out exp || fail=1 +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 @@ -41,6 +41,6 @@ cat <<\EOF > exp || fail=1 error: vcpupin: Invalid vCPU number. EOF -compare out exp || fail=1 +compare exp out || fail=1 (exit $fail); exit $fail