1 #!/bin/sh 2 # SPDX-License-Identifier: GPL-2.0+ 3 # 4 # Reruns the C-language litmus tests previousl 5 # specified criteria, and compares the result 6 # runs from initlitmushist.sh and/or newlitmus 7 # 8 # sh checklitmushist.sh 9 # 10 # Run from the Linux kernel tools/memory-model 11 # See scripts/parseargs.sh for list of argumen 12 # 13 # Copyright IBM Corporation, 2018 14 # 15 # Author: Paul E. McKenney <paulmck@linux.ibm.c 16 17 . scripts/parseargs.sh 18 19 T=/tmp/checklitmushist.sh.$$ 20 trap 'rm -rf $T' 0 21 mkdir $T 22 23 if test -d litmus 24 then 25 : 26 else 27 echo Run scripts/initlitmushist.sh fir 28 exit 1 29 fi 30 31 # Create the results directory and populate it 32 # The initial output is created here to avoid 33 # generated earlier. 34 mkdir $T/results 35 find litmus -type d -print | ( cd $T/results; 36 37 # Create the list of litmus tests already run, 38 # are excluded by this run's --procs argument. 39 ( cd $LKMM_DESTDIR; find litmus -name '*.litmu 40 sed -e 's/\.out$//' | 41 xargs -r grep -L "^P${LKMM_PROCS}"> $T 42 xargs < $T/list-C-already -r grep -L "^P${LKMM 43 44 # Redirect output, run tests, then restore des 45 destdir="$LKMM_DESTDIR" 46 LKMM_DESTDIR=$T/results; export LKMM_DESTDIR 47 scripts/runlitmushist.sh < $T/list-C-short > $ 48 LKMM_DESTDIR="$destdir"; export LKMM_DESTDIR 49 50 # Move the newly generated .litmus.out files t 51 # in the destination directory. 52 cdir=`pwd` 53 ddir=`awk -v c="$cdir" -v d="$LKMM_DESTDIR" \ 54 'END { if (d ~ /^\//) print d; else pr 55 ( cd $T/results; find litmus -type f -name '*. 56 sed -e 's,^.*$,cp & '"$ddir"'/&.new,' | sh ) 57 58 sed < $T/list-C-short -e 's,^,'"$LKMM_DESTDIR/ 59 sh scripts/cmplitmushist.sh 60 exit $?
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.