From: Anthony PERARD <anthony.perard@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
Julien Grall <julien.grall@arm.com>,
Jan Beulich <jbeulich@suse.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v4 for-4.10] scripts: introduce a script for build test
Date: Wed, 1 Nov 2017 11:39:53 +0000 [thread overview]
Message-ID: <20171101113953.GL1885@perard.uk.xensource.com> (raw)
In-Reply-To: <20171030160154.5107-1-wei.liu2@citrix.com>
On Mon, Oct 30, 2017 at 04:01:54PM +0000, Wei Liu wrote:
> +git rev-list $BASE..$TIP | nl -ba | tac | \
> +while read num rev; do
> + echo "Testing $num $rev"
> +
> + git checkout $rev
> + ret=$?
> + if test $ret -ne 0; then
> + echo "Failed to checkout $num $rev with $ret"
I don't think printing the return value of git-checkout is usefull, it
is just too much information. git-checkout man page have nothing about
the meaning of it.
Beside that, and the fact that I don't like this style of while loop
where `exit` doesn't exit the script, but only the loop ...
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
FIY: One would write the loop like this:
while read num rev; do
:
done < <(git rev-list $BASE..$TIP | nl -ba | tac)
And then you could ret=$?;break; inside the loop, and have the correct
$ret value after the loop.
--
Anthony PERARD
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
prev parent reply other threads:[~2017-11-01 11:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-30 16:01 [PATCH v4 for-4.10] scripts: introduce a script for build test Wei Liu
2017-11-01 11:39 ` Anthony PERARD [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=20171101113953.GL1885@perard.uk.xensource.com \
--to=anthony.perard@citrix.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=julien.grall@arm.com \
--cc=konrad.wilk@oracle.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/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).