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

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>

+8
+8
tools/memory-model/scripts/judgelitmus.sh
··· 83 83 fi 84 84 ret=1 85 85 fi 86 + elif grep '^Observation' $LKMM_DESTDIR/$litmus.out | grep -q 'Never 0 0$' 87 + then 88 + echo " !!! Unexpected non-$outcome deadlock" $litmus 89 + if ! grep -q '!!!' $LKMM_DESTDIR/$litmus.out 90 + then 91 + echo " !!! Unexpected non-$outcome deadlock" $litmus >> $LKMM_DESTDIR/$litmus.out 2>&1 92 + fi 93 + ret=1 86 94 elif grep '^Observation' $LKMM_DESTDIR/$litmus.out | grep -q $outcome || test "$outcome" = Maybe 87 95 then 88 96 ret=0