From nobody Tue Nov 04 15:52:24 2025 X-Original-To: dev-commits-src-branches@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 4d1CdR2L3bz6GHDs; Tue, 04 Nov 2025 15:52:27 +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 4d1CdP18Bhz3VSf; Tue, 04 Nov 2025 15:52:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762271545; 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=B+BQf6fsSMIzEehmtd8BqktiTb/RweuZhm5MpiGsu7s=; b=IUN1++F3/7rykXWnzVRHhoZ3vBpmRrnA778Xt7/afzziDsYPB8j/UicQKRoUCHxQitlnxR +DEtbc2DbdJaW1HaXfViDaY4fCgPv5MFyH88mb1UxbalOUIOJbzHXmDVumCFlp+S82Wadb Bj7X+mzEsD0uNXUokvO9AEnR9qstxWF69POLPCXItg/DHY94MupSyNhxH1RKHGP0FfCESO MxcItE8iOuNPZ0SBIy+ahVjxG9VwxVampWBykQif2y3vph4XnaiUgj85btsqo/ZplDnDSv cEy5hxvyB7d1r5PYEURAlJoLLDxxv6q76K9fitymBunUlCNu00mYgjproH0FpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762271545; 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=B+BQf6fsSMIzEehmtd8BqktiTb/RweuZhm5MpiGsu7s=; b=T0L19k/jkJIBbFd0ytRULcBdAY6GFjdY4DIkg6qYcojC3wCE4CXs5wHUsOtDK/bTJdL5dB tFhnRUxzriCY3PtnuSQxeyT3OJLf1J6tWM0Mcq41UBjH1Xec0xV5wWArerplU/C/3kDfO7 L8VBT9cDSARwCpNzuYM3yD4KKzkqpqr33PlLVr/szuh8tbjLu597Z/k+dw75lFCphntCab aBLqpGO4qL7Mecd0XaVp4IxYhEJVbwAsOaLph8CGt+RS0/8De87BAlxkEDOId0Sx9SnXFk RIFBbYtaOBjU0eigEmPYoZAi9z6FsJi1AHxc4kxvbsBwB4W78X0gS7lcxsZUiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762271545; a=rsa-sha256; cv=none; b=Pm20pxPLgGz3VE4HkED+Ax18WwtvgZDTDY3IbSHx9DbopIh6+A4UnBuYScVI7gpCr7QiOq OlT65nt7A+HpMybgDdEhOX/MFErJ07D1u0+eEXUbfCGVT5ZvHOGhixEqfSsPBBTm+X8WTD Jcb8r+HhY2kclPUkRJyZ5CBsSbUq41hBwJ96BDkghONadw/b3rtelEIElkIHo8WI6fZLtO c34E2mvCiviiHLEtRxuNetDrGHYv29AicbAaHaKT/CvuijtvsLjwEX04FGrWa80aeskRm3 fANrtX+Zb0znwN8jLZa+7sHv5GRJJ577HJ9yzaSh/j+etwC0MwLDTaj+BPiZHA== 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 4d1CdP0KC2z13Ws; Tue, 04 Nov 2025 15:52:25 +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 5A4FqO5Y054064; Tue, 4 Nov 2025 15:52:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5A4FqOFI054061; Tue, 4 Nov 2025 15:52:24 GMT (envelope-from git) Date: Tue, 4 Nov 2025 15:52:24 GMT Message-Id: <202511041552.5A4FqOFI054061@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 887e686fc935 - stable/15 - pjdfstest: Fix link count test List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 887e686fc9358fb4f08c4b46ce917dee18b9056c Auto-Submitted: auto-generated The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=887e686fc9358fb4f08c4b46ce917dee18b9056c commit 887e686fc9358fb4f08c4b46ce917dee18b9056c Author: Dag-Erling Smørgrav AuthorDate: 2025-10-30 20:18:17 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-04 15:52:11 +0000 pjdfstest: Fix link count test This UFS-only test verifies that attempting to create more links than permitted by the file system returns EMLINK, but has been broken ever since UFS_LINK_MAX was increased because a) it hardcodes the previous value of UFS_LINK_MAX, and b) the new value requires more space than the test allocates, so it ends up getting ENOSPC instead of EMLINK. * Switch to retrieving {PC_LINK_MAX} at runtime. * Stop the test when we reach {PC_LINK_MAX} links. This ensures that we don't go on for hours if the actual limit turns out to be much higher than we anticipated (e.g. INT64_MAX on ZFS). * Double the size of the test filesystem. MFC after: 3 days Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Fixes: 35a301555bff ("Increase UFS/FFS maximum link count from 32767 to 65530.") Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53442 (cherry picked from commit 6c86379b0d0deb2750a662579f63d71ffa519e81) --- contrib/pjdfstest/tests/link/05.t | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/contrib/pjdfstest/tests/link/05.t b/contrib/pjdfstest/tests/link/05.t index 5a18c2103e1d..e6a7d1cc8201 100644 --- a/contrib/pjdfstest/tests/link/05.t +++ b/contrib/pjdfstest/tests/link/05.t @@ -2,7 +2,7 @@ # vim: filetype=sh noexpandtab ts=8 sw=8 # $FreeBSD: head/tools/regression/pjdfstest/tests/link/05.t 211352 2010-08-15 21:24:17Z pjd $ -desc="link returns EMLINK if the link count of the file named by name1 would exceed 32767" +desc="link returns EMLINK if the link count of the file named by name1 would exceed {PC_LINK_MAX}" dir=`dirname $0` . ${dir}/../misc.sh @@ -16,19 +16,20 @@ n1=`namegen` n2=`namegen` expect 0 mkdir ${n0} 0755 -n=`mdconfig -a -n -t malloc -s 1m` || exit +n=`mdconfig -a -n -t malloc -s 2m` || exit newfs -i 1 /dev/md${n} >/dev/null || exit mount /dev/md${n} ${n0} || exit +link_max=`${fstest} pathconf ${n0} _PC_LINK_MAX` expect 0 create ${n0}/${n1} 0644 i=1 -while :; do +while [ ${i} -le ${link_max} ]; do link ${n0}/${n1} ${n0}/${i} >/dev/null 2>&1 if [ $? -ne 0 ]; then break fi i=`expr $i + 1` done -test_check $i -eq 32767 +test_check $i -eq ${link_max} expect EMLINK link ${n0}/${n1} ${n0}/${n2}