summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/rcutorture/bin
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2020-11-24 16:28:01 -0800
committerPaul E. McKenney <paulmck@kernel.org>2021-01-06 17:03:41 -0800
commit532017b11950a7042d130477747cced4b7e44199 (patch)
tree7e1cf705b3739a954c3e2a99949c7726696b6083 /tools/testing/selftests/rcutorture/bin
parent69d2b33e3f2077c57c20a3b718931746cb3a6094 (diff)
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: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/testing/selftests/rcutorture/bin')
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/torture.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/torture.sh b/tools/testing/selftests/rcutorture/bin/torture.sh
index e13dacf258f4..8e667975f9d2 100755
--- a/tools/testing/selftests/rcutorture/bin/torture.sh
+++ b/tools/testing/selftests/rcutorture/bin/torture.sh
@@ -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))