[Toybox] [PATCH] du.test: skip on Mac.

enh enh at google.com
Sat Nov 23 08:05:34 PST 2019


On Sat, Nov 23, 2019, 07:51 Rob Landley <rob at landley.net> wrote:

> On 11/22/19 2:38 PM, enh via Toybox wrote:
> > None of the current tests are relevant on the Mac because small
> > symlinks are inlined into inodes, as are empty directories, so
> > everything's using zero blocks.
>
> That's a filesystem issue, not an OS issue. (In theory Linux filesystems
> can do
> this too. I remember murderfs did tricks like this, but nobody uses it
> anymore
> because of the murder part. No idea what butterfs is doing.)
>
> There's a similar issue with test_chattr, getfattr, and setfattr. They
> were all
> kinda ext2-isms which were retained in ext3 but not ext4. (And then
> _partially_
> genericized but there's an API migration that goes along with that.)
>
> So the right thing to do (in the absence of a generic way to test
> filesystem
> capabilities) is to test for a recognized filesystem type that supports
> them, I
> guess?
>

It's worse than that, though, because SELinux is an option orthogonal to
file system, and this probably varies by macos version (assuming it isn't
an option, which I don't actually know --- case sensitivity is).

But although you can "df ." and then grep that partition name in
> /proc/mounts to
> get ext4, "stat -fc %T" says ext3 for ext4, which is sad. And I see the
> implementation isn't _checking_ which driver is used by the live mounted
> filesystem, instead the blkid tests have been block copied into a second
> place
> so that if they ever _are_ updated, they'll need updating twice. Sigh. No,
> it's
> worse: blkid has an ext4 test now.)
>
> (All this is on the todo list, although the note-to-self in this case is
> just
> "each tests/*.test file that isn't chmod +x has a reason why" and the rest
> is
> just stuff I remember needing to do...)
>
> Rob
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20191123/a43b0708/attachment-0001.htm>


More information about the Toybox mailing list