This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [commit] Fix timeouts in break-interp.exp on slow machines
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 12 Oct 2010 20:23:37 +0200
- Subject: Re: [commit] Fix timeouts in break-interp.exp on slow machines
- References: <201010121720.o9CHKTnM003520@d12av02.megacenter.de.ibm.com>
On Tue, 12 Oct 2010 19:20:29 +0200, Ulrich Weigand wrote:
> This is once again caused by a gdb_expect clause with a ".*" wildcard that
> matches a large number of lines. This can cause expect to slow down
> significantly, to the extent that the tests time out on slow machines.
OK, thanks for the fix. I do not have the slowness reproducible here but
I thought gdb_expect is deprecated in the favor of gdb_test_multiple.
I do not mind but just curious if it could be rather coded this way or it
would be still slow/incompatible by the more patterns of gdb_test_multiple?
Tested on x86_64-fedora14snapshot-linux-gnu.
Thanks,
Jan
gdb/testsuite/
2010-10-12 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/break-interp.exp (test_ld): Replace gdb_expect by
gdb_test_multiple.
--- a/gdb/testsuite/gdb.base/break-interp.exp
+++ b/gdb/testsuite/gdb.base/break-interp.exp
@@ -442,21 +442,19 @@ proc test_ld {file ifmain trynosym displacement} {
if $ifmain {
reach "_dl_debug_state" run $displacement
- # Use two separate gdb_expect statements to avoid timeouts due to
- # slow processing of wildcard capturing long output
+ # Use two separate gdb_test_multiple statements to avoid timeouts due
+ # to slow processing of wildcard capturing long output
set test "info files"
set entrynohex ""
- send_gdb "$test\n"
- gdb_expect {
+ gdb_test_multiple $test $test {
-re "\r\n\[\t \]*Entry point:\[\t \]*0x(\[0-9a-f\]+)\r\n" {
set entrynohex $expect_out(1,string)
- gdb_expect {
- -re "$gdb_prompt $" { pass $test }
- timeout { fail "$test (timeout)" }
+ gdb_test_multiple "" $test {
+ -re "\r\n$gdb_prompt $" {
+ pass $test
+ }
}
}
- -re ".*$gdb_prompt $" { fail $test }
- timeout { fail "$test (timeout)" }
}
# `info sym' cannot be tested for .opd as the binary may not have