From nobody Tue Oct 14 14:47:11 2025 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 4cmH9r1g0Lz6CYD8; Tue, 14 Oct 2025 14:47:12 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cmH9r17NWz3cMB; Tue, 14 Oct 2025 14:47:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760453232; 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=hiH1J4L4SaMI3SAfRaGgcr4tp8vIhUMoXl9W6SUQCTk=; b=F9ZckLpQhKsjWWP7UVT2Xr/g+5n4qdakia/KcG+aVEq2Ak/YEtehKVsYZtUfMEKIkyS42A p/sMHHk811kAbe0E1pWAmDPrMxlY3xJPMxm4Ez/5ihukpkhgZNF0oSw+EqHeXrTqYsA/ZU kRiscfrVmRS5Ek/K/xUK/JQA9ki2L8rlXYayYSgKUeyggmmJpxVXnGAb+s5bbLrg511dLg +a7lC7ksYjCM+qwBEyBiOXF8GqTAoXGL8L4qFxcMazDw8JXGZ5ElyI1tv50uZ5vLc0a37e jr4sN3hzuYAc4k64hXqPXwYWsZAhEM6iSYu70jpCK7Q/reOUt0wtwhluekzzLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760453232; 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=hiH1J4L4SaMI3SAfRaGgcr4tp8vIhUMoXl9W6SUQCTk=; b=UDOOCa1IJjCpnoDOOQ3ooQ9gFShV423EbFXYHyy504wI8/SOeXR2rGjZuvRT2hy/Ecv5A/ LUNQB9npNOIbzJ4ldjFYHoyWerbW3e7Zl1KY0aiNuzDsLyfJzYE/OB8Tc+E0Rzk+oBD7kO HUaQr1hz3ftNIyUvg+ujG5PS8PJJjGEUMxHHiSAATYOwK4afrauDEMNGxog7drTRk7KPCF 6WHTmHqFYa2OhYUL9DkVZiCcqYrwNCYDOaAerbfY5evW46/JU9G5kn3YZq8L7wnRiIwtWB eFP8X9SsEof/MQr/lzug4Vl1UmLo5iAMKvmuvhygkXBREiEu9+JBWdHfCQP4jQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760453232; a=rsa-sha256; cv=none; b=MBLUkITljMV01S/q/0LuZJw9yEjxYx0GtkH4NlM8JE+tsEUTHJchU1hjrF8gsT6ITcugFh N0m7f4gcopycd4XJgL/vSxsmet1vno9euoh1yvW8juTvKMmQGo/aH3YJ4VhKuA5j8ldNWX 4QEKEM3mxuUUWz5wesLSKGSetH8cRgKFMI6vWiSc83bvLOJMEgB01IFEb5/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; } /*