This fixes running the du tests with /tmp as tmpfs (which is what we do in the
CheriBSD CI).
Obtained from: CheriBSD
Co-authored-by: Brooks Davis <brooks@FreeBSD.org>
Differential D28398
du_test: Skip three tests if sparse files are not supported Authored by arichardson on Jan 28 2021, 10:11 AM. Tags None Referenced Files
Subscribers
Details This fixes running the du tests with /tmp as tmpfs (which is what we do in the Obtained from: CheriBSD
Diff Detail
Event TimelineComment Actions This isn't the right approach; please use getconf MIN_HOLE_SIZE instead, like the ls tests do 83 create_test_inputs2()
84 {
85 create_test_dir
86
87 if ! getconf MIN_HOLE_SIZE "$(pwd)"; then
88 echo "getconf MIN_HOLE_SIZE $(pwd) failed; sparse files probably" \
89 "not supported by file system"
90 mount
91 atf_skip "Test's work directory does not support sparse files;" \
92 "try with a different TMPDIR?"
93 fiComment Actions Thanks, I was not aware of MIN_HOLE_SIZE. Seems to report a sensible value on UFS and fail on tmpfs and smbfs. Will update the patch tomorrow. Comment Actions With this change I now get three skipped tests by default, and if I do env TMPDIR=/root/tmp to run them on UFS all of them pass. |