aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2017-06-12 09:45:32 -0700
committerGitHub <[email protected]>2017-06-12 09:45:32 -0700
commit851aa99c899e5d7ddc937e223359b8892eeeca5d (patch)
tree9d98e80558b234b8f58fd010603314dc806ad97b /tests
parent88c30122e5ccb343c5675f4429ee29fc5ba224a0 (diff)
Use log_must_busy in destroy_pool
The log function log_must_busy was added in commit e623aea2 for this purpose. Update destroy_pool to use it. Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #6217
Diffstat (limited to 'tests')
-rw-r--r--tests/zfs-tests/include/libtest.shlib15
1 files changed, 3 insertions, 12 deletions
diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib
index df6b94f58..5d8500ddf 100644
--- a/tests/zfs-tests/include/libtest.shlib
+++ b/tests/zfs-tests/include/libtest.shlib
@@ -1496,20 +1496,11 @@ function destroy_pool #pool
if poolexists "$pool" ; then
mtpt=$(get_prop mountpoint "$pool")
- # At times, syseventd activity can cause attempts to
- # destroy a pool to fail with EBUSY. We retry a few
+ # At times, syseventd/udev activity can cause attempts
+ # to destroy a pool to fail with EBUSY. We retry a few
# times allowing failures before requiring the destroy
# to succeed.
- typeset -i wait_time=10 ret=1 count=0
- must=""
- while [[ $ret -ne 0 ]]; do
- $must zpool destroy -f $pool
- ret=$?
- [[ $ret -eq 0 ]] && break
- log_note "zpool destroy failed with $ret"
- [[ count++ -ge 7 ]] && must=log_must
- sleep $wait_time
- done
+ log_must_busy zpool destroy -f $pool
[[ -d $mtpt ]] && \
log_must rm -rf $mtpt