Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Aug 2016 10:10:27 +0000 (UTC)
From:      Julio Merino <jmmv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r304741 - head/bin/ls/tests
Message-ID:  <201608241010.u7OAARk5065788@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608241010.u7OAARk5065788>