From: Jan Kratochvil Date: Tue, 7 Aug 2012 18:05:40 +0000 (+0000) Subject: gdb/testsuite/ X-Git-Tag: gdb_7_5-2012-08-17-release~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d00d163f522937350c1cd1ed49ba2f2159e14510;p=thirdparty%2Fbinutils-gdb.git gdb/testsuite/ * gdb.base/valgrind-infcall.exp (continue #$continue_count): Use global variable loop, not a 'break'. Add loop count limit to 100. Add new fail case for terminated vgdb. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index e3b122cc9b9..c1c62c0d57a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2012-08-07 Jan Kratochvil + + * gdb.base/valgrind-infcall.exp (continue #$continue_count): Use + global variable loop, not a 'break'. Add loop count limit to 100. + Add new fail case for terminated vgdb. + 2012-08-07 Jan Kratochvil Do not false FAIL with old GCCs. diff --git a/gdb/testsuite/gdb.base/valgrind-infcall.exp b/gdb/testsuite/gdb.base/valgrind-infcall.exp index 3224e9cdd8c..84d6819c71a 100644 --- a/gdb/testsuite/gdb.base/valgrind-infcall.exp +++ b/gdb/testsuite/gdb.base/valgrind-infcall.exp @@ -90,17 +90,23 @@ gdb_test "$vgdbcmd" " in \\.?_start .*" "target remote for vgdb" gdb_test "monitor v.set gdb_output" "valgrind output will go to gdb.*" set continue_count 1 -while 1 { +set loop 1 +while {$loop && $continue_count < 100} { set test "continue #$continue_count" gdb_test_multiple "continue" "" { -re "Invalid free\\(\\).*: main .*\r\n$gdb_prompt $" { pass $test - break + # In Ubuntu 10.04.4 environments 'break' does not work here. + set loop 0 } -re "Remote connection closed.*\r\n$gdb_prompt $" { fail "$test (remote connection closed)" return -1 } + -re "The program is not being run\\.\r\n$gdb_prompt $" { + fail "$test (valgrind vgdb has terminated)" + return -1 + } -re "\r\n$gdb_prompt $" { pass "$test (false warning)" }