From 6141f3bd6904df7cf9519c6444a14a608b9874c4 Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Fri, 21 Feb 2014 22:30:38 +0100 Subject: [PATCH] iotests: Mixed quorum child device specifications Add a test case to test 081 for mixing full option dicts and reference strings of specifying the quorum child block devices through QMP. Signed-off-by: Max Reitz Reviewed-by: Benoit Canet Signed-off-by: Kevin Wolf --- tests/qemu-iotests/081 | 51 ++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/081.out | 15 +++++++++++ 2 files changed, 66 insertions(+) diff --git a/tests/qemu-iotests/081 b/tests/qemu-iotests/081 index be345443c6..f053f11942 100755 --- a/tests/qemu-iotests/081 +++ b/tests/qemu-iotests/081 @@ -44,6 +44,18 @@ _supported_fmt raw _supported_proto generic _supported_os Linux +function do_run_qemu() +{ + echo Testing: "$@" | _filter_imgfmt + $QEMU -nographic -qmp stdio -serial none "$@" + echo +} + +function run_qemu() +{ + do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qmp | _filter_qemu_io +} + quorum="file.driver=quorum,file.children.0.file.filename=$TEST_DIR/1.raw" quorum="$quorum,file.children.1.file.filename=$TEST_DIR/2.raw" quorum="$quorum,file.children.2.file.filename=$TEST_DIR/3.raw,file.vote-threshold=2" @@ -79,6 +91,45 @@ echo "== checking quorum correction ==" $QEMU_IO -c "open -o $quorum" -c "read -P 0x32 0 $size" | _filter_qemu_io +echo +echo "== checking mixed reference/option specification ==" + +run_qemu -drive "file=$TEST_DIR/2.raw,format=$IMGFMT,if=none,id=drive2" <