KEM3mxuUUWz5wesLSKGSetH8cRgKFMI6vWiSc83bvLOJMEgB01IFEb5/JwGT3jMa/F1 HXCLjIxUiSIICIUCos4rTS2Dgt9vAAp3f0rY2ETcG519nzMnTjJmluWDYQQ8mAs3SiGZwi TchauBOKpaMJmGMzWoJnXpq8FQ+PT9scaY4kCz5zUJ82ZCwFpJW4eVKYMo+2Uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmH9r0C8qzx6f; Tue, 14 Oct 2025 14:47:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59EElBcV085192; Tue, 14 Oct 2025 14:47:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59EElBea085189; Tue, 14 Oct 2025 14:47:11 GMT (envelope-from git) Date: Tue, 14 Oct 2025 14:47:11 GMT Message-Id: <202510141447.59EElBea085189@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: d1bd541b385d - main - fusefs: fix intermittency in the BadServer.ShortWrite test 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 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: d1bd541b385d49d2ae3a8bad9df72779b606e208 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=d1bd541b385d49d2ae3a8bad9df72779b606e208 commit d1bd541b385d49d2ae3a8bad9df72779b606e208 Author: Alan Somers AuthorDate: 2025-10-14 02:18:48 +0000 Commit: Alan Somers CommitDate: 2025-10-14 14:46:54 +0000 fusefs: fix intermittency in the BadServer.ShortWrite test This test implicitly depended on the order in which two threads completed. If the test thread finished first, the test would pass. But if the mock file system thread did, it would attempt to read from an unmounted file system, and fail. As a result, the test would randomly fail once out of every several thousand executions. Fix it by telling the mock file system's event loop to exit without attempting to read any more events. Reported by: Siva Mahadevan MFC after: 1 week Reviewed by: Siva Mahadevan Differential Revision: https://reviews.freebsd.org/D53080 --- tests/sys/fs/fusefs/bad_server.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/sys/fs/fusefs/bad_server.cc b/tests/sys/fs/fusefs/bad_server.cc index af2ca146e431..c3d195735446 100644 --- a/tests/sys/fs/fusefs/bad_server.cc +++ b/tests/sys/fs/fusefs/bad_server.cc @@ -65,6 +65,11 @@ TEST_F(BadServer, ShortWrite) out.header.unique = 0; // Asynchronous notification out.expected_errno = EINVAL; m_mock->write_response(out); + /* + * Tell the event loop to quit. The kernel has already disconnected us + * because of the short write. + */ + m_mock->m_quit = true; } /*