aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-02-07 18:16:25 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-02-23 12:04:28 -0500
commit2193e1604eac422df05f77b53667237fcf130bf5 (patch)
tree80222ae1095a1eb50356ff7f543a5c600196d77c /tools/testing
parentbfefc73aa1d1bad317bccef8a15da39263d3d962 (diff)
rcutorture: Abstract kvm-recheck.sh
This commit creates a plug-in to allow kvm-recheck.sh to process non-rcutorture console output. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'tools/testing')
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh51
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm-recheck.sh20
2 files changed, 52 insertions, 19 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh
new file mode 100755
index 000000000000..d75b1dc5ae53
--- /dev/null
+++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh
@@ -0,0 +1,51 @@
1#!/bin/bash
2#
3# Analyze a given results directory for rcutorture progress.
4#
5# Usage: sh kvm-recheck-rcu.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
25i="$1"
26if test -d $i
27then
28 :
29else
30 echo Unreadable results directory: $i
31 exit 1
32fi
33
34configfile=`echo $i | sed -e 's/^.*\///'`
35ngps=`grep ver: $i/console.log 2> /dev/null | tail -1 | sed -e 's/^.* ver: //' -e 's/ .*$//'`
36if test -z "$ngps"
37then
38 echo $configfile
39else
40 title="$configfile ------- $ngps grace periods"
41 dur=`sed -e 's/^.* rcutorture.shutdown_secs=//' -e 's/ .*$//' < $i/qemu-cmd 2> /dev/null`
42 if test -z "$dur"
43 then
44 :
45 else
46 ngpsps=`awk -v ngps=$ngps -v dur=$dur '
47 BEGIN { print ngps / dur }' < /dev/null`
48 title="$title ($ngpsps per second)"
49 fi
50 echo $title
51fi
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
index 89b5dbac5327..31c87063231d 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
@@ -37,25 +37,7 @@ 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 configfile=`echo $i | sed -e 's/^.*\///'` 40 kvm-recheck-rcu.sh $i
41 ngps=`grep ver: $i/console.log 2> /dev/null | tail -1 | sed -e 's/^.* ver: //' -e 's/ .*$//'`
42 if test -z "$ngps"
43 then
44 echo $configfile
45 else
46 title="$configfile ------- $ngps grace periods"
47 dur=`sed -e 's/^.* rcutorture.shutdown_secs=//' -e 's/ .*$//' < $i/qemu-cmd 2> /dev/null`
48 if test -z "$dur"
49 then
50 :
51 else
52 ngpsps=$((ngps / dur))
53 ngpsps=`awk -v ngps=$ngps -v dur=$dur '
54 BEGIN { print ngps / dur }' < /dev/null`
55 title="$title ($ngpsps per second)"
56 fi
57 echo $title
58 fi
59 configcheck.sh $i/.config $i/ConfigFragment 41 configcheck.sh $i/.config $i/ConfigFragment
60 parse-build.sh $i/Make.out $configfile 42 parse-build.sh $i/Make.out $configfile
61 parse-rcutorture.sh $i/console.log $configfile 43 parse-rcutorture.sh $i/console.log $configfile