mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
tools/lib/lockdep/tests: Run lockdep tests a second time under Valgrind
This improves test coverage. Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Johannes Berg <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sasha Levin <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Waiman Long <[email protected]> Cc: [email protected] Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
1 parent
5ecb8e94b4
commit
2b28a8609e
1 file changed
+14
@@ -31,3 +31,17 @@ find tests -name '*.c' | sort | while read -r i; do
|
||||
fi
|
||||
rm -f "tests/$testname"
|
||||
done
|
||||
|
||||
find tests -name '*.c' | sort | while read -r i; do
|
||||
testname=$(basename "$i" .c)
|
||||
echo -ne "(PRELOAD + Valgrind) $testname... "
|
||||
if gcc -o "tests/$testname" -pthread -Iinclude "$i" &&
|
||||
{ timeout 10 valgrind --read-var-info=yes ./lockdep "./tests/$testname" >& "tests/${testname}.vg.out"; true; } &&
|
||||
"tests/${testname}.sh" < "tests/${testname}.vg.out" &&
|
||||
! grep -Eq '(^==[0-9]*== (Invalid |Uninitialised ))|Mismatched free|Source and destination overlap| UME ' "tests/${testname}.vg.out"; then
|
||||
echo "PASSED!"
|
||||
else
|
||||
echo "FAILED!"
|
||||
fi
|
||||
rm -f "tests/$testname"
|
||||
done
|
||||
Reference in new issue
Block a user