mirror of
https://github.com/ceph/ceph
synced 2025-03-25 11:48:05 +00:00
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>
This commit is contained in:
parent
3d187db501
commit
a40fe5bdad
@ -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)"
|
||||
|
Loading…
Reference in New Issue
Block a user