diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-02-07 18:47:12 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-02-23 12:04:40 -0500 |
commit | 02736b81dd74ea141ac5d55e909ac58ddc5f610d (patch) | |
tree | b39490634c5303f31f0a8ddb020ead01a2a94929 /tools | |
parent | f881825a73543e9664c7fe7166e06f5f4d569834 (diff) |
locktorture: Add kvm-recheck.sh plug-in for locktorture
This commit adds the kvm-recheck-lock.sh plug-in for locktorture to
print out lock-specific progress statistics.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/testing/selftests/rcutorture/bin/kvm-recheck-lock.sh | 51 | ||||
-rwxr-xr-x | tools/testing/selftests/rcutorture/bin/kvm-recheck.sh | 5 |
2 files changed, 54 insertions, 2 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck-lock.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck-lock.sh new file mode 100755 index 000000000000..829186e19eb1 --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck-lock.sh | |||
@@ -0,0 +1,51 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Analyze a given results directory for locktorture progress. | ||
4 | # | ||
5 | # Usage: sh kvm-recheck-lock.sh resdir | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License as published by | ||
9 | # the Free Software Foundation; either version 2 of the License, or | ||
10 | # (at your option) any later version. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License | ||
18 | # along with this program; if not, you can access it online at | ||
19 | # http://www.gnu.org/licenses/gpl-2.0.html. | ||
20 | # | ||
21 | # Copyright (C) IBM Corporation, 2014 | ||
22 | # | ||
23 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
24 | |||
25 | i="$1" | ||
26 | if test -d $i | ||
27 | then | ||
28 | : | ||
29 | else | ||
30 | echo Unreadable results directory: $i | ||
31 | exit 1 | ||
32 | fi | ||
33 | |||
34 | configfile=`echo $i | sed -e 's/^.*\///'` | ||
35 | ncs=`grep "Writes: Total:" $i/console.log 2> /dev/null | tail -1 | sed -e 's/^.* Total: //' -e 's/ .*$//'` | ||
36 | if test -z "$ncs" | ||
37 | then | ||
38 | echo $configfile | ||
39 | else | ||
40 | title="$configfile ------- $ncs acquisitions/releases" | ||
41 | dur=`sed -e 's/^.* locktorture.shutdown_secs=//' -e 's/ .*$//' < $i/qemu-cmd 2> /dev/null` | ||
42 | if test -z "$dur" | ||
43 | then | ||
44 | : | ||
45 | else | ||
46 | ncsps=`awk -v ncs=$ncs -v dur=$dur ' | ||
47 | BEGIN { print ncs / dur }' < /dev/null` | ||
48 | title="$title ($ncsps per second)" | ||
49 | fi | ||
50 | echo $title | ||
51 | fi | ||
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh index 31c87063231d..a44daaa259a9 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | # | 2 | # |
3 | # Given the results directories for previous KVM runs of rcutorture, | 3 | # Given the results directories for previous KVM-based torture runs, |
4 | # check the build and console output for errors. Given a directory | 4 | # check the build and console output for errors. Given a directory |
5 | # containing results directories, this recursively checks them all. | 5 | # containing results directories, this recursively checks them all. |
6 | # | 6 | # |
@@ -37,7 +37,8 @@ do | |||
37 | resdir=`echo $i | sed -e 's,/$,,' -e 's,/[^/]*$,,'` | 37 | resdir=`echo $i | sed -e 's,/$,,' -e 's,/[^/]*$,,'` |
38 | head -1 $resdir/log | 38 | head -1 $resdir/log |
39 | fi | 39 | fi |
40 | kvm-recheck-rcu.sh $i | 40 | TORTURE_SUITE="`cat $i/../TORTURE_SUITE`" |
41 | kvm-recheck-${TORTURE_SUITE}.sh $i | ||
41 | configcheck.sh $i/.config $i/ConfigFragment | 42 | configcheck.sh $i/.config $i/ConfigFragment |
42 | parse-build.sh $i/Make.out $configfile | 43 | parse-build.sh $i/Make.out $configfile |
43 | parse-rcutorture.sh $i/console.log $configfile | 44 | parse-rcutorture.sh $i/console.log $configfile |