aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-09-29 11:13:46 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-12-03 10:11:11 -0800
commit4275be83b807c2926d2b23e67eb61692a1810080 (patch)
tree8a38da9120e8e9d2ed4e797067e9afb8c91d19e8 /tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh
parentrcutorture: Add kernel-version argument (diff)
downloadlinux-dev-4275be83b807c2926d2b23e67eb61692a1810080.tar.xz
linux-dev-4275be83b807c2926d2b23e67eb61692a1810080.zip
rcutorture: Add per-version default Kconfig fragments and module parameters
Different Kconfig parameters apply to different kernel versions, as do different rcutorture module parameters. This commit allows the rcutorture test scripts to adjust for different kernel versions. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
Diffstat (limited to '')
-rw-r--r--tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh46
1 files changed, 46 insertions, 0 deletions
diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh
new file mode 100644
index 000000000000..401974455aee
--- /dev/null
+++ b/tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+#
+# Kernel-version-dependent shell functions for the rest of the scripts.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright (C) IBM Corporation, 2013
+#
+# Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
+
+# rcutorture_param_n_barrier_cbs bootparam-string
+#
+# Adds n_barrier_cbs rcutorture module parameter to kernels having it.
+rcutorture_param_n_barrier_cbs () {
+ if echo $1 | grep -q "rcutorture\.n_barrier_cbs"
+ then
+ echo $1
+ else
+ echo $1 rcutorture.n_barrier_cbs=4
+ fi
+}
+
+# rcutorture_param_onoff bootparam-string config-file
+#
+# Adds onoff rcutorture module parameters to kernels having it.
+rcutorture_param_onoff () {
+ if ! bootparam_hotplug_cpu "$1" && configfrag_hotplug_cpu "$2"
+ then
+ echo CPU-hotplug kernel, adding rcutorture onoff.
+ echo $1 rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30
+ else
+ echo $1
+ fi
+}