diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2016-03-29 13:50:38 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2016-03-31 16:39:53 -0400 |
commit | 480b1eb659f65be8ed039f1a9db3f762c41c9770 (patch) | |
tree | 734bd267a9aaef2400896ae22ede62d91a89ddcd /tools | |
parent | fb2c66af10f92bc83659c4d8a32e02287f0e5dda (diff) |
rcutorture: Convert test duration to seconds early
This commit converts test duration from minutes to seconds early on
in order to prepare for upcoming OS-jitter-injection changes.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 5 | ||||
-rwxr-xr-x | tools/testing/selftests/rcutorture/bin/kvm.sh | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh index 2eb8fefbe7d9..73a265668421 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | |||
@@ -6,7 +6,7 @@ | |||
6 | # Execute this in the source tree. Do not run it as a background task | 6 | # Execute this in the source tree. Do not run it as a background task |
7 | # because qemu does not seem to like that much. | 7 | # because qemu does not seem to like that much. |
8 | # | 8 | # |
9 | # Usage: kvm-test-1-run.sh config builddir resdir minutes qemu-args boot_args | 9 | # Usage: kvm-test-1-run.sh config builddir resdir seconds qemu-args boot_args |
10 | # | 10 | # |
11 | # qemu-args defaults to "-enable-kvm -soundhw pcspk -nographic", along with | 11 | # qemu-args defaults to "-enable-kvm -soundhw pcspk -nographic", along with |
12 | # arguments specifying the number of CPUs and other | 12 | # arguments specifying the number of CPUs and other |
@@ -123,8 +123,7 @@ while test -f $builddir.ready | |||
123 | do | 123 | do |
124 | sleep 1 | 124 | sleep 1 |
125 | done | 125 | done |
126 | minutes=$4 | 126 | seconds=$4 |
127 | seconds=$(($minutes * 60)) | ||
128 | qemu_args=$5 | 127 | qemu_args=$5 |
129 | boot_args=$6 | 128 | boot_args=$6 |
130 | 129 | ||
diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index c33cb582b3dc..704e219f67a7 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh | |||
@@ -34,7 +34,7 @@ T=/tmp/kvm.sh.$$ | |||
34 | trap 'rm -rf $T' 0 | 34 | trap 'rm -rf $T' 0 |
35 | mkdir $T | 35 | mkdir $T |
36 | 36 | ||
37 | dur=30 | 37 | dur=$((30*60)) |
38 | dryrun="" | 38 | dryrun="" |
39 | KVM="`pwd`/tools/testing/selftests/rcutorture"; export KVM | 39 | KVM="`pwd`/tools/testing/selftests/rcutorture"; export KVM |
40 | PATH=${KVM}/bin:$PATH; export PATH | 40 | PATH=${KVM}/bin:$PATH; export PATH |
@@ -116,7 +116,7 @@ do | |||
116 | ;; | 116 | ;; |
117 | --duration) | 117 | --duration) |
118 | checkarg --duration "(minutes)" $# "$2" '^[0-9]*$' '^error' | 118 | checkarg --duration "(minutes)" $# "$2" '^[0-9]*$' '^error' |
119 | dur=$2 | 119 | dur=$(($2*60)) |
120 | shift | 120 | shift |
121 | ;; | 121 | ;; |
122 | --interactive) | 122 | --interactive) |