From nobody Thu Dec 18 19:13:41 2025 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 4dXL1K66Z8z6LZ13 for ; Thu, 18 Dec 2025 19:13:41 +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 4dXL1K4jWFz4LmK for ; Thu, 18 Dec 2025 19:13:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766085221; 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=Oall6cUqPO8kwjI6BrZEo1ZB71Tw89ZDfWO2sQrJuc8=; b=icHQ7E4MsXaI1yhdJqgHUL9dZiuywarFZkzVJkZRVQTl4Y/svNmY2OVdWZ05DbQ59KQVaV a3/bFeEKpYMWk8jSNGPGHJZ8rEPgkFRfo6i3nOrZ/+c13Fw0olad5/AuEWb1MOUonKwTZB 9icHRhjwgZ1Uxpv2AFeW1zx4nc0oIAh5aomS5V8M3IlvfHHgN8OlXZaa8UiY7veoJZhwvo 1KS78gBHuEdXIEhyF1UWssInpVKGs8BRSnhcyG+MdVpv/tdxTfN5b5fo5SIDY5bhLz+TAF euyD+tkrbGFjUiunIVUQZEZyt3+8BqjJIlHQUSFHqcl9tvvMwwJ0qZppyEvXGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766085221; 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=Oall6cUqPO8kwjI6BrZEo1ZB71Tw89ZDfWO2sQrJuc8=; b=RIMJMchsXSAqIu2axtRRcCbUYDJ7ISOYdkpvnmChyJjlyjQn6S4KMGL/ThOyeSzI+XJmRI /QOMubX3bFdKDc/cNhzj45Lp7HU+YbffxypyFgdusDubM33kfLePa4H75za39eeURMsZdk aKkpg+qxHxx+IXPwqa7CjcPlwfc03wIw+IvxhqqfAU7AxV7EYotaOw0K9KFV8LTjEvp9TY W4KMrinaFPlqEjRq/FNFLhTJK55o4raOKe2H+w14IYbQP/Z80kLmwXtLjqZOXgtFJ08Qd9 HGhNlhkGWKbdSiQmj5QJZ4od/Jhtndgv6ENr2n0mCgCxDYY0o17TeUNISwPfTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766085221; a=rsa-sha256; cv=none; b=VIBxNcUpAHbPvGLM33cmeIsFL/DLsl7WEGUrvOs+yYcgDZzxEWiqpvT1SzDQqd0/t8ZlVQ P0dTDcwfQdOOCBOpyXhfqhofDHewDZXk7tqvsAjtxXr+IJ+zdwZSkaTIW9yUXTmvLYcPej 9g+ZdCL//pcaWtDcXGNiRvFMdACQlzdL3q47aJ1FEsPRFpr/4HvIFE6lCIFoKFfu/zbQck xGsbeALgK+0J2a8ysArVKdHmNTIhsuinDnHVMv2NQCmX0h4nNsuq20/2DTMub5nrx7XhTd 9CUxKz/Be0RaAUdxs+rfAV0gB3ktLx5skLd14FUjfF/Hc9DiMHvkUT+Al5DBIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXL1K4FXmzrLx for ; Thu, 18 Dec 2025 19:13:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34323 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 19:13:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 9207e31ba142 - stable/15 - closefrom_test: Fix the first 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 9207e31ba1426a4263322951c3e9a949aee4667a Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 19:13:41 +0000 Message-Id: <69445265.34323.7546e328@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9207e31ba1426a4263322951c3e9a949aee4667a commit 9207e31ba1426a4263322951c3e9a949aee4667a Author: John Baldwin AuthorDate: 2025-10-23 19:59:32 +0000 Commit: John Baldwin CommitDate: 2025-12-18 18:42:09 +0000 closefrom_test: Fix the first test The first test is supposed to close the new fd, but was instead not closing anything. Reviewed by: ngie, markj Fixes: 3cedbec3ee08 ("Integrate tools/regression/fifo into ...") Differential Revision: https://reviews.freebsd.org/D52799 (cherry picked from commit b307799b5141331effbb93d7f87dd00e9b991982) --- tests/sys/file/closefrom_test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/sys/file/closefrom_test.c b/tests/sys/file/closefrom_test.c index 7dccf858c772..212d048d7566 100644 --- a/tests/sys/file/closefrom_test.c +++ b/tests/sys/file/closefrom_test.c @@ -148,7 +148,7 @@ main(void) /* We'd better start up with fd's 0, 1, and 2 open. */ start = devnull(); - if (start == -1) + if (start < 3) fail("open", "bad descriptor %d", start); ok("open"); @@ -159,9 +159,9 @@ main(void) ok("highest_fd"); /* Try to use closefrom() for just closing fd 3. */ - closefrom(start + 1); + closefrom(start); fd = highest_fd(); - if (fd != start) + if (fd != start - 1) fail("closefrom", "highest fd %d", fd); ok("closefrom"); @@ -169,7 +169,7 @@ main(void) for (i = 0; i < 16; i++) (void)devnull(); fd = highest_fd(); - if (fd != start + 16) + if (fd != start + 15) fail("open 16", "highest fd %d", fd); ok("open 16");