From nobody Sat Nov 25 09:37:22 2023 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 4ScmwL2qpYz529sm; Sat, 25 Nov 2023 09:37:22 +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 4ScmwL2P4Wz3LRt; Sat, 25 Nov 2023 09:37:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700905042; 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=C/2lGkCHXnDj0BTViRiyfbee/8XSggE2QpzDSYi+mhs=; b=pVTK2vTdJCt4g55BsGgmJ5lsxSIzVEagWL3ViaObQkDtw9TU6V3KTmJshlPGSfhAx0jNMi s0GX2mmAyNWjB54/nBNqrNZAqS5KRP0gxSK8AcUvLB6zWYTXn1ClxY8ij53CZa8UU28rf8 VcWclcz4xK4K3nXs2weRKM9kqUB8FEagi4uw693CVpb5Erz/FMaK6vupqENS5JdwLBE7l4 GZa7t0r6dHHV6UMTeOJobCxW9YFjcbSgZJGMo3eTe2D0YmK69RIuZoC1RqEQqTsuMHcLK7 Vkg93c3LZ1hwhpy8sUflFoy7Gf7+CVC7sP/2HXLeL9acX196X0ktG52KyhHpDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700905042; 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=C/2lGkCHXnDj0BTViRiyfbee/8XSggE2QpzDSYi+mhs=; b=MyLqljeQjCG+y08CE9KBYJnt8l81rEzyaUoM6wmJKKuTRuTfwP3XeJJujhn6MvZJ2wTNdE qyl+wTIBztfKtFECYEmEIHh+T7JqKP1K9oiopUifjzUs3BEYxu8yRV+leTuIfV0nn2Bw2b KLbiHxF4qXU64dkrbEUF86CB86MTooAHPo4WQD4lWSPme/qTwrRwz684kZhqLXaZXW2OYT S9U9xDpLm3ICWBb82ro0GKUFyJI7jYZ8bHcgA/defjRKdRIRV9t4hAYrSRVsneSOPEku54 MWGymSp85L4W7swylPi1FHQqHmOb232VPsXjL/2tu/go+MyrDX5YHkX88dhM8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700905042; a=rsa-sha256; cv=none; b=fxbF+FiEkH7AqTIp9HhCwo5c4EwR2vdaaKx4vub/LXxYdXzbdHqSXSj+VXTLdKSflQ5qZG VieCHDxWqyDhXVi6YhJIL4QM9Q5qUFWnmIU4bSW9adO+TGJc1AGyCQOcx9mwvG3AOisZZL C/fzuJHvlE/68hT/H56x50iaXj1hedIU3b1BOb2pUxRjPD4eZBborOu1wes55EpZ8lpVXB Okr92qhAFUgbEb/W+BCcBE2zW54XtAPp050nlVf48R0ooZ0D5gWJwT4gCuQ19jsywdkp8A 5q4MDyTww/1PbCwbVtA3dHNwYznc/2Sn6RI2fdmAvwMhPSYYBbpXLe3NAsYrcA== 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 4ScmwL1Sm6z1MRD; Sat, 25 Nov 2023 09:37:22 +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 3AP9bMj9071566; Sat, 25 Nov 2023 09:37:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AP9bMkn071563; Sat, 25 Nov 2023 09:37:22 GMT (envelope-from git) Date: Sat, 25 Nov 2023 09:37:22 GMT Message-Id: <202311250937.3AP9bMkn071563@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 49a83b94395a - main - stress2: Do not make assumptions about the value of UFS_LINK_MAX 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 49a83b94395a6eaae4642aa72c9f6a40143f0f45 Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=49a83b94395a6eaae4642aa72c9f6a40143f0f45 commit 49a83b94395a6eaae4642aa72c9f6a40143f0f45 Author: Peter Holm AuthorDate: 2023-11-25 09:36:00 +0000 Commit: Peter Holm CommitDate: 2023-11-25 09:36:00 +0000 stress2: Do not make assumptions about the value of UFS_LINK_MAX --- tools/test/stress2/misc/nlink3.sh | 2 +- tools/test/stress2/misc/nlink4.sh | 2 +- tools/test/stress2/misc/nlink5.sh | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/test/stress2/misc/nlink3.sh b/tools/test/stress2/misc/nlink3.sh index 0c1b9fc0c32d..55557124c9c2 100755 --- a/tools/test/stress2/misc/nlink3.sh +++ b/tools/test/stress2/misc/nlink3.sh @@ -52,7 +52,7 @@ main (void) { err(1, "creat(%s)", file); close(fd); - mx = UFS_LINK_MAX - 1; /* UFS_LINK_MAX = 32767 */ + mx = UFS_LINK_MAX - 1; for (i = 0; i < mx; i++) { snprintf(file, sizeof(file), "%d", i); if (link("f", file) == -1) diff --git a/tools/test/stress2/misc/nlink4.sh b/tools/test/stress2/misc/nlink4.sh index 5f31df2c24d0..cce8bb06985a 100755 --- a/tools/test/stress2/misc/nlink4.sh +++ b/tools/test/stress2/misc/nlink4.sh @@ -51,7 +51,7 @@ main (void) { err(1, "creat(%s)", file); close(fd); - mx = UFS_LINK_MAX - 1; /* UFS_LINK_MAX = 32767 */ + mx = UFS_LINK_MAX - 1; for (i = 0; i < mx; i++) { snprintf(file, sizeof(file), "%d", i); if (link("f", file) == -1) diff --git a/tools/test/stress2/misc/nlink5.sh b/tools/test/stress2/misc/nlink5.sh index af19d052f9f3..4e7f2d9c827d 100755 --- a/tools/test/stress2/misc/nlink5.sh +++ b/tools/test/stress2/misc/nlink5.sh @@ -33,6 +33,9 @@ . ../default.cfg +UFS_LINK_MAX=`grep UFS_LINK_MAX /usr/include/ufs/ufs/dinode.h 2>/dev/null` +[ -z "$UFS_LINK_MAX" ] && exit 0 +UFS_LINK_MAX=`echo $UFS_LINK_MAX | awk '{print $NF}'` cat > /tmp/nlink5.c < #include @@ -46,7 +49,7 @@ main (void) { int i, mx; char dir[100]; - mx = UFS_LINK_MAX - 2; /* UFS_LINK_MAX = 32767 */ + mx = UFS_LINK_MAX - 2; for (i = 0; i < mx; i++) { snprintf(dir, sizeof(dir), "%d", i); if (mkdir(dir, 0700) == -1) @@ -111,7 +114,7 @@ set +e cd $mntpoint /tmp/nlink5; s=$? n=`find . -type d -maxdepth 1 | wc -l` -[ $n -ne 32766 ] && s=2 +[ $n -ne $((UFS_LINK_MAX - 1)) ] && s=2 cd $here umount $mntpoint