On 02/11/18 09:54, Christophe Lyon wrote:
> Hi,
>
> I've noticed failure on targets using newlib (aarch64-elf and arm-eabi):
> FAIL: gcc.c-torture/execute/printf-2.c
> FAIL: gcc.c-torture/execute/user-printf.c
>
> my gcc.log contains:
> gcc.c-torture/execute/user-printf.c   -O0  execution test (reason: TCL
> LOOKUP CHANNEL exp5)
> which is not very helpful
>

@Christophe
Can I ask if your DejaGNU board setup has "needs_status_wrapper 1" for 
both of these boards?

I believe this problem is caused by an interaction with the DejaGNU 
status wrapper.

When the status wrapper is needed, DejaGNU looks at stdout for a line 
saying "*** EXIT code <number>" indicating what the status code was.
When it doesn't find that line it assumes an exit code of 2.
Without the status wrapper DejaGNU takes the return code from the 
program executed.

Because these tests use "freopen ()" on stdout, the status wrapper fails 
to print to the IO channel DejaGNU is listening on, hence DejaGNU fails 
to find it's line, uses an exit code of 2, and fails the test.


@Martin
Would these tests still be valid having run freopen on stderr and using 
fprintf instead of printf?
That makes the testcases pass for me.

If not we could add an
    { dg-require-effective-target unwrapped }
directive in the testcases to stop the failure complaints.

Reply via email to