<div dir="ltr"><div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 5, 2025, 19:32 Rob Landley <<a href="mailto:rob@landley.net" target="_blank">rob@landley.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I can't use "toyonly" in tests/test.test because it's a TOYFLAG_NOHELP <br>
command, so "test --version" produces no output, which is how <br>
scripts/runtest.sh is currently checking for toybox.<br>
<br>
My next instinct was to $(basename $(readlink)) and check if that <br>
pointed to "toybox", but "make test_test" is doing scripts/single.sh <br>
test (which would be "make test" except that's intercepted to do <br>
something else, just like "make help" and "make install")... anyway, <br>
it's creating a standalone binary called "test" with no symlink for <br>
readlink to interrogate. So that check fails in the current test suite.<br>
<br>
My THIRD idea was to run "strings" against the binary and see if <br>
anything unique was in there, but having been intentionally parsimonious <br>
in that regard my options for the standalone "test" binary seem to be:<br>
<br>
   need arg @%d<br>
   bad (<br>
   need )<br>
   too many arguments<br>
<br>
I think. There's a bunch of dynamic glibc nonsense, so I thought "I'll <br>
do a static NDK build, that's likely to be less noisy", and... um...<br>
<br>
$ strings generated/testdir/test | wc<br>
    3539    5144   33361<br>
<br>
What IS "Scudo" anyway? (Not that static musl is much better...)<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">(android's secure allocator: <a href="https://source.android.com/docs/security/test/scudo">https://source.android.com/docs/security/test/scudo</a>)</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I'm open to suggestions. I can force the test suite to create a symlink <br>
(although for the standalone commands without a multiplexer that's a bit <br>
awkward), but the reason this is NOT just checking TEST_HOST=1 is the <br>
host could be toybox (mkroot!) and I want it to work there too, and <br>
"installing a bunch of hardlinks" was a popular option back in the <br>
busybox world...<br>
<br>
Rob<br>
<br>
(Another "the decision is hard because the stakes are so small" thing, I <br>
know...)<br>
_______________________________________________<br>
Toybox mailing list<br>
<a href="mailto:Toybox@lists.landley.net" rel="noreferrer" target="_blank">Toybox@lists.landley.net</a><br>
<a href="http://lists.landley.net/listinfo.cgi/toybox-landley.net" rel="noreferrer noreferrer" target="_blank">http://lists.landley.net/listinfo.cgi/toybox-landley.net</a><br>
</blockquote></div></div></div>
</div>