From: Matthew Malcomson Date: Fri, 16 Nov 2018 16:26:44 +0000 (+0000) Subject: When running the testsuite on boards that can't report an error status DejaGNU... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fe5d12969fba426ff15afad597a3668bb18804ea;p=gcc.git 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 * gcc.c-torture/execute/printf-2.c: Skip on wrapped boards. * gcc.c-torture/execute/user-printf.c: Likewise. From-SVN: r266214 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b1b6ae4bc87..a00506d533d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-11-16 Matthew Malcomson + + * gcc.c-torture/execute/printf-2.c: Skip on wrapped boards. + * gcc.c-torture/execute/user-printf.c: Likewise. + 2018-11-16 Nathan Sidwell PR c++/87269 diff --git a/gcc/testsuite/gcc.c-torture/execute/printf-2.c b/gcc/testsuite/gcc.c-torture/execute/printf-2.c index 50741101bbd..2e9f2a2bb75 100644 --- a/gcc/testsuite/gcc.c-torture/execute/printf-2.c +++ b/gcc/testsuite/gcc.c-torture/execute/printf-2.c @@ -1,6 +1,7 @@ /* Verify that calls to printf don't get eliminated even if their result on success can be computed at compile time (they can fail). The calls can still be transformed into those of other functions. + { dg-require-effective-target unwrapped } { dg-skip-if "requires io" { freestanding } } */ #include diff --git a/gcc/testsuite/gcc.c-torture/execute/user-printf.c b/gcc/testsuite/gcc.c-torture/execute/user-printf.c index e5784ed8e96..11c61fa3949 100644 --- a/gcc/testsuite/gcc.c-torture/execute/user-printf.c +++ b/gcc/testsuite/gcc.c-torture/execute/user-printf.c @@ -1,6 +1,7 @@ /* 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 compile time (they can fail). + { dg-require-effective-target unwrapped } { dg-skip-if "requires io" { freestanding } } */ #include