mirror_zfs/tests/zfs-tests/tests/functional/removal
Ryan Moeller 0a0f9a7dc6
ZTS: Provide for nested cleanup routines
Shared test library functions lack a simple way to ensure proper
cleanup in the event of a failure.  The `log_onexit` cleanup pattern
cannot be used in library functions because it uses one global
variable to store the cleanup command.

An example of where this is a serious issue is when a tunable that
artifically stalls kernel progress gets activated and then some check
fails.  Unless the caller knows about the tunable and sets it back,
the system will be left in a bad state.

To solve this problem, turn the global cleanup variable into a stack.
Provide push and pop functions to add additional cleanup steps and
remove them after it is safe again.

The first use of this new functionality is in attempt_during_removal,
which sets REMOVAL_SUSPEND_PROGRESS.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10080
2020-03-03 10:28:09 -08:00
..
cleanup.ksh OpenZFS 7614, 9064 - zfs device evacuation/removal 2018-04-14 12:16:17 -07:00
Makefile.am Device removal of indirect vdev panics the kernel 2019-09-16 10:46:59 -07:00
removal_all_vdev.ksh OpenZFS 7614, 9064 - zfs device evacuation/removal 2018-04-14 12:16:17 -07:00
removal_cancel.ksh ZTS: Misc fixes for FreeBSD 2020-02-27 09:38:34 -08:00
removal_check_space.ksh OpenZFS 7614, 9064 - zfs device evacuation/removal 2018-04-14 12:16:17 -07:00
removal_condense_export.ksh ZTS: Catalog tunable names for tests in tunables.cfg 2020-01-14 14:57:28 -08:00
removal_multiple_indirection.ksh ZTS: Catalog tunable names for tests in tunables.cfg 2020-01-14 14:57:28 -08:00
removal_nopwrite.ksh ZTS: Don't use edonr on FreeBSD 2020-01-28 08:38:02 -08:00
removal_remap_deadlists.ksh Update ZTS to work on FreeBSD 2019-12-18 12:29:43 -08:00
removal_reservation.ksh OpenZFS 9166 - zfs storage pool checkpoint 2018-06-26 10:07:42 -07:00
removal_resume_export.ksh ZTS: Fix removal_resume_export 2018-09-24 12:58:16 -07:00
removal_sanity.ksh ZTS: change $(cat) to $(<) for speedup 2018-10-31 12:00:06 -05:00
removal_with_add.ksh OpenZFS 9166 - zfs storage pool checkpoint 2018-06-26 10:07:42 -07:00
removal_with_create_fs.ksh OpenZFS 9166 - zfs storage pool checkpoint 2018-06-26 10:07:42 -07:00
removal_with_dedup.ksh ZTS: change $(cat) to $(<) for speedup 2018-10-31 12:00:06 -05:00
removal_with_errors.ksh ZTS: Fix removal_with_errors 2019-10-31 12:57:42 -07:00
removal_with_export.ksh OpenZFS 9166 - zfs storage pool checkpoint 2018-06-26 10:07:42 -07:00
removal_with_faulted.ksh Detect IO errors during device removal 2018-12-04 09:37:37 -08:00
removal_with_ganging.ksh ZTS: Catalog tunable names for tests in tunables.cfg 2020-01-14 14:57:28 -08:00
removal_with_remove.ksh OpenZFS 9166 - zfs storage pool checkpoint 2018-06-26 10:07:42 -07:00
removal_with_scrub.ksh OpenZFS 9166 - zfs storage pool checkpoint 2018-06-26 10:07:42 -07:00
removal_with_send_recv.ksh OpenZFS 9166 - zfs storage pool checkpoint 2018-06-26 10:07:42 -07:00
removal_with_send.ksh OpenZFS 9166 - zfs storage pool checkpoint 2018-06-26 10:07:42 -07:00
removal_with_snapshot.ksh OpenZFS 9166 - zfs storage pool checkpoint 2018-06-26 10:07:42 -07:00
removal_with_write.ksh OpenZFS 7614, 9064 - zfs device evacuation/removal 2018-04-14 12:16:17 -07:00
removal_with_zdb.ksh OpenZFS 9166 - zfs storage pool checkpoint 2018-06-26 10:07:42 -07:00
removal.kshlib ZTS: Provide for nested cleanup routines 2020-03-03 10:28:09 -08:00
remove_expanded.ksh OpenZFS 9591 - ms_shift can be incorrectly changed 2018-06-21 09:35:26 -07:00
remove_indirect.ksh Device removal of indirect vdev panics the kernel 2019-09-16 10:46:59 -07:00
remove_mirror_sanity.ksh ZTS: change $(cat) to $(<) for speedup 2018-10-31 12:00:06 -05:00
remove_mirror.ksh OpenZFS 7614, 9064 - zfs device evacuation/removal 2018-04-14 12:16:17 -07:00
remove_raidz.ksh OpenZFS 7614, 9064 - zfs device evacuation/removal 2018-04-14 12:16:17 -07:00