public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [testsuite] fix testsuite/41659, target or xfail with dg-lto-do
@ 2009-10-12 17:32 Janis Johnson
  2009-10-12 20:03 ` Richard Guenther
  0 siblings, 1 reply; 3+ messages in thread
From: Janis Johnson @ 2009-10-12 17:32 UTC (permalink / raw)
  To: gcc-patches

The test directive dg-lto-do does not support target and xfail causes
and ignores them.  That behavior is documented in the section on LTO
testing in the GCC internals manual, but there was no warning or error
about it.  This patch fixes a test that tries to skip a test with a
"target" clause and reports an error for using "target" or "xfail" with
that directive.

Tested on powerpc64-linux by running lto.exp for c,c++,fortran, checked
in on trunk.

2009-10-12  Janis Johnson  <janis187@us.ibm.com>

	PR testsuite/41659
	* gcc.dg/lto/20090914-2.c: Use dg-skip-if to skip test.
	* lib/lto.exp (lto-get-options-main): Report error for using "target"
	or "xfail" with dg-lto-dg.

Index: gcc/testsuite/gcc.dg/lto/20090914-2_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20090914-2_0.c	(revision 152593)
+++ gcc/testsuite/gcc.dg/lto/20090914-2_0.c	(working copy)
@@ -1,4 +1,5 @@
-/* { dg-lto-do run { target x86_64-*-* i?86-*-* } } */
+/* { dg-lto-do run */
+/* { dg-skip-if "x86 only" { ! { x86_64-*-* i?86-*-* } } { "*" } { "" } }
 
 /* Doesn't work without this dummy function with -fwhopr.  */
 int foo(void) { }
Index: gcc/testsuite/lib/lto.exp
===================================================================
--- gcc/testsuite/lib/lto.exp	(revision 152593)
+++ gcc/testsuite/lib/lto.exp	(working copy)
@@ -191,6 +191,16 @@ proc lto-get-options-main { src } {
 		   || ![string compare "dg-options" $cmd] } {
 	    warning "lto.exp does not support $cmd in primary source file"
 	} elseif { ![string compare "dg-lto-do" $cmd] } {
+	    if { [llength $op] > 3 } {
+		set kw [lindex [lindex $op 3] 0]
+		if [string match "target" $kw] {
+		    perror "$src: dg-lto-do does not support \"target\""
+		} elseif [string match "xfail" $kw] {
+		    perror "$src: dg-lto-do does not support \"xfail\""
+		} else {
+		    perror "$src: dg-lto-do takes a single argument"
+		}
+	    }
 	    set dgdo [lindex $op 2]
 	    verbose "dg-lto-do command for \"$op\" is $dgdo"
 	    if { ![string compare "assemble" $dgdo] } {


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [testsuite] fix testsuite/41659, target or xfail with dg-lto-do
  2009-10-12 17:32 [testsuite] fix testsuite/41659, target or xfail with dg-lto-do Janis Johnson
@ 2009-10-12 20:03 ` Richard Guenther
  2009-10-12 20:20   ` Janis Johnson
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Guenther @ 2009-10-12 20:03 UTC (permalink / raw)
  To: janis187; +Cc: gcc-patches

On Mon, Oct 12, 2009 at 7:19 PM, Janis Johnson <janis187@us.ibm.com> wrote:
> The test directive dg-lto-do does not support target and xfail causes
> and ignores them.  That behavior is documented in the section on LTO
> testing in the GCC internals manual, but there was no warning or error
> about it.  This patch fixes a test that tries to skip a test with a
> "target" clause and reports an error for using "target" or "xfail" with
> that directive.
>
> Tested on powerpc64-linux by running lto.exp for c,c++,fortran, checked
> in on trunk.
>
> 2009-10-12  Janis Johnson  <janis187@us.ibm.com>
>
>        PR testsuite/41659
>        * gcc.dg/lto/20090914-2.c: Use dg-skip-if to skip test.
>        * lib/lto.exp (lto-get-options-main): Report error for using "target"
>        or "xfail" with dg-lto-dg.
>
> Index: gcc/testsuite/gcc.dg/lto/20090914-2_0.c
> ===================================================================
> --- gcc/testsuite/gcc.dg/lto/20090914-2_0.c     (revision 152593)
> +++ gcc/testsuite/gcc.dg/lto/20090914-2_0.c     (working copy)
> @@ -1,4 +1,5 @@
> -/* { dg-lto-do run { target x86_64-*-* i?86-*-* } } */
> +/* { dg-lto-do run */

Hmm, I miss a } here and

> +/* { dg-skip-if "x86 only" { ! { x86_64-*-* i?86-*-* } } { "*" } { "" } }

a */ here.

But maybe you noticed and checked in sth different.

Thanks btw for fixing this.

Richard.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [testsuite] fix testsuite/41659, target or xfail with dg-lto-do
  2009-10-12 20:03 ` Richard Guenther
@ 2009-10-12 20:20   ` Janis Johnson
  0 siblings, 0 replies; 3+ messages in thread
From: Janis Johnson @ 2009-10-12 20:20 UTC (permalink / raw)
  To: Richard Guenther; +Cc: gcc-patches

On Mon, 2009-10-12 at 22:02 +0200, Richard Guenther wrote:
> On Mon, Oct 12, 2009 at 7:19 PM, Janis Johnson <janis187@us.ibm.com> wrote:
> > The test directive dg-lto-do does not support target and xfail causes
> > and ignores them.  That behavior is documented in the section on LTO
> > testing in the GCC internals manual, but there was no warning or error
> > about it.  This patch fixes a test that tries to skip a test with a
> > "target" clause and reports an error for using "target" or "xfail" with
> > that directive.
> >
> > Tested on powerpc64-linux by running lto.exp for c,c++,fortran, checked
> > in on trunk.
> >
> > 2009-10-12  Janis Johnson  <janis187@us.ibm.com>
> >
> >        PR testsuite/41659
> >        * gcc.dg/lto/20090914-2.c: Use dg-skip-if to skip test.
> >        * lib/lto.exp (lto-get-options-main): Report error for using "target"
> >        or "xfail" with dg-lto-dg.
> >
> > Index: gcc/testsuite/gcc.dg/lto/20090914-2_0.c
> > ===================================================================
> > --- gcc/testsuite/gcc.dg/lto/20090914-2_0.c     (revision 152593)
> > +++ gcc/testsuite/gcc.dg/lto/20090914-2_0.c     (working copy)
> > @@ -1,4 +1,5 @@
> > -/* { dg-lto-do run { target x86_64-*-* i?86-*-* } } */
> > +/* { dg-lto-do run */
> 
> Hmm, I miss a } here and
> 
> > +/* { dg-skip-if "x86 only" { ! { x86_64-*-* i?86-*-* } } { "*" } { "" } }
> 
> a */ here.
> 
> But maybe you noticed and checked in sth different.
> 
> Thanks btw for fixing this.

Oops, I hadn't noticed those.  They're fixed now.

Janis

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-10-12 20:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-12 17:32 [testsuite] fix testsuite/41659, target or xfail with dg-lto-do Janis Johnson
2009-10-12 20:03 ` Richard Guenther
2009-10-12 20:20   ` Janis Johnson

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).