Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lockdep/lib/tests: Fix run_tests.sh

Apparently the execute bits were set for the tests/*.sh scripts on my
test setup but these are not set in the kernel tree. Fix this by adding
the interpreter path in front of the script paths.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Waiman Long <longman@redhat.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: johannes.berg@intel.com
Cc: tj@kernel.org
Fixes: 5ecb8e94b494 ("tools/lib/lockdep/tests: Improve testing accuracy") # v5.0-rc1
Link: https://lkml.kernel.org/r/20190214230058.196511-23-bvanassche@acm.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Bart Van Assche and committed by
Ingo Molnar
d93ac78b 669de8bd

+3 -3
+3 -3
tools/lib/lockdep/run_tests.sh
··· 11 11 testname=$(basename "$i" .c) 12 12 echo -ne "$testname... " 13 13 if gcc -o "tests/$testname" -pthread "$i" liblockdep.a -Iinclude -D__USE_LIBLOCKDEP && 14 - timeout 1 "tests/$testname" 2>&1 | "tests/${testname}.sh"; then 14 + timeout 1 "tests/$testname" 2>&1 | /bin/bash "tests/${testname}.sh"; then 15 15 echo "PASSED!" 16 16 else 17 17 echo "FAILED!" ··· 24 24 echo -ne "(PRELOAD) $testname... " 25 25 if gcc -o "tests/$testname" -pthread -Iinclude "$i" && 26 26 timeout 1 ./lockdep "tests/$testname" 2>&1 | 27 - "tests/${testname}.sh"; then 27 + /bin/bash "tests/${testname}.sh"; then 28 28 echo "PASSED!" 29 29 else 30 30 echo "FAILED!" ··· 37 37 echo -ne "(PRELOAD + Valgrind) $testname... " 38 38 if gcc -o "tests/$testname" -pthread -Iinclude "$i" && 39 39 { timeout 10 valgrind --read-var-info=yes ./lockdep "./tests/$testname" >& "tests/${testname}.vg.out"; true; } && 40 - "tests/${testname}.sh" < "tests/${testname}.vg.out" && 40 + /bin/bash "tests/${testname}.sh" < "tests/${testname}.vg.out" && 41 41 ! grep -Eq '(^==[0-9]*== (Invalid |Uninitialised ))|Mismatched free|Source and destination overlap| UME ' "tests/${testname}.vg.out"; then 42 42 echo "PASSED!" 43 43 else