From: Stefan Hajnoczi <stefanha@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
Max Reitz <mreitz@redhat.com>,
qemu-devel@nongnu.org, Wenchao Xia <xiawenc@linux.vnet.ibm.com>
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 [thread overview]
Message-ID: <20140925101553.GA19882@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <20140925014624.GC1990@fam-t430.nay.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1378 bytes --]
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 <stefanha@redhat.com>
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2014-09-25 10:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 2:26 [Qemu-devel] [PATCH] qemu-iotests: Fail test if explict test case number is unknown Fam Zheng
2014-09-24 9:05 ` Stefan Hajnoczi
2014-09-25 1:46 ` Fam Zheng
2014-09-25 10:15 ` Stefan Hajnoczi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140925101553.GA19882@stefanha-thinkpad.redhat.com \
--to=stefanha@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=xiawenc@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).