From patchwork Thu Mar 19 19:03:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 452182 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 4AD381400F1 for ; Fri, 20 Mar 2015 06:15:21 +1100 (AEDT) Received: from localhost ([::1]:40839 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYfuZ-0006tK-7Z for incoming@patchwork.ozlabs.org; Thu, 19 Mar 2015 15:15:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYfjB-0002c3-V8 for qemu-devel@nongnu.org; Thu, 19 Mar 2015 15:03:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYfjB-0005ys-3u for qemu-devel@nongnu.org; Thu, 19 Mar 2015 15:03:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYfj3-0005wN-FL; Thu, 19 Mar 2015 15:03:25 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2JJ3No7022645 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Mar 2015 15:03:24 -0400 Received: from localhost (dhcp-17-47.bos.redhat.com [10.18.17.47]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2JJ3Mnq015033 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Thu, 19 Mar 2015 15:03:23 -0400 From: Max Reitz To: qemu-block@nongnu.org Date: Thu, 19 Mar 2015 15:03:19 -0400 Message-Id: <1426791801-9042-2-git-send-email-mreitz@redhat.com> In-Reply-To: <1426791801-9042-1-git-send-email-mreitz@redhat.com> References: <1426791801-9042-1-git-send-email-mreitz@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi , Max Reitz Subject: [Qemu-devel] [PATCH v2 1/3] iotests: Make nested read in 072 and 089 read-only 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 iotests 072 and 089 create a nested qcow2-in-qcow2 image. This should be opened read-only, for one because it is indeed read only, and also because writing to it would probably turn out bad (the outer qcow2 image cannot grow on demand, so no clusters can be allocated for the inner one). Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/072 | 2 +- tests/qemu-iotests/089 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/072 b/tests/qemu-iotests/072 index e4a723d..7bcf9f8 100755 --- a/tests/qemu-iotests/072 +++ b/tests/qemu-iotests/072 @@ -55,7 +55,7 @@ $QEMU_IO -c 'write -P 42 0 512' -c 'write -P 23 512 512' \ $QEMU_IMG convert -f raw -O $IMGFMT "$TEST_IMG.base" "$TEST_IMG" -$QEMU_IO -c "open -o driver=$IMGFMT,file.driver=$IMGFMT,file.file.filename=$TEST_IMG" \ +$QEMU_IO -c "open -r -o driver=$IMGFMT,file.driver=$IMGFMT,file.file.filename=$TEST_IMG" \ -c 'read -P 42 0 512' -c 'read -P 23 512 512' \ -c 'read -P 66 1024 512' | _filter_qemu_io diff --git a/tests/qemu-iotests/089 b/tests/qemu-iotests/089 index 3e0038d..af22e1f 100755 --- a/tests/qemu-iotests/089 +++ b/tests/qemu-iotests/089 @@ -69,7 +69,7 @@ $QEMU_IMG convert -f raw -O $IMGFMT "$TEST_IMG.base" "$TEST_IMG" $QEMU_IO_PROG --cache $CACHEMODE \ -c 'read -P 42 0 512' -c 'read -P 23 512 512' \ - -c 'read -P 66 1024 512' "json:{ + -c 'read -P 66 1024 512' -r "json:{ \"driver\": \"$IMGFMT\", \"file\": { \"driver\": \"$IMGFMT\",