From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGvym-0008MO-7Y for qemu-devel@nongnu.org; Fri, 21 Feb 2014 14:41:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGvyg-0002Ow-6O for qemu-devel@nongnu.org; Fri, 21 Feb 2014 14:41:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:9545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGvyf-0002Oi-Uc for qemu-devel@nongnu.org; Fri, 21 Feb 2014 14:41:42 -0500 From: Max Reitz Date: Fri, 21 Feb 2014 20:44:08 +0100 Message-Id: <1393011848-18742-3-git-send-email-mreitz@redhat.com> In-Reply-To: <1393011848-18742-1-git-send-email-mreitz@redhat.com> References: <1393011848-18742-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH 2/2] iotests: Mixed quorum child device specifications List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , =?UTF-8?q?Beno=C3=AEt=20Canet?= , Stefan Hajnoczi , Max Reitz 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 --- tests/qemu-iotests/081 | 52 ++++++++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/081.out | 15 +++++++++++++ 2 files changed, 67 insertions(+) diff --git a/tests/qemu-iotests/081 b/tests/qemu-iotests/081 index be34544..421c7cc 100755 --- a/tests/qemu-iotests/081 +++ b/tests/qemu-iotests/081 @@ -44,6 +44,19 @@ _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 | \ + sed -e 's/"sector-num": [0-9]*/"sector-num": X/' +} + 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" @@ -80,6 +93,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" <