+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
error: Failed to define domain from xml-invalid
EOF
-compare out exp || fail=1
+compare exp out || fail=1
(exit $fail); exit $fail
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
# 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
# (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.
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
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
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
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
error: vcpupin: Invalid vCPU number.
EOF
-compare out exp || fail=1
+compare exp out || fail=1
(exit $fail); exit $fail