[Toybox] Test suite plumbing.
Rob Landley
rob at landley.net
Sun Jan 5 16:32:09 PST 2025
I can't use "toyonly" in tests/test.test because it's a TOYFLAG_NOHELP
command, so "test --version" produces no output, which is how
scripts/runtest.sh is currently checking for toybox.
My next instinct was to $(basename $(readlink)) and check if that
pointed to "toybox", but "make test_test" is doing scripts/single.sh
test (which would be "make test" except that's intercepted to do
something else, just like "make help" and "make install")... anyway,
it's creating a standalone binary called "test" with no symlink for
readlink to interrogate. So that check fails in the current test suite.
My THIRD idea was to run "strings" against the binary and see if
anything unique was in there, but having been intentionally parsimonious
in that regard my options for the standalone "test" binary seem to be:
need arg @%d
bad (
need )
too many arguments
I think. There's a bunch of dynamic glibc nonsense, so I thought "I'll
do a static NDK build, that's likely to be less noisy", and... um...
$ strings generated/testdir/test | wc
3539 5144 33361
What IS "Scudo" anyway? (Not that static musl is much better...)
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...
Rob
(Another "the decision is hard because the stakes are so small" thing, I
know...)
More information about the Toybox
mailing list