public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix gdb.debuginfod/fetch_src_and_symbols.exp with check-read1 Date: Thu, 20 Oct 2022 07:50:08 +0000 (GMT) [thread overview] Message-ID: <20221020075008.0125D3852760@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=15ede33bfa86fd2dfd2d088e01ac2d20cdba46c9 commit 15ede33bfa86fd2dfd2d088e01ac2d20cdba46c9 Author: Tom de Vries <tdevries@suse.de> Date: Thu Oct 20 09:50:04 2022 +0200 [gdb/testsuite] Fix gdb.debuginfod/fetch_src_and_symbols.exp with check-read1 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) ... 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 first two words of the output, after which an implicit clause in gdb_test_multiple triggers on the second part containing the interactive prompt. Fix this by included the interactive prompt in the regexp. 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/testsuite/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 { } { # GDB should now find the symbol and source files. clean_restart - gdb_test "file $binfile" "" "file [file tail $binfile]" "Enable debuginfod?.*" "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 $::corefile]" \ - "Enable debuginfod?.*" "y" + $enable_debuginfod_question "y" # 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" # Configure debuginfod with commands. unsetenv DEBUGINFOD_URLS
reply other threads:[~2022-10-20 7:50 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=20221020075008.0125D3852760@sourceware.org \ --to=vries@sourceware.org \ --cc=gdb-cvs@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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).