3 # Run a series of 14 tests under KVM. These are not particularly
4 # well-selected or well-tuned, but are the current set. Run from the
5 # top level of the source tree.
7 # Edit the definitions below to set the locations of the various directories,
8 # as well as the test duration.
10 # Usage: sh kvm.sh [ options ]
12 # This program is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2 of the License, or
15 # (at your option) any later version.
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write to the Free Software
24 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 # Copyright (C) IBM Corporation, 2011
28 # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
33 KVM=`pwd`/tools/testing/selftests/rcutorture; export KVM
36 configs=" sysidleY.2013.06.19a \
37 sysidleN.2013.06.19a \
53 ds=`date +%Y.%m.%d-%H:%M:%S`
57 echo "Usage: $scriptname optional arguments:"
58 echo " --builddir absolute-pathname"
59 echo " --configs \"config-file list\""
60 echo " --datestamp string"
61 echo " --duration minutes"
62 echo " --kversion vN.NN"
63 echo " --rcu-kvm absolute-pathname"
64 echo " --results absolute-pathname"
65 echo " --relbuilddir relative-pathname"
69 # checkarg --argname argtype $# arg mustmatch cannotmatch
73 echo $1 needs argument $2 matching \"$5\"
76 if echo "$4" | grep -q -e "$5"
80 echo $1 $2 \"$4\" must match \"$5\"
83 if echo "$4" | grep -q -e "$6"
85 echo $1 $2 \"$4\" must not match \"$6\"
95 checkarg --builddir "(absolute pathname)" "$#" "$2" '^/' error
101 checkarg --configs "(list of config files)" "$#" "$2" '^[^/]*$' '^--'
106 checkarg --datestamp "(relative pathname)" "$#" "$2" '^[^/]*$' '^--'
111 checkarg --duration "(minutes)" $# "$2" '^[0-9]*$' error
116 checkarg --kversion "(kernel version)" $# "$2" '^v[0-9.]*$' error
121 checkarg --rcu-kvm "(absolute pathname)" "$#" "$2" '^/' error
127 if -n "$gotrelbuilddir"
129 builddir=${KVM}/${relbuilddir}
134 checkarg --relbuilddir "(relative pathname)" "$#" "$2" '^[^/]*$' '^--'
137 builddir=${KVM}/${relbuilddir}
141 checkarg --results "(absolute pathname)" "$#" "$2" '^/' error
152 echo "builddir=$builddir"
155 echo "resdir=$resdir"
157 PATH=${KVM}/bin:$PATH; export PATH
158 CONFIGFRAG=${KVM}/configs; export CONFIGFRAG
165 mkdir -p "$resdir" || :
170 pwd > $resdir/$ds/testid.txt
173 git status >> $resdir/$ds/testid.txt
174 git rev-parse HEAD >> $resdir/$ds/testid.txt
183 echo Results directory: $rd
184 kvm-test-1-rcu.sh $CONFIGFRAG/$kversion/$CF $builddir $rd $dur "-nographic" "rcutorture.test_no_idle_hz=1 rcutorture.n_barrier_cbs=4 rcutorture.verbose=1"
186 # Tracing: trace_event=rcu:rcu_nocb_grace_period,rcu:rcu_grace_period,rcu:rcu_grace_period_init,rcu:rcu_quiescent_state_report,rcu:rcu_fqs,rcu:rcu_callback,rcu:rcu_torture_read,rcu:rcu_invoke_callback,rcu:rcu_fqs,rcu:rcu_dyntick,rcu:rcu_unlock_preempted_task