From nobody Wed Feb 18 00:26:00 2026 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 4fFy3X52Vjz6SMBn for ; Wed, 18 Feb 2026 00:26:00 +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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fFy3X0wH4z3GgT for ; Wed, 18 Feb 2026 00:26:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771374360; 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=Wv3H3roe+a5fegESU19lm1vsp9j8ULCze2mDn6tF3uo=; b=AzpdGcfGqSZWYGu43mpCMlNxEkR4tQGO2PHxHyV+Dd2lm6Y26SRTSPdLjIjmKSpUA89OYR vNWsmBVDP+bhfrp5tl4L3OgbgAhQRU6iSjB7Ssh0NuoT/rAF7zT89GdfZoN0tkEq53Wld5 NfHtQVJkJURMZ5MkALbQwDV16J5QwTMD8RM0WfuVBen9cdJdjDdu5dHYqjOCOTlFa4n7xP pYL2VnBRBbv5e84KkJ00+ewE2G+SgXmhw3J4KfX59oUMIBC3SoM+Izz4bSDtDhRWoxvmCX 5I8FetRs3uoix1cCjz69WT1ddW0HVxlYXee3zrWWNPP+EIU64jIbcSPJtfDiwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771374360; a=rsa-sha256; cv=none; b=r4u38i4aTSYHYfXrXpqrDtJYStA3nZkWnEIgdvdmZaaczVuStc/as6WhwcSH/rCpq/6T+d kPr8j6TkAZiR5KdGfDHkZvmtTU2eY3hDdzYJyVMdk4qFAwToU/bhZQiFaZriKt7Zxwb0Xy dmdNyhQM8hIpA75QGj0XRnh96cM4aOCJvjKgQVLlSXaLcn9aTOjTZEwEpDVhkRiDAX5ACu ekOp4uKcwZ+uHeXQjavqbZsglu1fZxwVy+8iT2IUlsuKYNtE4NKoR290inELQ2ovIKO5/O RK7rKqxtU7zl0nkKgUQ2jEdqGsqmKWt8vD1JBi1mnXwKZ1zkTxLdyvKLaBQ9Rw== 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=1771374360; 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=Wv3H3roe+a5fegESU19lm1vsp9j8ULCze2mDn6tF3uo=; b=fS3pb7bUBgx1OaGsPrdqR2hnmwYWHIuqTeR4doXTuwvRC2gAp7nP/T6/ooji4TxNzTfP45 yhr1le8U+P2iC2vZune0bxnPPRV3aolEStn0nR/bioS5h2LcPdLrtWEHzmWNv8gjAmkWTT 0XgPtPJncdN9DnW0LoAi3mhWFQPA5iRWsO7nWX5q2QYYYYI5CwTn8IrE4Oj3b5Aq6+Ztfa Ny+7Qa1MS4o6bDDp3RKq/wc85JmfNLavHCEkhbcdofOOOzGxVzoIKCweVTgz7khvcLqGBK 8yd8PhHR/YmNXIADDLMPBPz+pSP7EaYmIbM8go8RQDvCHZZDc1r0tPNyKfd3rw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fFy3X0JQszYwD for ; Wed, 18 Feb 2026 00:26:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e0a1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 18 Feb 2026 00:26:00 +0000 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=B8rg?=rav Subject: git: f10da155fafa - stable/14 - diff: Tweak recursion tests 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/14 X-Git-Reftype: branch X-Git-Commit: f10da155fafad0fc450f974e3ae1421d7f78f123 Auto-Submitted: auto-generated Date: Wed, 18 Feb 2026 00:26:00 +0000 Message-Id: <69950718.3e0a1.2136dc13@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f10da155fafad0fc450f974e3ae1421d7f78f123 commit f10da155fafad0fc450f974e3ae1421d7f78f123 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-13 20:18:30 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-18 00:18:38 +0000 diff: Tweak recursion tests The -r flag is not required to compare two directories; it is only required to compare them recursively, i.e. descend into their common subdirectories. Adjust tests that use -r needlessly, and adjust the dirloop test to verify that these two cases remain distinct. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D55262 (cherry picked from commit b2532432971fbd9339a9a49eca1b532978bb6d48) --- usr.bin/diff/tests/diff_test.sh | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/usr.bin/diff/tests/diff_test.sh b/usr.bin/diff/tests/diff_test.sh index 07e019aafc4e..19e9bfb25728 100755 --- a/usr.bin/diff/tests/diff_test.sh +++ b/usr.bin/diff/tests/diff_test.sh @@ -1,4 +1,3 @@ - atf_test_case simple atf_test_case unified atf_test_case header @@ -191,19 +190,19 @@ brief_format_body() atf_check \ -s exit:1 \ -o inline:"Files A/test-file and B/test-file differ\n" \ - diff -rq A B + diff -q A B atf_check diff -rq A C atf_check \ -s exit:1 \ -o inline:"Only in D: another-test-file\n" \ - diff -rq A D + diff -q A D atf_check \ -s exit:1 \ -o inline:"Files A/another-test-file and D/another-test-file differ\n" \ - diff -Nrq A D + diff -Nq A D } Bflag_body() @@ -225,9 +224,9 @@ Nflag_body() { atf_check -x 'printf "foo" > A' - atf_check -s exit:1 -o ignore -e ignore diff -N A NOFILE - atf_check -s exit:1 -o ignore -e ignore diff -N NOFILE A - atf_check -s exit:2 -o ignore -e ignore diff -N NOFILE1 NOFILE2 + atf_check -s exit:1 -o ignore -e ignore diff -N A NOFILE + atf_check -s exit:1 -o ignore -e ignore diff -N NOFILE A + atf_check -s exit:2 -o ignore -e ignore diff -N NOFILE1 NOFILE2 } tabsize_body() @@ -335,23 +334,23 @@ noderef_body() atf_check ln -s $(pwd)/test-file B/test-file - atf_check -o empty -s exit:0 diff -r A B + atf_check -o empty -s exit:0 diff A B atf_check -o inline:"File A/test-file is a file while file B/test-file is a symbolic link\n" \ - -s exit:1 diff -r --no-dereference A B + -s exit:1 diff --no-dereference A B # both test files are now the same symbolic link atf_check rm A/test-file atf_check ln -s $(pwd)/test-file A/test-file - atf_check -o empty -s exit:0 diff -r A B - atf_check -o empty -s exit:0 diff -r --no-dereference A B + atf_check -o empty -s exit:0 diff A B + atf_check -o empty -s exit:0 diff --no-dereference A B # make test files different symbolic links, but same contents atf_check unlink A/test-file atf_check ln -s $(pwd)/test-file2 A/test-file - atf_check -o empty -s exit:0 diff -r A B - atf_check -o inline:"Symbolic links A/test-file and B/test-file differ\n" -s exit:1 diff -r --no-dereference A B + atf_check -o empty -s exit:0 diff A B + atf_check -o inline:"Symbolic links A/test-file and B/test-file differ\n" -s exit:1 diff --no-dereference A B } ignorecase_body() @@ -362,7 +361,7 @@ ignorecase_body() atf_check -x "echo hello > A/foo" atf_check -x "echo hello > B/FOO" - atf_check -o empty -s exit:0 diff -u -r --ignore-file-name-case A B + atf_check -o empty -s exit:0 diff -u --ignore-file-name-case A B } dirloop_head() @@ -374,6 +373,9 @@ dirloop_body() atf_check mkdir -p a/foo/bar atf_check ln -s .. a/foo/bar/up atf_check cp -a a b + atf_check \ + -o inline:"Common subdirectories: a/foo and b/foo\n" \ + diff a b atf_check \ -e match:"a/foo/bar/up: Directory loop detected" \ -e match:"b/foo/bar/up: Directory loop detected" \