summaryrefslogtreecommitdiffstats
path: root/scripts/zfs-tests.sh
diff options
context:
space:
mode:
authorDamian Szuberski <[email protected]>2022-01-13 19:09:19 +0100
committerGitHub <[email protected]>2022-01-13 11:09:19 -0700
commit836136961a306f82e57a2f47b79e638ec843e56b (patch)
tree7951e3662a5ff71a9a462346afcce15e1d3f2936 /scripts/zfs-tests.sh
parent8a7c4efd3cf47ce4a27b00c176845f1ac1c483c8 (diff)
Add ShellCheck's `--enable=all` inside `scripts/`
Strengthen static code analysis for shell scripts. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: John Kennedy <[email protected]> Signed-off-by: szubersk <[email protected]> Closes #12914
Diffstat (limited to 'scripts/zfs-tests.sh')
-rwxr-xr-xscripts/zfs-tests.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/zfs-tests.sh b/scripts/zfs-tests.sh
index f871a51d3..aaaf9ddfc 100755
--- a/scripts/zfs-tests.sh
+++ b/scripts/zfs-tests.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+# shellcheck disable=SC2154
#
# CDDL HEADER START
#
@@ -422,6 +423,8 @@ while getopts 'hvqxkfScRn:d:s:r:?t:T:u:I:' OPTION; do
usage
exit
;;
+ *)
+ ;;
esac
done
@@ -442,7 +445,7 @@ if [ -n "$SINGLETEST" ]; then
SINGLEQUIET="True"
fi
- cat >$RUNFILE_DIR/$RUNFILES << EOF
+ cat >"${RUNFILE_DIR}/${RUNFILES}" << EOF
[DEFAULT]
pre =
quiet = $SINGLEQUIET
@@ -466,7 +469,7 @@ EOF
CLEANUPSCRIPT="cleanup"
fi
- cat >>$RUNFILE_DIR/$RUNFILES << EOF
+ cat >>"${RUNFILE_DIR}/${RUNFILES}" << EOF
[$SINGLETESTDIR]
tests = ['$SINGLETESTFILE']
@@ -745,4 +748,4 @@ if [ -n "$SINGLETEST" ]; then
rm -f "$RUNFILES" >/dev/null 2>&1
fi
-exit ${RESULT}
+exit "${RESULT}"