From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id E688C395A42F for ; Wed, 11 May 2022 09:14:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E688C395A42F 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 D5B8D1F8CC for ; Wed, 11 May 2022 09:14:47 +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 C13C113A76 for ; Wed, 11 May 2022 09:14:47 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id GDMMLod+e2IWCAAAMHmgww (envelope-from ) for ; Wed, 11 May 2022 09:14:47 +0000 Date: Wed, 11 May 2022 11:14:46 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.base/maint.exp on powerpc64le Message-ID: <20220511091443.GA25428@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Wed, 11 May 2022 09:14:50 -0000 Hi, On powerpc64le-linux, I ran into: ... FAIL: gdb.base/maint.exp: maint print objfiles: symtabs ... The problem is that: - the "Cooked index in use" line occurs twice in the gdb output: - once for exec maint, and - once for "Object file system-supplied DSO". - the matching of the second "Cooked index in use" also consumes the "Symtabs:" string, and consequently the corresponding clause does not trigger and $symtabs remains 0. Fix this by limiting the output of the command to the exec. Tested on x86_64-linux and powerpcle-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix gdb.base/maint.exp on powerpc64le --- gdb/testsuite/gdb.base/maint.exp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index 45ccdc6584e..2817c6eafb9 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -226,7 +226,9 @@ set header 0 set psymtabs 0 set cooked_index 0 set symtabs 0 -gdb_test_multiple "maint print objfiles" "" -lbl { +set cmd "maint print objfiles" +set re "maint" +gdb_test_multiple "$cmd $re" "$cmd" -lbl { -re "\r\nObject file.*maint($EXEEXT)?: Objfile at ${hex}" { set header 1 exp_continue