tools/memory-model: Add data-race capabilities to judgelitmus.sh
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 3 May 2019 14:34:20 +0000 (07:34 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 1 Dec 2021 01:48:15 +0000 (17:48 -0800)
commit43a74b9dd11b7bdd0d005215fd90e19a72ba6d67
tree22866535a9b2c39ae422f231daeabf05c2a3e989
parentb8eff65fa1f9b6747a391f5694b9b601323120b6
tools/memory-model: Add data-race capabilities to judgelitmus.sh

This commit adds functionality to judgelitmus.sh to allow it to handle
both the "DATARACE" markers in the "Result:" comments in litmus tests
and the "Flag data-race" markers in LKMM output.  For C-language tests,
if either marker is present, the other must also be as well, at least for
litmus tests having a "Result:" comment.  If the LKMM output indicates
a data race, then failures of the Always/Sometimes/Never portion of the
"Result:" prediction are forgiven.

The reason for forgiving "Result:" mispredictions is that data races can
result in "interesting" compiler optimizations, so that all bets are off
in the data-race case.

[ paulmck: Apply Akira Yokosawa feedback. ]
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/memory-model/scripts/judgelitmus.sh