From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 091663942005 for ; Thu, 12 Mar 2020 10:35:20 +0000 (GMT) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 1CF7CAE6F for ; Thu, 12 Mar 2020 10:35:19 +0000 (UTC) Date: Thu, 12 Mar 2020 11:35:17 +0100 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.linespec/explicit.exp FAIL with glibc debug info Message-ID: <20200312103515.GA13623@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Mar 2020 10:35:20 -0000 Hi, When running test-case gdb.linespec/explicit.exp with GLIBC debuginfo installed, I run into: ... (gdb) break -source exp^GlFAIL: gdb.linespec/explicit.exp: complete \ non-unique file name (timeout) ... The regexp that times out is: ... -re "break -source exp\\\x07licit" { ... and the reason it times out is that gdb only outputs an "l" after the tab, while the regexp expect a futher "icit". This is a regression since commit 507dd60e28 "[gdb/testsuite, 1/2] Fix gdb.linespec/explicit.exp with check-read1", where I merged the matching for the two cases where GLIBC debuginfo is either installed or not, as it turns out incorrectly, presumably because even though I tested with GLIBC debuginfo info installed and deinstalled, that didn't make a difference because I didn't use configure flag --with-separate-debug-dir=/usr/lib/debug. Fix this by not explictly matching the "icit" part. Tested on x86_64-linux, with and without GLIBC debuginfo installed, both with make targets check and check-read1. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix gdb.linespec/explicit.exp FAIL with glibc debug info gdb/testsuite/ChangeLog: 2020-03-12 Tom de Vries * gdb.linespec/explicit.exp: Fix "complete non-unique file name" test in presence of GLIBC debuginfo. --- gdb/testsuite/gdb.linespec/explicit.exp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.linespec/explicit.exp b/gdb/testsuite/gdb.linespec/explicit.exp index 2f31b0e24e..4f457dc372 100644 --- a/gdb/testsuite/gdb.linespec/explicit.exp +++ b/gdb/testsuite/gdb.linespec/explicit.exp @@ -239,8 +239,26 @@ namespace eval $testfile { set tst "complete non-unique file name" send_gdb "break -source exp\t" + # We're matching two cases here: + # - without GLIBC debuginfo + # (gdb) break -source exp^Glicit^G^M + # explicit.c explicit2.c ^M + # (gdb) break -source explicit^M + # Source filename requires function, label, or line offset.^M + # (gdb) PASS: gdb.linespec/explicit.exp: complete non-unique file name + # - with GLIBC debuginfo: + # (gdb) break -source exp^Gl^G^M + # explicit.c explicit2.c explicit_bzero.c explicit_bzero_chk.c \ + # explodename.c ^M + # (gdb) break -source expl^M + # Source filename requires function, label, or line offset.^M + # (gdb) PASS: gdb.linespec/explicit.exp: complete non-unique file name gdb_test_multiple "" $tst { - -re "break -source exp\\\x07licit" { + -re "break -source exp\\\x07l" { + # At this point, either output is done (first case), or a + # further "icit" is emitted (second case). We have no reliable + # way to decide one way or another, so just send the tabs, even + # though that may be a little early in the second case. send_gdb "\t\t" gdb_test_multiple "" $tst { -re "\\\x07\r\nexplicit.c\[ \t\]+explicit2.c\[ \t\]+\(expl.*\)?\r\n$gdb_prompt" {