From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 2LIbOxsSZGGKJAAAWB0awg (envelope-from ) for ; Mon, 11 Oct 2021 06:29:47 -0400 Received: by simark.ca (Postfix, from userid 112) id EFDEE1F3CB; Mon, 11 Oct 2021 06:29:47 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.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 902D41E813 for ; Mon, 11 Oct 2021 06:29:46 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 020063858422 for ; Mon, 11 Oct 2021 10:29:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 020063858422 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1633948186; bh=MDhzJb6SlgiiMT1+VA05ztqUDZ9jaH1Btt7WB4AyaTs=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=geEquGc7Q1kIoCr6BoIG8cT1TVScEnkRYi8tAg2UC/pR77lqOotzskX5J3EG+0NvQ 6L5Ooy01TwyaU4M/AGrDND/Qb8AasK1AXdycrot/m8OWO0Zxo2ot2EUJq2gn0MwUDp YfGD7htVQf3iu/E+HvvI9Ilyf7yqYah65ohtbNIc= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 4D52D3858024 for ; Mon, 11 Oct 2021 10:29:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4D52D3858024 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 7D44F21F22 for ; Mon, 11 Oct 2021 10:29:15 +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 6B6F513C4C for ; Mon, 11 Oct 2021 10:29:15 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id rF8wGfsRZGF2OQAAMHmgww (envelope-from ) for ; Mon, 11 Oct 2021 10:29:15 +0000 Date: Mon, 11 Oct 2021 12:29:14 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Handle readnow in ensure_gdb_index Message-ID: <20211011102912.GA21648@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/with-mf.exp with target board readnow, I run into: ... FAIL: gdb.base/with-mf.exp: check if index present ... This is since commit 6010fb0c49e "[gdb/testsuite] Fix full buffer in gdb.rust/dwindex.exp". Before that commit, the proc ensure_gdb_index would treat the line: ... .gdb_index: faked for "readnow"^M ... as proof that an index is already present (which is incorrect). Now, instead it generates aforementioned FAIL and continues to generate an index. Fix this by explicitly handling the readnow case in proc ensure_gdb_index, such that we bail out instead. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Handle readnow in ensure_gdb_index --- gdb/testsuite/lib/gdb.exp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 6a5cdc06485..c2e6595f594 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -7922,6 +7922,7 @@ proc ensure_gdb_index { binfile {style ""} } { set testfile [file tail $binfile] set test "check if index present" set has_index 0 + set has_readnow 0 gdb_test_multiple "mt print objfiles ${testfile}" $test -lbl { -re "\r\n\\.gdb_index: version ${decimal}(?=\r\n)" { set has_index 1 @@ -7934,6 +7935,10 @@ proc ensure_gdb_index { binfile {style ""} } { -re "\r\nPsymtabs:(?=\r\n)" { gdb_test_lines "" $gdb_test_name ".*" } + -re ".gdb_index: faked for \"readnow\"" { + set has_readnow 1 + gdb_test_lines "" $gdb_test_name ".*" + } -re -wrap "" { fail $gdb_test_name } @@ -7943,6 +7948,10 @@ proc ensure_gdb_index { binfile {style ""} } { return 0 } + if { $has_readnow } { + return -1 + } + if { [add_gdb_index $binfile $style] == "1" } { return 1 }