[Toybox] avoiding testing shell builtins

Rob Landley rob at landley.net
Wed Jun 26 16:43:36 PDT 2019


On 6/26/19 3:42 PM, enh wrote:
> your patch doesn't fix this for me. even with testcmd i'm still seeing
> the mksh builtin kill get run rather than the toybox kill...

With TEST_HOST it tests just the command name, however the shell decides to
resolve that. Without that it tests the path to the toybox command.

Instead you want the TEST_HOST version also to not test the shell builtin? (Some
host systems don't have non-builtin versions of things like "echo". It's a
design question of what counts as the "host version"...)

Rob


> On Sat, Jun 22, 2019 at 7:35 PM Rob Landley <rob at landley.net> wrote:
>>
>> On 6/22/19 11:26 AM, enh via Toybox wrote:
>>> i realized today that the kill tests are testing the shell's builtin
>>> kill, not the toybox kill. one solution would be to use env, but
>>> presumably that would be better in the infrastructure rather than
>>> having to remember to do it in each test that might be subverted by a
>>> builtin?
>>
>> This is why I added testcmd and $C a while back. (Although currently it won't
>> work if the path to the testing directory has a space in it, because I hadn't
>> quoted $C. Just fixed that...)
>>
>> Rob
> 



More information about the Toybox mailing list