From patchwork Fri Dec 12 17:09:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 420579 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 893E2140100 for ; Sat, 13 Dec 2014 04:11:18 +1100 (AEDT) Received: from localhost ([::1]:58571 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzTkK-0006yn-L7 for incoming@patchwork.ozlabs.org; Fri, 12 Dec 2014 12:11:16 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzTjT-0005kp-TF for qemu-devel@nongnu.org; Fri, 12 Dec 2014 12:10:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XzTjN-0004Br-Nn for qemu-devel@nongnu.org; Fri, 12 Dec 2014 12:10:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzTjN-0004Bl-Ew for qemu-devel@nongnu.org; Fri, 12 Dec 2014 12:10:17 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBCHAEZb002304 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 12 Dec 2014 12:10:15 -0500 Received: from localhost (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBCHADO9006829; Fri, 12 Dec 2014 12:10:14 -0500 From: Stefan Hajnoczi To: Date: Fri, 12 Dec 2014 17:09:49 +0000 Message-Id: <1418404205-6213-4-git-send-email-stefanha@redhat.com> In-Reply-To: <1418404205-6213-1-git-send-email-stefanha@redhat.com> References: <1418404205-6213-1-git-send-email-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Peter Maydell , Stefan Hajnoczi , Max Reitz Subject: [Qemu-devel] [PULL 03/19] iotests: Add test for vmdk JSON file names 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 From: Max Reitz Add a test for vmdk files which use a file with a JSON file name, and which then try to open extents. That should fail and the error message should at least try to look helpful. Signed-off-by: Max Reitz Reviewed-by: Fam Zheng Message-id: 1417615043-26174-3-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/059 | 6 ++++++ tests/qemu-iotests/059.out | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059 index 2ed1a7f..50ca5ce 100755 --- a/tests/qemu-iotests/059 +++ b/tests/qemu-iotests/059 @@ -111,6 +111,12 @@ $QEMU_IO -f qcow2 -c "write -P 0xb 10240 512" "$TEST_IMG.qcow2" | _filter_qemu_i $QEMU_IMG convert -f qcow2 -O vmdk -o subformat=streamOptimized "$TEST_IMG.qcow2" "$TEST_IMG" 2>&1 echo +echo "=== Testing monolithicFlat with internally generated JSON file name ===" +IMGOPTS="subformat=monolithicFlat" _make_test_img 64M +$QEMU_IO -c "open -o driver=$IMGFMT,file.driver=blkdebug,file.image.filename=$TEST_IMG,file.inject-error.0.event=read_aio" 2>&1 \ + | _filter_testdir | _filter_imgfmt + +echo echo "=== Testing version 3 ===" _use_sample_img iotest-version3.vmdk.bz2 _img_info diff --git a/tests/qemu-iotests/059.out b/tests/qemu-iotests/059.out index 0dadba6..cbb0de4 100644 --- a/tests/qemu-iotests/059.out +++ b/tests/qemu-iotests/059.out @@ -2053,6 +2053,10 @@ wrote 512/512 bytes at offset 0 wrote 512/512 bytes at offset 10240 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +=== Testing monolithicFlat with internally generated JSON file name === +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 +qemu-io: can't open: Cannot use relative extent paths with VMDK descriptor file 'json:{"image": {"driver": "file", "filename": "TEST_DIR/t.IMGFMT"}, "driver": "blkdebug", "inject-error.0.event": "read_aio"}' + === Testing version 3 === image: TEST_DIR/iotest-version3.IMGFMT file format: IMGFMT