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

Configure Feed

Select the types of activity you want to include in your feed.

tools/memory-model: Add checktheselitmus.sh to run specified litmus tests

This commit adds a checktheselitmus.sh script that runs the litmus tests
specified on the command line. This is useful for verifying fixes to
specific litmus tests.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>

+51
+8
tools/memory-model/scripts/README
··· 27 27 checklitmus.sh 28 28 29 29 Check a single litmus test against its "Result:" expected result. 30 + Not intended to for manual use. 31 + 32 + checktheselitmus.sh 33 + 34 + Check the specified list of litmus tests against their "Result:" 35 + expected results. This takes optional parseargs.sh arguments, 36 + followed by "--" followed by pathnames starting from the current 37 + directory. 30 38 31 39 cmplitmushist.sh 32 40
+43
tools/memory-model/scripts/checktheselitmus.sh
··· 1 + #!/bin/sh 2 + # SPDX-License-Identifier: GPL-2.0+ 3 + # 4 + # Invokes checklitmus.sh on its arguments to run the specified litmus 5 + # test and pass judgment on the results. 6 + # 7 + # Usage: 8 + # checktheselitmus.sh -- [ file1.litmus [ file2.litmus ... ] ] 9 + # 10 + # Run this in the directory containing the memory model, specifying the 11 + # pathname of the litmus test to check. The usual parseargs.sh arguments 12 + # can be specified prior to the "--". 13 + # 14 + # This script is intended for use with pathnames that start from the 15 + # tools/memory-model directory. If some of the pathnames instead start at 16 + # the root directory, they all must do so and the "--destdir /" parseargs.sh 17 + # argument must be specified prior to the "--". Alternatively, some other 18 + # "--destdir" argument can be supplied as long as the needed subdirectories 19 + # are populated. 20 + # 21 + # Copyright IBM Corporation, 2018 22 + # 23 + # Author: Paul E. McKenney <paulmck@linux.ibm.com> 24 + 25 + . scripts/parseargs.sh 26 + 27 + ret=0 28 + for i in "$@" 29 + do 30 + if scripts/checklitmus.sh $i 31 + then 32 + : 33 + else 34 + ret=1 35 + fi 36 + done 37 + if test "$ret" -ne 0 38 + then 39 + echo " ^^^ VERIFICATION MISMATCHES" 1>&2 40 + else 41 + echo All litmus tests verified as was expected. 1>&2 42 + fi 43 + exit $ret