[Toybox] Toybox test image / fuzzing

Samuel Holland samuel at sholland.org
Sun Mar 13 12:13:29 PDT 2016


On 03/13/2016 01:18 PM, Rob Landley wrote:
> On 03/13/2016 03:34 AM, Andy Chu wrote:
>> FWIW I think the test harness is missing a few concepts:
>>
>> - exit code
>
> blah; echo $?
>
>> - stderr
>
> 2>&1

I think the idea here was the importance of differentiating between
stdout and stderr, and between text output and return code. This is as
simple as having a separate output variable for each type of output.

Granted, it will usually be unambiguous as to the correctness of the
program, but having the return code in the output string can be
confusing to the human looking at the test case. Plus, why would you not
want to verify the exit code for every test? It's a lot of duplication
to write "echo $?" in all of the test cases.

As for stdout/stderr, it helps make sure diagnostic messages are going
to the right stream when not using the helper functions.

--
Regards,
Samuel Holland <samuel at sholland.org>

 1457896409.0


More information about the Toybox mailing list