<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Nov 23, 2019, 07:51 Rob Landley <<a href="mailto:rob@landley.net">rob@landley.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 11/22/19 2:38 PM, enh via Toybox wrote:<br>
> None of the current tests are relevant on the Mac because small<br>
> symlinks are inlined into inodes, as are empty directories, so<br>
> everything's using zero blocks.<br>
<br>
That's a filesystem issue, not an OS issue. (In theory Linux filesystems can do<br>
this too. I remember murderfs did tricks like this, but nobody uses it anymore<br>
because of the murder part. No idea what butterfs is doing.)<br>
<br>
There's a similar issue with test_chattr, getfattr, and setfattr. They were all<br>
kinda ext2-isms which were retained in ext3 but not ext4. (And then _partially_<br>
genericized but there's an API migration that goes along with that.)<br>
<br>
So the right thing to do (in the absence of a generic way to test filesystem<br>
capabilities) is to test for a recognized filesystem type that supports them, I<br>
guess?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">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). </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
But although you can "df ." and then grep that partition name in /proc/mounts to<br>
get ext4, "stat -fc %T" says ext3 for ext4, which is sad. And I see the<br>
implementation isn't _checking_ which driver is used by the live mounted<br>
filesystem, instead the blkid tests have been block copied into a second place<br>
so that if they ever _are_ updated, they'll need updating twice. Sigh. No, it's<br>
worse: blkid has an ext4 test now.)<br>
<br>
(All this is on the todo list, although the note-to-self in this case is just<br>
"each tests/*.test file that isn't chmod +x has a reason why" and the rest is<br>
just stuff I remember needing to do...)<br>
<br>
Rob<br>
</blockquote></div></div></div>