Skip to content

Commit 389dde6

Browse files
committed
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 <[email protected]> Sponsored by: iXsystems, Inc.
1 parent 5b05553 commit 389dde6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

tests/zfs-tests/tests/functional/online_offline/online_offline_001_pos.ksh

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ function cleanup
5959
log_must zpool online $TESTPOOL $disk
6060
log_must check_state $TESTPOOL $disk "online"
6161
done
62+
sleep 1 # Delay for resilver to start
6263
log_must zpool wait -t resilver $TESTPOOL
6364

6465
[[ -e $TESTDIR ]] && log_must rm -rf $TESTDIR/*
@@ -77,7 +78,7 @@ for disk in $DISKLIST; do
7778

7879
log_must zpool online $TESTPOOL $disk
7980
log_must check_state $TESTPOOL $disk "online"
80-
81+
sleep 1 # Delay for resilver to start
8182
log_must zpool wait -t resilver $TESTPOOL
8283
done
8384

tests/zfs-tests/tests/functional/online_offline/online_offline_002_neg.ksh

+3
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ function cleanup
6060
log_must zpool online $TESTPOOL $disk
6161
log_must check_state $TESTPOOL $disk "online"
6262
done
63+
sleep 1 # Delay for resilver to start
6364
log_must zpool wait -t resilver $TESTPOOL
6465

6566
[[ -e $TESTDIR ]] && log_must rm -rf $TESTDIR/*
@@ -89,6 +90,7 @@ while [[ $i -lt ${#disks[*]} ]]; do
8990
log_must zpool online $TESTPOOL ${disks[$i]}
9091
check_state $TESTPOOL ${disks[$i]} "online" || \
9192
log_fail "Failed to set ${disks[$i]} online"
93+
sleep 1 # Delay for resilver to start
9294
log_must zpool wait -t resilver $TESTPOOL
9395
log_must zpool clear $TESTPOOL
9496
while [[ $j -lt ${#disks[*]} ]]; do
@@ -121,6 +123,7 @@ while [[ $i -lt ${#disks[*]} ]]; do
121123
log_must zpool online $TESTPOOL ${disks[$i]}
122124
check_state $TESTPOOL ${disks[$i]} "online" || \
123125
log_fail "Failed to set ${disks[$i]} online"
126+
sleep 1 # Delay for resilver to start
124127
log_must zpool wait -t resilver $TESTPOOL
125128
log_must zpool clear $TESTPOOL
126129
fi

0 commit comments

Comments
 (0)