aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-10-19 09:28:21 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-12-03 13:11:18 -0500
commitf43f8f73510c1013fe9449d7732e8f73a75b6fde (patch)
treea2b9d37475d71a2dd9a44efc19456bb6539ecdaa /tools/testing
parente1362651f713e359dd76f0df74bce393a9372316 (diff)
rcutorture: Record results from repeated runs of the same test scenario
Repeatedly running a given test, for example, by repeating the name as in "--configs "TREE08 TREE08 TREE08" records the results only of the last run of this test. This is because the earlier results are overwritten by the later results. This commit therefore checks for earlier results, using numbered file extensions to distinguish multiple runs. The earlier example would therefore create directories TREE01, TREE01.2, and TREE01.3. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/rcutorture/bin/kvm.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index b8d278904dee..0783ec9c583e 100644
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -204,8 +204,22 @@ fi
204 204
205for CF in $configs 205for CF in $configs
206do 206do
207 # Running TREE01 multiple times creates TREE01, TREE01.2, TREE01.3, ...
207 rd=$resdir/$ds/$CF 208 rd=$resdir/$ds/$CF
208 mkdir $rd || : 209 if test -d "${rd}"
210 then
211 n="`ls -d "${rd}"* | grep '\.[0-9]\+$' |
212 sed -e 's/^.*\.\([0-9]\+\)/\1/' |
213 sort -k1n | tail -1`"
214 if test -z "$n"
215 then
216 rd="${rd}.2"
217 else
218 n="`expr $n + 1`"
219 rd="${rd}.${n}"
220 fi
221 fi
222 mkdir "${rd}"
209 echo Results directory: $rd 223 echo Results directory: $rd
210 kvm-test-1-rcu.sh $CONFIGFRAG/$kversion/$CF $builddir $rd $dur "-nographic $RCU_QEMU_ARG" "rcutorture.test_no_idle_hz=1 rcutorture.verbose=1 $RCU_BOOTARGS" 224 kvm-test-1-rcu.sh $CONFIGFRAG/$kversion/$CF $builddir $rd $dur "-nographic $RCU_QEMU_ARG" "rcutorture.test_no_idle_hz=1 rcutorture.verbose=1 $RCU_BOOTARGS"
211done 225done