summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-01-27 12:31:20 -0800
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-02-23 09:00:59 -0800
commitdaeda23de108fab1202b6843e5adb59de0a261f9 (patch)
treec3f978b01f40ff56d65d6fd7ed5c0af7578cc2cc /tools
parent51b1130eb5823ddb90a9ad07d243031d8cb7ecf2 (diff)
downloadop-kernel-dev-daeda23de108fab1202b6843e5adb59de0a261f9.zip
op-kernel-dev-daeda23de108fab1202b6843e5adb59de0a261f9.tar.gz
rcutorture: Don't create results directory for dryruns
This commit prevents the results directory from being created for dryruns. However, a script generated from a dryrun will create the results directory should it be run. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/rcutorture/bin/kvm.sh34
1 files changed, 17 insertions, 17 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index cde25d8..521f9e0 100644
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -175,31 +175,29 @@ fi
if test -z "$resdir"
then
resdir=$KVM/res
- if ! test -e $resdir
- then
- mkdir $resdir || :
- fi
-else
+fi
+
+if test "$dryrun" = ""
+then
if ! test -e $resdir
then
mkdir -p "$resdir" || :
fi
-fi
-mkdir $resdir/$ds
-if test "$dryrun" = ""
-then
+ mkdir $resdir/$ds
+
# Be noisy only if running the script.
echo Results directory: $resdir/$ds
echo $scriptname $args
-fi
-touch $resdir/$ds/log
-echo $scriptname $args >> $resdir/$ds/log
-pwd > $resdir/$ds/testid.txt
-if test -d .git
-then
- git status >> $resdir/$ds/testid.txt
- git rev-parse HEAD >> $resdir/$ds/testid.txt
+ touch $resdir/$ds/log
+ echo $scriptname $args >> $resdir/$ds/log
+
+ pwd > $resdir/$ds/testid.txt
+ if test -d .git
+ then
+ git status >> $resdir/$ds/testid.txt
+ git rev-parse HEAD >> $resdir/$ds/testid.txt
+ fi
fi
# Create a file of test-name/#cpus pairs, sorted by decreasing #cpus.
@@ -371,6 +369,8 @@ then
echo RCU_QEMU_CMD="$RCU_QEMU_CMD; export RCU_QEMU_CMD"
echo RCU_QEMU_INTERACTIVE="$RCU_QEMU_INTERACTIVE; export RCU_QEMU_INTERACTIVE"
echo RCU_QEMU_MAC="$RCU_QEMU_MAC; export RCU_QEMU_MAC"
+ echo "mkdir -p "$resdir" || :"
+ echo "mkdir $resdir/$ds"
cat $T/script
exit 0
elif test "$dryrun" = sched
OpenPOWER on IntegriCloud