From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYvEA-0002rv-GM for qemu-devel@nongnu.org; Mon, 07 Sep 2015 08:08:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYvE6-0003z0-G5 for qemu-devel@nongnu.org; Mon, 07 Sep 2015 08:08:50 -0400 Date: Mon, 7 Sep 2015 14:08:39 +0200 From: Kevin Wolf Message-ID: <20150907120839.GB5529@noname.redhat.com> References: <1441387117-27072-1-git-send-email-kwolf@redhat.com> <1441387117-27072-14-git-send-email-kwolf@redhat.com> <55E9F67D.9010909@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TB36FDmn/VVEgNH/" Content-Disposition: inline In-Reply-To: <55E9F67D.9010909@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 13/13] qemu-iotests: More qcow2 reopen tests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org --TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 > > --- > > 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 > >=20 > > 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 >=20 >=20 > [snip] >=20 > > +echo > > +echo =3D=3D=3D Try setting some invalid values =3D=3D=3D > > +echo > > + > > +$QEMU_IO \ > > + -c "reopen -o lazy-refcounts=3D42" \ > > + -c "reopen -o cache-size=3D1M,l2-cache-size=3D64k,refcount-cache-s= ize=3D64k" \ > > + -c "reopen -o cache-size=3D1M,l2-cache-size=3D2M" \ > > + -c "reopen -o cache-size=3D1M,refcount-cache-size=3D2M" \ > > + -c "reopen -o l2-cache-size=3D256T" \ > > + -c "reopen -o l2-cache-size=3D64G" \ >=20 > 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 =3D=3D 2G * 64k). > Or actually even on my machine: >=20 > $ 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=3D64G' test.qcow2 > $ >=20 > (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 --TB36FDmn/VVEgNH/ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJV7X5HAAoJEH8JsnLIjy/W63AP/AmnpzQiYeNtNkWzU8vFWwPd vlzO2a5ixcvPyFYKRPGAWUefH+NX+vDRwBPRV0Q0151uHpXCfJ+fPN8EMSUaw/91 ENdSQlKXoyhADR6R9kSL50vnaoHRXu2ItBbjDHqiNIA89nKH7JQuingvy57LFuLe iZmTs5CTt5ZnlAOS7prtwWckDksHuzVvqQMIFeXWlZAubUE8w6op/EqXp2UCD37M Sa8skFvmzWRW3/CVhHJTnAsBB4fxflGa4obooC0xNX3ud9s2wwAdrM4Ewdxekksd 6/ErJQhyTCicWPFwO6KkVHAOK00HWubajGiD1pgZWMA0Pnx0+94iHGGZFdwshM0k YKUo2ddh+zIovt66ifnTZ2zOTUD+Zkz/t904Yo1WXamWmbn/8gcovPZx6BfRi5wo O77BbmK/LK9jrRwkWLcPKom8Uz1hovQ0+PRI22TwDfFT2Ok1aul2lbVd5w57KoB+ oJT5XmkwTPT9GkR7q222AZf8oWWQb+dBhyxS2IcfcJ5wm9ORFftwlZ20smnWvOf/ fZL2ZIU1Z+lzARAbLbYxhVdLOl6c7YblFvZ/6TlwYtOl7Yb7FJnMCBPESzGsK3ue phfn0oLJSKdN8rWF1aIHwtYomwTYRmINiP3uSV1J430mQDLuyxY3jCKv8Pdgq5+C x0aUgqugwo7ipDzDUoGj =vbua -----END PGP SIGNATURE----- --TB36FDmn/VVEgNH/--