diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-01-27 15:31:20 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-02-23 12:00:59 -0500 |
commit | daeda23de108fab1202b6843e5adb59de0a261f9 (patch) | |
tree | c3f978b01f40ff56d65d6fd7ed5c0af7578cc2cc | |
parent | 51b1130eb5823ddb90a9ad07d243031d8cb7ecf2 (diff) |
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
-rw-r--r-- | tools/testing/selftests/rcutorture/bin/kvm.sh | 34 |
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 cde25d8546da..521f9e01074d 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh | |||
@@ -175,31 +175,29 @@ fi | |||
175 | if test -z "$resdir" | 175 | if test -z "$resdir" |
176 | then | 176 | then |
177 | resdir=$KVM/res | 177 | resdir=$KVM/res |
178 | if ! test -e $resdir | 178 | fi |
179 | then | 179 | |
180 | mkdir $resdir || : | 180 | if test "$dryrun" = "" |
181 | fi | 181 | then |
182 | else | ||
183 | if ! test -e $resdir | 182 | if ! test -e $resdir |
184 | then | 183 | then |
185 | mkdir -p "$resdir" || : | 184 | mkdir -p "$resdir" || : |
186 | fi | 185 | fi |
187 | fi | 186 | mkdir $resdir/$ds |
188 | mkdir $resdir/$ds | 187 | |
189 | if test "$dryrun" = "" | ||
190 | then | ||
191 | # Be noisy only if running the script. | 188 | # Be noisy only if running the script. |
192 | echo Results directory: $resdir/$ds | 189 | echo Results directory: $resdir/$ds |
193 | echo $scriptname $args | 190 | echo $scriptname $args |
194 | fi | ||
195 | touch $resdir/$ds/log | ||
196 | echo $scriptname $args >> $resdir/$ds/log | ||
197 | 191 | ||
198 | pwd > $resdir/$ds/testid.txt | 192 | touch $resdir/$ds/log |
199 | if test -d .git | 193 | echo $scriptname $args >> $resdir/$ds/log |
200 | then | 194 | |
201 | git status >> $resdir/$ds/testid.txt | 195 | pwd > $resdir/$ds/testid.txt |
202 | git rev-parse HEAD >> $resdir/$ds/testid.txt | 196 | if test -d .git |
197 | then | ||
198 | git status >> $resdir/$ds/testid.txt | ||
199 | git rev-parse HEAD >> $resdir/$ds/testid.txt | ||
200 | fi | ||
203 | fi | 201 | fi |
204 | 202 | ||
205 | # Create a file of test-name/#cpus pairs, sorted by decreasing #cpus. | 203 | # Create a file of test-name/#cpus pairs, sorted by decreasing #cpus. |
@@ -371,6 +369,8 @@ then | |||
371 | echo RCU_QEMU_CMD="$RCU_QEMU_CMD; export RCU_QEMU_CMD" | 369 | echo RCU_QEMU_CMD="$RCU_QEMU_CMD; export RCU_QEMU_CMD" |
372 | echo RCU_QEMU_INTERACTIVE="$RCU_QEMU_INTERACTIVE; export RCU_QEMU_INTERACTIVE" | 370 | echo RCU_QEMU_INTERACTIVE="$RCU_QEMU_INTERACTIVE; export RCU_QEMU_INTERACTIVE" |
373 | echo RCU_QEMU_MAC="$RCU_QEMU_MAC; export RCU_QEMU_MAC" | 371 | echo RCU_QEMU_MAC="$RCU_QEMU_MAC; export RCU_QEMU_MAC" |
372 | echo "mkdir -p "$resdir" || :" | ||
373 | echo "mkdir $resdir/$ds" | ||
374 | cat $T/script | 374 | cat $T/script |
375 | exit 0 | 375 | exit 0 |
376 | elif test "$dryrun" = sched | 376 | elif test "$dryrun" = sched |