[Toybox] [PATCH] tests.tar: fix tests for macOS.
enh
enh at google.com
Fri Aug 26 16:29:41 PDT 2022
macOS doesn't have a 'root' group (it uses 'wheel' instead), which
we can work around by using 'sys', since that happens to have the
same gid on Linux and BSD. (Android doesn't have a 'sys' group, but
I can fix that and give it the same number myself -- we already
have similar hacks for Linux Test Project tests -- and this seems
like the only way out of our current situation that doesn't require
abandoning the "sha" style of test we have here.)
macOS uses a different device for /dev/null, so work around that too.
I don't have a good workaround for macOS' weird sparse file behavior
(not least because I still haven't understood what it does/doesn't
support), so I've just disabled all sparse tests for now.
I fixed some of the symlink tests (where macOS has group r-x and
Linux group rwx) where we're just doing text comparisons, but I've
just skipped the "sha" style tests that use symlinks for now.
With this change, there are no test failures for me on macOS 12.5
or on current-ish debian.
---
tests/tar.test | 101 ++++++++++++++++++++++++++++---------------------
1 file changed, 58 insertions(+), 43 deletions(-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20220826/e99b47bc/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-tests.tar-fix-tests-for-macOS.patch
Type: application/octet-stream
Size: 12865 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20220826/e99b47bc/attachment-0001.obj>
More information about the Toybox
mailing list