Page MenuHomeFreeBSD

Skip ls tests that use sparse files if these are not supported.
ClosedPublic

Authored by jmmv on Aug 23 2016, 11:04 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 7:30 PM
Unknown Object (File)
Tue, Nov 19, 9:38 AM
Unknown Object (File)
Thu, Nov 14, 2:08 PM
Unknown Object (File)
Wed, Nov 6, 12:13 PM
Unknown Object (File)
Wed, Nov 6, 3:54 AM
Unknown Object (File)
Sun, Oct 27, 10:44 AM
Unknown Object (File)
Sun, Oct 27, 10:44 AM
Unknown Object (File)
Sun, Oct 27, 10:44 AM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jmmv retitled this revision from to Skip ls tests that use sparse files if these are not supported..
jmmv updated this object.
jmmv edited the test plan for this revision. (Show Details)
jmmv added a reviewer: ngie.
jmmv added a subscriber: markm.
ngie requested changes to this revision.Aug 23 2016, 7:01 PM
ngie edited edge metadata.
ngie added inline comments.
bin/ls/tests/ls_tests.sh
87 ↗(On Diff #19579)

This doesn't seem to work on UFS/ZFS on FreeBSD 10.3-RELEASE...

$ getconf MIN_HOLE_SIZE /tmp
getconf: no such path configuration parameter `MIN_HOLE_SIZE'
$ mount -p | head -n 1
zroot                   /                       zfs     rw,nfsv4acls    0 0
$ uname -a
FreeBSD picasso.local 10.3-RELEASE-p5 FreeBSD 10.3-RELEASE-p5 #1 r302018: Sun Jun 19 16:18:37 PDT 2016     ngie@picasso.local:/usr/obj/usr/src/sys/GENERIC  amd64
$ mkdir /tmp/md && sudo mdmfs -s 40m md /tmp/md
$ getconf MIN_HOLE_SIZE /tmp/md/                                
getconf: no such path configuration parameter `MIN_HOLE_SIZE'
$
This revision now requires changes to proceed.Aug 23 2016, 7:01 PM
bin/ls/tests/ls_tests.sh
87 ↗(On Diff #19579)

Ah... this is a NetBSDism...

bin/ls/tests/ls_tests.sh
87 ↗(On Diff #19579)

But.. it's supposed to work on FreeBSD according to getconf(1)... hmmm....

bin/ls/tests/ls_tests.sh
87 ↗(On Diff #19579)

See D7608, which this one depends on.

ngie edited edge metadata.
ngie added inline comments.
bin/ls/tests/ls_tests.sh
87 ↗(On Diff #19579)

LGTM after getconf(1) support is added via rS304694.

This revision is now accepted and ready to land.Aug 23 2016, 8:58 PM
This revision was automatically updated to reflect the committed changes.