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>
This commit is contained in:
Родитель
8ba8b664d4
Коммит
7d3bb54ade
|
@ -55,7 +55,7 @@ usage () {
|
||||||
echo " --bootargs kernel-boot-arguments"
|
echo " --bootargs kernel-boot-arguments"
|
||||||
echo " --bootimage relative-path-to-kernel-boot-image"
|
echo " --bootimage relative-path-to-kernel-boot-image"
|
||||||
echo " --buildonly"
|
echo " --buildonly"
|
||||||
echo " --configs \"config-file list\""
|
echo " --configs \"config-file list w/ repeat factor (3*TINY01)\""
|
||||||
echo " --cpus N"
|
echo " --cpus N"
|
||||||
echo " --datestamp string"
|
echo " --datestamp string"
|
||||||
echo " --defconfig string"
|
echo " --defconfig string"
|
||||||
|
@ -178,13 +178,26 @@ fi
|
||||||
touch $T/cfgcpu
|
touch $T/cfgcpu
|
||||||
for CF in $configs
|
for CF in $configs
|
||||||
do
|
do
|
||||||
if test -f "$CONFIGFRAG/$CF"
|
case $CF in
|
||||||
|
[0-9]\**|[0-9][0-9]\**|[0-9][0-9][0-9]\**)
|
||||||
|
config_reps=`echo $CF | sed -e 's/\*.*$//'`
|
||||||
|
CF1=`echo $CF | sed -e 's/^[^*]*\*//'`
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
config_reps=1
|
||||||
|
CF1=$CF
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if test -f "$CONFIGFRAG/$CF1"
|
||||||
then
|
then
|
||||||
cpu_count=`configNR_CPUS.sh $CONFIGFRAG/$CF`
|
cpu_count=`configNR_CPUS.sh $CONFIGFRAG/$CF1`
|
||||||
cpu_count=`configfrag_boot_cpus "$TORTURE_BOOTARGS" "$CONFIGFRAG/$CF" "$cpu_count"`
|
cpu_count=`configfrag_boot_cpus "$TORTURE_BOOTARGS" "$CONFIGFRAG/$CF1" "$cpu_count"`
|
||||||
echo $CF $cpu_count >> $T/cfgcpu
|
for ((cur_rep=0;cur_rep<$config_reps;cur_rep++))
|
||||||
|
do
|
||||||
|
echo $CF1 $cpu_count >> $T/cfgcpu
|
||||||
|
done
|
||||||
else
|
else
|
||||||
echo "The --configs file $CF does not exist, terminating."
|
echo "The --configs file $CF1 does not exist, terminating."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Загрузка…
Ссылка в новой задаче