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? 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 _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
