git: 9a9e93f38642 - stable/14 - Fix the zfsd_fault_001_pos test
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 23 Jul 2025 22:55:47 UTC
The branch stable/14 has been updated by asomers:
URL: https://cgit.FreeBSD.org/src/commit/?id=9a9e93f386421270b721392183fc3c5088f0055f
commit 9a9e93f386421270b721392183fc3c5088f0055f
Author: Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2025-05-02 14:48:58 +0000
Commit: Alan Somers <asomers@FreeBSD.org>
CommitDate: 2025-07-23 22:55:00 +0000
Fix the zfsd_fault_001_pos test
Due to a regression in ZFS, a pool's status may not change to DEGRADED
promptly after a vdev becomes faulted. This test is primarily concerned
with vdev status, not pool status, so work around the bug by doing a
"zpool reopen". Otherwise the test would time out waiting for a status
change that never came.
https://github.com/openzfs/zfs/issues/16245
Sponsored by: ConnectWise
(cherry picked from commit 01a1dd321807ba8a3ef3a4bfad52d8aa23130d10)
---
tests/sys/cddl/zfs/tests/zfsd/zfsd_fault_001_pos.ksh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/sys/cddl/zfs/tests/zfsd/zfsd_fault_001_pos.ksh b/tests/sys/cddl/zfs/tests/zfsd/zfsd_fault_001_pos.ksh
index 3456a328e7f9..df704e183fb0 100644
--- a/tests/sys/cddl/zfs/tests/zfsd/zfsd_fault_001_pos.ksh
+++ b/tests/sys/cddl/zfs/tests/zfsd/zfsd_fault_001_pos.ksh
@@ -78,6 +78,10 @@ for type in "raidz" "mirror"; do
$DD if=/dev/zero bs=128k count=1 >> \
/$TESTPOOL/$TESTFS/$TESTFILE 2> /dev/null
$FSYNC /$TESTPOOL/$TESTFS/$TESTFILE
+ # Due to a bug outside of zfsd, it may be necessary to reopen
+ # the pool before it will become DEGRADED.
+ # https://github.com/openzfs/zfs/issues/16245
+ $ZPOOL reopen $TESTPOOL
# Check to see if the pool is faulted yet
$ZPOOL status $TESTPOOL | grep -q 'state: DEGRADED'
if [ $? == 0 ]