From nobody Fri Oct 06 19:57:48 2023 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 4S2K3J3Pj9z4wNYv; Fri, 6 Oct 2023 19:57:48 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2K3J2wSCz3Svf; Fri, 6 Oct 2023 19:57:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696622268; 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=CPQ8W7xbbyVGpuiNL8yg7cLAco9NxJCZ2deMrPdpjSg=; b=O3busy3H/6m915msF6vIyaLmj91AHfLDCAp2ntpqrDcbjsggFl21WAxIr1wN2HIBZ9VHuH hxtPJx2x5rc1Ig/tlxXADNLlpDXrvORIALlgmwkVnVurcJvnOaVw2fowLZxQxo86X6t13U VdGoHwQqbJxVdSgT0ieb2ivKrW7YrjF9ZL7xlLuDSNHkDx0VLeHZMSgSX9pbdsCmazWqou YUZJV9qqMswzKBJYXpzaFs8BLcjYRwB8yT1y0jk5qpcphSoffVrPI2zGPC7DhdgN+StEjT WSHwWcUXUlNfPn6zs/5NbugwgfsEK7NNiefn8QOIaBMGJ6JSCPiwvn4yNnOP9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696622268; a=rsa-sha256; cv=none; b=eQzlKPlYDb2+gU768SXvfbGVI9Rba54nx4/Hf+AKyoqQAh8VD3lK6PXvV4J1SAiPUpMSkU rZHAJXMxb8jMWVtOr2ZoG4OdHqHnfbWz7sZ4ZUOu8ZqKp0p2fRp8+1wSw51My6Krq1IZjE np8eyMO0OmWWHj3hzRwNP19gW3pz9jLCVdU6bhmk+1NKcaC/YV2VlskXvSQMgc68cAMwcE lBbzl8HzS3ZSIGjWg9gjEivMTdCwMNBnoWV9w4P3VKxLaNT3gd0JZqhB7ZaJZ91FkWEmZL Oj4FjMafTl6k5KiGRCC9IBPJzdC1nfdcsKrnsvZemuIGkk1K6uhLpObtVW7nzw== 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=1696622268; 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=CPQ8W7xbbyVGpuiNL8yg7cLAco9NxJCZ2deMrPdpjSg=; b=Vgyc0dgftRwRBV9FN6s4ceJQjoYQ4BRMvyzcFTsj0wWkvcZrs6CESFf56q2fRPY9k3s0KJ /dghEXNbPh0B9dAy3Bl/8BD8XUcmp4fgn+kwBLvLhfolHGFLkyFlX2Xl0mc9juVA0xbokL EX80U2PlNYvO1ylt5TvU3a1kwKr588EW1xzm3atLOcrhAuohhdFq//qagJvGEo2tdiRgR2 +S8RYqnOB2+PpDiZ6/FwYVwvV7KY5PDfnvrVghusXY4bUXiCGiLdnEDaWg8aeKAptl1Yc5 ct1804JLWsLfB9Y7+zmFlrPjnGjDaFuqmMMnihGTohWR2MPgRkgBBBCdLxOWfw== 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 4S2K3J1tByz11BD; Fri, 6 Oct 2023 19:57:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396JvmDL043323; Fri, 6 Oct 2023 19:57:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396JvmS8043320; Fri, 6 Oct 2023 19:57:48 GMT (envelope-from git) Date: Fri, 6 Oct 2023 19:57:48 GMT Message-Id: <202310061957.396JvmS8043320@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: 86885b186898 - main - Fix intermittency in the sys.fs.fusefs.mknod.main test 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 86885b18689889e9b9142fd31d8c67f21334ba32 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=86885b18689889e9b9142fd31d8c67f21334ba32 commit 86885b18689889e9b9142fd31d8c67f21334ba32 Author: Alan Somers AuthorDate: 2023-10-06 19:46:42 +0000 Commit: Alan Somers CommitDate: 2023-10-06 19:57:38 +0000 Fix intermittency in the sys.fs.fusefs.mknod.main test In the Mknod.parent_inode test case, the kernel sends an extra FUSE_FORGET message. But because it gets sent asynchronously with the failing syscall, it doesn't always get received before the test ends. So we never setup an expectation for it. And 90+% of the time the test would exit successfully. Fix the intermittency by always waiting to receive the FUSE_FORGET message. MFC after: 2 weeks Sponsored by: Axcient --- tests/sys/fs/fusefs/mknod.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/sys/fs/fusefs/mknod.cc b/tests/sys/fs/fusefs/mknod.cc index 223d38f8acb1..1fb855f44f29 100644 --- a/tests/sys/fs/fusefs/mknod.cc +++ b/tests/sys/fs/fusefs/mknod.cc @@ -32,6 +32,7 @@ extern "C" { #include #include #include +#include } #include "mockfs.hh" @@ -255,14 +256,18 @@ TEST_F(Mknod, parent_inode) const char RELPATH[] = "some_node"; mode_t mode = S_IFSOCK | 0755; struct sockaddr_un sa; + sem_t sem; int fd; dev_t rdev = -1; /* Really it's a don't care */ uint64_t ino = 42; + ASSERT_EQ(0, sem_init(&sem, 0, 0)) << strerror(errno); + expect_lookup(PPATH, ino, S_IFDIR | 0755, 0, 1); EXPECT_LOOKUP(ino, RELPATH) .WillOnce(Invoke(ReturnErrno(ENOENT))); expect_mknod(ino, RELPATH, ino, mode, rdev); + expect_forget(ino, 1, &sem); fd = socket(AF_UNIX, SOCK_STREAM, 0); ASSERT_LE(0, fd) << strerror(errno); @@ -273,6 +278,8 @@ TEST_F(Mknod, parent_inode) ASSERT_EQ(EIO, errno); leak(fd); + sem_wait(&sem); + sem_destroy(&sem); } /*