From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 0125D3852760; Thu, 20 Oct 2022 07:50:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0125D3852760 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666252208; bh=n82/Rfmm0Wv01yhI+eFghTNdVZ+IS60aGdjgDLCHUTM=; h=From:To:Subject:Date:From; b=Cdl3v7mxt7JtQ9jIKXD2GvOr/vQDdoqRhq0xGUPh04DidXnlKCiG4T7ujoOUMrn8P mIQ2gva85n8y2yqyqzScQ8IB9MTgeREC4Hh3hTy4IeaG4IE96ZOOCWW+CPy2NpoWDk 7XOUZ4NHUhzznoXOBaTTGkU094o476o0izSHzmKY= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix gdb.debuginfod/fetch_src_and_symbols.exp with check-read1 X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 9c1c98cc632a7f4721e0b19edcb8f6bcd9347942 X-Git-Newrev: 15ede33bfa86fd2dfd2d088e01ac2d20cdba46c9 Message-Id: <20221020075008.0125D3852760@sourceware.org> Date: Thu, 20 Oct 2022 07:50:08 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D15ede33bfa86= fd2dfd2d088e01ac2d20cdba46c9 commit 15ede33bfa86fd2dfd2d088e01ac2d20cdba46c9 Author: Tom de Vries Date: Thu Oct 20 09:50:04 2022 +0200 [gdb/testsuite] Fix gdb.debuginfod/fetch_src_and_symbols.exp with check= -read1 =20 With test-case gdb.debuginfod/fetch_src_and_symbols.exp and check-read1= , I run into: ... (gdb) FAIL: gdb.debuginfod/fetch_src_and_symbols.exp: local_url: \ file fetch_src_and_symbols (got interactive prompt) ... =20 The problem is that this output: ... Enable debuginfod for this session? (y or [n]) y^M ... is matched using regexp "Enable debuginfod?.*" with matches only the fi= rst two words of the output, after which an implicit clause in gdb_test_multipl= e triggers on the second part containing the interactive prompt. =20 Fix this by included the interactive prompt in the regexp. =20 Tested on x86_64-linux. Diff: --- gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp b/gdb/t= estsuite/gdb.debuginfod/fetch_src_and_symbols.exp index 8bb9203686d..9bffb3397ec 100644 --- a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp +++ b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp @@ -210,7 +210,10 @@ proc_with_prefix local_url { } { =20 # GDB should now find the symbol and source files. clean_restart - gdb_test "file $binfile" "" "file [file tail $binfile]" "Enable debugi= nfod?.*" "y" + set enable_debuginfod_question \ + "Enable debuginfod for this session. \\(y or \\\[n\\\]\\) " + gdb_test "file $binfile" "" "file [file tail $binfile]" \ + $enable_debuginfod_question "y" gdb_test_no_output "set substitute-path $outputdir /dev/null" \ "set substitute-path" gdb_test "br main" "Breakpoint 1 at.*file.*" @@ -219,14 +222,14 @@ proc_with_prefix local_url { } { # GDB should now find the executable file. clean_restart gdb_test "core $::corefile" ".*return 0.*" "file [file tail $::corefil= e]" \ - "Enable debuginfod?.*" "y" + $enable_debuginfod_question "y" =20 # GDB should now find the debugaltlink file. clean_restart gdb_test "file ${binfile}_alt.o" \ ".*Downloading.*separate debug info.*" \ "file [file tail ${binfile}_alt.o]" \ - ".*Enable debuginfod?.*" "y" + $enable_debuginfod_question "y" =20 # Configure debuginfod with commands. unsetenv DEBUGINFOD_URLS