aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/common.config
diff options
context:
space:
mode:
authorNick Thomas <nick@bytemark.co.uk>2012-11-02 13:01:23 +0000
committerKevin Wolf <kwolf@redhat.com>2012-11-14 18:19:21 +0100
commita9660664fde89ef2c7bc629eda547a48b288fbb9 (patch)
treee76b91f39ce5121c530772703f10065ef4b00cbb /tests/qemu-iotests/common.config
parentcee40d2d2dda87fd9705ed4b85e2c0cf0e5c2ac4 (diff)
tests: allow qemu-iotests to be run against nbd backend
To do this, we start a qemu-nbd process at _make_test_img and kill it in _cleanup_test_img. $TEST_IMG is changed to point at the TCP server. We also remove the checks for existence of binaries from common.config - they're duplicated in common, and we can make the qemu-nbd check conditional on $IMGPROTO being "nbd" if we do it there. Signed-off-by: Nick Thomas <nick@bytemark.co.uk> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/common.config')
-rw-r--r--tests/qemu-iotests/common.config10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
index df082e750c..08a3f100b8 100644
--- a/tests/qemu-iotests/common.config
+++ b/tests/qemu-iotests/common.config
@@ -90,21 +90,23 @@ export PS_ALL_FLAGS="-ef"
if [ -z "$QEMU_PROG" ]; then
export QEMU_PROG="`set_prog_path qemu`"
fi
-[ "$QEMU_PROG" = "" ] && _fatal "qemu not found"
if [ -z "$QEMU_IMG_PROG" ]; then
export QEMU_IMG_PROG="`set_prog_path qemu-img`"
fi
-[ "$QEMU_IMG_PROG" = "" ] && _fatal "qemu-img not found"
if [ -z "$QEMU_IO_PROG" ]; then
export QEMU_IO_PROG="`set_prog_path qemu-io`"
fi
-[ "$QEMU_IO_PROG" = "" ] && _fatal "qemu-io not found"
+
+if [ -z "$QEMU_NBD_PROG" ]; then
+ export QEMU_NBD_PROG="`set_prog_path qemu-nbd`"
+fi
export QEMU=$QEMU_PROG
-export QEMU_IMG=$QEMU_IMG_PROG
+export QEMU_IMG=$QEMU_IMG_PROG
export QEMU_IO="$QEMU_IO_PROG $QEMU_IO_OPTIONS"
+export QEMU_NBD=$QEMU_NBD_PROG
[ -f /etc/qemu-iotest.config ] && . /etc/qemu-iotest.config