Commit 0ae3f73a authored by Paul E. McKenney's avatar Paul E. McKenney

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: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
parent a7582815
...@@ -238,42 +238,39 @@ function dump(first, pastlast) ...@@ -238,42 +238,39 @@ function dump(first, pastlast)
jn=1 jn=1
for (j = first; j < pastlast; j++) { for (j = first; j < pastlast; j++) {
builddir=KVM "/b" jn builddir=KVM "/b" jn
print "echo ", cf[j], cpus[j] ": Starting build." cpusr[jn] = cpus[j];
print "rm -f " builddir ".*"
print "touch " builddir ".wait"
print "mkdir " builddir " > /dev/null 2>&1 || :"
if (cfrep[cf[j]] == "") { if (cfrep[cf[j]] == "") {
cfr[j] = cf[j]; cfr[jn] = cf[j];
cfrep[cf[j]] = 1; cfrep[cf[j]] = 1;
} else { } else {
cfrep[cf[j]]++; cfrep[cf[j]]++;
cfr[j] = cf[j] "." cfrep[cf[j]]; cfr[jn] = cf[j] "." cfrep[cf[j]];
} }
print "mkdir " rd cfr[j] " || :"; print "echo ", cfr[jn], cpusr[jn] ": Starting build.";
print "kvm-test-1-rcu.sh " CONFIGDIR cf[j], builddir, rd cfr[j], dur " \"" RCU_QEMU_ARG "\" \"" RCU_BOOTARGS "\" > " builddir ".out 2>&1 &" print "rm -f " builddir ".*";
print "echo ", cf[j], cpus[j] ": Waiting for build to complete." print "touch " builddir ".wait";
print "mkdir " builddir " > /dev/null 2>&1 || :";
print "mkdir " rd cfr[jn] " || :";
print "kvm-test-1-rcu.sh " CONFIGDIR cf[j], builddir, rd cfr[jn], dur " \"" RCU_QEMU_ARG "\" \"" RCU_BOOTARGS "\" > " builddir ".out 2>&1 &"
print "echo ", cfr[jn], cpusr[jn] ": Waiting for build to complete."
print "while test -f " builddir ".wait" print "while test -f " builddir ".wait"
print "do" print "do"
print "\tsleep 1" print "\tsleep 1"
print "done" print "done"
print "echo ", cf[j], cpus[j] ": Build complete." print "echo ", cfr[jn], cpusr[jn] ": Build complete."
jn++; jn++;
} }
k = first
for (j = 1; j < jn; j++) { for (j = 1; j < jn; j++) {
builddir=KVM "/b" j builddir=KVM "/b" j
print "rm -f " builddir ".ready" print "rm -f " builddir ".ready"
print "echo ----", cf[k], cpus[k] ": Starting kernel" print "echo ----", cfr[j], cpusr[j] ": Starting kernel"
k++;
} }
print "wait" print "wait"
print "echo ---- All kernel runs complete" print "echo ---- All kernel runs complete"
k = first
for (j = 1; j < jn; j++) { for (j = 1; j < jn; j++) {
builddir=KVM "/b" j builddir=KVM "/b" j
print "echo ----", cf[k], cpus[k] ": Build/run results:" print "echo ----", cfr[j], cpusr[j] ": Build/run results:"
print "cat " builddir ".out" print "cat " builddir ".out"
k++;
} }
} }
......
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