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

TOMOYO Linux Cross Reference
Linux/tools/memory-model/scripts/newlitmushist.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 ] ~

Diff markup

Differences between /tools/memory-model/scripts/newlitmushist.sh (Architecture sparc64) and /tools/memory-model/scripts/newlitmushist.sh (Architecture i386)


  1 #!/bin/sh                                           1 #!/bin/sh
  2 # SPDX-License-Identifier: GPL-2.0+                 2 # SPDX-License-Identifier: GPL-2.0+
  3 #                                                   3 #
  4 # Runs the C-language litmus tests matching th      4 # Runs the C-language litmus tests matching the specified criteria
  5 # that do not already have a corresponding .li      5 # that do not already have a corresponding .litmus.out file, and does
  6 # not judge the result.                             6 # not judge the result.
  7 #                                                   7 #
  8 # sh newlitmushist.sh                               8 # sh newlitmushist.sh
  9 #                                                   9 #
 10 # Run from the Linux kernel tools/memory-model     10 # Run from the Linux kernel tools/memory-model directory.
 11 # See scripts/parseargs.sh for list of argumen     11 # See scripts/parseargs.sh for list of arguments.
 12 #                                                  12 #
 13 # Copyright IBM Corporation, 2018                  13 # Copyright IBM Corporation, 2018
 14 #                                                  14 #
 15 # Author: Paul E. McKenney <paulmck@linux.ibm.c     15 # Author: Paul E. McKenney <paulmck@linux.ibm.com>
 16                                                    16 
 17 . scripts/parseargs.sh                             17 . scripts/parseargs.sh
 18                                                    18 
 19 T=/tmp/newlitmushist.sh.$$                         19 T=/tmp/newlitmushist.sh.$$
 20 trap 'rm -rf $T' 0                                 20 trap 'rm -rf $T' 0
 21 mkdir $T                                           21 mkdir $T
 22                                                    22 
 23 if test -d litmus                                  23 if test -d litmus
 24 then                                               24 then
 25         :                                          25         :
 26 else                                               26 else
 27         echo Run scripts/initlitmushist.sh fir     27         echo Run scripts/initlitmushist.sh first, need litmus repo.
 28         exit 1                                     28         exit 1
 29 fi                                                 29 fi
 30                                                    30 
 31 # Create any new directories that have appeare     31 # Create any new directories that have appeared in the github litmus
 32 # repo since the last run.                         32 # repo since the last run.
 33 if test "$LKMM_DESTDIR" != "."                     33 if test "$LKMM_DESTDIR" != "."
 34 then                                               34 then
 35         find litmus -type d -print |               35         find litmus -type d -print |
 36         ( cd "$LKMM_DESTDIR"; sed -e 's/^/mkdi     36         ( cd "$LKMM_DESTDIR"; sed -e 's/^/mkdir -p /' | sh )
 37 fi                                                 37 fi
 38                                                    38 
 39 # Create a list of the C-language litmus tests     39 # Create a list of the C-language litmus tests previously run.
 40 ( cd $LKMM_DESTDIR; find litmus -name '*.litmu     40 ( cd $LKMM_DESTDIR; find litmus -name '*.litmus.out' -print ) |
 41         sed -e 's/\.out$//' |                      41         sed -e 's/\.out$//' |
 42         xargs -r grep -L "^P${LKMM_PROCS}"> $T     42         xargs -r grep -L "^P${LKMM_PROCS}"> $T/list-C-already
 43                                                    43 
 44 # Form full list of litmus tests with no more      44 # Form full list of litmus tests with no more than the specified
 45 # number of processes (per the --procs argumen     45 # number of processes (per the --procs argument).
 46 find litmus -name '*.litmus' -print | mselect7     46 find litmus -name '*.litmus' -print | mselect7 -arch C > $T/list-C-all
 47 xargs < $T/list-C-all -r grep -L "^P${LKMM_PRO     47 xargs < $T/list-C-all -r grep -L "^P${LKMM_PROCS}" > $T/list-C-short
 48                                                    48 
 49 # Form list of new tests.  Note: This does not     49 # Form list of new tests.  Note: This does not handle litmus-test deletion!
 50 sort $T/list-C-already $T/list-C-short | uniq      50 sort $T/list-C-already $T/list-C-short | uniq -u > $T/list-C-new
 51                                                    51 
 52 # Form list of litmus tests that have changed      52 # Form list of litmus tests that have changed since the last run.
 53 sed < $T/list-C-short -e 's,^.*$,if test & -nt     53 sed < $T/list-C-short -e 's,^.*$,if test & -nt '"$LKMM_DESTDIR"'/&.out; then echo &; fi,' > $T/list-C-script
 54 sh $T/list-C-script > $T/list-C-newer              54 sh $T/list-C-script > $T/list-C-newer
 55                                                    55 
 56 # Merge the list of new and of updated litmus      56 # Merge the list of new and of updated litmus tests: These must be (re)run.
 57 sort -u $T/list-C-new $T/list-C-newer > $T/lis     57 sort -u $T/list-C-new $T/list-C-newer > $T/list-C-needed
 58                                                    58 
 59 scripts/runlitmushist.sh < $T/list-C-needed        59 scripts/runlitmushist.sh < $T/list-C-needed
 60                                                    60 
 61 exit 0                                             61 exit 0
                                                      

~ [ 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