
LIBSTDC++ v3 TestSuite import to eCos libstdc++ Package
=======================================================

The tests in the publicly available libstdc++ v3 TestSuite are oriented to
running in a test system called DejaGnu.  DejaGnu searches for special
comments in source files that are being used for testing ("testcases") and
parses these comments to work out what to do with the testcase, and what
results are expected.  So the testcase itself describes what it ought to do
and how to treat it.

eCosCentric's automated testing differs from DejaGnu, not least because of
the highly configurable nature of eCos.  It doesn't understand the
DejaGnu-style instructions in the imported testcases from libstdc++ v3.
eCos-style testing compiles, links and executes every testcase it
encounters.  Therefore those testcases from libstdc++ which are not
expected to fully build and execute are omitted from the eCos build.

The TestSuite was imported into the eCos package CYGPKG_LIBSTDCXX "ISO
standard C++", located in the source tree at
	.../packages/language/c++/libstdc++/VERSION
Within that directory, the imported files that do build and run live in
directory tscpp (TestSuite C++).

These special comments which DejaGnu understands are of the form
	// { dg-do compile }
and contain reasonably obvious keywords and properties in the rest of the
line.  Examples are "compile" which means the testcase should compile but
not link because it intentionally generates unresolved external references
in the course of exercising C++ naming, classes templates &c, and "xfail"
which means the test is expected to fail.  Note that "expected to fail"
includes coredump or SEGV or hanging forever, not just reporting a test
failure message - so it's not usually possible to simply change "xfail"
cases into cases which pass with a quick edit of the source.

Here is a list of the omitted testcases with their DejaGnu comments,
justification for omitting the testcase from the eCos build, and brief
comment on what testing was carried out (for example, compilation only)
during the TestSuite import work.



20_util/auto_ptr_neg.cxx:		// { dg-do compile }
23_containers/map_operators_neg.cxx:	// { dg-do compile }
23_containers/set_operators_neg.cxx:	// { dg-do compile }
  These are compile-only tests, omitted.
  "*_neg" tests are supposed to fail.

22_locale/money_put_members_char.cxx
  Expected not to run.
  // XXX This test is not working for non-glibc locale models.
  // { dg-do run { xfail *-*-* } }

22_locale/collate.cxx:			// { dg-do compile }
  Expected to compile, but not to link.  That's what happened, linking
  failed with undefined references. 

22_locale/ctype.cxx:			// { dg-do compile }
  Expected to compile, but not to link.  That's what happened, linking
  failed with undefined references. 

22_locale/messages_byname.cxx:	// { dg-do run { xfail *-*-* } }
22_locale/messages_members_char.cxx:	(ditto)
  Expected to fail at runtime.

22_locale/money_get.cxx:		// { dg-do compile }
22_locale/money_put.cxx:		// { dg-do compile }
22_locale/moneypunct.cxx:		// { dg-do compile }
22_locale/num_get.cxx:			// { dg-do compile }
22_locale/num_put.cxx:			// { dg-do compile }
22_locale/numpunct.cxx:			// { dg-do compile }
22_locale/time_get.cxx:			// { dg-do compile }
22_locale/time_put.cxx:			// { dg-do compile }
22_locale/messages.cxx:			// { dg-do compile }
27_io/filebuf.cxx:			// { dg-do compile }
27_io/stringstream.cxx:			// { dg-do compile }
  These all contain { dg-do compile } and indeed they did compile, but fail
  at link time with unresolved references as expected.

22_locale/collate_byname.cxx:// { dg-do run { xfail *-*-* } }
22_locale/collate_members_char.cxx:// { dg-do run { xfail *-*-* } }
22_locale/ctype_is_char.cxx:// { dg-do run { xfail *-*-* } }
22_locale/members.cxx:// { dg-do run { xfail *-*-* } }
22_locale/money_get_members_char.cxx:// { dg-do run { xfail *-*-* } }
22_locale/moneypunct_byname.cxx:// { dg-do run { xfail *-*-* } }
22_locale/moneypunct_members_char.cxx:// { dg-do run { xfail *-*-* } }
22_locale/num_get_members_char.cxx:// { dg-do run { xfail *-*-* } }
22_locale/numpunct_byname.cxx:// { dg-do run { xfail *-*-* } }
22_locale/numpunct_members_char.cxx:// { dg-do run { xfail *-*-* } }
22_locale/num_put_members_char.cxx:// { dg-do run { xfail *-*-* } }
22_locale/time_get_members_char.cxx:// { dg-do run { xfail *-*-* } }
22_locale/time_put_members_char.cxx:// { dg-do run { xfail *-*-* } }
  These are all xfail and all contain a comment:
  // XXX This test is not working for non-glibc locale models.
  They all compile OK but do indeed issue many failures at runtime.

22_locale/codecvt_members_unicode_wchar_t.cxx
22_locale/codecvt_members_wchar_t_char.cxx
22_locale/collate_members_wchar_t.cxx:	// { dg-do run { xfail *-*-* } }
22_locale/ctype_is_wchar_t.cxx:		// { dg-do run { xfail *-*-* } }
22_locale/ctype_members_wchar_t.cxx
22_locale/ctype_narrow_wchar_t.cxx
22_locale/ctype_scan_wchar_t.cxx
22_locale/ctype_to_wchar_t.cxx
22_locale/ctype_widen_wchar_t.cxx
22_locale/money_get_members_wchar_t.cxx:// { dg-do run { xfail *-*-* } }
22_locale/money_put_members_wchar_t.cxx:// { dg-do run { xfail *-*-* } }
22_locale/moneypunct_members_wchar_t.cxx:// { dg-do run { xfail *-*-* } }
22_locale/num_get_members_wchar_t.cxx:	// { dg-do run { xfail *-*-* } }
22_locale/num_put_members_wchar_t.cxx:	// { dg-do run { xfail *-*-* } }
22_locale/numpunct_members_wchar_t.cxx:	// { dg-do run { xfail *-*-* } }
22_locale/time_put_members_wchar_t.cxx:	// { dg-do run { xfail *-*-* } }
22_locale/time_get_members_wchar_t.cxx:	// { dg-do run { xfail *-*-* } }
  These are completely empty unless _GLIBCPP_USE_WCHAR_T, and it isn't
  defined in eCos.  wchar_t itself is supported, but that define in the
  standard actually covers a vast swathe of functionality including a full
  and complete implementation of the C99 and XPG2 wide character
  functions. It's not a good idea to do that in eCos or most embedded
  systems really, and won't be relevant for the foreseeable future.
  Ten of them are also expected to fail at runtime anyway, so that's really
  only 7 tests omitted due to the above.

26_numerics/valarray_name_lookup.cxx:     // { dg-do compile }
  Compile only - expected not to link.

26_numerics/c99_classification_macros_c.cxx
  // { dg-do compile { xfail *-*-linux-gnu *-*-freebsd5* } }
  // { dg-excess-errors "" { target *-*-linux-gnu *-*-freebsd5* } }
  Expected to fail under compilation alone.

27_io/filebuf_virtuals.cxx  
27_io/filebuf_members.cxx  
  These two are predicated on being able to use "fork()" and "sleep()" and
  the like, ie a POSIX-like environment with true processes.

thread/pthread1.cxx
thread/pthread2.cxx
thread/pthread3.cxx
thread/pthread4.cxx
thread/pthread5.cxx
thread/pthread6.cxx
  These all contain the comment
  // { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris*
                          *-*-cygwin *-*-darwin* } }
  Ie. they're only expected to run inder those enviroments, which include
  the pthreads package.  eCos doesn't have pthreads in the default build.

ext/rope.cxx
  Compilation error: `_Atomic_swap' undeclared in namespace `std'
  "Rope" is an SGI extension, which allows concurrent updates using an
  atomic swap routine.  eCos does not provide this, so this case does not
  build.  Note that THIS IS NOT PART OF THE STANDARD.


[the end]
