From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xi4fZ-0002Es-5w for qemu-devel@nongnu.org; Sat, 25 Oct 2014 12:58:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xi4fU-0000iF-Cn for qemu-devel@nongnu.org; Sat, 25 Oct 2014 12:58:25 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:59255 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xi4fT-0000hx-WE for qemu-devel@nongnu.org; Sat, 25 Oct 2014 12:58:20 -0400 From: Peter Lieven Date: Sat, 25 Oct 2014 18:55:52 +0200 Message-Id: <1414256153-10148-6-git-send-email-pl@kamp.de> In-Reply-To: <1414256153-10148-1-git-send-email-pl@kamp.de> References: <1414256153-10148-1-git-send-email-pl@kamp.de> Subject: [Qemu-devel] [PATCHv3 5/6] block: add qemu-iotest for write-merge parameter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, benoit@irqsave.net, Peter Lieven , armbru@redhat.com, mreitz@redhat.com, stefanha@redhat.com Signed-off-by: Peter Lieven --- tests/qemu-iotests/109 | 113 ++++++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/109.out | 68 ++++++++++++++++++++++++++ tests/qemu-iotests/group | 1 + 3 files changed, 182 insertions(+) create mode 100755 tests/qemu-iotests/109 create mode 100644 tests/qemu-iotests/109.out diff --git a/tests/qemu-iotests/109 b/tests/qemu-iotests/109 new file mode 100755 index 0000000..5ee0383 --- /dev/null +++ b/tests/qemu-iotests/109 @@ -0,0 +1,113 @@ +#!/bin/bash +# +# Test if write-merging parameter is applied correctly +# +# Copyright (C) 2014 Peter Lieven +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# creator +owner=pl@kamp.de + +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter + +_supported_fmt raw +_supported_proto file +_supported_os Linux + +function do_run_qemu() +{ + echo Testing: "$@" + $QEMU -nographic -qmp stdio -serial none "$@" + echo +} + +function run_qemu() +{ + do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qmp +} + +size=128M + +_make_test_img $size + +echo +echo === write-merging not specified === +echo + +run_qemu -drive file=$TEST_IMG,format=$IMGFMT,if=virtio,file.node-name=file <