diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index bb8dd7923d..547a3be897 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2017-11-16 Pedro Alves + + * gdb.base/starti.exp ("continue" test): Remove ".*"s from + pattern. + * lib/gdb.exp (gdb_test_sequence): Don't send empty command to + GDB. + 2017-11-15 Simon Marchi * gdb.tui/completionn.exp (test_tab_completion): Add space in diff --git a/gdb/testsuite/gdb.base/starti.exp b/gdb/testsuite/gdb.base/starti.exp index 98167ce5c7..76e68d5457 100644 --- a/gdb/testsuite/gdb.base/starti.exp +++ b/gdb/testsuite/gdb.base/starti.exp @@ -47,5 +47,5 @@ gdb_test_sequence "" "starti" { gdb_breakpoint main gdb_test_sequence "continue" "" { "\\$2 = 1" - ".*Breakpoint .*main \\(\\) at .*starti.c.*" + "Breakpoint \[^\r\n\]*main \\(\\) at \[^\r\n\]*starti.c" } diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 548cb068d4..8d6972ab1f 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -1093,7 +1093,8 @@ proc gdb_test_no_output { args } { # This is useful when the sequence is long and contains ".*", a single # regexp to match the entire output can get a timeout much easier. # -# COMMAND is the command to send. +# COMMAND is the command to execute, send to GDB with send_gdb. If +# this is the null string no command is sent. # TEST_NAME is passed to pass/fail. COMMAND is used if TEST_NAME is "". # EXPECTED_OUTPUT_LIST is a list of regexps of expected output, which are # processed in order, and all must be present in the output. @@ -1116,7 +1117,9 @@ proc gdb_test_sequence { command test_name expected_output_list } { set test_name $command } lappend expected_output_list ""; # implicit ".*" before gdb prompt - send_gdb "$command\n" + if { $command != "" } { + send_gdb "$command\n" + } return [gdb_expect_list $test_name "$gdb_prompt $" $expected_output_list] }