From nobody Tue Jun 23 23:32:08 2026 X-Original-To: dev-commits-src-all@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 4glLvK5fqDz6jLD7 for ; Tue, 23 Jun 2026 23:32:13 +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 4glLvK4dQFz3fH9 for ; Tue, 23 Jun 2026 23:32:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782257533; 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=k/5GJMXAI18F31LObCnCersfbWJaTa3lDJBIT4daCXDTG6dEf5VtCFGJZOvnvdwXXrDbQX 0bhCRGds8wrYoIxIcttzAZ/i/JS9KWsl1D7kJ6J75m5K4LfQlXa2nQ7+uCHCwYQ0eht5M+ 0NDTuuIyHkPxWY2ld73Ue4DIfP18WxUA72TG8TlnsfZuJkXdiOLqcKCR1IsXnWfLfB7pUZ 3EN+xuuoXEj5lCPrW+jgXzS4R9dcQtvWbZ4Gy+Ivhzqqjf9bvMwv78BmHLLByVmFZihzhR 9rQP3uauCCI4ebB48Qs33JniMy8DDlAggrFDT2Jc1PbZOsaOscIG/rXWMlBN7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1782257533; a=rsa-sha256; cv=none; b=AS9AHd/hyx98Q8W7XGVk+ZaApU3Sbv0dazcAiZ3V3u1MjPALblC6inQMRsl8DJCReBwVKZ 4kbkBnR14T8vIoGiHB4YBMT1Ydq5ez/wv3lRc7V5QZX7U2C0+PA0rPTVsJnQOz6xvNR5jU 7Gx0Kdarm71iv7dTxyfsVehcvKIPc4u+kbHVVhYnH3nwi/xES70QrpMdZXxV8SZ9Je1Pg8 Vcz9Frey5FKMNen0hIjPcaTYjbUdTQVF4fp4GL4JEom6zhNT9eeonel6WRFCL1ShI71Qg5 +iDBlxnZb/eGqRtgNbOFrfYYNadfmpUZuRW5719RzOwXxZ9pAhLlJYeplAs11A== 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=1782257533; 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=JZH/zTXIRmHWIkr1G2u4gJ2sfdckvvj06dqQZ/LVKt8EDOk8czxdtBymkgkAmvIAqgwlWh Rzx8+iu+Ee1owWQ3PIJlCJeWa+AZ8uS4F4H00gSaERLGppv2U0RNWNrxepeLA+uNRBgzmE 6Cpql2xtqmBL3CWbD5wSc3qZ8JcNmqcI579DCBtS7hfsHYkIl2dJgGRdrRsy746p24Hy8K MTndRMVPCdPCZV2+p+yzQnL/zu0XhNaL7HQvcIl/rhcxbjWIjg/cJdg5zwEcWFECd4nqq8 z+8r+ehMjBUX5arpPkily+VPNWIGxsOeaLfmlbImOyhz14D2EDRIAZe1whEM6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4glLvK3T9mzvmt for ; Tue, 23 Jun 2026 23:32:13 +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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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