]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
torture: Make kvm-find-errors.sh and kvm-recheck.sh provide exit status
authorPaul E. McKenney <paulmck@linux.ibm.com>
Thu, 11 Apr 2019 20:31:57 +0000 (13:31 -0700)
committerPaul E. McKenney <paulmck@linux.ibm.com>
Tue, 28 May 2019 16:06:09 +0000 (09:06 -0700)
This commit causes both kvm-find-errors.sh and kvm-recheck.sh to provide
an exit status based on whether or not errors were located.  In the
case of kvm-recheck.sh, this will be the error status of the last run.
This change allows these commands to be used in scripting and Makefiles
to automatically report failed rcutorture runs.

Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh
tools/testing/selftests/rcutorture/bin/kvm-recheck.sh

index 8426fe1f15eeb1a3bce6a4f11687a5aa28ba0321..1871d00bccd7cfc46b4d8de189d026ceb0d05ad7 100755 (executable)
@@ -11,6 +11,7 @@
 #
 # The "directory" above should end with the date/time directory, for example,
 # "tools/testing/selftests/rcutorture/res/2018.02.25-14:27:27".
+# Returns error status reflecting the success (or not) of the specified run.
 #
 # Copyright (C) IBM Corporation, 2018
 #
@@ -56,6 +57,8 @@ done
 if test -n "$files"
 then
        $editor $files
+       exit 1
 else
        echo No errors in console logs.
+       exit 0
 fi
index 2adde6aaafdbadb722d84bca43b9579d0d638e9a..2297ddc2d4c5b06507332ad02f5ed71ff6ac78c2 100755 (executable)
@@ -7,6 +7,8 @@
 #
 # Usage: kvm-recheck.sh resdir ...
 #
+# Returns status reflecting the success or not of the last run specified.
+#
 # Copyright (C) IBM Corporation, 2011
 #
 # Authors: Paul E. McKenney <paulmck@linux.ibm.com>
@@ -58,3 +60,4 @@ do
                fi
        done
 done
+EDITOR=echo kvm-find-errors.sh "${@: -1}" > /dev/null 2>&1