rcutorture: Note diffs from git commits
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 24 Mar 2014 20:15:49 +0000 (13:15 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 14 May 2014 16:46:25 +0000 (09:46 -0700)
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>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
tools/testing/selftests/rcutorture/bin/kvm.sh

index 468d92f94e7f1056c3383d6107b54949c5b661c2..40285c58653ef49c970b696979cd9f423e8ef525 100644 (file)
@@ -276,6 +276,10 @@ if test -d .git
 then
        git status >> $resdir/$ds/testid.txt
        git rev-parse HEAD >> $resdir/$ds/testid.txt
+       if ! git diff HEAD > $T/git-diff 2>&1
+       then
+               cp $T/git-diff $resdir/$ds
+       fi
 fi
 ___EOF___
 awk < $T/cfgcpu.pack \