From 47f140182f3a0a66b8c39d5c3495d487ef7ce514 Mon Sep 17 00:00:00 2001 From: Tino Reichardt Date: Tue, 6 Aug 2024 20:37:27 +0200 Subject: [PATCH] ZTS: fix raidz_expand_001_pos and raidz_expand_002_pos Sometimes the pool may start an auto scrub. Reviewed by: Brian Behlendorf Signed-off-by: Tino Reichardt Signed-off-by: Tony Hutter Closes #16537 --- .../zfs-tests/tests/functional/raidz/raidz_expand_001_pos.ksh | 3 +++ .../zfs-tests/tests/functional/raidz/raidz_expand_002_pos.ksh | 1 + 2 files changed, 4 insertions(+) diff --git a/tests/zfs-tests/tests/functional/raidz/raidz_expand_001_pos.ksh b/tests/zfs-tests/tests/functional/raidz/raidz_expand_001_pos.ksh index 063d7fa735df..d4923fdb67d9 100755 --- a/tests/zfs-tests/tests/functional/raidz/raidz_expand_001_pos.ksh +++ b/tests/zfs-tests/tests/functional/raidz/raidz_expand_001_pos.ksh @@ -154,7 +154,9 @@ function test_scrub # log_must zpool import -o cachefile=none -d $dir $pool + is_pool_scrubbing $pool && wait_scrubbed $pool log_must zpool scrub -w $pool + log_must zpool clear $pool log_must zpool export $pool @@ -166,6 +168,7 @@ function test_scrub # log_must zpool import -o cachefile=none -d $dir $pool + is_pool_scrubbing $pool && wait_scrubbed $pool log_must zpool scrub -w $pool log_must check_pool_status $pool "errors" "No known data errors" diff --git a/tests/zfs-tests/tests/functional/raidz/raidz_expand_002_pos.ksh b/tests/zfs-tests/tests/functional/raidz/raidz_expand_002_pos.ksh index 004f3d1f9255..56810aca099f 100755 --- a/tests/zfs-tests/tests/functional/raidz/raidz_expand_002_pos.ksh +++ b/tests/zfs-tests/tests/functional/raidz/raidz_expand_002_pos.ksh @@ -105,6 +105,7 @@ for disk in ${disks[$(($nparity+2))..$devs]}; do log_fail "pool $pool not expanded" fi + is_pool_scrubbing $pool && wait_scrubbed $pool verify_pool $pool pool_size=$expand_size