[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 13/13] qemu-iotests: More qcow2 reopen tests
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [PATCH v2 13/13] qemu-iotests: More qcow2 reopen tests |
Date: |
Mon, 7 Sep 2015 14:08:39 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 04.09.2015 um 21:52 hat Max Reitz geschrieben:
> On 04.09.2015 19:18, Kevin Wolf wrote:
> > Signed-off-by: Kevin Wolf <address@hidden>
> > ---
> > tests/qemu-iotests/137 | 143
> > +++++++++++++++++++++++++++++++++++++++++++++
> > tests/qemu-iotests/137.out | 43 ++++++++++++++
> > tests/qemu-iotests/group | 1 +
> > 3 files changed, 187 insertions(+)
> > create mode 100755 tests/qemu-iotests/137
> > create mode 100644 tests/qemu-iotests/137.out
> >
> > diff --git a/tests/qemu-iotests/137 b/tests/qemu-iotests/137
> > new file mode 100755
> > index 0000000..ad52f71
> > --- /dev/null
> > +++ b/tests/qemu-iotests/137
>
>
> [snip]
>
> > +echo
> > +echo === Try setting some invalid values ===
> > +echo
> > +
> > +$QEMU_IO \
> > + -c "reopen -o lazy-refcounts=42" \
> > + -c "reopen -o cache-size=1M,l2-cache-size=64k,refcount-cache-size=64k"
> > \
> > + -c "reopen -o cache-size=1M,l2-cache-size=2M" \
> > + -c "reopen -o cache-size=1M,refcount-cache-size=2M" \
> > + -c "reopen -o l2-cache-size=256T" \
> > + -c "reopen -o l2-cache-size=64G" \
>
> Testing this seems risky. The rest looks fine, but I'm not sure whether
> this is really needed so much that we should risk the test failing on
> some machines, especially in the future.
I think we should be testing the "too large, but not much too large"
case. A risk of false positives is better than a risk to break things
without noticing. I could make it something like 64T, though, that
should last a bit longer. The "much too large" case starts at 128T
(INT_MAX * s->cluster_size == 2G * 64k).
> Or actually even on my machine:
>
> $ touch ~/tmp/swap
> $ truncate ~/tmp/swap --size 128G
> $ fallocate -l 128G ~/tmp/swap
> # mkswap ~maxx/tmp/swap
> # swapon ~max/tmp/swap
This looks faked. :-P
> $ cd /to/qemu/build
> $ ./qemu-io -c 'reopen -o l2-cache-size=64G' test.qcow2
> $
>
> (Running the test itself is apparently a bad idea, because then for some
> reason Linux thinks I actually want to use the swap and everything slows
> down to a crawl)
Well, if you do that intentionally, I guess you deserve it...
Kevin
pgptiZktrDEKS.pgp
Description: PGP signature
- [Qemu-block] [PATCH v2 07/13] qcow2: Move rest of option handling to qcow2_update_options(), (continued)
- [Qemu-block] [PATCH v2 07/13] qcow2: Move rest of option handling to qcow2_update_options(), Kevin Wolf, 2015/09/04
- [Qemu-block] [PATCH v2 08/13] qcow2: Leave s unchanged on qcow2_update_options() failure, Kevin Wolf, 2015/09/04
- [Qemu-block] [PATCH v2 09/13] qcow2: Fix memory leak in qcow2_update_options() error path, Kevin Wolf, 2015/09/04
- [Qemu-block] [PATCH v2 10/13] qcow2: Make qcow2_update_options() suitable for transactions, Kevin Wolf, 2015/09/04
- [Qemu-block] [PATCH v2 12/13] qemu-iotests: Reopen qcow2 with lazy-refcounts change, Kevin Wolf, 2015/09/04
- [Qemu-block] [PATCH v2 11/13] qcow2: Support updating driver-specific options in reopen, Kevin Wolf, 2015/09/04
- [Qemu-block] [PATCH v2 13/13] qemu-iotests: More qcow2 reopen tests, Kevin Wolf, 2015/09/04