<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.bin/du/tests, branch stable/14</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>du: Set BLOCKSIZE before running tests</title>
<updated>2026-04-22T08:20:53+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-04-18T12:48:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=10ed7115165eb967b65231d447db52cfce1fb872'/>
<id>10ed7115165eb967b65231d447db52cfce1fb872</id>
<content type='text'>
Several testcases assume BLOCKSIZE=K, so set it at the top of the
script.  This fixes an issue where the tests would sometimes fail
when run under sudo.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D56476

(cherry picked from commit d618ba314d1452c1cb4360e15ae1c80adac48306)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Several testcases assume BLOCKSIZE=K, so set it at the top of the
script.  This fixes an issue where the tests would sometimes fail
when run under sudo.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D56476

(cherry picked from commit d618ba314d1452c1cb4360e15ae1c80adac48306)
</pre>
</div>
</content>
</entry>
<entry>
<title>du: Fix t_flag test case</title>
<updated>2026-04-22T08:20:53+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-04-15T14:50:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a1f848a8d9b8f4efdfdf9be47804ac0662ab6372'/>
<id>a1f848a8d9b8f4efdfdf9be47804ac0662ab6372</id>
<content type='text'>
MFC after:	1 week
Fixes:		3e5550d25c6d ("du: Add regression tests")
Sponsored by:	Klara, Inc.

(cherry picked from commit e99b3f5e318626b45510e29993aabca1d161bfa0)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MFC after:	1 week
Fixes:		3e5550d25c6d ("du: Add regression tests")
Sponsored by:	Klara, Inc.

(cherry picked from commit e99b3f5e318626b45510e29993aabca1d161bfa0)
</pre>
</div>
</content>
</entry>
<entry>
<title>du: Add regression tests</title>
<updated>2025-06-01T19:53:29+00:00</updated>
<author>
<name>Michal Scigocki</name>
<email>michal.os@hotmail.com</email>
</author>
<published>2025-04-07T11:08:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f7d9af32d84f12172da018c1a876f3b66fd9ca34'/>
<id>f7d9af32d84f12172da018c1a876f3b66fd9ca34</id>
<content type='text'>
Reviewed by:	markj
MFC after:	1 month
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1648

(cherry picked from commit 3e5550d25c6d614f422506373f7068c6c366fa85)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by:	markj
MFC after:	1 month
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1648

(cherry picked from commit 3e5550d25c6d614f422506373f7068c6c366fa85)
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-16T17:55:03+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf'/>
<id>d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>du_test: Skip three tests if sparse files are not supported</title>
<updated>2021-02-03T17:06:07+00:00</updated>
<author>
<name>Alex Richardson</name>
<email>arichardson@FreeBSD.org</email>
</author>
<published>2021-02-03T16:07:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=39a1f858ad735ef816a9b1fb7eeade2c6802eb98'/>
<id>39a1f858ad735ef816a9b1fb7eeade2c6802eb98</id>
<content type='text'>
This fixes running the du tests with /tmp as tmpfs (which is what we do in the
CheriBSD CI).

Obtained from:	CheriBSD
Reviewed By:	ngie
Differential Revision: https://reviews.freebsd.org/D28398
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes running the du tests with /tmp as tmpfs (which is what we do in the
CheriBSD CI).

Obtained from:	CheriBSD
Reviewed By:	ngie
Differential Revision: https://reviews.freebsd.org/D28398
</pre>
</div>
</content>
</entry>
<entry>
<title>du: tests: use dollar-single quotes where appropriate</title>
<updated>2021-01-29T03:02:58+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2021-01-29T03:01:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=bf59049c27ef86669a94ffd43f7216107b5c57ff'/>
<id>bf59049c27ef86669a94ffd43f7216107b5c57ff</id>
<content type='text'>
No need for "foo$(printf "\t")", $'\t' is both more readable and still
functional.

Reported-by:	Jamie Landeg-Jones &lt;jamie@catflap.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No need for "foo$(printf "\t")", $'\t' is both more readable and still
functional.

Reported-by:	Jamie Landeg-Jones &lt;jamie@catflap.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>du: tests: make H_flag tests more strict about output requirements</title>
<updated>2021-01-07T22:37:28+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2021-01-05T21:49:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3c5c39c7ad8f010cfa5fc0db43d15d1964b4cf16'/>
<id>3c5c39c7ad8f010cfa5fc0db43d15d1964b4cf16</id>
<content type='text'>
The current version of this test will effectively pass as long as one of the
specified paths is in the output, and it could even be a subset of one of
the paths.

Strengthen up the test a little bit:
  * Specify beginning/end anchors for each path
  * Add egrep -v checks to make sure we don't have any *additional* paths
  * Ratchet down paths2 to exactly the two paths we expect to appear

Reviewed by:	ngie
Differential Revision:	https://reviews.freebsd.org/D27984
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current version of this test will effectively pass as long as one of the
specified paths is in the output, and it could even be a subset of one of
the paths.

Strengthen up the test a little bit:
  * Specify beginning/end anchors for each path
  * Add egrep -v checks to make sure we don't have any *additional* paths
  * Ratchet down paths2 to exactly the two paths we expect to appear

Reviewed by:	ngie
Differential Revision:	https://reviews.freebsd.org/D27984
</pre>
</div>
</content>
</entry>
<entry>
<title>du: tests: fix the H_flag test (primarily grep usage)</title>
<updated>2021-01-07T22:36:31+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2021-01-05T21:33:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4832d2e8ae1df6f907ac00275764f8135722cb7e'/>
<id>4832d2e8ae1df6f907ac00275764f8135722cb7e</id>
<content type='text'>
This test attempts to use \t (tab intended) in a grep expression.  With the
former /usr/bin/grep (i.e. gnugrep), this was interpreted as a literal 't'.
The expression would work anyways because the tr(1) usage would ultimately
replace all of the spaces with a single newline, and they would match the
paths whether they were correctly fromatted or not.

Current /usr/bin/grep (i.e. bsdgrep) is less-tolerant of ordinary-escapes, a
property of the underlying regex(3) engine, to make it easier to identify
when stuff like this happens. In-fact, this expression broke after the
switch happened.

This revision does the bare basics to fix the usage by using a printf to get
a literal tab character to insert into the expression. It also swaps out the
manual insertion of the line prefix into the grep expression by pulling
that part out of $sep and reusing it for the leading path.

The secondary issue was the tr(1) usage, since tr would only replace the
first character of string1 with the first character of string2.  This has
instead been replaced by a sed expression, which similary understands \n to
be a newline on all supported versions of FreeBSD.  Each path now gets
prefixed with the appropriate context that should be there (i.e. numeric
sequence followed by a tab).

PR:		252446
Reviewed by:	emaste, ngie
Differential Revision:	https://reviews.freebsd.org/D27983
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This test attempts to use \t (tab intended) in a grep expression.  With the
former /usr/bin/grep (i.e. gnugrep), this was interpreted as a literal 't'.
The expression would work anyways because the tr(1) usage would ultimately
replace all of the spaces with a single newline, and they would match the
paths whether they were correctly fromatted or not.

Current /usr/bin/grep (i.e. bsdgrep) is less-tolerant of ordinary-escapes, a
property of the underlying regex(3) engine, to make it easier to identify
when stuff like this happens. In-fact, this expression broke after the
switch happened.

This revision does the bare basics to fix the usage by using a printf to get
a literal tab character to insert into the expression. It also swaps out the
manual insertion of the line prefix into the grep expression by pulling
that part out of $sep and reusing it for the leading path.

The secondary issue was the tr(1) usage, since tr would only replace the
first character of string1 with the first character of string2.  This has
instead been replaced by a sed expression, which similary understands \n to
be a newline on all supported versions of FreeBSD.  Each path now gets
prefixed with the appropriate context that should be there (i.e. numeric
sequence followed by a tab).

PR:		252446
Reviewed by:	emaste, ngie
Differential Revision:	https://reviews.freebsd.org/D27983
</pre>
</div>
</content>
</entry>
<entry>
<title>Update the spelling of my name</title>
<updated>2019-04-22T17:52:46+00:00</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2019-04-22T17:52:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=da5069e1f7daaef1e7157876d6044de6f3a08ce2'/>
<id>da5069e1f7daaef1e7157876d6044de6f3a08ce2</id>
<content type='text'>
Previous spellings of my name (NGie, Ngie) weren't my legal spelling. Use Enji
instead for clarity.

While here, remove "All Rights Reserved" from copyrights I "own".

MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previous spellings of my name (NGie, Ngie) weren't my legal spelling. Use Enji
instead for clarity.

While here, remove "All Rights Reserved" from copyrights I "own".

MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>DIRDEPS_BUILD: Connect new directories.</title>
<updated>2017-10-31T00:04:07+00:00</updated>
<author>
<name>Bryan Drewery</name>
<email>bdrewery@FreeBSD.org</email>
</author>
<published>2017-10-31T00:04:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3806950135d2c8633ec0764e8807eacc87cf3e10'/>
<id>3806950135d2c8633ec0764e8807eacc87cf3e10</id>
<content type='text'>
Sponsored by:	Dell EMC Isilon
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sponsored by:	Dell EMC Isilon
</pre>
</div>
</content>
</entry>
</feed>
