diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c575405279..2f9c79a063 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-07-23 Tom de Vries + + PR testsuite/24711 + * gdb.mi/mi-complete.exp: Wait for "set max-completions" result before + issuing next command. + 2019-07-22 Andrew Burgess * gdb.ada/info_auto_lang.exp: Update expected results. diff --git a/gdb/testsuite/gdb.mi/mi-complete.exp b/gdb/testsuite/gdb.mi/mi-complete.exp index 692b004fd9..5b9613548f 100644 --- a/gdb/testsuite/gdb.mi/mi-complete.exp +++ b/gdb/testsuite/gdb.mi/mi-complete.exp @@ -58,14 +58,16 @@ mi_gdb_test "-info-gdb-mi-command complete" \ # Limit max completions and check that max_completions_reached=\"0\" is set # to 1. -send_gdb "set max-completions 1\n" +mi_gdb_test "set max-completions 1" ".*=cmd-param-changed.*\\^done" \ + "set max-completions 1" mi_gdb_test "2-complete br" \ ".*2\\^done,completion=\"br\[A-Za-z0-9-\]+\",matches=\\\[\"br\[A-Za-z0-9-\]+\"\\\],max_completions_reached=\"1\"" \ "-complete br, max-completions 1" # Disable completions and check an error is returned -send_gdb "set max-completions 0\n" +mi_gdb_test "set max-completions 0" ".*=cmd-param-changed.*\\^done" \ + "set max-completions 0" mi_gdb_test "3-complete br" \ ".*3\\^error,msg=\".*" \