summaryrefslogtreecommitdiffstats
path: root/scripts/zpios-sanity.sh
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-06-02 10:13:15 -0700
committerBrian Behlendorf <[email protected]>2011-06-02 10:13:15 -0700
commit2ea9dc40f88ed84bc3e8022b91dd33cbce94653f (patch)
tree1e124b2161bbf70decb0fb2c1f7dbc30733697e4 /scripts/zpios-sanity.sh
parente95b3bdcbbc64ea502349413234e7c71563e7115 (diff)
Fix zpios-sanity.sh return code
The zpios-sanity.sh script should return failure when any of the individual zpios.sh tests fail. The previous code would always return success suppressing real failures.
Diffstat (limited to 'scripts/zpios-sanity.sh')
-rwxr-xr-xscripts/zpios-sanity.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/zpios-sanity.sh b/scripts/zpios-sanity.sh
index 194ae82e2..c8e9bb583 100755
--- a/scripts/zpios-sanity.sh
+++ b/scripts/zpios-sanity.sh
@@ -13,6 +13,7 @@ fi
PROG=zpios-sanity.sh
HEADER=
+FAILS=0
usage() {
cat << EOF
@@ -74,6 +75,8 @@ zpios_test() {
${ZPIOS_SH} -f -c ${CONFIG} -t ${TEST} &>${LOG}
if [ $? -ne 0 ]; then
+ FAILS=1
+
if [ ${VERBOSE} ]; then
printf "FAIL: %-13s\n" ${CONFIG}
cat ${LOG}
@@ -155,4 +158,4 @@ if [ ${DANGEROUS} ]; then
done
fi
-exit 0
+exit $FAILS