Received: from eggs.gnu.org ([2001:4830:134:3::10]:44158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWidI-0002Ll-An for qemu-devel@nongnu.org; Wed, 24 Sep 2014 05:13:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWid8-00089x-IT for qemu-devel@nongnu.org; Wed, 24 Sep 2014 05:13:08 -0400 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:50208) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWid8-00088B-Bj for qemu-devel@nongnu.org; Wed, 24 Sep 2014 05:12:58 -0400 Received: by mail-wi0-f180.google.com with SMTP id q5so6794412wiv.1 for ; Wed, 24 Sep 2014 02:12:52 -0700 (PDT) Date: Wed, 24 Sep 2014 10:05:00 +0100 From: Stefan Hajnoczi Message-ID: <20140924090500.GE21137@stefanha-thinkpad.redhat.com> References: <1411439186-20582-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qOrJKOH36bD5yhNe" Content-Disposition: inline In-Reply-To: <1411439186-20582-1-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH] qemu-iotests: Fail test if explict test case number is unknown List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Kevin Wolf , Max Reitz , qemu-devel@nongnu.org, Stefan Hajnoczi , Wenchao Xia --qOrJKOH36bD5yhNe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 23, 2014 at 10:26:26AM +0800, Fam Zheng wrote: > When we expand a number range, we just print "$id - unknown test, > ignored", this is convenient if we want to run a range of tests. >=20 > When we designate a test case number explicitly, we shouldn't just > ignore it if the case script doesn't exist. >=20 > Print an error and fail the test. I guess you want this because new test case numbers are often sparse? For example, 096, 096, 098 are missing. Presumably those patches are waiting to be merged but we already merged 100. It's helps to explain "why" this patch is useful. > diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common > index 70df659..2403a20 100644 > --- a/tests/qemu-iotests/common > +++ b/tests/qemu-iotests/common > @@ -382,10 +382,16 @@ BEGIN { for (t=3D'$start'; t<=3D'$end'; t++)= printf "%03d\n",t }' \ > echo $id >>$tmp.list > else > # oops > - echo "$id - unknown test, ignored" > + if [ "$start" =3D=3D "$end" -a "$id" =3D=3D "$end" ] > + then > + echo "$id - unknown test" > + exit 1 > + else > + echo "$id - unknown test, ignored" > + fi > fi > fi > - done > + done || exit 1 What is the purpose of this line? --qOrJKOH36bD5yhNe Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUIok8AAoJEJykq7OBq3PIvzAIAK+zyFFdjc5YsggvAoXtTsN7 D9ilGBRjtaysd1NAJP0v320RXy9kXQXk7f8fxDWj3eCzrSxx58fQ0N+Xtsci56Ak fdOkGDpbrd31Z/29TRp0xN7CmnbizI0kv20ZfAelLs/ONR1YnzvXioS1QAqRTp3w noLgqnrk2SknrLZOyOUe+VeDxGrpvbxjVVfeh9haVRLhFbNYqa2GX74L0hJvOkoK GJE7GYthtdLJoPKioccZCp2w0674el8jyZ6THAShzvW+D6/VQBpa6sYzCuZfaDk+ RU2RpbATbJNlHqy/j1N3hhuBV67Q/veZ8P4nkWWaHgqvpZPUy8EPQtHQZB4iSWg= =qbwf -----END PGP SIGNATURE----- --qOrJKOH36bD5yhNe--