aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-05-11 16:55:47 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-05-27 16:00:00 -0400
commit7d3bb54adeb13bb98badd86c24648d51ebe28331 (patch)
treea651aa81d86bce352eb71175b01cfa0bad4b75c2
parent8ba8b664d4e43abf6bd896f3f614c8eb22384635 (diff)
rcutorture: Allow repetition factors in Kconfig-fragment lists
Although it is currently possible to run the same test in parallel, '--config "TINY01 TINY01 TINY01"' can get a bit verbose, especially if you want to run 48 instances of TINY01 in parallel. This commit therefore allows prefixing the Kconfig fragment with a repeat count, for example, '--config "48*TINY01"' to run 48 instances in parallel. At least assuming that you have 48 CPUs and also gave '--cpus 48'. 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/kvm.sh25
1 files changed, 19 insertions, 6 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index dd2812ceb0ba..fbe2dbff1e21 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -55,7 +55,7 @@ usage () {
55 echo " --bootargs kernel-boot-arguments" 55 echo " --bootargs kernel-boot-arguments"
56 echo " --bootimage relative-path-to-kernel-boot-image" 56 echo " --bootimage relative-path-to-kernel-boot-image"
57 echo " --buildonly" 57 echo " --buildonly"
58 echo " --configs \"config-file list\"" 58 echo " --configs \"config-file list w/ repeat factor (3*TINY01)\""
59 echo " --cpus N" 59 echo " --cpus N"
60 echo " --datestamp string" 60 echo " --datestamp string"
61 echo " --defconfig string" 61 echo " --defconfig string"
@@ -178,13 +178,26 @@ fi
178touch $T/cfgcpu 178touch $T/cfgcpu
179for CF in $configs 179for CF in $configs
180do 180do
181 if test -f "$CONFIGFRAG/$CF" 181 case $CF in
182 [0-9]\**|[0-9][0-9]\**|[0-9][0-9][0-9]\**)
183 config_reps=`echo $CF | sed -e 's/\*.*$//'`
184 CF1=`echo $CF | sed -e 's/^[^*]*\*//'`
185 ;;
186 *)
187 config_reps=1
188 CF1=$CF
189 ;;
190 esac
191 if test -f "$CONFIGFRAG/$CF1"
182 then 192 then
183 cpu_count=`configNR_CPUS.sh $CONFIGFRAG/$CF` 193 cpu_count=`configNR_CPUS.sh $CONFIGFRAG/$CF1`
184 cpu_count=`configfrag_boot_cpus "$TORTURE_BOOTARGS" "$CONFIGFRAG/$CF" "$cpu_count"` 194 cpu_count=`configfrag_boot_cpus "$TORTURE_BOOTARGS" "$CONFIGFRAG/$CF1" "$cpu_count"`
185 echo $CF $cpu_count >> $T/cfgcpu 195 for ((cur_rep=0;cur_rep<$config_reps;cur_rep++))
196 do
197 echo $CF1 $cpu_count >> $T/cfgcpu
198 done
186 else 199 else
187 echo "The --configs file $CF does not exist, terminating." 200 echo "The --configs file $CF1 does not exist, terminating."
188 exit 1 201 exit 1
189 fi 202 fi
190done 203done