lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140513233950.GA19525@linux.vnet.ibm.com>
Date:	Tue, 13 May 2014 16:39:50 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Josh Triplett <josh@...htriplett.org>
Cc:	linux-kernel@...r.kernel.org, mingo@...nel.org,
	laijs@...fujitsu.com, dipankar@...ibm.com,
	akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com,
	niv@...ibm.com, tglx@...utronix.de, peterz@...radead.org,
	rostedt@...dmis.org, dhowells@...hat.com, edumazet@...gle.com,
	darren@...art.com, fweisbec@...il.com, oleg@...hat.com, sbw@....edu
Subject: Re: [PATCH tip/core/rcu 39/45] rcutorture: Note diffs from git
 commits

On Tue, May 13, 2014 at 04:17:16PM -0700, Paul E. McKenney wrote:
> On Fri, May 09, 2014 at 10:19:39PM -0700, Josh Triplett wrote:
> > 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@...htriplett.org wrote:
> > > > On Mon, Apr 28, 2014 at 05:25:27PM -0700, Paul E. McKenney wrote:
> > > > > From: "Paul E. McKenney" <paulmck@...ux.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@...ux.vnet.ibm.com>
> > > > 
> > > > Nit below.
> > > > Reviewed-by: Josh Triplett <josh@...htriplett.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.
> 
> I guess I should have searched for "exit" rather than scrolling to the
> bottom of the man page.  Thank you for the tip!  ;-)
> 
> So:
> 
> 	if ! git diff HEAD > $T/git-diff 2>&1

Except with the --exit-code included...

							Thanx, Paul

> 	then
> 		cp $T/git-diff $resdir/$ds
> 	fi
> 
> The reason for dropping into /tmp and then copying if there were
> diffs is that I don't want there to be an empty file if no diffs.
> 
> 							Thanx, Paul

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ