[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-5.1 2/2] iotests: Test sparseness for qemu-img convert -n
From: |
Kevin Wolf |
Subject: |
Re: [PATCH for-5.1 2/2] iotests: Test sparseness for qemu-img convert -n |
Date: |
Tue, 21 Jul 2020 13:20:28 +0200 |
Am 21.07.2020 um 12:19 hat Max Reitz geschrieben:
> On 20.07.20 15:18, Kevin Wolf wrote:
> > Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> > ---
> > tests/qemu-iotests/122 | 34 ++++++++++++++++++++++++++++++++++
> > tests/qemu-iotests/122.out | 17 +++++++++++++++++
> > 2 files changed, 51 insertions(+)
> >
> > diff --git a/tests/qemu-iotests/122 b/tests/qemu-iotests/122
> > index dfd1cd05d6..1112fc0730 100755
> > --- a/tests/qemu-iotests/122
> > +++ b/tests/qemu-iotests/122
> > @@ -281,6 +281,40 @@ $QEMU_IMG convert -O $IMGFMT -n "$TEST_IMG"
> > "$TEST_IMG".orig
> >
> > $QEMU_IMG compare "$TEST_IMG" "$TEST_IMG".orig
> >
> > +echo
> > +echo '=== -n to an empty image ==='
> > +echo
> > +
> > +_make_test_img 64M
> > +
> > +# Convert with -n, which should not result in a fully allocated image, not
> > even
> > +# with compat=0.10 (because the target doesn't have a backing file)
> > +TEST_IMG="$TEST_IMG".orig _make_test_img -o compat=1.1 64M
> > +$QEMU_IMG convert -O $IMGFMT -n "$TEST_IMG" "$TEST_IMG".orig
> > +$QEMU_IMG map --output=json "$TEST_IMG".orig
> > +
> > +TEST_IMG="$TEST_IMG".orig _make_test_img -o compat=0.10 64M
>
> It’s a shame that with this, the test will no longer pass with
> refcount_bits=1. (Or an external data file.)
You mean because of the compat=0.10? We already use that in this test
case, however just with "$QEMU_IMG convert" so that $IMGOPTS doesn't
apply.
I guess I could just override $IMGOPTS for this line to get the same
behaviour here and make sure that none of these options are used.
Kevin
signature.asc
Description: PGP signature