]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix actual vs expected data comparison order to get correct diff +++/--- output
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 20 Jan 2009 12:03:40 +0000 (12:03 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 20 Jan 2009 12:03:40 +0000 (12:03 +0000)
ChangeLog
tests/cpuset
tests/read-bufsiz
tests/start
tests/undefine
tests/vcpupin

index 9a0c3f4c029a747d0cc2c49c8e8860b3751a96b6..e166eaa2a6c5de8bc31cd2c3ca06dc7f6de63128 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Jan 20 12:03:53 GMT 2009 Daniel P. Berrange <berrange@redhat.com>
+
+       * 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 <berrange@redhat.com>
 
        Thread local error handling
index 8722c81a348b59b468f2b997e8e2c50c00de7743..75303e37e0ab58fc9332c38dd1c34e2c54f94cf8 100755 (executable)
@@ -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
index 3037452e149fcaf5d71940b114baf53b597d8175..001bfa7d1a78b3bb78219ece175c2f18bdf077af 100755 (executable)
@@ -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
index a436f9b3eafccd935f14c2be52a1e0909fd1a017..f457d5939e5e67fd4822a8b84a17af960dac27d8 100755 (executable)
@@ -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
index d7452418e29ceb03003c62f863bd49b44e6aa5a2..48e835681e1657255e192c14405a68ef68a2d228 100755 (executable)
@@ -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
index 7b5f86cf967afc00060515f3a5b532a361f5c113..79b02dc23bf82f5f7781af0a6f4ff72b3725a5ee 100755 (executable)
@@ -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