1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-29 08:08:37 +00:00

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
This commit is contained in:
Julio Merino 2016-08-24 10:10:26 +00:00
parent 102754b3cf
commit 647672e21f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=304741

View File

@ -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 \