[PATCH]: Don't XFAIL 21674.cc on darwin

Jack Howarth howarth@bromo.med.uc.edu
Sun Dec 14 21:37:00 GMT 2008


On Sun, Dec 14, 2008 at 04:07:16PM -0500, Jack Howarth wrote:
> On Sun, Dec 14, 2008 at 09:11:44PM +0100, Paolo Bonzini wrote:
> > 
> > > Paolo,
> > >    I haven't found any examples which show that xfail can be used in
> > > combination with target? Are you sure that combination is valid? I think
> > > we shouldn't avoid running this test on darwin since it does pass and would
> > > check that the behvaior isn't regressed in some later darwin libc.
> > 
> > grep dg-xfail-if.
> > 
> > Paolo
> 
> How about...
> 
> Index: testsuite/21_strings/basic_string/element_access/wchar_t/21674.cc
> ===================================================================
> --- testsuite/21_strings/basic_string/element_access/wchar_t/21674.cc	(revision 142752)
> +++ testsuite/21_strings/basic_string/element_access/wchar_t/21674.cc	(working copy)
> @@ -1,6 +1,6 @@
>  // { dg-require-debug-mode "" }
>  // { dg-options "-O0 -D_GLIBCXX_DEBUG" }
> -// { dg-do run { xfail *-*-* } }
> +// { dg-xfail-run-if "PR21674" { target { ! { *-*-darwin* } } } { "*" }  { "" } } 
>  
>  // Copyright (C) 2005 Free Software Foundation, Inc.
>  //
> Index: testsuite/21_strings/basic_string/element_access/char/21674.cc
> ===================================================================
> --- testsuite/21_strings/basic_string/element_access/char/21674.cc	(revision 142752)
> +++ testsuite/21_strings/basic_string/element_access/char/21674.cc	(working copy)
> @@ -1,6 +1,6 @@
>  // { dg-require-debug-mode "" }
>  // { dg-options "-O0 -D_GLIBCXX_DEBUG" }
> -// { dg-do run { xfail *-*-* } }
> +// { dg-xfail-run-if "PR21674" { target { ! { *-*-darwin* } } } { "*" }  { "" } } 
>  
>  // Copyright (C) 2005 Free Software Foundation, Inc.
>  //
> Index: testsuite/22_locale/ctype/is/char/2.cc
> ===================================================================
> --- testsuite/22_locale/ctype/is/char/2.cc	(revision 142752)
> +++ testsuite/22_locale/ctype/is/char/2.cc	(working copy)
> @@ -1,4 +1,4 @@
> -// { dg-do run { xfail *-*-![linux]* } }
> +// { dg-xfail-run-if "" { target { ! { *-*-linux* } } } { "*" }  { "" } } 
>  // { dg-require-namedlocale "" }
>  
>  // Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
> 
>                     Jack

This generates the error on target target, however if I change it to...

Index: testsuite/21_strings/basic_string/element_access/wchar_t/21674.cc
===================================================================
--- testsuite/21_strings/basic_string/element_access/wchar_t/21674.cc	(revision 142752)
+++ testsuite/21_strings/basic_string/element_access/wchar_t/21674.cc	(working copy)
@@ -1,6 +1,6 @@
 // { dg-require-debug-mode "" }
 // { dg-options "-O0 -D_GLIBCXX_DEBUG" }
-// { dg-do run { xfail *-*-* } }
+// { dg-xfail-run-if "PR21674" { ! { *-*-darwin* } } { "*" }  { "" } } 
 
 // Copyright (C) 2005 Free Software Foundation, Inc.
 //
Index: testsuite/21_strings/basic_string/element_access/char/21674.cc
===================================================================
--- testsuite/21_strings/basic_string/element_access/char/21674.cc	(revision 142752)
+++ testsuite/21_strings/basic_string/element_access/char/21674.cc	(working copy)
@@ -1,6 +1,6 @@
 // { dg-require-debug-mode "" }
 // { dg-options "-O0 -D_GLIBCXX_DEBUG" }
-// { dg-do run { xfail *-*-* } }
+// { dg-xfail-run-if "PR21674" { ! { *-*-darwin* } } { "*" }  { "" } } 
 
 // Copyright (C) 2005 Free Software Foundation, Inc.
 //
Index: testsuite/22_locale/ctype/is/char/2.cc
===================================================================
--- testsuite/22_locale/ctype/is/char/2.cc	(revision 142752)
+++ testsuite/22_locale/ctype/is/char/2.cc	(working copy)
@@ -1,4 +1,4 @@
-// { dg-do run { xfail *-*-![linux]* } }
+// { dg-xfail-run-if "" { ! { *-*-linux* } } { "*" }  { "" } } 
 // { dg-require-namedlocale "" }
 
 // Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005


This seems to work okay. The two 21674.cc tests are run on darwin
and pass without generating XPASS output in dejagnu while the
2.cc test is not run on darwin and is marked as UNSUPPORTED.
            Jack



More information about the Gcc-patches mailing list