From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id v4oaBe82YGGhEAAAWB0awg (envelope-from ) for ; Fri, 08 Oct 2021 08:17:51 -0400 Received: by simark.ca (Postfix, from userid 112) id 0301C1EE20; Fri, 8 Oct 2021 08:17:50 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 49CD61E813 for ; Fri, 8 Oct 2021 08:17:50 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 306F03857C7A for ; Fri, 8 Oct 2021 12:17:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 306F03857C7A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1633695469; bh=vz8mW2y/kVCaSYT3Hy6bOcwtg2OfghGUFPP7rKkkToo=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=nDscFjGKu+Ih+bNb7/rDmPkvwLuyixxh1LDJKs+bJyrfhjLOXqPEECSiuVnyGpOAG 8FYuWoUcEjw8hAz7G6OR4DM1nft2zfcEHIgaSE0tRuaJsF4kAHgoxcRR4opHub14r1 iorI1b6e6aNfqatxEhuAc7CSlLfQQSBVajQm6yl8= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id C2CD53858431 for ; Fri, 8 Oct 2021 12:17:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C2CD53858431 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-out1.suse.de (Postfix) with ESMTPS id F3E1D21AB3 for ; Fri, 8 Oct 2021 12:17:29 +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 D505813E7F for ; Fri, 8 Oct 2021 12:17:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uQXjMtk2YGFnTQAAMHmgww (envelope-from ) for ; Fri, 08 Oct 2021 12:17:29 +0000 Date: Fri, 8 Oct 2021 14:17:28 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.base/info_sources_2.exp with check-read1 Message-ID: <20211008121726.GA4106@delia.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) 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: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, When running test-case gdb.base/info_sources_2.exp with check-read1, I run into: ... FAIL: gdb.base/info_sources_2.exp: args: : info sources (timeout) ... Fix this by consuming a "$src1, $src2, ..., $srcn: line bit by bit rather than as one whole line. Also add the missing handling of "Objfile has no debug information". Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix gdb.base/info_sources_2.exp with check-read1 --- gdb/testsuite/gdb.base/info_sources_2.exp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.base/info_sources_2.exp b/gdb/testsuite/gdb.base/info_sources_2.exp index 3aed25b07ac..186b21c2ed8 100644 --- a/gdb/testsuite/gdb.base/info_sources_2.exp +++ b/gdb/testsuite/gdb.base/info_sources_2.exp @@ -68,6 +68,7 @@ proc run_info_sources { extra_args args } { # Run the command and extract the results into INFO_SOURCES. set objfile_name "" set source_files {} + set files {} gdb_test_multiple $cmd "" { -re "${command_regex}\r\n" { exp_continue @@ -81,6 +82,9 @@ proc run_info_sources { extra_args args } { -re "^\\(Full debug information has not yet been read for this file\\.\\)\r\n" { exp_continue } + -re "^\\(Objfile has no debug information\\.\\)\r\n" { + exp_continue + } -re "^\r\n" { exp_continue @@ -90,18 +94,22 @@ proc run_info_sources { extra_args args } { pass $gdb_test_name } + -re "^(\[^,\r\n\]+), " { + set f $expect_out(1,string) + lappend files $f + exp_continue + } -re "^(\[^\r\n\]+)\r\n" { if { $objfile_name == "" } { fail "${gdb_test_name} (no objfile name)" return } - set files {} - foreach f [split $expect_out(1,string) ,] { - lappend files [string trim $f] - } + set f $expect_out(1,string) + lappend files $f set info_sources($objfile_name) $files set $objfile_name "" + set files {} exp_continue } }