torture: Allow standalone kvm-recheck.sh run detect --trust-make
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 24 Dec 2020 00:00:27 +0000 (16:00 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 4 Jan 2021 22:01:25 +0000 (14:01 -0800)
Normally, kvm-recheck.sh is run from kvm.sh, which provides the
TORTURE_TRUST_MAKE environment variable that, if a non-empty string,
indicates that the --trust-make command-line parameter has been passed
to kvm.sh.  If there was no --trust-make, kvm-recheck.sh insists
that the Make.out file contain at least one "CC" command.  Thus, when
kvm-recheck.sh is run standalone to evaluate a prior --trust-make run,
it will incorrectly insist that a proper kernel build did not happen.

This commit therefore causes kvm-recheck.sh to also search the "log"
file in the top-level results directory for the string "--trust-make".

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/testing/selftests/rcutorture/bin/parse-build.sh

index 09155c15ea651549d8958a0fa52db9ff67f6f758..9313e5065ae923bb1612ed4be7e14e89bff163ef 100755 (executable)
@@ -21,7 +21,7 @@ mkdir $T
 
 . functions.sh
 
-if grep -q CC < $F || test -n "$TORTURE_TRUST_MAKE"
+if grep -q CC < $F || test -n "$TORTURE_TRUST_MAKE" || grep -qe --trust-make < `dirname $F`/../log
 then
        :
 else