svn commit: r304741 - head/bin/ls/tests
Julio Merino
jmmv at FreeBSD.org
Wed Aug 24 10:10:28 UTC 2016
Author: jmmv
Date: Wed Aug 24 10:10:26 2016
New Revision: 304741
URL: https://svnweb.freebsd.org/changeset/base/304741
Log:
Skip ls tests that use sparse files if these are not supported.
Some of the ls(1) tests create really large sparse files to validate
the number formatting features of ls(1). Unfortunately, those tests fail
if the underlying test file system does not support sparse files, as is the
case when /tmp is mounted on tmpfs.
Before running these tests, check if the test file system supports sparse
files by using getconf(1) and skip them if not. Note that the support for
this query was just added to getconf(1) in r304694.
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D7609
Modified:
head/bin/ls/tests/ls_tests.sh
Modified: head/bin/ls/tests/ls_tests.sh
==============================================================================
--- head/bin/ls/tests/ls_tests.sh Wed Aug 24 09:57:19 2016 (r304740)
+++ head/bin/ls/tests/ls_tests.sh Wed Aug 24 10:10:26 2016 (r304741)
@@ -84,6 +84,14 @@ create_test_inputs2()
{
create_test_dir
+ 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
+
for filesize in 1 512 $(( 2 * $KB )) $(( 10 * $KB )) $(( 512 * $KB )); \
do
atf_check -e ignore -o empty -s exit:0 \
More information about the svn-src-head
mailing list