<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.bin/diff/tests, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2026-02-13T20:19:16Z</updated>
<entry>
<title>diff: Tweak recursion tests</title>
<updated>2026-02-13T20:19:16Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-02-13T20:18:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b2532432971fbd9339a9a49eca1b532978bb6d48'/>
<id>urn:sha1:b2532432971fbd9339a9a49eca1b532978bb6d48</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>diff: Tweak range of -C and -U arguments</title>
<updated>2026-02-13T20:19:16Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-02-13T20:18:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=790f1d1cc5fa892ba59fd7f239b22064c8ab14c7'/>
<id>urn:sha1:790f1d1cc5fa892ba59fd7f239b22064c8ab14c7</id>
<content type='text'>
POSIX uses the terms “positive decimal integer” for -C and “non-negative
decimal integer” for -U, which translates into lower bounds of 1 for -C
and 0 for -U.

POSIX does not specify a minimum upper bound for either mode, but as of
5fc739eb5949 both our backends support context sizes up to and including
INT_MAX, so use that.

Having had the opportunity to consult the Unix System Test Suite, the
diff test cases found therein happen to precisely match these bounds.

While here, switch to using strtonum() to parse numerical arguments, and
try to be more consistent in how we report usage errors.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D55261
</content>
</entry>
<entry>
<title>diff: Improve directory loop detection</title>
<updated>2026-02-11T16:24:54Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-02-11T16:24:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=71569594d860a59d8362770a56d806e1d31fb946'/>
<id>urn:sha1:71569594d860a59d8362770a56d806e1d31fb946</id>
<content type='text'>
When we're done processing a directory, remove its entry from the tree
of visited inodes, ensuring that we only report a loop when we encounter
a descendant-to-ancestor link, not when we encounter a cousin-to-cousin
or sibling-to-sibling link.

MFC after:	1 week
Reported by:	Bakul Shah &lt;bakul@iitbombay.org&gt;
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D55248
</content>
</entry>
<entry>
<title>diff: Correctly declare tests</title>
<updated>2026-02-05T16:23:53Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-02-05T16:21:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=157d6664aeb815db3b758bd3038fd1512a0f4e2c'/>
<id>urn:sha1:157d6664aeb815db3b758bd3038fd1512a0f4e2c</id>
<content type='text'>
Sponsored by:	Klara, Inc.
Fixes:		5fc739eb5949 ("diff: Fix integer overflows in Stone algorithm")
Fixes:		270492602b9b ("diff: Add test case for pagination resource leak")
Fixes:		590126789c84 ("diff: Don't compare a file or directory to itself")
</content>
</entry>
<entry>
<title>diff: Don't compare a file or directory to itself</title>
<updated>2026-02-05T14:39:57Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-02-05T14:39:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=590126789c841d80655869bc075c8980c173dd1c'/>
<id>urn:sha1:590126789c841d80655869bc075c8980c173dd1c</id>
<content type='text'>
While here, stop abusing struct dirent for something we don't even need
to store.

PR:		254455
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	thj, kevans
Differential Revision:	https://reviews.freebsd.org/D55113
</content>
</entry>
<entry>
<title>diff: Add test case for pagination resource leak</title>
<updated>2026-02-05T14:39:47Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-02-05T14:39:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=270492602b9bd8b8fce4f021f055804978bf3f23'/>
<id>urn:sha1:270492602b9bd8b8fce4f021f055804978bf3f23</id>
<content type='text'>
The pagination code leaks either processes or descriptors or both,
depending on the exact version of the code you have.  Add a test case
which exercises this leak to facilitate fixing it.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	thj, kevans
Differential Revision:	https://reviews.freebsd.org/D55111
</content>
</entry>
<entry>
<title>diff: Fix integer overflows in Stone algorithm</title>
<updated>2026-02-05T14:39:43Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-02-05T14:39:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5fc739eb5949620da911db2f87ca8faedc549d3a'/>
<id>urn:sha1:5fc739eb5949620da911db2f87ca8faedc549d3a</id>
<content type='text'>
Fix integer overflows that may occur when the context window is very
large and add tests to exercise those conditions.

PR:		267032
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	thj, kevans
Differential Revision:	https://reviews.freebsd.org/D55110
</content>
</entry>
<entry>
<title>diff: Detect loops when diffing directories.</title>
<updated>2025-06-20T11:10:35Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2025-06-20T11:10:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=42092e1b6625b8226de5f34d22b9a96c713626cb'/>
<id>urn:sha1:42092e1b6625b8226de5f34d22b9a96c713626cb</id>
<content type='text'>
Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D50936
</content>
</entry>
<entry>
<title>Remove residual blank line at start of Makefile</title>
<updated>2024-07-15T22:43:39Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-07-15T04:46:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e9ac41698b2f322d55ccf9da50a3596edb2c1800'/>
<id>urn:sha1:e9ac41698b2f322d55ccf9da50a3596edb2c1800</id>
<content type='text'>
This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
</content>
</entry>
<entry>
<title>diff: Nits in tests.</title>
<updated>2024-05-20T14:27:50Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2024-05-20T14:27:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9c7f83bbb4cd8c1241ca1d8a0742bbfec0ddb068'/>
<id>urn:sha1:9c7f83bbb4cd8c1241ca1d8a0742bbfec0ddb068</id>
<content type='text'>
Sponsored by:	Klara, Inc.
</content>
</entry>
</feed>
