From: Joel Brobecker <brobecker@gnat.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA/testsuite] Workaround timeout in default.exp
Date: Thu, 20 May 2004 01:48:00 -0000 [thread overview]
Message-ID: <20040520014811.GR10684@gnat.com> (raw)
In-Reply-To: <20040518214255.GC4036@nevyn.them.org>
> > 2004-05-18 J. Brobecker <brobecker@gnat.com>
> >
> > * gdb.base/default.exp: Rewrite a couple of tests to work-around
> > a problem that causes this test and all the following tests to
> > timeout.
> >
> > Tested on AIX 5.1 and x86-linux. Would that be OK to apply?
>
> Rather than adding a FIXME, let me try to explain what is going on.
OK.
> The first part is a guess. For some reason, the pattern "\(gdb\) $"
> never matches on GNU/Linux but does on AIX and Solaris. I presume this
> is because of some difference in the pseudo-TTY layer or in the
> standard I/O library, which causes characters to be send in smaller
> batches. So at some point on those systems, the buffer ends with the
> prompt.
There may be a crack in your theory, because there something it doesn't
explain. When I use the simple send_gdb/gdb_expect sequence, then I get
the whole output, ie the differences you are mentioning do not come into
play. I verified this by using expect_out.
I tried your suggestion, without much luck so far. Here is what I have
tried:
print "DEBUG: Starting test...."
gdb_test_multiple "info set" "info set" {
-re "confirm: Whether to confirm potentially dangerous operations is o\[a-z\]*.(\[^\r\n\]*\[\r\n\])+history filename: The filename in which to record the command history is (\[^\r\n\]*\[\r\n\])+listsize: Number of source lines gdb will list by default is 10.*prompt: Gdb's " {
global saw_good_text
set saw_good_text 1
print "DEBUG: First part of output found."
exp_continue
}
-re "prompt is \"$gdb_prompt \"" {
print "DEBUG: Line with GDB prompt."
exp_continue
}
-re "$gdb_prompt $" {
global saw_good_text
print "DEBUG: Final part of output."
if {$saw_good_text} {
pass "test name"
} else {
fail "test name (unknown output)"
}
}
}
But none of the regexp matched (no DEBUG: output besides the first
one before gdb_test_multiple), and it eventually timedout.
I tried with verbose set to 3, and that gives me the following output.
First, it prints:
Running ./gdb.base/joel.exp ...
DEBUG: Starting test....
Sending "info set" to gdb
Looking to match ""confirm: Whether to confirm potentially dangerous operations is o[a-z]*.([^\r\n]*[\r\n])+history filename: The filename in which to record the command history is ([^\r\n]*[\r\n])+listsize: Number of source lines gdb will list by default is 10.*prompt: Gdb's "; "prompt is "\(gdb\) ""; "\(gdb\) $""
Message is "info set"
board_info host exists name
board_info host name
getting cam name
board_info cam exists name
board_info cam exists protocol
board_info cam generic_name
getting cam generic_name
call_remote send cam {info set
}
board_info cam file_transfer
getting cam file_transfer
board_info cam connect
getting cam connect
call_remote calling standard_send
board_info cam exists fileid
board_info cam fileid
getting cam fileid
shell_id in standard_send is 6
board_info cam fileid
getting cam fileid
send -i 6 -- {info set
}
board_info cam fileid
getting cam fileid
board_info target exists gdb,timeout
board_info host fileid
getting cam fileid
At which point we get stuck for a while, and then we receive the rest
of the output:
FAIL: gdb.base/joel.exp: info set (timeout)
Quitting /cam.a/brobecke/gdb-public/gdb/testsuite/../../gdb/gdb -nx
[rest of output snip'ed]
--
Joel
next prev parent reply other threads:[~2004-05-20 1:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-18 21:01 Joel Brobecker
2004-05-18 21:42 ` Daniel Jacobowitz
2004-05-20 1:48 ` Joel Brobecker [this message]
2004-05-20 2:27 ` Daniel Jacobowitz
2004-05-21 1:14 ` Joel Brobecker
2004-05-21 1:31 ` Daniel Jacobowitz
2004-05-21 1:43 ` Joel Brobecker
2004-05-21 6:58 ` Jim Blandy
2004-05-21 16:10 ` Joel Brobecker
[not found] ` <20040521160554.GK10684@gnat.com>
2004-05-21 16:36 ` Daniel Jacobowitz
2004-05-21 17:28 ` Joel Brobecker
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=20040520014811.GR10684@gnat.com \
--to=brobecker@gnat.com \
--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