From owner-dev-commits-src-branches@freebsd.org Thu Apr 22 11:08:16 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4C2F85EBC2D; Thu, 22 Apr 2021 11:08:16 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQvmH69Q4z3kbP; Thu, 22 Apr 2021 11:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5339118BB1; Thu, 22 Apr 2021 11:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13MB8FXn088339; Thu, 22 Apr 2021 11:08:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13MB8FLI088338; Thu, 22 Apr 2021 11:08:15 GMT (envelope-from git) Date: Thu, 22 Apr 2021 11:08:15 GMT Message-Id: <202104221108.13MB8FLI088338@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alex Richardson Subject: git: 436fcd12f20d - stable/13 - du_test: Skip three tests if sparse files are not supported MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 436fcd12f20d80cbbbaeb55b8a639f02e6372929 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 11:08:16 -0000 The branch stable/13 has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=436fcd12f20d80cbbbaeb55b8a639f02e6372929 commit 436fcd12f20d80cbbbaeb55b8a639f02e6372929 Author: Alex Richardson AuthorDate: 2021-02-03 16:07:05 +0000 Commit: Alex Richardson CommitDate: 2021-04-22 09:41:39 +0000 du_test: Skip three tests if sparse files are not supported 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 (cherry picked from commit 39a1f858ad735ef816a9b1fb7eeade2c6802eb98) --- usr.bin/du/tests/du_test.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/usr.bin/du/tests/du_test.sh b/usr.bin/du/tests/du_test.sh index 1c283b58fef4..5106307ad66a 100755 --- a/usr.bin/du/tests/du_test.sh +++ b/usr.bin/du/tests/du_test.sh @@ -24,6 +24,17 @@ # # $FreeBSD$ +require_sparse_file_support() +{ + if ! getconf MIN_HOLE_SIZE "$(pwd)"; then + echo "getconf MIN_HOLE_SIZE $(pwd) failed; sparse files " \ + "probably not supported by file system" + mount + atf_skip "Test's work directory does not support sparse files;" \ + "try with a different TMPDIR?" + fi +} + atf_test_case A_flag A_flag_head() { @@ -31,6 +42,7 @@ A_flag_head() } A_flag_body() { + require_sparse_file_support # XXX: compressed volumes? atf_check truncate -s 10g sparse.file atf_check -o inline:'1\tsparse.file\n' du -g sparse.file @@ -103,6 +115,7 @@ g_flag_head() } g_flag_body() { + require_sparse_file_support atf_check truncate -s 1k A atf_check truncate -s 1m B atf_check truncate -s 1g C @@ -117,6 +130,7 @@ h_flag_head() } h_flag_body() { + require_sparse_file_support atf_check truncate -s 1k A atf_check truncate -s 1m B atf_check truncate -s 1g C