Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite, 2/2] Fix gdb.linespec/explicit.exp with check-read1
Date: Mon, 29 Jul 2019 14:26:00 -0000	[thread overview]
Message-ID: <20190729142602.GA21057@delia> (raw)

Hi,

When running gdb.linespec/explicit.exp with check-read1, we get:
...
(gdb) PASS: gdb.linespec/explicit.exp: set max-completions unlimited
break \a
-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.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite, 2/2] Fix gdb.linespec/explicit.exp with check-read1

gdb/testsuite/ChangeLog:

2019-07-29  Tom de Vries  <tdevries@suse.de>

	* gdb.linespec/explicit.exp: Fix completion trigger for "complete with
	no arguments".

---
 gdb/testsuite/gdb.linespec/explicit.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.linespec/explicit.exp b/gdb/testsuite/gdb.linespec/explicit.exp
index 90181b3acb..e50e503343 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"


                 reply	other threads:[~2019-07-29 14:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190729142602.GA21057@delia \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox