From 4275be83b807c2926d2b23e67eb61692a1810080 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Sun, 29 Sep 2013 11:13:46 -0700 Subject: 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 Cc: Greg KH --- .../rcutorture/configs/v3.5/ver_functions.sh | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh (limited to 'tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh') 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 + +# 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 +} -- cgit v1.2.3-59-g8ed1b