| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 |
|
| 26 | litmus=$1
|
| 27 | if test -f "$litmus" -a -r "$litmus"
|
| 28 | then
|
| 29 | :
|
| 30 | else
|
| 31 | echo ' !!! ' error: \"$litmus\" is not a readable file
|
| 32 | exit 255
|
| 33 | fi
|
| 34 |
|
| 35 | if test -z "$LKMM_HW_MAP_FILE" -o ! -e $LKMM_DESTDIR/$litmus.out
|
| 36 | then
|
| 37 | |
| 38 | herdoptions=${LKMM_HERD_OPTIONS--conf linux-kernel.cfg}
|
| 39 | echo Herd options: $herdoptions > $LKMM_DESTDIR/$litmus.out
|
| 40 | /usr/bin/time $LKMM_TIMEOUT_CMD herd7 $herdoptions $litmus >> $LKMM_DESTDIR/$litmus.out 2>&1
|
| 41 | ret=$?
|
| 42 | if test -z "$LKMM_HW_MAP_FILE"
|
| 43 | then
|
| 44 | exit $ret
|
| 45 | fi
|
| 46 | echo " --- " Automatically generated LKMM output for '"'--hw $LKMM_HW_MAP_FILE'"' run
|
| 47 | fi
|
| 48 |
|
| 49 | |
| 50 |
|
| 51 | T=/tmp/checklitmushw.sh.$$
|
| 52 | trap 'rm -rf $T' 0 2
|
| 53 | mkdir $T
|
| 54 |
|
| 55 | |
| 56 | mapfile="Linux2${LKMM_HW_MAP_FILE}.map"
|
| 57 | themefile="$T/${LKMM_HW_MAP_FILE}.theme"
|
| 58 | herdoptions="-model $LKMM_HW_CAT_FILE"
|
| 59 | hwlitmus=`echo $litmus | sed -e 's/\.litmus$/.litmus.'${LKMM_HW_MAP_FILE}'/'`
|
| 60 | hwlitmusfile=`echo $hwlitmus | sed -e 's,^.*/,,'`
|
| 61 |
|
| 62 | |
| 63 | if ! scripts/simpletest.sh $litmus
|
| 64 | then
|
| 65 | echo ' --- ' error: \"$litmus\" contains locking, RCU, or SRCU
|
| 66 | exit 254
|
| 67 | fi
|
| 68 |
|
| 69 | |
| 70 | gen_theme7 -n 10 -map $mapfile -call Linux.call > $themefile
|
| 71 | jingle7 -v -theme $themefile $litmus > $LKMM_DESTDIR/$hwlitmus 2> $T/$hwlitmusfile.jingle7.out
|
| 72 | if grep -q "Generated 0 tests" $T/$hwlitmusfile.jingle7.out
|
| 73 | then
|
| 74 | echo ' !!! ' jingle7 failed, errors in $hwlitmus.err
|
| 75 | cp $T/$hwlitmusfile.jingle7.out $LKMM_DESTDIR/$hwlitmus.err
|
| 76 | exit 253
|
| 77 | fi
|
| 78 | /usr/bin/time $LKMM_TIMEOUT_CMD herd7 -unroll 0 $LKMM_DESTDIR/$hwlitmus > $LKMM_DESTDIR/$hwlitmus.out 2>&1
|
| 79 |
|
| 80 | exit $?
|