Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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