Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: [rfa/testsuite/threads] ping: manythreads.exp
@ 2004-06-03 18:28 Michael Elizabeth Chastain
  2004-06-03 19:31 ` Jeff Johnston
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Elizabeth Chastain @ 2004-06-03 18:28 UTC (permalink / raw)
  To: mec.gnu, msnyder; +Cc: gdb-patches, jjohnstn

ms> So... this means it will unconditionally wait, right?
ms> Can I assume that "after 1000" means milliseconds, not seconds?

Yes, and yes.  The "milliseconds" part is in the TCL book so it's
okay to rely on it.

ms> That's my only concern, that if it fails for some reason, it
ms> will block for a long time.  If that's not the case, then the
ms> change is ok with me (if it's ok with Jeff).

Hey Jeff -- is this okay with you?

ms> Michael, I notice that the same idiom is used in pthreads.exp;
ms> do you think your change would also be appropriate there, and
ms> if so, would you mind making it?

I think it would be good there too.  Right now, the code says:

  sleep 1
  set description "Stopped with a ^C"
  after 1000 [send_gdb "\003"]
  gdb_expect {
      ...
  }

so the test script is going into the gdb_expect and pausing there
until the 'after' block executes.  There's no need to be running
the send_gdb "\003" in parallel with gdb_expect.  So I'll make a
patch for this too.  (Also it looks bizarre to use both 'sleep'
and 'after' ... gotta do a little research).

Michael C


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [rfa/testsuite/threads] ping: manythreads.exp
  2004-06-03 18:28 [rfa/testsuite/threads] ping: manythreads.exp Michael Elizabeth Chastain
@ 2004-06-03 19:31 ` Jeff Johnston
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Johnston @ 2004-06-03 19:31 UTC (permalink / raw)
  To: Michael Elizabeth Chastain; +Cc: msnyder, gdb-patches

Michael Elizabeth Chastain wrote:
> ms> So... this means it will unconditionally wait, right?
> ms> Can I assume that "after 1000" means milliseconds, not seconds?
> 
> Yes, and yes.  The "milliseconds" part is in the TCL book so it's
> okay to rely on it.
> 
> ms> That's my only concern, that if it fails for some reason, it
> ms> will block for a long time.  If that's not the case, then the
> ms> change is ok with me (if it's ok with Jeff).
> 
> Hey Jeff -- is this okay with you?
> 

Yes, please go ahead.

> ms> Michael, I notice that the same idiom is used in pthreads.exp;
> ms> do you think your change would also be appropriate there, and
> ms> if so, would you mind making it?
> 
> I think it would be good there too.  Right now, the code says:
> 
>   sleep 1
>   set description "Stopped with a ^C"
>   after 1000 [send_gdb "\003"]
>   gdb_expect {
>       ...
>   }
> 
> so the test script is going into the gdb_expect and pausing there
> until the 'after' block executes.  There's no need to be running
> the send_gdb "\003" in parallel with gdb_expect.  So I'll make a
> patch for this too.  (Also it looks bizarre to use both 'sleep'
> and 'after' ... gotta do a little research).
> 
> Michael C
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [rfa/testsuite/threads] ping: manythreads.exp
  2004-06-02 17:34 Michael Elizabeth Chastain
@ 2004-06-03 18:07 ` Michael Snyder
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Snyder @ 2004-06-03 18:07 UTC (permalink / raw)
  To: Michael Elizabeth Chastain; +Cc: jjohnstn, gdb-patches

Michael Elizabeth Chastain wrote:
> This patch fixes a problem in gdb.threads/manythreads.exp.
> I've submitted this patch before on 2004-05-07 and 2004-05-14.
> 
> manythreads.exp uses asynchronous TCL blocks to send "^C" at a later
> time, similar to the shell code: "(sleep 1 ; send ^C) &".  If the tests
> fail -- and they do sometimes fail -- manythreads.exp leaves these
> asynchronous blocks in the background, where they ruin the unlucky next
> test, which happens to be gdb.threads/print-threads.exp.
> 
> This patch changes the sleeps from asynchronous to synchronous so that
> there is no cleanup to do: "(sleep 1 ; send ^C)".
> 
> I tested this (again) on native i686-pc-linux-gnu, red hat 8.0, group of 6
> test runs before and after.
> 
> OK to commit?
> 
> Michael C

So... this means it will unconditionally wait, right?
Can I assume that "after 1000" means milliseconds, not seconds?

That's my only concern, that if it fails for some reason, it
will block for a long time.  If that's not the case, then the
change is ok with me (if it's ok with Jeff).

Michael, I notice that the same idiom is used in pthreads.exp;
do you think your change would also be appropriate there, and
if so, would you mind making it?

thanks

> 
> 2004-06-02  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" {
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [rfa/testsuite/threads] ping: manythreads.exp
@ 2004-06-02 17:34 Michael Elizabeth Chastain
  2004-06-03 18:07 ` Michael Snyder
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Elizabeth Chastain @ 2004-06-02 17:34 UTC (permalink / raw)
  To: jjohnstn, msnyder; +Cc: gdb-patches

This patch fixes a problem in gdb.threads/manythreads.exp.
I've submitted this patch before on 2004-05-07 and 2004-05-14.

manythreads.exp uses asynchronous TCL blocks to send "^C" at a later
time, similar to the shell code: "(sleep 1 ; send ^C) &".  If the tests
fail -- and they do sometimes fail -- manythreads.exp leaves these
asynchronous blocks in the background, where they ruin the unlucky next
test, which happens to be gdb.threads/print-threads.exp.

This patch changes the sleeps from asynchronous to synchronous so that
there is no cleanup to do: "(sleep 1 ; send ^C)".

I tested this (again) on native i686-pc-linux-gnu, red hat 8.0, group of 6
test runs before and after.

OK to commit?

Michael C

2004-06-02  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" {


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-06-03 19:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-03 18:28 [rfa/testsuite/threads] ping: manythreads.exp Michael Elizabeth Chastain
2004-06-03 19:31 ` Jeff Johnston
  -- strict thread matches above, loose matches on Subject: below --
2004-06-02 17:34 Michael Elizabeth Chastain
2004-06-03 18:07 ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox