From patchwork Tue May 7 11:13:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 242176 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 281832C011D for ; Tue, 7 May 2013 21:13:54 +1000 (EST) Received: from localhost ([::1]:58747 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZfqC-00073y-1X for incoming@patchwork.ozlabs.org; Tue, 07 May 2013 07:13:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57602) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZfpo-0006zb-KW for qemu-devel@nongnu.org; Tue, 07 May 2013 07:13:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZfpk-00089s-2V for qemu-devel@nongnu.org; Tue, 07 May 2013 07:13:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZfpj-00089d-P5 for qemu-devel@nongnu.org; Tue, 07 May 2013 07:13:23 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r47BDNNP008627 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 7 May 2013 07:13:23 -0400 Received: from fam-laptop.nay.redhat.com ([10.66.7.14]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r47BDD9b007162; Tue, 7 May 2013 07:13:21 -0400 From: Fam Zheng To: qemu-devel@nongnu.org Date: Tue, 7 May 2013 19:13:05 +0800 Message-Id: <1367925185-12988-4-git-send-email-famz@redhat.com> In-Reply-To: <1367925185-12988-1-git-send-email-famz@redhat.com> References: <1367925185-12988-1-git-send-email-famz@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, Fam Zheng , stefanha@redhat.com Subject: [Qemu-devel] [PATCH 3/3] qemu-iotests: fix 017 018 for vmdk X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 017 and 018 use /bin/mv to move base img from t.IMGFMG to t.IMGFMT.base after filling data, this is not enough for vmdk, when t.IMGFMT is only a description text file who points to t-{flat,s001,f001,...}.IMGFMT as data extent, so testing such subformats alway fails on them. This patch use the trick of temprorily changing TEST_IMG to avoid using /bin/mv. Signed-off-by: Fam Zheng --- tests/qemu-iotests/017 | 4 +++- tests/qemu-iotests/017.out | 2 +- tests/qemu-iotests/018 | 4 +++- tests/qemu-iotests/018.out | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/017 b/tests/qemu-iotests/017 index 66951eb..45f2c0b 100755 --- a/tests/qemu-iotests/017 +++ b/tests/qemu-iotests/017 @@ -46,6 +46,8 @@ _supported_os Linux TEST_OFFSETS="0 4294967296" +TEST_IMG_SAVE=$TEST_IMG +TEST_IMG=$TEST_IMG.base _make_test_img 6G echo "Filling base image" @@ -63,7 +65,7 @@ _check_test_img echo "Creating test image with backing file" echo -mv $TEST_IMG $TEST_IMG.base +TEST_IMG=$TEST_IMG_SAVE _make_test_img -b $TEST_IMG.base 6G echo "Filling test image" diff --git a/tests/qemu-iotests/017.out b/tests/qemu-iotests/017.out index a861e58..df34ee7 100644 --- a/tests/qemu-iotests/017.out +++ b/tests/qemu-iotests/017.out @@ -1,5 +1,5 @@ QA output created by 017 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 +Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=6442450944 Filling base image === IO: pattern 0 diff --git a/tests/qemu-iotests/018 b/tests/qemu-iotests/018 index bd2db78..453ce61 100755 --- a/tests/qemu-iotests/018 +++ b/tests/qemu-iotests/018 @@ -46,6 +46,8 @@ _supported_os Linux TEST_OFFSETS="0 4294967296" +TEST_IMG_SAVE=$TEST_IMG +TEST_IMG=$TEST_IMG.base _make_test_img 6G echo "Filling base image" @@ -63,7 +65,7 @@ _check_test_img echo "Creating test image with backing file" echo -mv $TEST_IMG $TEST_IMG.base +TEST_IMG=$TEST_IMG_SAVE _make_test_img -b $TEST_IMG.base 6G echo "Filling test image" diff --git a/tests/qemu-iotests/018.out b/tests/qemu-iotests/018.out index 6bbd815..3ddb8d8 100644 --- a/tests/qemu-iotests/018.out +++ b/tests/qemu-iotests/018.out @@ -1,5 +1,5 @@ QA output created by 018 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 +Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=6442450944 Filling base image === IO: pattern 0