Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Apr 2026 08:21:11 +0000
From:      Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav <des@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 10ed7115165e - stable/14 - du: Set BLOCKSIZE before running tests
Message-ID:  <69e884f7.273c2.18bf8bbd@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/14 has been updated by des:

URL: https://cgit.FreeBSD.org/src/commit/?id=10ed7115165eb967b65231d447db52cfce1fb872

commit 10ed7115165eb967b65231d447db52cfce1fb872
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-04-18 12:48:04 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-04-22 08:20:53 +0000

    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
    
    (cherry picked from commit d618ba314d1452c1cb4360e15ae1c80adac48306)
---
 usr.bin/du/tests/du_test.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/usr.bin/du/tests/du_test.sh b/usr.bin/du/tests/du_test.sh
index b60433da7dc0..ca2cc92ceb93 100755
--- a/usr.bin/du/tests/du_test.sh
+++ b/usr.bin/du/tests/du_test.sh
@@ -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


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69e884f7.273c2.18bf8bbd>