Skip to content

Commit beabc80

Browse files
committed
rcutorture: Make kvm-find-errors.sh abort on bad directory
Currently, kvm-find-errors.sh gives a usage prompt when given a bad directory, but then soldiers on, giving a series of confusing error messages. This commit therefore prints an error message and exits when given a bad directory, hopefully reducing confusion. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent c0b94ff commit beabc80

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
rundir="${1}"
2121
if test -z "$rundir" -o ! -d "$rundir"
2222
then
23+
echo Directory "$rundir" not found.
2324
echo Usage: $0 directory
25+
exit 1
2426
fi
2527
editor=${EDITOR-vi}
2628

0 commit comments

Comments
 (0)