This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Mon, 2008-12-15 at 18:37 -0500, Jack Howarth wrote:
> 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,
>     If I move the 'dg-do run' to the top for all three tests, I find that the
> 21674.cc seem to behavior properly (ie are compiled and executed but not xfail'd)
> however the 2.cc has a problem with this. I see the same thing I saw the last time
> I tried having 'dg-do run' above 'dg-require-namedlocale ""'...
> 
> Executing on host: /sw/src/fink.build/gcc44-4.3.999-20081213/darwin_objdir/./gcc/g++ -shared-libgcc -B/sw/src/fink.build/gcc44-4.3.999-20081213/darwin_objdir/./gcc -nost
> dinc++ -L/sw/src/fink.build/gcc44-4.3.999-20081213/darwin_objdir/i686-apple-darwin9/libstdc++-v3/src -L/sw/src/fink.build/gcc44-4.3.999-20081213/darwin_objdir/i686-apple
> -darwin9/libstdc++-v3/src/.libs -B/sw/lib/gcc4.4/i686-apple-darwin9/bin/ -B/sw/lib/gcc4.4/i686-apple-darwin9/lib/ -isystem /sw/lib/gcc4.4/i686-apple-darwin9/include -isy
> stem /sw/lib/gcc4.4/i686-apple-darwin9/sys-include -g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0 -ffunction-sections -fdata-sections -g -O2 -g -O2   -DLOCALEDIR="." -nostd
> inc++ -I/sw/src/fink.build/gcc44-4.3.999-20081213/darwin_objdir/i686-apple-darwin9/libstdc++-v3/include/i686-apple-darwin9 -I/sw/src/fink.build/gcc44-4.3.999-20081213/da
> rwin_objdir/i686-apple-darwin9/libstdc++-v3/include -I/sw/src/fink.build/gcc44-4.3.999-20081213/gcc-4.4-20081213/libstdc++-v3/libsupc++ -I/sw/src/fink.build/gcc44-4.3.99
> 9-20081213/gcc-4.4-20081213/libstdc++-v3/include/backward -I/sw/src/fink.build/gcc44-4.3.999-20081213/gcc-4.4-20081213/libstdc++-v3/testsuite/util -L/sw/lib -liconv /sw/
> src/fink.build/gcc44-4.3.999-20081213/gcc-4.4-20081213/libstdc++-v3/testsuite/22_locale/ctype/is/char/1.cc    -include bits/stdc++.h ./libtestc++.a  -lm   -m32 -o ./1.ex
> e    (timeout = 600)
> PASS: 22_locale/ctype/is/char/1.cc (test for excess errors)
> Setting LD_LIBRARY_PATH to :/sw/src/fink.build/gcc44-4.3.999-20081213/darwin_objdir/gcc:/sw/src/fink.build/gcc44-4.3.999-20081213/darwin_objdir/i686-apple-darwin9/./libs
> tdc++-v3/src/.libs::/sw/src/fink.build/gcc44-4.3.999-20081213/darwin_objdir/gcc:/sw/src/fink.build/gcc44-4.3.999-20081213/darwin_objdir/i686-apple-darwin9/./libstdc++-v3
> /src/.libs:/usr/local/NMRPipe/xview/mac/lib:/usr/openwin/lib:/usr/local/NMRPipe/nmrbin.mac/lib:/usr/local/lib
> PASS: 22_locale/ctype/is/char/1.cc execution test
> UNSUPPORTED: 22_locale/ctype/is/char/2.cc
> extra_tool_flags are:
>   -include bits/stdc++.h
> Executing on host: /sw/src/fink.build/gcc44-4.3.999-20081213/darwin_objdir/./gcc/g++ -shared-libgcc -B/sw/src/fink.build/gcc44-4.3.999-20081213/darwin_objdir/./gcc -nost
> dinc++ -L/sw/src/fink.build/gcc44-4.3.999-20081213/darwin_objdir/i686-apple-darwin9/libstdc++-v3/src -L/sw/src/fink.build/gcc44-4.3.999-20081213/darwin_objdir/i686-apple
> -darwin9/libstdc++-v3/src/.libs -B/sw/lib/gcc4.4/i686-apple-darwin9/bin/ -B/sw/lib/gcc4.4/i686-apple-darwin9/lib/ -isystem /sw/lib/gcc4.4/i686-apple-darwin9/include -isy
> stem /sw/lib/gcc4.4/i686-apple-darwin9/sys-include -g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0 -ffunction-sections -fdata-sections -g -O2 -g -O2   -DLOCALEDIR="." -nostd
> inc++ -I/sw/src/fink.build/gcc44-4.3.999-20081213/darwin_objdir/i686-apple-darwin9/libstdc++-v3/include/i686-apple-darwin9 -I/sw/src/fink.build/gcc44-4.3.999-20081213/da
> rwin_objdir/i686-apple-darwin9/libstdc++-v3/include -I/sw/src/fink.build/gcc44-4.3.999-20081213/gcc-4.4-20081213/libstdc++-v3/libsupc++ -I/sw/src/fink.build/gcc44-4.3.99
> 9-20081213/gcc-4.4-20081213/libstdc++-v3/include/backward -I/sw/src/fink.build/gcc44-4.3.999-20081213/gcc-4.4-20081213/libstdc++-v3/testsuite/util -L/sw/lib -liconv /sw/
> src/fink.build/gcc44-4.3.999-20081213/gcc-4.4-20081213/libstdc++-v3/testsuite/22_locale/ctype/is/char/3.cc    -include bits/stdc++.h ./libtestc++.a  -lm   -m32 -o ./3.ex
> e    (timeout = 600)
> PASS: 22_locale/ctype/is/char/3.cc (test for excess errors)
> 
> The 2.cc becomes unsupported. If I have the 'dg-require-namedlocale ""' above the 'dg-do run', the test is compiled and executed rather
> than being marked as UNSUPPORTED. Should this test be unsupported on non-linux targets?

If you add "--verbose --verbose" to RUNTESTFLAGS you can see messages
from check_v3_target_namedlocale in the log file telling you if the
check passes or not.  It looks like it depends on whether locales are
installed on the test system, not on the operating system.

dg-do comes from DejaGnu and doesn't know that anything else might be
changing the flags on whether to run or skip a test, so it overwrites
a flag that might have been set by dg-require-*; same with the XFAIL
flag that might have been set by dg-xfail-run-if.  That's why dg-do
must come before any of the test directives that are defined in GCC's
testsuite.

Janis

Janis 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]