From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 3D64C3852760 for ; Thu, 20 Oct 2022 07:50:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3D64C3852760 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id DE2E01F9C4 for ; Thu, 20 Oct 2022 07:50:19 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id BDB3F139D2 for ; Thu, 20 Oct 2022 07:50:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 5GIsLbv9UGNMFQAAMHmgww (envelope-from ) for ; Thu, 20 Oct 2022 07:50:19 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed] [gdb/testsuite] Fix gdb.debuginfod/fetch_src_and_symbols.exp with check-read1 Date: Thu, 20 Oct 2022 09:50:19 +0200 Message-Id: <20221020075019.27628-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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, 20 Oct 2022 07:50:23 -0000 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. --- 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 base-commit: 9c1c98cc632a7f4721e0b19edcb8f6bcd9347942 -- 2.35.3