rcutorture: Add per-Kconfig fragment boot parameters

Some Kconfig fragments require rcutorture module parameters to
do optimal testing, for example, a configuration for SRCU would
need rcutorture.torture_type=srcu.  This commit therefore adds a
per-Kconfig-fragment boot-parameter capability.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
This commit is contained in:
Paul E. McKenney
2013-09-29 20:22:32 -07:00
parent 4275be83b8
commit 0cc2441447
2 changed files with 14 additions and 0 deletions

View File

@@ -28,6 +28,18 @@ bootparam_hotplug_cpu () {
echo "$1" | grep -q "rcutorture\.onoff_"
}
# configfrag_boot_params bootparam-string config-fragment-file
#
# Adds boot parameters from the .boot file, if any.
configfrag_boot_params () {
if test -r "$2.boot"
then
echo $1 `grep -v '^#' "$2.boot" | tr '\012' ' '`
else
echo $1
fi
}
# configfrag_hotplug_cpu config-fragment-file
#
# Returns 1 if the config fragment specifies hotplug CPU.