Back to home page

OSCL-LXR

 
 

    


0001 #!/bin/bash
0002 # SPDX-License-Identifier: GPL-2.0+
0003 #
0004 # Torture-suite-dependent shell functions for the rest of the scripts.
0005 #
0006 # Copyright (C) Facebook, 2020
0007 #
0008 # Authors: Paul E. McKenney <paulmck@kernel.org>
0009 
0010 # scftorture_param_onoff bootparam-string config-file
0011 #
0012 # Adds onoff scftorture module parameters to kernels having it.
0013 scftorture_param_onoff () {
0014         if ! bootparam_hotplug_cpu "$1" && configfrag_hotplug_cpu "$2"
0015         then
0016                 echo CPU-hotplug kernel, adding scftorture onoff. 1>&2
0017                 echo scftorture.onoff_interval=1000 scftorture.onoff_holdoff=30
0018         fi
0019 }
0020 
0021 # per_version_boot_params bootparam-string config-file seconds
0022 #
0023 # Adds per-version torture-module parameters to kernels supporting them.
0024 per_version_boot_params () {
0025         echo $1 `scftorture_param_onoff "$1" "$2"` \
0026                 scftorture.stat_interval=15 \
0027                 scftorture.shutdown_secs=$3 \
0028                 scftorture.verbose=1
0029 }