diff mbox

[v2,1/3] iotests: Make nested read in 072 and 089 read-only

Message ID 1426791801-9042-2-git-send-email-mreitz@redhat.com
State New
Headers show

Commit Message

Max Reitz March 19, 2015, 7:03 p.m. UTC
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 <mreitz@redhat.com>
---
 tests/qemu-iotests/072 | 2 +-
 tests/qemu-iotests/089 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Eric Blake March 19, 2015, 7:23 p.m. UTC | #1
On 03/19/2015 01:03 PM, Max Reitz wrote:
> 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 <mreitz@redhat.com>
> ---
>  tests/qemu-iotests/072 | 2 +-
>  tests/qemu-iotests/089 | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>
diff mbox

Patch

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\",