This is the mail archive of the gdb-patches@sources.redhat.com 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]

[PING/rfa/testsuite/threads] manythreads.exp: synchronous wait


It's been a week.  Time to ping!

This patch fixes PR gdb/1636.  manythreads.exp has some asynchronous
background code chunks to implement its sleeps.  If the test script
finishes before the asynchronous blocks fire, then the asynchronous
blocks execute during the *next* test script, print-threads.exp,
and bollixes it.

This patch just makes the sleeping synchronous.  Alternatively,
I could keep the sleeps asynchronous and add cancellation code
at the end of the test script.  This way is simpler and Daniel J
prefers it.

The subtle point here is the difference between:

  after 1000 { send_gdb "\003" }	// asynchronous
  
  after 1000				// synchronous
  send_gdb "\003"

I haven't re-tested this since the first submission.  At that time,
I tested on native i686-pc-linux-gnu, red hat 8.0 group of 12 test
runs before and after.

Okay to commit?

Michael C

2004-05-07  Michael Chastain  <mec.gnu@mindspring.com>

	Fix PR gdb/1636.
	* gdb.threads/manythreads.exp: Change asynchronous 'after'
	calls to synchronous.

Index: gdb.threads/manythreads.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/manythreads.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 manythreads.exp
*** gdb.threads/manythreads.exp	22 Apr 2004 22:19:40 -0000	1.1
--- gdb.threads/manythreads.exp	7 May 2004 12:41:39 -0000
*************** gdb_test_multiple "continue" "first cont
*** 60,66 ****
  }
  
  # Send a Ctrl-C and verify that we can do info threads and continue
! after 1000 {send_gdb "\003"}
  set message "stop threads 1"
  gdb_test_multiple "" "stop threads 1" {
    -re "\\\[New \[^\]\]*\\\]\r\n" {
--- 60,67 ----
  }
  
  # Send a Ctrl-C and verify that we can do info threads and continue
! after 1000
! send_gdb "\003"
  set message "stop threads 1"
  gdb_test_multiple "" "stop threads 1" {
    -re "\\\[New \[^\]\]*\\\]\r\n" {
*************** gdb_test_multiple "continue" "second con
*** 93,99 ****
  }
  
  # Send another Ctrl-C and verify that we can do info threads and quit
! after 1000 {send_gdb "\003"}
  set message "stop threads 2"
  gdb_test_multiple "" "stop threads 2" {
    -re "\\\[New \[^\]\]*\\\]\r\n" {
--- 94,101 ----
  }
  
  # Send another Ctrl-C and verify that we can do info threads and quit
! after 1000
! send_gdb "\003"
  set message "stop threads 2"
  gdb_test_multiple "" "stop threads 2" {
    -re "\\\[New \[^\]\]*\\\]\r\n" {


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