diff options
author | Alex Elder <elder@doink.(none)> | 2012-04-14 11:43:15 -0500 |
---|---|---|
committer | Alex Elder <elder@dreamhost.com> | 2012-04-14 11:43:15 -0500 |
commit | a40fe5bdadd6a7c40457dc71e0641ac75ba59232 (patch) | |
tree | 5bab9d3e34d1b9b8a500d7cd0450a1eade6615c1 /qa/run_xfstests.sh | |
parent | 3d187db50130d048bc9c6e980c5c64fbd36d8cb4 (diff) | |
download | ceph-a40fe5bdadd6a7c40457dc71e0641ac75ba59232.tar.gz |
run_xfstests.sh: ensure cleanup on errors
Because we exit on any error (due to 'set -e'), the cleanup call was
never getting made in the event of an error. The net effect of that
was that a filesystem could be left mounted, and rbd cleanup then
couldn't complete because the module was in use.
Fix the trap call so it calls cleanup on exit as well as error.
Switch to using the capitalized signal names in the call.
Signed-off-by: Alex Elder <elder@dreamhost.com>
Diffstat (limited to 'qa/run_xfstests.sh')
-rw-r--r-- | qa/run_xfstests.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qa/run_xfstests.sh b/qa/run_xfstests.sh index 92b449aab64..2566b10831e 100644 --- a/qa/run_xfstests.sh +++ b/qa/run_xfstests.sh @@ -395,7 +395,7 @@ function cleanup() { remove_xfstests cleanup_host_options } -trap cleanup hup int quit +trap cleanup EXIT ERR HUP INT QUIT # ################################################################ @@ -410,7 +410,7 @@ pushd "${XFSTESTS_DIR}" status=$? popd -cleanup +# cleanup is called via the trap call, above echo "This xfstests run started at: ${start_date}" echo "xfstests run completed at: $(date)" |