Skip to content

Commit db5dc35

Browse files
committed
torture: Add srcu_lockdep.sh to torture.sh
This commit adds srcu_lockdep.sh to torture.sh, thus exercizing the extended SRCU-aware lockdep-RCU functionality on a regular basis. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent adec488 commit db5dc35

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tools/testing/selftests/rcutorture/bin/torture.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ do_kcsan=no
5656
do_clocksourcewd=yes
5757
do_rt=yes
5858
do_rcutasksflavors=yes
59+
do_srcu_lockdep=yes
5960

6061
# doyesno - Helper function for yes/no arguments
6162
function doyesno () {
@@ -87,6 +88,7 @@ usage () {
8788
echo " --do-refscale / --do-no-refscale / --no-refscale"
8889
echo " --do-rt / --do-no-rt / --no-rt"
8990
echo " --do-scftorture / --do-no-scftorture / --no-scftorture"
91+
echo " --do-srcu-lockdep / --do-no-srcu-lockdep / --no-srcu-lockdep"
9092
echo " --duration [ <minutes> | <hours>h | <days>d ]"
9193
echo " --kcsan-kmake-arg kernel-make-arguments"
9294
exit 1
@@ -128,6 +130,7 @@ do
128130
do_kasan=yes
129131
do_kcsan=yes
130132
do_clocksourcewd=yes
133+
do_srcu_lockdep=yes
131134
;;
132135
--do-allmodconfig|--do-no-allmodconfig|--no-allmodconfig)
133136
do_allmodconfig=`doyesno "$1" --do-allmodconfig`
@@ -160,6 +163,7 @@ do
160163
do_kasan=no
161164
do_kcsan=no
162165
do_clocksourcewd=no
166+
do_srcu_lockdep=no
163167
;;
164168
--do-rcuscale|--do-no-rcuscale|--no-rcuscale)
165169
do_rcuscale=`doyesno "$1" --do-rcuscale`
@@ -179,6 +183,9 @@ do
179183
--do-scftorture|--do-no-scftorture|--no-scftorture)
180184
do_scftorture=`doyesno "$1" --do-scftorture`
181185
;;
186+
--do-srcu-lockdep|--do-no-srcu-lockdep|--no-srcu-lockdep)
187+
do_srcu_lockdep=`doyesno "$1" --do-srcu-lockdep`
188+
;;
182189
--duration)
183190
checkarg --duration "(minutes)" $# "$2" '^[0-9][0-9]*\(m\|h\|d\|\)$' '^error'
184191
mult=1
@@ -432,6 +439,23 @@ then
432439
torture_set "rcurttorture-exp" tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --duration "$duration_rcutorture" --configs "TREE03" --trust-make
433440
fi
434441

442+
if test "$do_srcu_lockdep" = "yes"
443+
then
444+
echo " --- do-srcu-lockdep:" Start `date` | tee -a $T/log
445+
tools/testing/selftests/rcutorture/bin/srcu_lockdep.sh --datestamp "$ds/results-srcu-lockdep" > $T/srcu_lockdep.sh.out 2>&1
446+
retcode=$?
447+
cp $T/srcu_lockdep.sh.out "tools/testing/selftests/rcutorture/res/$ds/results-srcu-lockdep/log"
448+
if test "$retcode" -eq 0
449+
then
450+
echo "srcu_lockdep($retcode)" "tools/testing/selftests/rcutorture/res/$ds/results-srcu-lockdep" >> $T/successes
451+
echo Success >> "tools/testing/selftests/rcutorture/res/$ds/results-srcu-lockdep/log"
452+
else
453+
echo "srcu_lockdep($retcode)" "tools/testing/selftests/rcutorture/res/$ds/results-srcu-lockdep" >> $T/failures
454+
echo " --- srcu_lockdep Test Summary:" >> "tools/testing/selftests/rcutorture/res/$ds/results-srcu-lockdep/log"
455+
echo " --- Summary: Exit code $retcode from srcu_lockdep.sh, see ds/results-srcu-lockdep" >> "tools/testing/selftests/rcutorture/res/$ds/results-srcu-lockdep/log"
456+
fi
457+
fi
458+
435459
if test "$do_refscale" = yes
436460
then
437461
primlist="`grep '\.name[ ]*=' kernel/rcu/refscale.c | sed -e 's/^[^"]*"//' -e 's/".*$//'`"

0 commit comments

Comments
 (0)