Received: from eggs.gnu.org ([2001:4830:134:3::10]:36367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vj2Sx-0005Q3-7L for qemu-devel@nongnu.org; Wed, 20 Nov 2013 02:44:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vj2Sr-0006jt-7i for qemu-devel@nongnu.org; Wed, 20 Nov 2013 02:44:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:28841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vj2Sq-0006jm-Vx for qemu-devel@nongnu.org; Wed, 20 Nov 2013 02:44:45 -0500 From: Fam Zheng Date: Wed, 20 Nov 2013 15:44:16 +0800 Message-Id: <1384933457-26953-6-git-send-email-famz@redhat.com> In-Reply-To: <1384933457-26953-1-git-send-email-famz@redhat.com> References: <1384933457-26953-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH v3 5/6] qemu-iotests: Force qcow2 in error path test in 048 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, WenchaoXia , stefanha@redhat.com The "raw" doesn't always work on certain file systems (e.g. tmpfs). Use qcow2 to make the allocation status explicit. Signed-off-by: Fam Zheng --- tests/qemu-iotests/048 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/048 b/tests/qemu-iotests/048 index 9def7fc..0fb5d2c 100755 --- a/tests/qemu-iotests/048 +++ b/tests/qemu-iotests/048 @@ -88,7 +88,13 @@ event = "read_aio" errno = "5" once ="off" EOF -_make_test_img $size +if [ "$IMGFMT" = "raw" ]; then + # For raw the allocation status for new image depends on file system, force + # qcow2 in this case, since the tested code is in block layer + IMGFMT=qcow2 _make_test_img $size | _filter_imgfmt +else + _make_test_img $size | _filter_imgfmt +fi cp "$TEST_IMG" "$TEST_IMG2" io_pattern write 512 512 0 1 102 TEST_IMG="blkdebug:$TEST_DIR/blkdebug.conf:$TEST_IMG" _compare 2>&1 |\ -- 1.8.4.2