[Toybox] Test suite plumbing.

Rob Landley rob at landley.net
Mon Jan 6 06:33:25 PST 2025


On 1/5/25 18:32, Rob Landley wrote:
> I'm open to suggestions. I can force the test suite to create a symlink 
> (although for the standalone commands without a multiplexer that's a bit 
> awkward), but the reason this is NOT just checking TEST_HOST=1 is the 
> host could be toybox (mkroot!) and I want it to work there too, and 
> "installing a bunch of hardlinks" was a popular option back in the 
> busybox world...

Obviously, having slept on it, I should only do the is-it-toybox tests 
when $TEST_HOST is set, and otherwise assume it's toybox for Harold 
Finch reasons. And if there's the occasional false negative on host 
tests with toybox installed via hardlinks: oh well. So we skip some 
tests in that corner case.

I'm going through and adjusting TEST_HOST to pass on Devuan Deadmaus, 
which is a systemd-free fork of Debian Bookworm, I.E. Debian 12, and 
there are SO many brittle...

FAIL: file mach-o universal
echo -ne '' | "/usr/bin/file" universal
--- expected	2025-01-06 08:27:07.239762821 -0600
+++ actual	2025-01-06 08:27:07.243762873 -0600
@@ -1 +1 @@
-universal: Mach-O universal binary with 2 architectures: [x86_64] [arm64]
+universal: Mach-O universal binary with 2 architectures: [x86_64] 
[\012- arm64e (caps: 0x2)]
FAIL: file ELF bad bits
echo -ne '' | file bad-bits
--- expected	2025-01-06 08:27:07.315763818 -0600
+++ actual	2025-01-06 08:27:07.319763871 -0600
@@ -1 +1 @@
-bad-bits: ELF (bad type 12336), (bad class -1) (bad endian 48) unknown 
arch 12336
+bad-bits: ELF invalid class, unknown class 0

I try not to expect large chunks of gnu/gnu output to stay stable.

Rob


More information about the Toybox mailing list