Ensure `zinject -c` all gets called whenever
zpool_scrub_004_pos exits.
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Issue #5444
Closes #6021
# resilver does not complete before the scrub can be issued. This
# can occur when testing with small pools or very fast hardware.
+function cleanup
+{
+ log_must zinject -c all
+}
+
verify_runnable "global"
# See issue: https://github.com/zfsonlinux/zfs/issues/5444
log_unsupported "Test case fails on 32-bit systems"
fi
+log_onexit cleanup
+
log_assert "Resilver prevent scrub from starting until the resilver completes"
log_must zpool detach $TESTPOOL $DISK2
sleep 1
done
-log_must zinject -c all
log_pass "Resilver prevent scrub from starting until the resilver completes"