From: mec.gnu@mindspring.com (Michael Elizabeth Chastain)
To: gdb-patches@sources.redhat.com, msnyder@redhat.com
Subject: [rfa/testsuite/threads] pthreads.exp: copyright, sync 'after'
Date: Fri, 04 Jun 2004 15:54:00 -0000 [thread overview]
Message-ID: <20040604155413.6E4F84B104@berman.michael-chastain.com> (raw)
Hi Mike, here's the gdb.threads/pthreads.exp "after" patch that you were
interested in.
First it updates the copyright years. I included all the years that
I actually found in "cvs log pthreads.exp" plus the ChangeLog.
Then it changes the "after" call from async to sync. The async
background call isn't hurting my test results, but sync is simpler.
This is old news to some people, but let me run it down. In TCL, there
are two ways to call the "after" builtin verb. One way is like this:
after 1000 [send_gdb "\003"]
This is an asynchronous block. TCL detaches the block and schedules
it for execution in the future. Meanwhile, TCL keeps running.
It's like doing "(sleep 1; send_gdb \003) &" in the shell.
This is usually not what we want!
The other way is like this:
after 1000
send_gdb "\003"
This is synchronous; TCL waits for the "after 1000" to run before
continuing. Like "sleep 1; send_gdb \003" in the shell.
Testing: native i686-pc-linux-gnu, red hat 8.0, 6 test runs before
and after. No change in test results.
OK to commit?
Michael C
2004-06-04 Michael Chastain <mec.gnu@mindspring.com>
* gdb.threads/pthreads.exp: Update copyright years.
(check_control_c): Change asynchronous 'after' to synchronous.
Index: pthreads.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/pthreads.exp,v
retrieving revision 1.11
diff -c -3 -p -r1.11 pthreads.exp
*** pthreads.exp 11 Apr 2003 13:55:31 -0000 1.11
--- pthreads.exp 4 Jun 2004 15:37:33 -0000
***************
*** 1,4 ****
! # Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
--- 1,5 ----
! # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004
! # Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
*************** proc check_control_c {} {
*** 230,238 ****
fail "Continue with all threads running (timeout)"
}
}
! sleep 1
set description "Stopped with a ^C"
- after 1000 [send_gdb "\003"]
gdb_expect {
-re "Program received signal SIGINT.*$gdb_prompt $" {
pass $description
--- 231,239 ----
fail "Continue with all threads running (timeout)"
}
}
! after 2000
! send_gdb "\003"
set description "Stopped with a ^C"
gdb_expect {
-re "Program received signal SIGINT.*$gdb_prompt $" {
pass $description
next reply other threads:[~2004-06-04 15:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-04 15:54 Michael Elizabeth Chastain [this message]
2004-06-04 19:19 ` Michael Snyder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040604155413.6E4F84B104@berman.michael-chastain.com \
--to=mec.gnu@mindspring.com \
--cc=gdb-patches@sources.redhat.com \
--cc=msnyder@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox