From nobody Fri Oct 06 21:08:24 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 4S2Lcm6qhKz4wZk0; Fri, 6 Oct 2023 21:08:24 +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 4S2Lcm6Qjbz3cT5; Fri, 6 Oct 2023 21:08:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696626504; 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=gZmuOxBTeyUzKioBr75zDHEhZLfxkYbZMKzeyJn4xM0=; b=T3S9sedDllicJ6XH6ukV4reKG5/tRrEG24SyjSnQhV35tdY1ZcfGlJSzyatb9JyDwckiKs u+jtmIXaSk/78Nw8OaUQZChFcZ0QuAbCCETL9P0ZIbt/XQ56k6kbKV8MbluXinkY9OuPcY tbCZka3mxyIMl3e5Bc1U3UC07lQklJTV1BvNplNObd+d+v+PInaL4Jo0QmrFQy+ioUsz0I LcLECSDV0nU5YAJ5Hmy1fswx8wMCsOJANpxV/yxz5dDJclNXxK+eC70g0+sMvwVxqbeej7 P0KAUopD0viLrKIquH0glTHF1cFJsaycTDCYyqx0PkaEXY5C+qGpKBFLL+UgBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696626504; a=rsa-sha256; cv=none; b=gPtL/CoayZT/wSxOV2p7+tlpV3kPy+qEEeUw5Bl+47f3a5fKRCeAm6Ak6mfiIDnvUy8P/S EOUinW4fHCg8e+uwR7sg8UbzjDSmqLgzBL/CrLWwaO0S9NCjRjvcU59ymZOk6VNZEB4SrK dDbwbd6Cb/8hyozDofCvlLKy2/wg3fB7ZN2ZXA7fiIaMGgbLEb3Rp9KgwKEfFuYzwWNJWS OsJfBlRyFEMRJeEH1ezeeZHfwsYnVnuS3+1biHs28hktRr/Uq2qLue7GVx55lj+QKZvv9g hBJbhmTOmDWzHrBRc4WZjIgE/x14zeXHQcszjpjGgSmyOwds3RshrDaosTt/Og== 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=1696626504; 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=gZmuOxBTeyUzKioBr75zDHEhZLfxkYbZMKzeyJn4xM0=; b=rBcb/CX74U2m8SzTXCo0XQfD/N9U7MlVmAFv/JU+S+DiKGLGEu54FyafbvN8r7KbjJ+qrh 63sPIp29ZCfGXLRCuTLuU3RarQ9ncGnWorJmPcFWs4IbONheG45isAn9hBTsloHpNdjnav 8SVeLqaMZ5akozHzJ7ejRDQCJL74cu599MrPtJpdBtuwrjpWywaDXKYtud5WY9erqjNgMz UzeYKRjQJYCvE4HQzuRNI8fmAchOdtfa2ACIUdnvTp85p5swPIKPenIZ2zSgpKoZG0D0R/ pz91TbQa6YH3IJtleZLuieu0vGTMU+b9LkFZmFIEpcykyUSJBTxnQdxZm2X/hQ== 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 4S2Lcm5TlMz13J9; Fri, 6 Oct 2023 21:08:24 +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 396L8Olv059649; Fri, 6 Oct 2023 21:08:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396L8OFk059646; Fri, 6 Oct 2023 21:08:24 GMT (envelope-from git) Date: Fri, 6 Oct 2023 21:08:24 GMT Message-Id: <202310062108.396L8OFk059646@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: 8399d764c929 - main - Fix intermittency in the sys.fs.fusefs.symlink.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: 8399d764c929a4b2fa98dbfae0ca7359810e4668 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=8399d764c929a4b2fa98dbfae0ca7359810e4668 commit 8399d764c929a4b2fa98dbfae0ca7359810e4668 Author: Alan Somers AuthorDate: 2023-10-06 21:05:41 +0000 Commit: Alan Somers CommitDate: 2023-10-06 21:08:03 +0000 Fix intermittency in the sys.fs.fusefs.symlink.main test This change is identical to 86885b18689 but for symlink instead of mknod. The kernel sends a FUSE_FORGET asynchronously with the final syscall. The lack of an expectation caused this test to occasionally fail. Also, remove a sleep that accidentally snuck into a different test. MFC after: 2 weeks MFC with: 86885b18689889e9b9142fd31d8c67f21334ba32 Sponsored by: Axcient --- tests/sys/fs/fusefs/mkdir.cc | 1 - tests/sys/fs/fusefs/symlink.cc | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/sys/fs/fusefs/mkdir.cc b/tests/sys/fs/fusefs/mkdir.cc index 48453ff8bb8a..f020feb94ed8 100644 --- a/tests/sys/fs/fusefs/mkdir.cc +++ b/tests/sys/fs/fusefs/mkdir.cc @@ -241,7 +241,6 @@ TEST_F(Mkdir, parent_inode) ASSERT_EQ(-1, mkdir(FULLPATH, mode)); ASSERT_EQ(EIO, errno); - usleep(100000); } TEST_F(Mkdir_7_8, ok) diff --git a/tests/sys/fs/fusefs/symlink.cc b/tests/sys/fs/fusefs/symlink.cc index 19286a446fc3..bd355497a8bd 100644 --- a/tests/sys/fs/fusefs/symlink.cc +++ b/tests/sys/fs/fusefs/symlink.cc @@ -29,6 +29,7 @@ */ extern "C" { +#include #include } @@ -174,15 +175,22 @@ TEST_F(Symlink, parent_ino) const char PPATH[] = "parent"; const char RELPATH[] = "src"; const char dst[] = "dst"; + sem_t sem; const 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_symlink(ino, dst, RELPATH); + expect_forget(ino, 1, &sem); EXPECT_EQ(-1, symlink(dst, FULLPATH)); EXPECT_EQ(EIO, errno); + + sem_wait(&sem); + sem_destroy(&sem); } TEST_F(Symlink_7_8, ok)