diff options
author | Tom Caputi <[email protected]> | 2018-12-14 13:06:49 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-12-14 10:06:49 -0800 |
commit | 7c46894081300410612a34f7c05377848b277dab (patch) | |
tree | e87c1b7208702558eab60184cfe6886355b78145 /tests/zfs-tests/include/libtest.shlib | |
parent | 2a6078450db6437863f5ce32cfbb06f82e1beae7 (diff) |
ZTS: fix wait_scrubbed()
Currently, wait_scrubbed() is the only function of its kind that
accepts a timeout, which is 10s by default. This timeout is pretty
short for a scrub and causes test failures if we run too long. This
patch removes the timeout, instead leaning on the global test suite
timeout to ensure the tests keep moving.
Reviewed-by: Richard Elling <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Tom Caputi <[email protected]>
Closes #8210
Diffstat (limited to 'tests/zfs-tests/include/libtest.shlib')
-rw-r--r-- | tests/zfs-tests/include/libtest.shlib | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib index 2effa4207..482ab5ef5 100644 --- a/tests/zfs-tests/include/libtest.shlib +++ b/tests/zfs-tests/include/libtest.shlib @@ -1029,7 +1029,7 @@ function get_endslice #<disk> <slice> ((endcyl = (endcyl + 1) / ratio)) fi - + echo $endcyl } @@ -3209,15 +3209,10 @@ function wait_replacing #pool function wait_scrubbed { typeset pool=${1:-$TESTPOOL} - typeset iter=${2:-10} - typeset -i i=0 - for i in {1..$iter} ; do - if is_pool_scrubbed $pool ; then - return 0 - fi - sleep 1 + while true ; do + is_pool_scrubbed $pool && break + log_must sleep 1 done - return 1 } # Backup the zed.rc in our test directory so that we can edit it for our test. |