Fix test script error codes
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 24 Jan 2013 21:49:17 +0000 (13:49 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 24 Jan 2013 21:53:12 +0000 (13:53 -0800)
The 'exit $?' command in the INT TERM EXIT trap was overwritting
the expected error code with the error code from mv.  Fix the
issue by removing the 'exit $?'.  It's important the we preserve
the original error code so failures are easily noticed.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
scripts/common.sh.in

index 3c11820..f087f44 100644 (file)
@@ -124,7 +124,7 @@ init() {
        # set to ensure the udev rule is correctly replaced on exit.
        local RULE=${udevruledir}/90-zfs.rules
        if test -e  ${RULE}; then
-               trap "mv ${RULE}.disabled ${RULE}; exit $?" INT TERM EXIT
+               trap "mv ${RULE}.disabled ${RULE}" INT TERM EXIT
                mv ${RULE} ${RULE}.disabled
        fi
 }