du: Set BLOCKSIZE before running tests

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
This commit is contained in:
Dag-Erling Smørgrav
2026-04-18 14:48:04 +02:00
parent 9899c8da0c
commit d618ba314d
+4
View File
@@ -23,6 +23,10 @@
# SUCH DAMAGE.
#
# This is the default in a FreeBSD login session, but may be unset if
# run under sudo or in a different environment.
export BLOCKSIZE=K
require_sparse_file_support()
{
if ! getconf MIN_HOLE_SIZE "$(pwd)"; then