[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qemu-iotests: Fail test if explict test case nu
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH] qemu-iotests: Fail test if explict test case number is unknown |
Date: |
Thu, 25 Sep 2014 11:15:53 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
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 <address@hidden>
pgpmGoRy5kx5q.pgp
Description: PGP signature