Skip to content

Commit

Permalink
tools/memory-model: Make judgelitmus.sh handle scripted Result: tag
Browse files Browse the repository at this point in the history
The scripts that generate the litmus tests in the "auto" directory of
the https://github.com/paulmckrcu/litmus archive place the "Result:"
tag into a single-line ocaml comment, which judgelitmus.sh currently
does not recognize.  This commit therefore makes judgelitmus.sh
recognize both the multiline comment format that it currently does
and the automatically generated single-line format.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
  • Loading branch information
Paul E. McKenney committed Mar 24, 2023
1 parent 68f7bca commit 72b5f10
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/memory-model/scripts/judgelitmus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ if grep -q '^Flag data-race$' "$LKMM_DESTDIR/$litmusout"
then
datarace_modeled=1
fi
if grep -q '^ \* Result: ' $litmus
if grep -q '^[( ]\* Result: ' $litmus
then
outcome=`grep -m 1 '^ \* Result: ' $litmus | awk '{ print $3 }'`
if grep -m1 '^ \* Result: .* DATARACE' $litmus
outcome=`grep -m 1 '^[( ]\* Result: ' $litmus | awk '{ print $3 }'`
if grep -m1 '^[( ]\* Result: .* DATARACE' $litmus
then
datarace_predicted=1
fi
Expand Down

0 comments on commit 72b5f10

Please sign in to comment.