Commit 532017b1 authored by Paul E. McKenney's avatar Paul E. McKenney

torture: Enable torture.sh argument checking

This commit uncomments the argument checking for the --duration argument
to torture.sh.  While in the area, it also corrects the duration units
from seconds to minutes.
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent 69d2b33e
......@@ -157,17 +157,17 @@ do
fi
;;
--duration)
# checkarg --duration "(minutes)" $# "$2" '^[0-9][0-9]*\(s\|m\|h\|d\|\)$' '^error'
mult=60
if echo "$2" | grep -q 's$'
checkarg --duration "(minutes)" $# "$2" '^[0-9][0-9]*\(m\|h\|d\|\)$' '^error'
mult=1
if echo "$2" | grep -q 'm$'
then
mult=1
elif echo "$2" | grep -q 'h$'
then
mult=3600
mult=60
elif echo "$2" | grep -q 'd$'
then
mult=86400
mult=1440
fi
ts=`echo $2 | sed -e 's/[smhd]$//'`
duration_base=$(($ts*mult))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment