From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: bob@brasko.net
Cc: gdb-patches@sources.redhat.com
Subject: Re: MI testsuite to use PTY for inferior
Date: Thu, 01 Sep 2005 22:12:00 -0000 [thread overview]
Message-ID: <200509012211.j81MBfX1004484@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <20050901005200.GA6990@white> (message from Bob Rossi on Wed, 31 Aug 2005 20:52:00 -0400)
> Date: Wed, 31 Aug 2005 20:52:00 -0400
> From: Bob Rossi <bob@brasko.net>
>
> Index: gdb/testsuite/lib/mi-support.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v
> retrieving revision 1.30
> diff -u -r1.30 mi-support.exp
> --- gdb/testsuite/lib/mi-support.exp 9 Aug 2005 19:00:16 -0000 1.30
> +++ gdb/testsuite/lib/mi-support.exp 1 Sep 2005 00:46:01 -0000
> @@ -659,7 +659,15 @@
> gdb_start
> set result -1
> }
> - -re "\[\r\n\]*($pattern)\[\r\n\]+$mi_gdb_prompt\[ \]*$" {
> + -re "\[\r\n\]*($pattern)\[\r\n\]+$mi_gdb_prompt\[ \]*" {
> + # NOTE, there is no trailing anchor because with GDB/MI,
> + # asynchronous responses can happen at any point, causing more
> + # data to be available. Normally an anchor is used to make
> + # sure the end of the output is matched, however, $mi_gdb_prompt
> + # is just as good of an anchor since mi_gdb_test is meant to
> + # match a single mi output command. If a second GDB/MI output
> + # response is sent, it will be in the buffer for the next
> + # time mi_gdb_test is called.
> if ![string match "" $message] then {
> pass "$message"
> }
>
> Basically, this passes the mi-console.exp testcase if the 'sleep 1' is
> there or not. Also, it didn't break any testcases. It changes
> mi_gdb_test to enforce the fact that only a single MI output command can
> be matched. What do you think?
Fixes the problems in mi-console.exp, but I still see the following:
403-exec-continue
403^running
(gdb)
FAIL: gdb.mi/mi-syn-frame.exp: testing exec continue
403*stopped
(gdb)
404-stack-list-frames 0 0
404^done,stack=[frame={level="0",addr="0x1c0006c8",func="main",file="../../../..
/src/gdb/gdb/testsuite/gdb.mi/mi-syn-frame.c",fullname="/home/kettenis/src/gdb/g
db/testsuite/gdb.mi/mi-syn-frame.c",line="14"}]
(gdb)
PASS: gdb.mi/mi-syn-frame.exp: list stack frames
Seems the attached patch solves those though.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* gdb.mi/mi-syn-frame.exp (my_mi_gdb_prompt): Remove. Split tests
that were using this variable.
Index: gdb.mi/mi-syn-frame.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-syn-frame.exp,v
retrieving revision 1.6
diff -u -p -r1.6 mi-syn-frame.exp
--- gdb.mi/mi-syn-frame.exp 4 Aug 2005 01:52:31 -0000 1.6
+++ gdb.mi/mi-syn-frame.exp 1 Sep 2005 22:10:47 -0000
@@ -35,8 +35,6 @@ if { [gdb_compile "${srcdir}/${subdir}/
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-set my_mi_gdb_prompt "\\(gdb\\)\[ \]*\[\r\n\]*"
-
mi_gdb_exit
mi_gdb_start separate-inferior-tty
mi_delete_breakpoints
@@ -61,9 +59,18 @@ mi_gdb_test "402-stack-list-frames" "402
# Continue back to main()
#
mi_gdb_test "403-exec-continue" \
- "403\\^running\[\r\n\]+${my_mi_gdb_prompt}403\\\*stopped" \
- "testing exec continue" \
- "hi in foo\[\r\n\]\+"
+ "403\\^running" \
+ "testing exec continue" \
+ "hi in foo\[\r\n\]\+"
+
+gdb_expect {
+ -re "403\\*stopped.*$mi_gdb_prompt$" {
+ pass "finished exec continue"
+ }
+ timeout {
+ fail "finished exec continue (timeout)"
+ }
+}
mi_gdb_test "404-stack-list-frames 0 0" \
"404\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" \
@@ -92,7 +99,16 @@ mi_gdb_test "407-stack-list-frames" \
mi_gdb_test "408-exec-continue" \
- "408\\^running\[\r\n\]+${my_mi_gdb_prompt}408\\\*stopped"
+ "408\\^running"
+
+gdb_expect {
+ -re "408\\*stopped.*$mi_gdb_prompt$" {
+ pass "finished exec continue"
+ }
+ timeout {
+ fail "finished exec continue (timeout)"
+ }
+}
mi_gdb_test "409-stack-list-frames 0 0" \
"409\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" \
next prev parent reply other threads:[~2005-09-01 22:12 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-27 3:18 Bob Rossi
2005-08-13 22:04 ` Mark Kettenis
2005-08-20 9:07 ` Bob Rossi
2005-08-30 2:55 ` Daniel Jacobowitz
2005-09-01 0:52 ` Bob Rossi
2005-09-01 22:12 ` Mark Kettenis [this message]
2005-09-01 23:52 ` Bob Rossi
2005-09-05 19:52 ` Bob Rossi
2005-09-10 4:02 ` Daniel Jacobowitz
2005-07-30 5:54 Nick Roberts
2005-07-30 17:39 ` Bob Rossi
2005-07-30 18:08 ` Daniel Jacobowitz
2005-07-30 22:47 ` Nick Roberts
2005-07-31 1:19 ` Daniel Jacobowitz
2005-07-30 22:47 ` Nick Roberts
2005-07-30 23:03 ` Bob Rossi
2005-07-31 1:21 ` Daniel Jacobowitz
2005-07-31 13:16 ` Bob Rossi
2005-07-31 15:31 ` Daniel Jacobowitz
2005-07-31 21:20 ` Bob Rossi
2005-08-01 1:53 ` Daniel Jacobowitz
2005-08-01 2:05 ` Bob Rossi
2005-08-01 2:15 ` Daniel Jacobowitz
2005-08-01 11:32 ` Bob Rossi
2005-08-01 3:56 ` Eli Zaretskii
2005-08-01 11:30 ` Bob Rossi
2005-08-01 13:00 ` Daniel Jacobowitz
2005-08-01 13:16 ` Bob Rossi
2005-08-01 13:23 ` Daniel Jacobowitz
2005-08-01 13:31 ` Bob Rossi
2005-08-01 14:00 ` Daniel Jacobowitz
2005-08-01 14:07 ` Bob Rossi
2005-08-01 18:45 ` Eli Zaretskii
2005-08-01 19:01 ` Mark Kettenis
2005-08-01 19:25 ` Daniel Jacobowitz
2005-08-01 19:34 ` Mark Kettenis
2005-08-01 19:43 ` Bob Rossi
2005-08-01 20:48 ` Eli Zaretskii
2005-08-01 20:45 ` Eli Zaretskii
2005-08-01 20:52 ` Daniel Jacobowitz
2005-08-02 3:45 ` Eli Zaretskii
2005-08-02 3:50 ` Daniel Jacobowitz
2005-08-02 20:46 ` Eli Zaretskii
2005-08-02 20:48 ` Daniel Jacobowitz
2005-08-13 17:26 ` Bob Rossi
2005-08-13 21:41 ` Daniel Jacobowitz
2005-07-31 21:35 ` Nick Roberts
2005-07-31 21:37 ` Daniel Jacobowitz
2005-07-31 23:32 ` Nick Roberts
2005-08-01 1:51 ` Daniel Jacobowitz
2005-08-03 2:07 ` Bob Rossi
2005-08-03 12:48 ` Bob Rossi
2005-08-03 13:19 ` Daniel Jacobowitz
2005-08-03 18:22 ` Bob Rossi
2005-08-03 18:23 ` Daniel Jacobowitz
2005-08-03 18:24 ` Bob Rossi
2005-08-03 18:32 ` Daniel Jacobowitz
2005-08-03 19:31 ` Bob Rossi
2005-08-04 2:23 ` Bob Rossi
2005-08-04 2:27 ` Bob Rossi
2005-08-04 4:05 ` Daniel Jacobowitz
2005-08-04 13:07 ` Bob Rossi
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=200509012211.j81MBfX1004484@elgar.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=bob@brasko.net \
--cc=gdb-patches@sources.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