lkml.org 
[lkml]   [2014]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH tip/core/rcu 39/45] rcutorture: Note diffs from git commits
On Fri, May 09, 2014 at 05:51:24PM -0700, Paul E. McKenney wrote:
> On Wed, May 07, 2014 at 03:17:42PM -0700, josh@joshtriplett.org wrote:
> > On Mon, Apr 28, 2014 at 05:25:27PM -0700, Paul E. McKenney wrote:
> > > From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> > >
> > > The current scripting only keeps track of the git SHA-1 of the current
> > > HEAD. This can cause confusion in cases where testing ran in a git
> > > tree where changes had not yet been checked in. This commit therefore
> > > also records the output of "git diff HEAD" to provide the information
> > > needed to reconstruct the source tree that was tested.
> > >
> > > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> >
> > Nit below.
> > Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> >
> > > ---
> > > tools/testing/selftests/rcutorture/bin/kvm.sh | 5 +++++
> > > 1 file changed, 5 insertions(+)
> > >
> > > diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
> > > index 4eed2a4f42c7..91661845fdec 100644
> > > --- a/tools/testing/selftests/rcutorture/bin/kvm.sh
> > > +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
> > > @@ -277,6 +277,11 @@ if test -d .git
> > > then
> > > git status >> $resdir/$ds/testid.txt
> > > git rev-parse HEAD >> $resdir/$ds/testid.txt
> > > + git diff HEAD > $T/git-diff 2>&1
> > > + if test -s $T/git-diff
> >
> > You don't need test here; you can use the return value of git diff.
>
> Oddly enough, the "git diff" man page does not say anything about the
> exit value. At least not that I could find...

Look for the --exit-code option of git diff.

- Josh Triplett


\
 
 \ /
  Last update: 2014-05-10 07:41    [W:0.110 / U:1.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site