On Thu, Sep 25, 2014 at 09:46:24AM +0800, Fam Zheng wrote: > On Wed, 09/24 10:05, Stefan Hajnoczi wrote: > > On Tue, Sep 23, 2014 at 10:26:26AM +0800, Fam Zheng wrote: > > > 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='$start'; t<='$end'; t++) > > > printf "%03d\n",t }' \ > > > echo $id >>$tmp.list > > > else > > > # oops > > > - echo "$id - unknown test, ignored" > > > + if [ "$start" == "$end" -a "$id" == "$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? > > The exit inside the loop is in a subshell so won't cause the whole script to > exit.
Thanks for explaining. I see it now, was expecting ( ) but the subshell comes from awk ... | while ... done. Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
pgpwjFmJRmeRW.pgp
Description: PGP signature