diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-01-17 06:29:12 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-02-18 15:26:46 -0500 |
commit | 0ae3f73af5ba8025abcb328913643b291698af35 (patch) | |
tree | a0629483a7d463b8b722595dac8c4102eea84606 /tools/testing | |
parent | a7582815b98c843e6468cad82d01a6c084ed4072 (diff) |
rcutorture: Handle multiple runs of the same test
This commit fixes handling numbering of multiple runs of the same test
so as to disambiguate output.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'tools/testing')
-rw-r--r-- | tools/testing/selftests/rcutorture/bin/kvm.sh | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 9fab7c8e76f0..ad3779cefdb8 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh | |||
@@ -238,42 +238,39 @@ function dump(first, pastlast) | |||
238 | jn=1 | 238 | jn=1 |
239 | for (j = first; j < pastlast; j++) { | 239 | for (j = first; j < pastlast; j++) { |
240 | builddir=KVM "/b" jn | 240 | builddir=KVM "/b" jn |
241 | print "echo ", cf[j], cpus[j] ": Starting build." | 241 | cpusr[jn] = cpus[j]; |
242 | print "rm -f " builddir ".*" | ||
243 | print "touch " builddir ".wait" | ||
244 | print "mkdir " builddir " > /dev/null 2>&1 || :" | ||
245 | if (cfrep[cf[j]] == "") { | 242 | if (cfrep[cf[j]] == "") { |
246 | cfr[j] = cf[j]; | 243 | cfr[jn] = cf[j]; |
247 | cfrep[cf[j]] = 1; | 244 | cfrep[cf[j]] = 1; |
248 | } else { | 245 | } else { |
249 | cfrep[cf[j]]++; | 246 | cfrep[cf[j]]++; |
250 | cfr[j] = cf[j] "." cfrep[cf[j]]; | 247 | cfr[jn] = cf[j] "." cfrep[cf[j]]; |
251 | } | 248 | } |
252 | print "mkdir " rd cfr[j] " || :"; | 249 | print "echo ", cfr[jn], cpusr[jn] ": Starting build."; |
253 | print "kvm-test-1-rcu.sh " CONFIGDIR cf[j], builddir, rd cfr[j], dur " \"" RCU_QEMU_ARG "\" \"" RCU_BOOTARGS "\" > " builddir ".out 2>&1 &" | 250 | print "rm -f " builddir ".*"; |
254 | print "echo ", cf[j], cpus[j] ": Waiting for build to complete." | 251 | print "touch " builddir ".wait"; |
252 | print "mkdir " builddir " > /dev/null 2>&1 || :"; | ||
253 | print "mkdir " rd cfr[jn] " || :"; | ||
254 | print "kvm-test-1-rcu.sh " CONFIGDIR cf[j], builddir, rd cfr[jn], dur " \"" RCU_QEMU_ARG "\" \"" RCU_BOOTARGS "\" > " builddir ".out 2>&1 &" | ||
255 | print "echo ", cfr[jn], cpusr[jn] ": Waiting for build to complete." | ||
255 | print "while test -f " builddir ".wait" | 256 | print "while test -f " builddir ".wait" |
256 | print "do" | 257 | print "do" |
257 | print "\tsleep 1" | 258 | print "\tsleep 1" |
258 | print "done" | 259 | print "done" |
259 | print "echo ", cf[j], cpus[j] ": Build complete." | 260 | print "echo ", cfr[jn], cpusr[jn] ": Build complete." |
260 | jn++; | 261 | jn++; |
261 | } | 262 | } |
262 | k = first | ||
263 | for (j = 1; j < jn; j++) { | 263 | for (j = 1; j < jn; j++) { |
264 | builddir=KVM "/b" j | 264 | builddir=KVM "/b" j |
265 | print "rm -f " builddir ".ready" | 265 | print "rm -f " builddir ".ready" |
266 | print "echo ----", cf[k], cpus[k] ": Starting kernel" | 266 | print "echo ----", cfr[j], cpusr[j] ": Starting kernel" |
267 | k++; | ||
268 | } | 267 | } |
269 | print "wait" | 268 | print "wait" |
270 | print "echo ---- All kernel runs complete" | 269 | print "echo ---- All kernel runs complete" |
271 | k = first | ||
272 | for (j = 1; j < jn; j++) { | 270 | for (j = 1; j < jn; j++) { |
273 | builddir=KVM "/b" j | 271 | builddir=KVM "/b" j |
274 | print "echo ----", cf[k], cpus[k] ": Build/run results:" | 272 | print "echo ----", cfr[j], cpusr[j] ": Build/run results:" |
275 | print "cat " builddir ".out" | 273 | print "cat " builddir ".out" |
276 | k++; | ||
277 | } | 274 | } |
278 | } | 275 | } |
279 | 276 | ||