summaryrefslogtreecommitdiffstats
path: root/tests/zfs-tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/zfs-tests')
-rw-r--r--tests/zfs-tests/callbacks/Makefile.am1
-rwxr-xr-xtests/zfs-tests/callbacks/zfs_failsafe.ksh8
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/zfs-tests/callbacks/Makefile.am b/tests/zfs-tests/callbacks/Makefile.am
index 30e847241..512a737bb 100644
--- a/tests/zfs-tests/callbacks/Makefile.am
+++ b/tests/zfs-tests/callbacks/Makefile.am
@@ -1,5 +1,6 @@
pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/callbacks
dist_pkgdata_SCRIPTS = \
+ zfs_failsafe.ksh \
zfs_dbgmsg.ksh \
zfs_dmesg.ksh \
zfs_mmp.ksh
diff --git a/tests/zfs-tests/callbacks/zfs_failsafe.ksh b/tests/zfs-tests/callbacks/zfs_failsafe.ksh
new file mode 100755
index 000000000..0d14df701
--- /dev/null
+++ b/tests/zfs-tests/callbacks/zfs_failsafe.ksh
@@ -0,0 +1,8 @@
+#!/bin/ksh
+
+# Commands to perform failsafe-critical cleanup after a test is killed.
+#
+# This should only be used to ensure the system is restored to a functional
+# state in the event of tests being killed (preventing normal cleanup).
+
+zinject -c all