rcutorture/kvm.sh: Support execution from any directory

The 'kvm.sh' rcutorture script requires that it be invoked from the top
of Linux-kernel source tree.  It is just a subtle restriction, but users
using it for the first time could forget the restriction and be confused.
Moreover, it makes commands a little longer, which can be frustrating.
This commit therefore lets users invoke the script from any location.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
This commit is contained in:
SeongJae Park 2017-11-03 19:17:24 +09:00 committed by Paul E. McKenney
parent 8dcd6f3fe2
commit 512e3bd0b5
1 changed files with 3 additions and 2 deletions

View File

@ -1,8 +1,7 @@
#!/bin/bash #!/bin/bash
# #
# Run a series of 14 tests under KVM. These are not particularly # Run a series of 14 tests under KVM. These are not particularly
# well-selected or well-tuned, but are the current set. Run from the # well-selected or well-tuned, but are the current set.
# top level of the source tree.
# #
# Edit the definitions below to set the locations of the various directories, # Edit the definitions below to set the locations of the various directories,
# as well as the test duration. # as well as the test duration.
@ -34,6 +33,8 @@ T=${TMPDIR-/tmp}/kvm.sh.$$
trap 'rm -rf $T' 0 trap 'rm -rf $T' 0
mkdir $T mkdir $T
cd `dirname $scriptname`/../../../../../
dur=$((30*60)) dur=$((30*60))
dryrun="" dryrun=""
KVM="`pwd`/tools/testing/selftests/rcutorture"; export KVM KVM="`pwd`/tools/testing/selftests/rcutorture"; export KVM