From patchwork Mon Jul 29 14:26:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 33844 Received: (qmail 13926 invoked by alias); 29 Jul 2019 14:26:08 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 13917 invoked by uid 89); 29 Jul 2019 14:26:08 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, SPF_PASS autolearn=ham version=3.3.1 spammy=maxcompletions, max-completions, unlimited X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 29 Jul 2019 14:26:07 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 95614AD08 for ; Mon, 29 Jul 2019 14:26:05 +0000 (UTC) Date: Mon, 29 Jul 2019 16:26:04 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite, 2/2] Fix gdb.linespec/explicit.exp with check-read1 Message-ID: <20190729142602.GA21057@delia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes Hi, 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. 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 * 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"