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