aboutsummaryrefslogtreecommitdiffstats
path: root/tests/zfs-tests/include
diff options
context:
space:
mode:
Diffstat (limited to 'tests/zfs-tests/include')
-rw-r--r--tests/zfs-tests/include/libtest.shlib25
1 files changed, 13 insertions, 12 deletions
diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib
index 9fbcc37c6..5e07cda4d 100644
--- a/tests/zfs-tests/include/libtest.shlib
+++ b/tests/zfs-tests/include/libtest.shlib
@@ -2222,26 +2222,27 @@ function check_pool_status # pool token keyword <verbose>
if [[ $verbose == true ]]; then
log_note $scan
fi
- echo $scan | grep -i "$keyword" > /dev/null 2>&1
+ echo $scan | egrep -i "$keyword" > /dev/null 2>&1
return $?
}
#
# The following functions are instance of check_pool_status()
-# is_pool_resilvering - to check if the pool is resilver in progress
-# is_pool_resilvered - to check if the pool is resilver completed
-# is_pool_scrubbing - to check if the pool is scrub in progress
-# is_pool_scrubbed - to check if the pool is scrub completed
-# is_pool_scrub_stopped - to check if the pool is scrub stopped
-# is_pool_scrub_paused - to check if the pool has scrub paused
-# is_pool_removing - to check if the pool is removing a vdev
-# is_pool_removed - to check if the pool is remove completed
-# is_pool_discarding - to check if the pool has checkpoint being discarded
+# is_pool_resilvering - to check if the pool resilver is in progress
+# is_pool_resilvered - to check if the pool resilver is completed
+# is_pool_scrubbing - to check if the pool scrub is in progress
+# is_pool_scrubbed - to check if the pool scrub is completed
+# is_pool_scrub_stopped - to check if the pool scrub is stopped
+# is_pool_scrub_paused - to check if the pool scrub has paused
+# is_pool_removing - to check if the pool removing is a vdev
+# is_pool_removed - to check if the pool remove is completed
+# is_pool_discarding - to check if the pool checkpoint is being discarded
#
function is_pool_resilvering #pool <verbose>
{
- check_pool_status "$1" "scan" "resilver in progress since " $2
+ check_pool_status "$1" "scan" \
+ "resilver[ ()0-9A-Za-z_-]* in progress since" $2
return $?
}
@@ -3487,7 +3488,7 @@ function wait_scrubbed
typeset pool=${1:-$TESTPOOL}
while true ; do
is_pool_scrubbed $pool && break
- log_must sleep 1
+ sleep 1
done
}