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)
Sun, Apr 14, 9:25 PM
Unknown Object (File)
Tue, Apr 9, 7:06 AM
Unknown Object (File)
Tue, Apr 9, 1:36 AM
Unknown Object (File)
Jan 30 2024, 11:27 AM
Unknown Object (File)
Jan 26 2024, 10:49 PM
Unknown Object (File)
Jan 2 2024, 7:43 AM
Unknown Object (File)
Dec 23 2023, 3:31 AM
Unknown Object (File)
Nov 29 2023, 5:32 PM
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 Warnings
SeverityLocationCodeMessage
Warningbin/ls/tests/ls_tests.sh:CHMOD1Invalid Executable
Unit
No Test Coverage
Build Status
Buildable 4895
Build 4958: arc lint + arc unit

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

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

Ah... this is a NetBSDism...

bin/ls/tests/ls_tests.sh
87

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

bin/ls/tests/ls_tests.sh
87

See D7608, which this one depends on.

ngie edited edge metadata.
ngie added inline comments.
bin/ls/tests/ls_tests.sh
87

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.