Paul E. McKenney | 2fb6ae1 | 2018-05-14 16:33:47 -0700 | [diff] [blame] | 1 | #!/bin/sh |
Paul E. McKenney | b02eb5b | 2018-12-03 15:04:50 -0800 | [diff] [blame] | 2 | # SPDX-License-Identifier: GPL-2.0+ |
Paul E. McKenney | 2fb6ae1 | 2018-05-14 16:33:47 -0700 | [diff] [blame] | 3 | # |
Paul E. McKenney | b02eb5b | 2018-12-03 15:04:50 -0800 | [diff] [blame] | 4 | # Run a herd test and invokes judgelitmus.sh to check the result against |
| 5 | # a "Result:" comment within the litmus test. It also outputs verification |
Paul E. McKenney | 2fb6ae1 | 2018-05-14 16:33:47 -0700 | [diff] [blame] | 6 | # results to a file whose name is that of the specified litmus test, but |
| 7 | # with ".out" appended. |
| 8 | # |
| 9 | # Usage: |
Paul E. McKenney | 24675bb | 2018-07-16 11:05:58 -0700 | [diff] [blame] | 10 | # checklitmus.sh file.litmus |
Paul E. McKenney | 2fb6ae1 | 2018-05-14 16:33:47 -0700 | [diff] [blame] | 11 | # |
Paul E. McKenney | b02eb5b | 2018-12-03 15:04:50 -0800 | [diff] [blame] | 12 | # Run this in the directory containing the memory model, specifying the |
| 13 | # pathname of the litmus test to check. The caller is expected to have |
| 14 | # properly set up the LKMM environment variables. |
Paul E. McKenney | 2fb6ae1 | 2018-05-14 16:33:47 -0700 | [diff] [blame] | 15 | # |
| 16 | # Copyright IBM Corporation, 2018 |
| 17 | # |
| 18 | # Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com> |
| 19 | |
| 20 | litmus=$1 |
Paul E. McKenney | b02eb5b | 2018-12-03 15:04:50 -0800 | [diff] [blame] | 21 | herdoptions=${LKMM_HERD_OPTIONS--conf linux-kernel.cfg} |
Paul E. McKenney | 2fb6ae1 | 2018-05-14 16:33:47 -0700 | [diff] [blame] | 22 | |
| 23 | if test -f "$litmus" -a -r "$litmus" |
| 24 | then |
| 25 | : |
| 26 | else |
| 27 | echo ' --- ' error: \"$litmus\" is not a readable file |
| 28 | exit 255 |
| 29 | fi |
Paul E. McKenney | 2fb6ae1 | 2018-05-14 16:33:47 -0700 | [diff] [blame] | 30 | |
Paul E. McKenney | b02eb5b | 2018-12-03 15:04:50 -0800 | [diff] [blame] | 31 | echo Herd options: $herdoptions > $LKMM_DESTDIR/$litmus.out |
| 32 | /usr/bin/time $LKMM_TIMEOUT_CMD herd7 $herdoptions $litmus >> $LKMM_DESTDIR/$litmus.out 2>&1 |
| 33 | |
| 34 | scripts/judgelitmus.sh $litmus |