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

Jack Howarth howarth@bromo.med.uc.edu
Mon Dec 15 19:56:00 GMT 2008


On Mon, Dec 15, 2008 at 11:23:01AM -0800, Janis Johnson wrote:
> On Sun, 2008-12-14 at 20:55 -0500, Jack Howarth wrote:
> > The following patch implements a xfail on darwin for 21_strings/basic_string/element_access/wchar_t/21674.cc
> > and 21_strings/basic_string/element_access/char/21674.cc and corrects the xfail on linux for
> > 22_locale/ctype/is/char/2.cc by using a combination of 'dg-do run' and 'dg-xfail-run-if' so
> > that the tests are always run but only not xfailed on the specified targets. Tested on
> > i686-apple-darwin9. Okay for gcc trunk?
> >                         Jack
> > 2008-12-14  Jack Howarth  <howarth@bromo.med.uc.edu>
> > 
> > 	* testsuite/21_strings/basic_string/element_access/wchar_t/21674.cc: Use dg-do run
> > 	and dg-xfail-run-if to run on all targets but 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 use dg-fo run and
> > 	dg-xfail-run-if to run on all targets but not xfail on linux. Move dg-require-namedlocale
> > 	to top.
> > 
> > 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 142754)
> > +++ libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/21674.cc	(working copy)
> > @@ -1,6 +1,7 @@
> >  // { dg-require-debug-mode "" }
> >  // { dg-options "-O0 -D_GLIBCXX_DEBUG" }
> > -// { dg-do run { xfail *-*-* } }
> > +// { dg-do run }
> > +// { dg-xfail-run-if "" { ! { *-*-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 142754)
> > +++ libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/21674.cc	(working copy)
> > @@ -1,6 +1,7 @@
> >  // { dg-require-debug-mode "" }
> >  // { dg-options "-O0 -D_GLIBCXX_DEBUG" }
> > -// { dg-do run { xfail *-*-* } }
> > +// { dg-do run }
> > +// { dg-xfail-run-if "" { ! { *-*-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 142754)
> > +++ libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc	(working copy)
> > @@ -1,5 +1,6 @@
> > -// { dg-do run { xfail *-*-![linux]* } }
> >  // { dg-require-namedlocale "" }
> > +// { dg-do run }
> > +// { dg-xfail-run-if "" { ! { *-*-linux* } } { "*" }  { "" } }     
> > 
> >  // Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
> >  // Free Software Foundation, Inc.
> 
> It should work to add { xfail { ! { *-*-linux-* } } } to the dg-do line.
> Does it work if you move dg-do back to the top?  Having it after
> dg-require-* can cause problems.
> 
> Janis

Janis,
   I'll double check when I get home. I may have been confused by an
earlier failure I saw when I accidentally used dg-xfail-if instead of
dg-xfail-run-if (which had the odd effect of causing an XPASS for 3.cc).
The main thing is to make sure that on non-linux platforms, the 2.cc
test is executed and not xfailed as opposed to becoming an UNSUPPORTED
test.
                         Jack



More information about the Gcc-patches mailing list