Skip to content

Commit 7c87ca3

Browse files
author
Paul Dagnelie
committed
Use zinject to try to make test fully reliable
Signed-off-by: Paul Dagnelie <[email protected]>
1 parent dba19ca commit 7c87ca3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_online_offline.ksh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#
2525
# Copyright (c) 2016 by Delphix. All rights reserved.
26+
# Copyright (c) 2025 by Klara, Inc.
2627
#
2728
. $STF_SUITE/include/libtest.shlib
2829
. $STF_SUITE/tests/functional/cli_root/zpool_initialize/zpool_initialize.kshlib
@@ -46,6 +47,8 @@ DISK1=${DISKS%% *}
4647
DISK2="$(echo $DISKS | cut -d' ' -f2)"
4748
DISK3="$(echo $DISKS | cut -d' ' -f3)"
4849

50+
log_onexit_push zpool status -v
51+
4952
for type in "mirror" "anyraid1"; do
5053

5154
if [[ "$type" == "mirror" ]]; then
@@ -57,6 +60,7 @@ for type in "mirror" "anyraid1"; do
5760
log_must rm /$TESTPOOL/f1
5861
log_must zpool sync
5962
fi
63+
log_must zinject -D 10:1 -d $DISK1 -T write $TESTPOOL
6064
log_must zpool initialize $TESTPOOL $DISK1
6165

6266
log_must zpool offline $TESTPOOL $DISK1
@@ -74,6 +78,7 @@ for type in "mirror" "anyraid1"; do
7478
log_mustnot eval "initialize_prog_line $TESTPOOL $DISK1 | grep suspended"
7579

7680
log_must zpool initialize -s $TESTPOOL $DISK1
81+
log_must zinject -c all
7782
action_date="$(initialize_prog_line $TESTPOOL $DISK1 | \
7883
sed 's/.*ed at \(.*\)).*/\1/g')"
7984
log_must zpool offline $TESTPOOL $DISK1

0 commit comments

Comments
 (0)