From nobody Tue Jun 23 23:32:08 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4glLvD5vlfz6jKs8 for ; Tue, 23 Jun 2026 23:32:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4glLvD4pmFz3fQt for ; Tue, 23 Jun 2026 23:32:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782257528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wLjQnIl7hcZig4V70HjrgOgtHNmECEXK867HJoewYb4=; b=SrhfDGomzMsuRbJ3n1NZJTSEJxiDKradHtF4QxcvhVNhI6Ut3IaSv90iLzzyAn8Bo3/sbw G+LviWg883JwBTFHgoJlDszQGqgOGTD584LraE06QL4F6zKKlhdLEO0N1sulpuBtp89vK2 DFPFmDz1a0ZndYxi9WIpi4IVANIDonf44otp8DI+hEknpfh30nPCUYlD1xh6mexc5tTRjn pe8Qo4cYfkzF5n9djKrxNx8y0KDBQSTLX11cbBH/jh18MUZv3AeKdVDeSZwaowS65X+2ro ctKvHuMTAo/sVE2DXj6PflB2imUzJgJXeRcpzuySqBfNrO2J9u4jrk9HBHYt4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1782257528; a=rsa-sha256; cv=none; b=H5l2Q9ns1lyrmy5/HK6RYrzlZhq01MtvOJ8LwJOf8PPiEWM7GKb2FvfuNmCEv7FsCuHNnQ rE+fDCRLBIWT/uDWa77iEzuJbpeeqdaD6dXr4vlEakmF/eLGABO9jZ/4bRk2YNl7wXZzvy RFuEJ34bDvTyawbdNpIyuggIubAAfLR7Xb+wF/ZVU7wgDpDHPdDMAGMa1j1b2UtvIGQFv2 w88GusYlHm0dzZ7NCrwGnKMLqbBHEUpt47KZ6sDKRp5NpBsdxuADfsG3iYYF4Z3Nf2Xx2X CKC/EU+sYfKL7FcF2RN0E31Rn/bpTLmf9OSK5BvEC7W5g8JJDnYCX8RQQ+KP5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782257528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wLjQnIl7hcZig4V70HjrgOgtHNmECEXK867HJoewYb4=; b=I6VNPIROZTjQ8/mBJtfr+5dNAsT57FFb6L9CuZC+Rti5fz02svcbofGna+0YCZ0CvBX3gl ll2u0Oilk/JH+qvApvGtvXSUfeBTGTmHvYLhZ4EsH/i72b44JLaXKy9uGtrWD0RSZpHQsc Dr529/2NL8nUbysxsh9ihCmO3G02GlJOooVB9zr5vgX3G0XUShrfrPm8CZ+r3wLBTP8JHn nZ3wPBxybnGWn5o29mthi0CGiF5MuUDooyl2iZj8+9QBBihAPDhBezcx8qgmxfSo4B6R8y vfNN7DZRDCzkZZrYpT1h+HyR2J+MFtEk1OKybp32qHcipjw5j3gGvHIOY9rqhw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4glLvD3T8Zzw97 for ; Tue, 23 Jun 2026 23:32:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32c5c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 23 Jun 2026 23:32:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: b7d2f7c1a68c - main - fusefs: fix two intermittency bugs in the destroy tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7d2f7c1a68c270ae5f46b8cfcfb85aa792b6b12 Auto-Submitted: auto-generated Date: Tue, 23 Jun 2026 23:32:08 +0000 Message-Id: <6a3b1778.32c5c.534dc7d3@gitrepo.freebsd.org> The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=b7d2f7c1a68c270ae5f46b8cfcfb85aa792b6b12 commit b7d2f7c1a68c270ae5f46b8cfcfb85aa792b6b12 Author: Alan Somers AuthorDate: 2026-06-23 20:42:25 +0000 Commit: Alan Somers CommitDate: 2026-06-23 23:31:44 +0000 fusefs: fix two intermittency bugs in the destroy tests * Though undocumented, statfs(2) can sometimes return EBADF or ENOENT while an unmount is in progress. * In MockFS::write_response, write(2) may fail if m_fuse_fd has already been closed. This doesn't happen in the normal sequence of events, but it can happen if some process unrelated to the test nosily decides to access the test file system while it's being unmounted. PR: 296237 Reported by: siva MFC after: 2 weeks Sponsored by: ConnectWise Reviewed by: siva Differential Revision: https://reviews.freebsd.org/D57787 --- tests/sys/fs/fusefs/destroy.cc | 16 +++++++++++++++- tests/sys/fs/fusefs/mockfs.cc | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/tests/sys/fs/fusefs/destroy.cc b/tests/sys/fs/fusefs/destroy.cc index 0c8e2fd22a50..fce3ed6ec78d 100644 --- a/tests/sys/fs/fusefs/destroy.cc +++ b/tests/sys/fs/fusefs/destroy.cc @@ -61,7 +61,21 @@ void assert_unmounted() { struct statfs statbuf; for (int retry = 100; retry > 0; retry--) { - ASSERT_EQ(0, statfs("mountpoint", &statbuf)) << strerror(errno); + if (0 != statfs("mountpoint", &statbuf)) { + switch (errno) { + case ENOENT: + case EBADF: + /* + * statfs will sometimes transiently return + * these errors while an unmount is in + * progress. Retry. + */ + nap(); + continue; + default: + FAIL() << "statfs:" << strerror(errno); + } + } if (strcmp("fusefs", statbuf.f_fstypename) != 0 && strcmp("/dev/fuse", statbuf.f_mntfromname) != 0) return; diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc index 5cc7be9df611..bc49542ce1a4 100644 --- a/tests/sys/fs/fusefs/mockfs.cc +++ b/tests/sys/fs/fusefs/mockfs.cc @@ -1071,6 +1071,8 @@ void MockFS::write_response(const mockfs_buf_out &out) { if (out.expected_errno) { ASSERT_EQ(-1, r); ASSERT_EQ(out.expected_errno, errno) << strerror(errno); + } else if (m_quit && errno == EBADF) { + /* Daemon is in the process of shutting down */ } else { if (r <= 0 && errno == EINVAL) { printf("Failed to write response. unique=%" PRIu64