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

## The tests periodically output status messages via printk(),
## which can be examined via the dmesg (perhaps grepping for "torture")
## The test is started when the module is loaded, and stops when the module is unloaded.

. $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

log_cmd modprobe locktorture $args || {
	errno=$?

	sleep 10
	die "failed to load locktorture module $errno"
}

log_cmd sleep $runtime

log_cmd rmmod locktorture

dmesg | grep torture:
