diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_004_pos.ksh | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_004_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_004_pos.ksh index 4d29e78bc..14563d64d 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_004_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_004_pos.ksh @@ -39,7 +39,9 @@ # STRATEGY: # 1. Setup a mirror pool and filled with data. # 2. Detach one of devices -# 3. Verify scrub failed until the resilver completed +# 3. Create a file for the resilver to work on so it takes some time +# 4. Export/import the pool to ensure the cache is dropped +# 5. Verify scrub failed until the resilver completed # # NOTES: # Artificially limit the scrub speed by setting the zfs_scan_vdev_limit @@ -49,22 +51,26 @@ function cleanup { log_must set_tunable64 zfs_scan_vdev_limit $ZFS_SCAN_VDEV_LIMIT_DEFAULT + rm -f $mntpnt/extra } verify_runnable "global" -# See issue: https://github.com/zfsonlinux/zfs/issues/5444 -if is_32bit; then - log_unsupported "Test case fails on 32-bit systems" -fi - log_onexit cleanup log_assert "Resilver prevent scrub from starting until the resilver completes" +mntpnt=$(get_prop mountpoint $TESTPOOL/$TESTFS) log_must set_tunable64 zfs_scan_vdev_limit $ZFS_SCAN_VDEV_LIMIT_SLOW -log_must zpool detach $TESTPOOL $DISK2 -log_must zpool attach $TESTPOOL $DISK1 $DISK2 + +while ! is_pool_resilvering $TESTPOOL; do + log_must zpool detach $TESTPOOL $DISK2 + log_must file_write -b 1048576 -c 128 -o create -d 0 -f $mntpnt/extra + log_must zpool export $TESTPOOL + log_must zpool import $TESTPOOL + log_must zpool attach $TESTPOOL $DISK1 $DISK2 +done + log_must is_pool_resilvering $TESTPOOL log_mustnot zpool scrub $TESTPOOL |