[Toybox] [PATCH] file: basic Mach-O universal binary support.
Rob Landley
rob at landley.net
Wed Sep 1 13:23:42 PDT 2021
On 8/31/21 6:23 PM, enh via Toybox wrote:
> PowerPC may be dead and gone, but arm64 is the new x86-64, and
> x86-64 the new PowerPC :-)
> ---
> tests/file.test | 4 ++++
> toys/posix/file.c | 36 +++++++++++++++++++++++++++++++-----
Grrr, clashes a lot with my tests/file.test local changes. (My tree accumulating
unfinished changes is yet another tabsplosion-style accumulation of minor
technical debt.) Anyway, backed my changes out to apply yours, then applied them
again.
It's a pity you don't use bash to run the test suite, because $'\x0a\xbc\xde' in
the "input" argument would be a more concise way of doing those tests. (Yes, I
need to find time to work on toysh again...)
Your TEST_HOST output didn't match my TEST_HOST output on devuan. Is this
version skew in the "file" command or did you not run TEST_HOST? I get:
universal: Mach-O universal binary with 2 architectures: [x86_64] [arm64]
Which has [name] instead of commas, and uses x86_64 instead of x86-64.
Hmmm, I have a big list of tests I need to add to file.test and some of them are...
$ echo hello > test; chmod 000 test; file test
test: regular file, no read permission
$ toybox file test
file: test: Permission denied
test: unknown
Eh, how much do we care about matching exactly in the corner cases? Hmmm...
Rob
More information about the Toybox
mailing list