diff options
Diffstat (limited to 'tools')
12 files changed, 73 insertions, 110 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-check-branches.sh b/tools/testing/selftests/rcutorture/bin/kvm-check-branches.sh deleted file mode 100755 index ed0ec7f0927e..000000000000 --- a/tools/testing/selftests/rcutorture/bin/kvm-check-branches.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: GPL-2.0+ -# -# Run a group of kvm.sh tests on the specified commits. This currently -# unconditionally does three-minute runs on each scenario in CFLIST, -# taking advantage of all available CPUs and trusting the "make" utility. -# In the short term, adjustments can be made by editing this script and -# CFLIST. If some adjustments appear to have ongoing value, this script -# might grow some command-line arguments. -# -# Usage: kvm-check-branches.sh commit1 commit2..commit3 commit4 ... -# -# This script considers its arguments one at a time. If more elaborate -# specification of commits is needed, please use "git rev-list" to -# produce something that this simple script can understand. The reason -# for retaining the simplicity is that it allows the user to more easily -# see which commit came from which branch. -# -# This script creates a yyyy.mm.dd-hh.mm.ss-group entry in the "res" -# directory. The calls to kvm.sh create the usual entries, but this script -# moves them under the yyyy.mm.dd-hh.mm.ss-group entry, each in its own -# directory numbered in run order, that is, "0001", "0002", and so on. -# For successful runs, the large build artifacts are removed. Doing this -# reduces the disk space required by about two orders of magnitude for -# successful runs. -# -# Copyright (C) Facebook, 2020 -# -# Authors: Paul E. McKenney <paulmck@kernel.org> - -if ! git status > /dev/null 2>&1 -then - echo '!!!' This script needs to run in a git archive. 1>&2 - echo '!!!' Giving up. 1>&2 - exit 1 -fi - -# Remember where we started so that we can get back at the end. -curcommit="`git status | head -1 | awk '{ print $NF }'`" - -nfail=0 -ntry=0 -resdir="tools/testing/selftests/rcutorture/res" -ds="`date +%Y.%m.%d-%H.%M.%S`-group" -if ! test -e $resdir -then - mkdir $resdir || : -fi -mkdir $resdir/$ds -echo Results directory: $resdir/$ds - -RCUTORTURE="`pwd`/tools/testing/selftests/rcutorture"; export RCUTORTURE -PATH=${RCUTORTURE}/bin:$PATH; export PATH -. functions.sh -echo Using all `identify_qemu_vcpus` CPUs. - -# Each pass through this loop does one command-line argument. -for gitbr in $@ -do - echo ' --- git branch ' $gitbr - - # Each pass through this loop tests one commit. - for i in `git rev-list "$gitbr"` - do - ntry=`expr $ntry + 1` - idir=`awk -v ntry="$ntry" 'END { printf "%04d", ntry; }' < /dev/null` - echo ' --- commit ' $i from branch $gitbr - date - mkdir $resdir/$ds/$idir - echo $gitbr > $resdir/$ds/$idir/gitbr - echo $i >> $resdir/$ds/$idir/gitbr - - # Test the specified commit. - git checkout $i > $resdir/$ds/$idir/git-checkout.out 2>&1 - echo git checkout return code: $? "(Commit $ntry: $i)" - kvm.sh --allcpus --duration 3 --trust-make --datestamp "$ds/$idir" > $resdir/$ds/$idir/kvm.sh.out 2>&1 - ret=$? - echo kvm.sh return code $ret for commit $i from branch $gitbr - echo Run results: $resdir/$ds/$idir - if test "$ret" -ne 0 - then - # Failure, so leave all evidence intact. - nfail=`expr $nfail + 1` - else - # Success, so remove large files to save about 1GB. - ( cd $resdir/$ds/$idir/$rrd; rm -f */vmlinux */bzImage */System.map */Module.symvers ) - fi - done -done -date - -# Go back to the original commit. -git checkout "$curcommit" - -if test $nfail -ne 0 -then - echo '!!! ' $nfail failures in $ntry 'runs!!!' - exit 1 -else - echo No failures in $ntry runs. - exit 0 -fi diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh index de65d77b47ff..63bbbdd5f4ef 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh @@ -39,7 +39,12 @@ do X*) ;; *) - kvm-recheck-${TORTURE_SUITE}.sh $i + if test -f tools/testing/selftests/rcutorture/bin/kvm-recheck-${TORTURE_SUITE}.sh + then + kvm-recheck-${TORTURE_SUITE}.sh $i + else + echo No kvm-recheck-${TORTURE_SUITE}.sh, so no ${TORTURE_SUITE}-specific analysis. + fi esac if test -f "$i/qemu-retval" && test "`cat $i/qemu-retval`" -ne 0 && test "`cat $i/qemu-retval`" -ne 137 then @@ -49,7 +54,7 @@ do then if test -f "$i/qemu-retval" && test "`cat $i/qemu-retval`" -eq 137 then - echo QEMU killed + echo "Summary: Potential hang (QEMU killed)" fi configcheck.sh $i/.config $i/ConfigFragment > $i/ConfigFragment.diags 2>&1 if grep -q '^CONFIG_KCSAN=y$' $i/ConfigFragment.input diff --git a/tools/testing/selftests/rcutorture/bin/parse-console.sh b/tools/testing/selftests/rcutorture/bin/parse-console.sh index 21e6ba3615f6..be1e943ca4d5 100755 --- a/tools/testing/selftests/rcutorture/bin/parse-console.sh +++ b/tools/testing/selftests/rcutorture/bin/parse-console.sh @@ -113,7 +113,6 @@ then then print_warning $title `cat $T.seq` fi - exit 2 fi fi | tee -a $file.diags diff --git a/tools/testing/selftests/rcutorture/bin/srcu_lockdep.sh b/tools/testing/selftests/rcutorture/bin/srcu_lockdep.sh index 208be7d09a61..4e98c697def4 100755 --- a/tools/testing/selftests/rcutorture/bin/srcu_lockdep.sh +++ b/tools/testing/selftests/rcutorture/bin/srcu_lockdep.sh @@ -50,7 +50,7 @@ do do err= val=$((d*1000+t*10+c)) - tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --duration 5s --configs "SRCU-P" --kconfig "CONFIG_FORCE_NEED_SRCU_NMI_SAFE=y" --bootargs "rcutorture.test_srcu_lockdep=$val rcutorture.reader_flavor=0x2" --trust-make --datestamp "$ds/$val" > "$T/kvm.sh.out" 2>&1 + tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --duration 5s --configs "SRCU-P" --kconfig "CONFIG_FORCE_NEED_SRCU_NMI_SAFE=y" --bootargs "rcutorture.test_srcu_lockdep=$val rcutorture.reader_flavor=0x4" --trust-make --datestamp "$ds/$val" > "$T/kvm.sh.out" 2>&1 ret=$? mv "$T/kvm.sh.out" "$RCUTORTURE/res/$ds/$val" if ! grep -q '^CONFIG_PROVE_LOCKING=y' .config @@ -92,12 +92,12 @@ do nerrs=$((nerrs+1)) err=1 fi - if test "$val" -eq 0xf && test "$ret" -eq 0 + if test "$val" = 0xf && test "$ret" -eq 0 then err=1 echo -n Unexpected success for > "$RCUTORTURE/res/$ds/$val/kvm.sh.err" fi - if test "$val" -eq 0x1 && test "$ret" -ne 0 + if test "$val" = 0x1 && test "$ret" -ne 0 then err=1 echo -n Unexpected failure for > "$RCUTORTURE/res/$ds/$val/kvm.sh.err" diff --git a/tools/testing/selftests/rcutorture/configs/rcu/NOCB01 b/tools/testing/selftests/rcutorture/configs/rcu/NOCB01 new file mode 100644 index 000000000000..bbe6d28210ab --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/rcu/NOCB01 @@ -0,0 +1,21 @@ +CONFIG_SMP=y +CONFIG_NR_CPUS=8 +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_PREEMPT_RCU=y +CONFIG_HZ_PERIODIC=n +CONFIG_NO_HZ_IDLE=y +CONFIG_NO_HZ_FULL=n +CONFIG_RCU_TRACE=y +CONFIG_HOTPLUG_CPU=y +CONFIG_RCU_FANOUT=3 +CONFIG_RCU_FANOUT_LEAF=2 +CONFIG_RCU_NOCB_CPU=y +CONFIG_DEBUG_LOCK_ALLOC=n +CONFIG_PROVE_LOCKING=n +CONFIG_RCU_BOOST=n +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n +CONFIG_RCU_EXPERT=y +CONFIG_RCU_EQS_DEBUG=y +CONFIG_RCU_LAZY=y diff --git a/tools/testing/selftests/rcutorture/configs/rcu/NOCB01.boot b/tools/testing/selftests/rcutorture/configs/rcu/NOCB01.boot new file mode 100644 index 000000000000..5130bc84c435 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/rcu/NOCB01.boot @@ -0,0 +1,2 @@ +rcupdate.rcu_self_test=1 +rcu_nocbs=all diff --git a/tools/testing/selftests/rcutorture/configs/rcu/NOCB02 b/tools/testing/selftests/rcutorture/configs/rcu/NOCB02 new file mode 100644 index 000000000000..4c2b8cd6d8fd --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/rcu/NOCB02 @@ -0,0 +1,20 @@ +CONFIG_SMP=y +CONFIG_NR_CPUS=8 +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_PREEMPT_RCU=y +CONFIG_HZ_PERIODIC=n +CONFIG_NO_HZ_IDLE=y +CONFIG_NO_HZ_FULL=n +CONFIG_RCU_TRACE=y +CONFIG_HOTPLUG_CPU=y +CONFIG_RCU_FANOUT=3 +CONFIG_RCU_FANOUT_LEAF=2 +CONFIG_RCU_NOCB_CPU=y +CONFIG_DEBUG_LOCK_ALLOC=n +CONFIG_PROVE_LOCKING=n +CONFIG_RCU_BOOST=n +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n +CONFIG_RCU_EXPERT=y +CONFIG_RCU_EQS_DEBUG=y diff --git a/tools/testing/selftests/rcutorture/configs/rcu/NOCB02.boot b/tools/testing/selftests/rcutorture/configs/rcu/NOCB02.boot new file mode 100644 index 000000000000..c212ae299b0b --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/rcu/NOCB02.boot @@ -0,0 +1,3 @@ +rcupdate.rcu_self_test=1 +rcu_nocbs=all +rcu_nocb_poll diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TRIVIAL-PREEMPT b/tools/testing/selftests/rcutorture/configs/rcu/TRIVIAL-PREEMPT new file mode 100644 index 000000000000..8230b14bfe68 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/rcu/TRIVIAL-PREEMPT @@ -0,0 +1,12 @@ +CONFIG_SMP=y +CONFIG_NR_CPUS=8 +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +CONFIG_HZ_PERIODIC=n +CONFIG_NO_HZ_IDLE=y +CONFIG_NO_HZ_FULL=n +CONFIG_DEBUG_LOCK_ALLOC=n +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n +CONFIG_RCU_EXPERT=y +CONFIG_TRIVIAL_PREEMPT_RCU=y diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TRIVIAL-PREEMPT.boot b/tools/testing/selftests/rcutorture/configs/rcu/TRIVIAL-PREEMPT.boot new file mode 100644 index 000000000000..299cd3a12df6 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/rcu/TRIVIAL-PREEMPT.boot @@ -0,0 +1,3 @@ +rcutorture.torture_type=trivial-preempt +rcutorture.onoff_interval=0 +rcutorture.shuffle_interval=0 diff --git a/tools/testing/selftests/rcutorture/configs/rcuscale/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/rcuscale/ver_functions.sh index 28070b43f017..b78ddc243d89 100644 --- a/tools/testing/selftests/rcutorture/configs/rcuscale/ver_functions.sh +++ b/tools/testing/selftests/rcutorture/configs/rcuscale/ver_functions.sh @@ -11,7 +11,7 @@ # # Adds per-version torture-module parameters to kernels supporting them. per_version_boot_params () { - echo rcuscale.shutdown=1 \ + echo rcuscale.shutdown_secs=$3 \ rcuscale.verbose=0 \ $1 } diff --git a/tools/testing/selftests/rcutorture/configs/refscale/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/refscale/ver_functions.sh index 748465627601..219fac070af2 100644 --- a/tools/testing/selftests/rcutorture/configs/refscale/ver_functions.sh +++ b/tools/testing/selftests/rcutorture/configs/refscale/ver_functions.sh @@ -11,7 +11,7 @@ # # Adds per-version torture-module parameters to kernels supporting them. per_version_boot_params () { - echo refscale.shutdown=1 \ + echo refscale.shutdown_secs=$3 \ refscale.verbose=0 \ $1 } |
