This is the mail archive of the mailing list for the GDB 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]

Fix manythreads.exp for solaris.

A few months ago I had noticed manythreads.exp was being skipped on
solaris, because PTHREAD_STACK_MIN isn't defined there, hence the
test wasn't compiling.  I'm finally applying this tiny patch I had
here that fixes it.  Confirmed that the test still passes cleanly on linux.

Pedro Alves

2009-06-07  Pedro Alves  <>

	* gdb.threads/manythreads.c (main): Check if PTHREAD_STACK_MIN is
	defined before referencing it.

The test has one failure on solaris, related to

FAIL: gdb.threads/manythreads.exp: info threads

                === gdb Summary ===

# of expected passes            9
# of unexpected failures        1

(and for the curious, the sleep(1) call in procfs.c:open_with_retry
was what I was trying to get rid of --- it makes the experience of
debugging applications with lots of threads really bad).

 gdb/testsuite/gdb.threads/manythreads.c |    3 +++
 1 file changed, 3 insertions(+)

Index: src/gdb/testsuite/gdb.threads/manythreads.c
--- src.orig/gdb/testsuite/gdb.threads/manythreads.c	2009-01-05 17:16:56.000000000 +0000
+++ src/gdb/testsuite/gdb.threads/manythreads.c	2009-06-07 20:38:20.000000000 +0100
@@ -42,7 +42,10 @@ main (int argc, char **argv)
   int i, j;
   pthread_attr_init (&attr);
   pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);
   /* Create a ton of quick-executing threads, then wait for them to
      complete.  */

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