From f85c96edf731f286a02856af2d5c8e70568545f0 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Fri, 25 Apr 2025 12:21:02 -0400 Subject: [PATCH] ZTS: Restore some delays in online_offline tests After more CI runs and code reading after #17259 I've found that online starts resilver via async mechanism, which does not provide wait primitives at this time. Restore some delays to restore CI until this is properly fixed. Signed-off-by: Alexander Motin Sponsored by: iXsystems, Inc. --- .../tests/functional/online_offline/online_offline_001_pos.ksh | 3 ++- .../tests/functional/online_offline/online_offline_002_neg.ksh | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/zfs-tests/tests/functional/online_offline/online_offline_001_pos.ksh b/tests/zfs-tests/tests/functional/online_offline/online_offline_001_pos.ksh index c7b7ca789..aacec48df 100755 --- a/tests/zfs-tests/tests/functional/online_offline/online_offline_001_pos.ksh +++ b/tests/zfs-tests/tests/functional/online_offline/online_offline_001_pos.ksh @@ -59,6 +59,7 @@ function cleanup log_must zpool online $TESTPOOL $disk log_must check_state $TESTPOOL $disk "online" done + sleep 1 # Delay for resilver to start log_must zpool wait -t resilver $TESTPOOL [[ -e $TESTDIR ]] && log_must rm -rf $TESTDIR/* @@ -77,7 +78,7 @@ for disk in $DISKLIST; do log_must zpool online $TESTPOOL $disk log_must check_state $TESTPOOL $disk "online" - + sleep 1 # Delay for resilver to start log_must zpool wait -t resilver $TESTPOOL done diff --git a/tests/zfs-tests/tests/functional/online_offline/online_offline_002_neg.ksh b/tests/zfs-tests/tests/functional/online_offline/online_offline_002_neg.ksh index 5da90b4d6..0155303b8 100755 --- a/tests/zfs-tests/tests/functional/online_offline/online_offline_002_neg.ksh +++ b/tests/zfs-tests/tests/functional/online_offline/online_offline_002_neg.ksh @@ -60,6 +60,7 @@ function cleanup log_must zpool online $TESTPOOL $disk log_must check_state $TESTPOOL $disk "online" done + sleep 1 # Delay for resilver to start log_must zpool wait -t resilver $TESTPOOL [[ -e $TESTDIR ]] && log_must rm -rf $TESTDIR/* @@ -89,6 +90,7 @@ while [[ $i -lt ${#disks[*]} ]]; do log_must zpool online $TESTPOOL ${disks[$i]} check_state $TESTPOOL ${disks[$i]} "online" || \ log_fail "Failed to set ${disks[$i]} online" + sleep 1 # Delay for resilver to start log_must zpool wait -t resilver $TESTPOOL log_must zpool clear $TESTPOOL while [[ $j -lt ${#disks[*]} ]]; do @@ -121,6 +123,7 @@ while [[ $i -lt ${#disks[*]} ]]; do log_must zpool online $TESTPOOL ${disks[$i]} check_state $TESTPOOL ${disks[$i]} "online" || \ log_fail "Failed to set ${disks[$i]} online" + sleep 1 # Delay for resilver to start log_must zpool wait -t resilver $TESTPOOL log_must zpool clear $TESTPOOL fi