* [PATCH] FAIL: gcc.dg/torture/ftrapv-1.c -O0 (test for excess errors) on bare-metal targets
@ 2014-08-05 9:48 Kyrill Tkachov
2014-08-05 9:51 ` Richard Biener
0 siblings, 1 reply; 2+ messages in thread
From: Kyrill Tkachov @ 2014-08-05 9:48 UTC (permalink / raw)
To: GCC Patches; +Cc: 'Richard Biener'
[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]
Hi all,
The recently added -ftrapv test FAILS on bare metal targets because it
requires the usage of fork.
It does have a dg-require-fork guard but apparently that function takes
an unused argument and if you don't give it that, DejaGNU will happily
ignore the directive and not bother checking for the presence of fork :S
The other places where I see dg-require-fork being used is in the
libstdc++ testsuite. Perhaps it's worth just removing the argument from
the definition of dg-require-fork in target-supports-dg.exp, but there
is a whole host of functions that take an argument and then don't use it
(dg-require-mkfifo is one, for example) so it seems like it would be an
out-of-place change unless we do a big sweep across the testsuite
library to clean that stuff up. This patch just fixes the
dg-requires-fork invocation in gcc.dg/torture/ftrapv-1.c.
Richard (and testsuite maintainers), is this ok? or would you prefer to
remove the unused arguments for the dg-requires-* functions in
testsuite/lib/ ?
With this patch the test now appears as UNSUPPORTED on bare metal
aarch64 and arm targets (that I've tested).
Thanks,
Kyrill
2014-08-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* gcc.dg/torture/ftrapv-1.c: Correct usage of dg-require-fork.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: dg-require-fork.patch --]
[-- Type: text/x-patch; name=dg-require-fork.patch, Size: 636 bytes --]
commit f7e9661501f3ceb2221c78569ce6bf6e1140f040
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date: Mon Aug 4 15:38:40 2014 +0100
[test] Fix dg-require-fork usage
diff --git a/gcc/testsuite/gcc.dg/torture/ftrapv-1.c b/gcc/testsuite/gcc.dg/torture/ftrapv-1.c
index 4fdccd8..c74535f 100644
--- a/gcc/testsuite/gcc.dg/torture/ftrapv-1.c
+++ b/gcc/testsuite/gcc.dg/torture/ftrapv-1.c
@@ -1,7 +1,7 @@
/* { dg-do run } */
/* { dg-additional-options "-ftrapv" } */
/* { dg-require-effective-target trapping } */
-/* { dg-require-fork } */
+/* { dg-require-fork "" } */
#include <stdlib.h>
#include <unistd.h>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] FAIL: gcc.dg/torture/ftrapv-1.c -O0 (test for excess errors) on bare-metal targets
2014-08-05 9:48 [PATCH] FAIL: gcc.dg/torture/ftrapv-1.c -O0 (test for excess errors) on bare-metal targets Kyrill Tkachov
@ 2014-08-05 9:51 ` Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2014-08-05 9:51 UTC (permalink / raw)
To: Kyrill Tkachov; +Cc: GCC Patches
On Tue, Aug 5, 2014 at 11:47 AM, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:
> Hi all,
>
> The recently added -ftrapv test FAILS on bare metal targets because it
> requires the usage of fork.
> It does have a dg-require-fork guard but apparently that function takes an
> unused argument and if you don't give it that, DejaGNU will happily ignore
> the directive and not bother checking for the presence of fork :S
>
> The other places where I see dg-require-fork being used is in the libstdc++
> testsuite. Perhaps it's worth just removing the argument from the definition
> of dg-require-fork in target-supports-dg.exp, but there is a whole host of
> functions that take an argument and then don't use it (dg-require-mkfifo is
> one, for example) so it seems like it would be an out-of-place change unless
> we do a big sweep across the testsuite library to clean that stuff up. This
> patch just fixes the dg-requires-fork invocation in
> gcc.dg/torture/ftrapv-1.c.
>
> Richard (and testsuite maintainers), is this ok? or would you prefer to
> remove the unused arguments for the dg-requires-* functions in
> testsuite/lib/ ?
>
> With this patch the test now appears as UNSUPPORTED on bare metal aarch64
> and arm targets (that I've tested).
Eh, I thought I fixed that already... (must have failed to commit).
OK.
Thanks,
Richard.
> Thanks,
> Kyrill
>
> 2014-08-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> * gcc.dg/torture/ftrapv-1.c: Correct usage of dg-require-fork.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-05 9:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-05 9:48 [PATCH] FAIL: gcc.dg/torture/ftrapv-1.c -O0 (test for excess errors) on bare-metal targets Kyrill Tkachov
2014-08-05 9:51 ` Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).