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

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


On Sun, Dec 14, 2008 at 05:53:42PM -0500, Jack Howarth wrote:
> On Sun, Dec 14, 2008 at 04:54:25PM -0500, Jack Howarth wrote:
> > The revised patch avoids the use of the ![] match construct in xfailing
> > targets for the 21_strings/basic_string/element_access/wchar_t/21674.cc,
> > 21_strings/basic_string/element_access/char/21674.cc and
> > 22_locale/ctype/is/char/2.cc testcases. Tested on i686-apple-darwin9.
> > Okay for gcc trunk?
> >            Jack
> > ps The target keyword can't be explicitly used with dg-xfail-run-if as it is 
> > assumed to be present for the target field.
> > 
> > 2008-12-14  Jack Howarth  <howarth@bromo.med.uc.edu>
> > 
> > 	* testsuite/21_strings/basic_string/element_access/wchar_t/21674.cc: Use
> > 	dg-xfail-run-if to not xfail on darwin.
> > 	* libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/21674.cc: Same.
> > 	* libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc: Switch to dg-xfail-run-if.
> > 
> > 
> > Index: libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/21674.cc
> > ===================================================================
> > --- libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/21674.cc	(revision 142752)
> > +++ libstdc++-v3/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: libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/21674.cc
> > ===================================================================
> > --- libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/21674.cc	(revision 142752)
> > +++ libstdc++-v3/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: libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc
> > ===================================================================
> > --- libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc	(revision 142752)
> > +++ libstdc++-v3/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
> 
> On reflection, I don't think we want to use dg-xfail-run-if. This is because it
> will convert the 22_locale/ctype/is/char/2.cc testcase to UNSUPPORTED on targets
> that aren't linux. Perhaps we can use a form like...
> 
> // { dg-do run { xfail ! { *-*-linux* } } }
> 
> ...which will allow it to always run by restrict the
> xfails.
>                    Jack

The construct...

 // { dg-do run { xfail ! { *-*-linux* } } }

produces the error...

ERROR: 21_strings/basic_string/element_access/char/21674.cc: syntax error in target selector "xfail ! { *-*-darwin* }" for " dg-do 3 run { xfail ! { *-*-darwin* } } "

I think for its purposed using the orginal syntax of...

// { dg-do run { xfail *-*-![linux]* } }

is the only way to both run the test on all targets but xfail them
on certain ones.
              Jack



More information about the Gcc-patches mailing list