From: Jim Kingdon Date: Thu, 22 Dec 1994 00:32:15 +0000 (+0000) Subject: * gdb.base/list.exp (test_forward_search): Set timeout higher X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9b826d6df6c9d126b9e52e2c4b3eabfc3589eb0d;p=binutils-gdb.git * gdb.base/list.exp (test_forward_search): Set timeout higher when we'll be getting lots of output from gdb. * gdb.base/a1-selftest.exp: Move code that was inside expect -re "init_malloc" to after the expect statement. Run it if that regexp is taken, but also for two others which happen if source cannot be found. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 37bd3a47edf..94caad8ea2a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,13 @@ +Wed Dec 21 12:51:37 1994 Jim Kingdon + + * gdb.base/list.exp (test_forward_search): Set timeout higher + when we'll be getting lots of output from gdb. + + * gdb.base/a1-selftest.exp: Move code that was inside expect -re + "init_malloc" to after the expect statement. Run it if that + regexp is taken, but also for two others which happen if source + cannot be found. + Tue Dec 20 12:35:21 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * gdb.base/printcmds.exp: New test, for printing register before diff --git a/gdb/testsuite/gdb.base/a1-selftest.exp b/gdb/testsuite/gdb.base/a1-selftest.exp index 5cf6d534919..6e4e2ea975e 100644 --- a/gdb/testsuite/gdb.base/a1-selftest.exp +++ b/gdb/testsuite/gdb.base/a1-selftest.exp @@ -221,13 +221,34 @@ proc test_with_self {} { # now jump over a few functions set description "next over get_run_time and everything it calls" + set got_over_get_run_time 0 send "next\n" expect { -re ".*init_malloc.*$prompt $" { pass "$description" - set description "next over init_malloc and everything it calls" - send "next\n" - expect { + set got_over_get_run_time 1 + } + -re ".*No such file or directory.\r\n$prompt $" { + pass "$description (no source available)" + set got_over_get_run_time 1 + } + -re ".*A file or directory .* does not exist..\r\n$prompt $" { + pass "$description (no source available)" + set got_over_get_run_time 1 + } + -re ".*$prompt $" { + fail "$description" + } + timeout { + fail "$description (timeout)" + } + } + # -re "if \(setmp \(to_top_level\)\).*$prompt $" { pass "first next" } + + if $got_over_get_run_time then { + set description "next over init_malloc and everything it calls" + send "next\n" + expect { -re "if.*SET_TOP_LEVEL.*$prompt $" { pass "$description" } @@ -254,24 +275,22 @@ proc test_with_self {} { } } } - } - } - } - -re ".*No such file or directory.\r\n$prompt $" { - pass "$description (no source available)" - } - -re ".*A file or directory .* does not exist..\r\n$prompt $" { - pass "$description (no source available)" - } - -re ".*$prompt $" { - fail "$description" - } - timeout { - fail "$description (timeout)" + } + -re ".*No such file or directory.\r\n$prompt $" { + pass "$description (no source available)" + } + -re ".*A file or directory .* does not exist..\r\n$prompt $" { + pass "$description (no source available)" + } + -re ".*$prompt $" { + fail "$description" + } + default { + fail "$description (timeout or eof)" + } } } - # -re "if \(setmp \(to_top_level\)\).*$prompt $" { pass "first next" } - + # This one fails on Solaris (for some versions of gdb) because you # can't next over library functions setup_xfail "sparc-sun-solaris2" 1817