From: Tom de Vries Date: Mon, 29 Jul 2019 14:24:57 +0000 (+0200) Subject: [gdb/testsuite, 2/2] Fix gdb.linespec/explicit.exp with check-read1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=de28a3b72e;p=binutils-gdb.git [gdb/testsuite, 2/2] Fix gdb.linespec/explicit.exp with check-read1 When running gdb.linespec/explicit.exp with check-read1, we get: ... (gdb) PASS: gdb.linespec/explicit.exp: set max-completions unlimited break  -function ... top (gdb) PASS: gdb.linespec/explicit.exp: complete with no arguments break -function ... top (gdb) FAIL: gdb.linespec/explicit.exp: complete with no arguments (clearing input line) ... The problem is that the send_gdb "\t\t" triggers completion twice: ... set tst "complete with no arguments" send_gdb "break \t" gdb_test_multiple "" $tst { "break \\\x07" { send_gdb "\t\t" gdb_test_multiple "" $tst { ... } clear_input_line $tst ... but the following gdb_test_multiple only parses it once, so the second completion is left for clear_input_line, which fails. Fix this by triggering completion only once. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2019-07-29 Tom de Vries * gdb.linespec/explicit.exp: Fix completion trigger for "complete with no arguments". --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 498f4e47464..e29c267691a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-07-29 Tom de Vries + + * gdb.linespec/explicit.exp: Fix completion trigger for "complete with + no arguments". + 2019-07-29 Tom de Vries * gdb.linespec/explicit.exp: Fix gdb_test_multiple regexps where second diff --git a/gdb/testsuite/gdb.linespec/explicit.exp b/gdb/testsuite/gdb.linespec/explicit.exp index 90181b3acba..e50e5033437 100644 --- a/gdb/testsuite/gdb.linespec/explicit.exp +++ b/gdb/testsuite/gdb.linespec/explicit.exp @@ -473,7 +473,7 @@ namespace eval $testfile { send_gdb "break \t" gdb_test_multiple "" $tst { "break \\\x07" { - send_gdb "\t\t" + send_gdb "\t" gdb_test_multiple "" $tst { "Display all" { send_gdb "y"