Commit fe5d1296 by Matthew Malcomson Committed by Matthew Malcomson

When running the testsuite on boards that can't report an error status DejaGNU...

When running the testsuite on boards that can't report an error status
DejaGNU uses a special wrapper to print the exit code on stdout and
parses stdout to find whether an execution failed or passed.

In testcases that use "freopen (..., ..., stdout)" this special line is
printed to the alternate location described in the freopen call and
DejaGNU can't find the error code.

This results in DejaGNU using a default return status of 2 and the test
failing.

This patch skips the two testcases that use freopen on stdout when
testing a board that requires this wrapper.


Testing done by running these two tests on arm-none-eabi cross build and
observing that they are unsupported.

gcc/testsuite/ChangeLog:

2018-11-16  Matthew Malcomson  <matthew.malcomson@arm.com>

	* gcc.c-torture/execute/printf-2.c: Skip on wrapped boards.
	* gcc.c-torture/execute/user-printf.c: Likewise.

From-SVN: r266214
parent 4359b631
2018-11-16 Matthew Malcomson <matthew.malcomson@arm.com>
* gcc.c-torture/execute/printf-2.c: Skip on wrapped boards.
* gcc.c-torture/execute/user-printf.c: Likewise.
2018-11-16 Nathan Sidwell <nathan@acm.org> 2018-11-16 Nathan Sidwell <nathan@acm.org>
PR c++/87269 PR c++/87269
......
/* Verify that calls to printf don't get eliminated even if their /* Verify that calls to printf don't get eliminated even if their
result on success can be computed at compile time (they can fail). result on success can be computed at compile time (they can fail).
The calls can still be transformed into those of other functions. The calls can still be transformed into those of other functions.
{ dg-require-effective-target unwrapped }
{ dg-skip-if "requires io" { freestanding } } */ { dg-skip-if "requires io" { freestanding } } */
#include <stdio.h> #include <stdio.h>
......
/* Verify that calls to a function declared wiith attribute format (printf) /* Verify that calls to a function declared wiith attribute format (printf)
don't get eliminated even if their result on success can be computed at don't get eliminated even if their result on success can be computed at
compile time (they can fail). compile time (they can fail).
{ dg-require-effective-target unwrapped }
{ dg-skip-if "requires io" { freestanding } } */ { dg-skip-if "requires io" { freestanding } } */
#include <stdarg.h> #include <stdarg.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment