summaryrefslogtreecommitdiffstats
path: root/tools/memory-model/scripts
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2019-03-19 14:27:06 -0700
committerPaul E. McKenney <paulmck@kernel.org>2023-03-24 10:24:13 -0700
commite253a403023488f2ade2845d0e1fd8e0e66befea (patch)
tree385480e389856a70eb9397e4f0a053c1c9fd030e /tools/memory-model/scripts
parent02484d826fda923f829fc47350ee99fd3cbd3414 (diff)
downloadlinux-e253a403023488f2ade2845d0e1fd8e0e66befea.tar.gz
linux-e253a403023488f2ade2845d0e1fd8e0e66befea.tar.bz2
linux-e253a403023488f2ade2845d0e1fd8e0e66befea.zip
tools/memory-model: Make judgelitmus.sh detect hard deadlocks
If a litmus test specifies "Result: Never" and if it contains an unconditional ("hard") deadlock, then running checklitmus.sh on it will not flag any errors, despite the fact that there are no executions. This commit therefore updates judgelitmus.sh to complain about tests with no executions that are marked, but not as "Result: DEADLOCK". Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/memory-model/scripts')
-rwxr-xr-xtools/memory-model/scripts/judgelitmus.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/memory-model/scripts/judgelitmus.sh b/tools/memory-model/scripts/judgelitmus.sh
index d40439c7b71e..84c62eee321b 100755
--- a/tools/memory-model/scripts/judgelitmus.sh
+++ b/tools/memory-model/scripts/judgelitmus.sh
@@ -83,6 +83,14 @@ then
fi
ret=1
fi
+elif grep '^Observation' $LKMM_DESTDIR/$litmus.out | grep -q 'Never 0 0$'
+then
+ echo " !!! Unexpected non-$outcome deadlock" $litmus
+ if ! grep -q '!!!' $LKMM_DESTDIR/$litmus.out
+ then
+ echo " !!! Unexpected non-$outcome deadlock" $litmus >> $LKMM_DESTDIR/$litmus.out 2>&1
+ fi
+ ret=1
elif grep '^Observation' $LKMM_DESTDIR/$litmus.out | grep -q $outcome || test "$outcome" = Maybe
then
ret=0