#!/bin/sh
# - runtime
# - test
# - torture_type

## creates an rcutorture kernel module that can be loaded to
## run a torture test.

. $LKP_SRC/lib/debug.sh
. $LKP_SRC/lib/reproduce-log.sh

args=""
case "$test" in
cpuhotplug)
        args=${args}" onoff_interval=3 onoff_holdoff=30"
        ;;
esac

[ ! -z "$torture_type" ] && args=${args}" torture_type=$torture_type"

log_cmd modprobe rcutorture $args ||
die "failed to load rcutorture module, try to enable CONFIG_RCU_TORTURE_TEST as module and build rcutorture.ko"

log_cmd sleep $runtime

log_cmd rmmod rcutorture 2> /dev/null

dmesg | grep torture:
