mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 15:15:25 +00:00
856e84a516
This unifies the test scripts to all use the similar pattern added for
schematests in ace4aecd
. This gives the following
- Enables running all tests from outside of tests/ dir
- Drops redundant abs_* definitions, which are set by test-lib.sh
- Drops unnecessary srcdir variable which was only used for sourcing
test-lib.sh
Behavior changes:
- srcdir can no longer be overwritten, but I don't know why anyone would
really need to...
- Script VERBOSE setting no longer prints commands executed by test-lib.sh.
if anyone cares I suggest handling this in test-lib.sh which already
has other verbose style handling
19 lines
534 B
Bash
Executable File
19 lines
534 B
Bash
Executable File
#!/bin/sh
|
|
# Ensure that an invalid domain ID isn't interpreted as a valid one.
|
|
# Before, an ID of 2^32+2 would be treated just like an ID of 2.
|
|
|
|
. "$(dirname $0)/test-lib.sh"
|
|
|
|
if test "$VERBOSE" = yes; then
|
|
set -x
|
|
$abs_top_builddir/tools/virsh --version
|
|
fi
|
|
|
|
echo "error: failed to get domain '4294967298'" > exp || fail=1
|
|
$abs_top_builddir/tools/virsh --quiet \
|
|
--connect test://$abs_top_srcdir/examples/xml/test/testnode.xml \
|
|
'domname 4294967298; quit' > /dev/null 2> err || fail=1
|
|
diff -u err exp || fail=1
|
|
|
|
exit $fail
|