~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/memory-model/scripts/checkghlitmus.sh

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #!/bin/sh
  2 # SPDX-License-Identifier: GPL-2.0+
  3 #
  4 # Runs the C-language litmus tests having a maximum number of processes
  5 # to run, defaults to 6.
  6 #
  7 # sh checkghlitmus.sh
  8 #
  9 # Run from the Linux kernel tools/memory-model directory.  See the
 10 # parseargs.sh scripts for arguments.
 11 
 12 . scripts/parseargs.sh
 13 . scripts/hwfnseg.sh
 14 
 15 T=/tmp/checkghlitmus.sh.$$
 16 trap 'rm -rf $T' 0
 17 mkdir $T
 18 
 19 # Clone the repository if it is not already present.
 20 if test -d litmus
 21 then
 22         :
 23 else
 24         git clone https://github.com/paulmckrcu/litmus
 25         ( cd litmus; git checkout origin/master )
 26 fi
 27 
 28 # Create any new directories that have appeared in the github litmus
 29 # repo since the last run.
 30 if test "$LKMM_DESTDIR" != "."
 31 then
 32         find litmus -type d -print |
 33         ( cd "$LKMM_DESTDIR"; sed -e 's/^/mkdir -p /' | sh )
 34 fi
 35 
 36 # Create a list of the specified litmus tests previously run.
 37 ( cd $LKMM_DESTDIR; find litmus -name "*.litmus${hwfnseg}.out" -print ) |
 38         sed -e "s/${hwfnseg}"'\.out$//' |
 39         xargs -r grep -E -l '^ \* Result: (Never|Sometimes|Always|DEADLOCK)' |
 40         xargs -r grep -L "^P${LKMM_PROCS}"> $T/list-C-already
 41 
 42 # Create a list of C-language litmus tests with "Result:" commands and
 43 # no more than the specified number of processes.
 44 find litmus -name '*.litmus' -print | mselect7 -arch C > $T/list-C
 45 xargs < $T/list-C -r grep -E -l '^ \* Result: (Never|Sometimes|Always|DEADLOCK)' > $T/list-C-result
 46 xargs < $T/list-C-result -r grep -L "^P${LKMM_PROCS}" > $T/list-C-result-short
 47 
 48 # Form list of tests without corresponding .out files
 49 sort $T/list-C-already $T/list-C-result-short | uniq -u > $T/list-C-needed
 50 
 51 # Run any needed tests.
 52 if scripts/runlitmushist.sh < $T/list-C-needed > $T/run.stdout 2> $T/run.stderr
 53 then
 54         errs=
 55 else
 56         errs=1
 57 fi
 58 
 59 sed < $T/list-C-result-short -e 's,^,scripts/judgelitmus.sh ,' |
 60         sh > $T/judge.stdout 2> $T/judge.stderr
 61 
 62 if test -n "$errs"
 63 then
 64         cat $T/run.stderr 1>&2
 65 fi
 66 grep '!!!' $T/judge.stdout

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php