summaryrefslogtreecommitdiffstats
path: root/tests/snapshot.rc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/snapshot.rc')
-rw-r--r--tests/snapshot.rc5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/snapshot.rc b/tests/snapshot.rc
index cca1f4d4988..f6da514f826 100644
--- a/tests/snapshot.rc
+++ b/tests/snapshot.rc
@@ -94,6 +94,11 @@ function cleanup_lvm() {
return 0
}
+# Find out how this file was sourced, source traps.rc the same way, and use
+# push_trapfunc to make sure cleanup_lvm gets called before we exit.
+. $(dirname ${BASH_SOURCE[0]})/traps.rc
+push_trapfunc cleanup_lvm
+
########################################################
# Private Functions
########################################################