mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 20:26:48 +07:00
878f968eeb
This is a rather simple and basic test suite to test common locking issues. Beyond tests, it also shows how to use the library. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/1371163284-6346-5-git-send-email-sasha.levin@oracle.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
28 lines
654 B
Bash
28 lines
654 B
Bash
#! /bin/bash
|
|
|
|
make &> /dev/null
|
|
|
|
for i in `ls tests/*.c`; do
|
|
testname=$(basename -s .c "$i")
|
|
gcc -o tests/$testname -pthread -lpthread $i liblockdep.a -Iinclude -D__USE_LIBLOCKDEP &> /dev/null
|
|
echo -ne "$testname... "
|
|
if [ $(timeout 1 ./tests/$testname | wc -l) -gt 0 ]; then
|
|
echo "PASSED!"
|
|
else
|
|
echo "FAILED!"
|
|
fi
|
|
rm tests/$testname
|
|
done
|
|
|
|
for i in `ls tests/*.c`; do
|
|
testname=$(basename -s .c "$i")
|
|
gcc -o tests/$testname -pthread -lpthread -Iinclude $i &> /dev/null
|
|
echo -ne "(PRELOAD) $testname... "
|
|
if [ $(timeout 1 ./lockdep ./tests/$testname | wc -l) -gt 0 ]; then
|
|
echo "PASSED!"
|
|
else
|
|
echo "FAILED!"
|
|
fi
|
|
rm tests/$testname
|
|
done
|