This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

testsuite/pthread4.cc and linux


The fourth thread test, phtread4.cc, rarely (never?) passes on my
various x86/linux machines.

However, it does pass for others:

alpha/linux pass
http://gcc.gnu.org/ml/gcc-testresults/2003-05/msg00875.html

x86/linux pass
http://gcc.gnu.org/ml/gcc-testresults/2003-05/msg00865.html

ia64/linux pass
http://gcc.gnu.org/ml/gcc-testresults/2003-05/msg00864.html

darwin/powerpc pass
http://gcc.gnu.org/ml/gcc-testresults/2003-05/msg00874.html

irix6.5/mips passes or is disabled
http://gcc.gnu.org/ml/gcc-testresults/2003-05/msg00870.html

Why is this?

Does this have something to do with --enable-threads=posix at configure
time? Usually I don't configure with this, because I didn't think it was
needed. I tried configuring in much the same way as the ia64/x86 tests
that pass, and I still get failures.

Possible solutions to this might include:

1) having linux use the cygwin interation count, 10K. This means that
running the test on a 1.8G linux machine takes a bit over four and a
half minutes. See patch below.

2) upping the timeout time for this test to around 10 minutes. Don't
know how to do this.

Loren?

-benjamin

2003-05-14  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/thread/pthread4.cc: Use smaller iteration count for linux.

Index: testsuite/thread/pthread4.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/thread/pthread4.cc,v
retrieving revision 1.5
diff -c -p -r1.5 pthread4.cc
*** testsuite/thread/pthread4.cc        15 Apr 2003 20:31:57 -0000      1.5
--- testsuite/thread/pthread4.cc        14 May 2003 16:43:54 -0000
*************** using namespace std;
*** 36,42 ****
  static list<string> foo;
  static pthread_mutex_t fooLock = PTHREAD_MUTEX_INITIALIZER;
  static unsigned max_size = 10;
! #if defined(__CYGWIN__)
  static int iters = 10000;
  #else
  static int iters = 300000;
--- 36,42 ----
  static list<string> foo;
  static pthread_mutex_t fooLock = PTHREAD_MUTEX_INITIALIZER;
  static unsigned max_size = 10;
! #if defined(__CYGWIN__) || defined(__linux__)
  static int iters = 10000;
  #else
  static int iters = 300000;


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