mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-02-05 06:43:31 +03:00
ZTS: pool_state test check for pool existence in cleanup
If there is no scsi_debug module, then this test must be skipped, in this case cleanup routine should be prepared for absent pool. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: George Melikov <mail@gmelikov.ru> Closes #11534
This commit is contained in:
parent
6b2e7203ae
commit
b8e6401b79
@ -61,16 +61,18 @@ function cleanup
|
|||||||
log_must rm -f $BACKUP
|
log_must rm -f $BACKUP
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Our disk is back. Now we can clear errors and destroy the
|
if poolexists $TESTPOOL2 ; then
|
||||||
# pool cleanly.
|
# Our disk is back. Now we can clear errors and destroy the
|
||||||
log_must zpool clear $TESTPOOL2
|
# pool cleanly.
|
||||||
|
log_must zpool clear $TESTPOOL2
|
||||||
|
|
||||||
# Now that the disk is back and errors cleared, wait for our
|
# Now that the disk is back and errors cleared, wait for our
|
||||||
# hung 'zpool scrub' to finish.
|
# hung 'zpool scrub' to finish.
|
||||||
wait
|
wait
|
||||||
|
|
||||||
destroy_pool $TESTPOOL2
|
destroy_pool $TESTPOOL2
|
||||||
log_must rm $REALDISK
|
fi
|
||||||
|
log_must rm -f $REALDISK
|
||||||
unload_scsi_debug
|
unload_scsi_debug
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user