aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-02-26 17:28:43 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-05-14 12:45:19 -0400
commit8c55f2271c732670099f0a47d287c1b4a1d812c2 (patch)
tree1cd9813a0cd63aafc1df9f1e62c1676a9f3a7c6d
parentda601c63fd3a3e6c30f85eefd5ee46397b5b439d (diff)
torture: Allow variations of "defconfig" to be specified
Some environments require some variation on "make defconfig" to initialize the .config file. This commit therefore adds a --defconfig argument to allow this to be specified. The default value is of course "defconfig". Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/configinit.sh2
-rw-r--r--tools/testing/selftests/rcutorture/bin/kvm.sh8
2 files changed, 9 insertions, 1 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/configinit.sh b/tools/testing/selftests/rcutorture/bin/configinit.sh
index a1be6e62add1..9c3f3d39b934 100755
--- a/tools/testing/selftests/rcutorture/bin/configinit.sh
+++ b/tools/testing/selftests/rcutorture/bin/configinit.sh
@@ -62,7 +62,7 @@ grep '^grep' < $T/u.sh > $T/upd.sh
62echo "cat - $c" >> $T/upd.sh 62echo "cat - $c" >> $T/upd.sh
63make mrproper 63make mrproper
64make $buildloc distclean > $builddir/Make.distclean 2>&1 64make $buildloc distclean > $builddir/Make.distclean 2>&1
65make $buildloc defconfig > $builddir/Make.defconfig.out 2>&1 65make $buildloc $TORTURE_DEFCONFIG > $builddir/Make.defconfig.out 2>&1
66mv $builddir/.config $builddir/.config.sav 66mv $builddir/.config $builddir/.config.sav
67sh $T/upd.sh < $builddir/.config.sav > $builddir/.config 67sh $T/upd.sh < $builddir/.config.sav > $builddir/.config
68cp $builddir/.config $builddir/.config.new 68cp $builddir/.config $builddir/.config.new
diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index a52a077ee258..59945b7793d9 100644
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -38,6 +38,7 @@ dur=30
38dryrun="" 38dryrun=""
39KVM="`pwd`/tools/testing/selftests/rcutorture"; export KVM 39KVM="`pwd`/tools/testing/selftests/rcutorture"; export KVM
40PATH=${KVM}/bin:$PATH; export PATH 40PATH=${KVM}/bin:$PATH; export PATH
41TORTURE_DEFCONFIG=defconfig
41TORTURE_INITRD="$KVM/initrd"; export TORTURE_INITRD 42TORTURE_INITRD="$KVM/initrd"; export TORTURE_INITRD
42RCU_KMAKE_ARG=""; export RCU_KMAKE_ARG 43RCU_KMAKE_ARG=""; export RCU_KMAKE_ARG
43TORTURE_SUITE=rcu 44TORTURE_SUITE=rcu
@@ -56,6 +57,7 @@ usage () {
56 echo " --configs \"config-file list\"" 57 echo " --configs \"config-file list\""
57 echo " --cpus N" 58 echo " --cpus N"
58 echo " --datestamp string" 59 echo " --datestamp string"
60 echo " --defconfig string"
59 echo " --dryrun sched|script" 61 echo " --dryrun sched|script"
60 echo " --duration minutes" 62 echo " --duration minutes"
61 echo " --interactive" 63 echo " --interactive"
@@ -96,6 +98,11 @@ do
96 ds=$2 98 ds=$2
97 shift 99 shift
98 ;; 100 ;;
101 --defconfig)
102 checkarg --defconfig "defconfigtype" "$#" "$2" '^[^/][^/]*$' '^--'
103 TORTURE_DEFCONFIG=$2
104 shift
105 ;;
99 --dryrun) 106 --dryrun)
100 checkarg --dryrun "sched|script" $# "$2" 'sched\|script' '^--' 107 checkarg --dryrun "sched|script" $# "$2" 'sched\|script' '^--'
101 dryrun=$2 108 dryrun=$2
@@ -259,6 +266,7 @@ END {
259# Generate a script to execute the tests in appropriate batches. 266# Generate a script to execute the tests in appropriate batches.
260cat << ___EOF___ > $T/script 267cat << ___EOF___ > $T/script
261TORTURE_SUITE="$TORTURE_SUITE"; export TORTURE_SUITE 268TORTURE_SUITE="$TORTURE_SUITE"; export TORTURE_SUITE
269TORTURE_DEFCONFIG="$TORTURE_DEFCONFIG"; export TORTURE_DEFCONFIG
262___EOF___ 270___EOF___
263awk < $T/cfgcpu.pack \ 271awk < $T/cfgcpu.pack \
264 -v CONFIGDIR="$CONFIGFRAG/$kversion/" \ 272 -v CONFIGDIR="$CONFIGFRAG/$kversion/" \