mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 18:11:00 +03:00
ddd9ef3a4f
Tests that get killed do not have an opportunity to clean up. There are many bad states this can leave the system in, but of particular gravity is when zinject has been used to induce bad behavior for one or more of the test disks. Create a failsafe mechanism in test-runner.py that runs a callback script after every test. The script is common to all tests so all tests benefit from the protection. Add an obligatory `zinject -c all` to clear all zinject state after every test case is run. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10096
9 lines
250 B
Bash
Executable File
9 lines
250 B
Bash
Executable File
#!/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
|