summaryrefslogtreecommitdiffstats
path: root/tests/qemu-iotests/common
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
parentcee40d2d2dda87fd9705ed4b85e2c0cf0e5c2ac4 (diff)
downloadhqemu-a9660664fde89ef2c7bc629eda547a48b288fbb9.zip
hqemu-a9660664fde89ef2c7bc629eda547a48b288fbb9.tar.gz
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')
-rw-r--r--tests/qemu-iotests/common13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common
index 1f6fdf5..b3aad89 100644
--- a/tests/qemu-iotests/common
+++ b/tests/qemu-iotests/common
@@ -136,6 +136,7 @@ check options
-vmdk test vmdk
-rbd test rbd
-sheepdog test sheepdog
+ -nbd test nbd
-xdiff graphical mode diff
-nocache use O_DIRECT on backing file
-misalign misalign memory allocations
@@ -197,12 +198,14 @@ testlist options
IMGPROTO=rbd
xpand=false
;;
-
-sheepdog)
IMGPROTO=sheepdog
xpand=false
;;
-
+ -nbd)
+ IMGPROTO=nbd
+ xpand=false
+ ;;
-nocache)
QEMU_IO_OPTIONS="$QEMU_IO_OPTIONS --nocache"
xpand=false
@@ -350,7 +353,11 @@ fi
[ "$QEMU" = "" ] && _fatal "qemu not found"
[ "$QEMU_IMG" = "" ] && _fatal "qemu-img not found"
-[ "$QEMU_IO" = "" ] && _fatal "qemu-img not found"
+[ "$QEMU_IO" = "" ] && _fatal "qemu-io not found"
+
+if [ "$IMGPROTO" = "nbd" ] ; then
+ [ "$QEMU_NBD" = "" ] && _fatal "qemu-nbd not found"
+fi
if $valgrind; then
export REAL_QEMU_IO="$QEMU_IO_PROG"
OpenPOWER on IntegriCloud