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 38821385801A for ; Sun, 1 Aug 2021 18:05:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 38821385801A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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 73E1F1FEFE for ; Sun, 1 Aug 2021 18:05:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1627841109; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=ojzUNs/aWUAFIWal+nQZMxu8/y5vyr484Aim3xc4TzE=; b=hzpHRxPpxnvls2YPTafQRVuClBgGVQ6uPOh9JOO/Pj0L9kMmeYq1GiGkrsX75BkiiNwBbn RyjCXX4v/DwqeR+LZOVxi/KtHTBRvY5eb669Q9lUje9NnRARo8Cf/5JKFKCP80D0Kw01TP Qw7pwS7YInNgfsyuNQkCERp1u2/WQHE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1627841109; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=ojzUNs/aWUAFIWal+nQZMxu8/y5vyr484Aim3xc4TzE=; b=tHCxtI+WDOUD4Mt+/KQhQh8wusOoyS8WZ/RF+NVBl3zg+V2486nQbdc1FOjY7phWzQh4qt FGCGiLT4s1h3D4DQ== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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 imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 6167E1369B for ; Sun, 1 Aug 2021 18:05:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id LeCpFlXiBmHTcwAAGKfGzw (envelope-from ) for ; Sun, 01 Aug 2021 18:05:09 +0000 Date: Sun, 1 Aug 2021 20:05:07 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.base/maint.exp with cc-with-gdb-index Message-ID: <20210801180505.GA9296@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=-11.9 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 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: Sun, 01 Aug 2021 18:05:11 -0000 Hi, With target board cc-with-gdb-index we run into: ... FAIL: gdb.base/maint.exp: maint print statistics ... The output that is checked is: ... Statistics for 'maint':^M Number of "minimal" symbols read: 53^M Number of "full" symbols read: 40^M Number of "types" defined: 60^M Number of symbol tables: 7^M Number of symbol tables with line tables: 2^M Number of symbol tables with blockvectors: 2^M Number of read CUs: 2^M Number of unread CUs: 5^M Total memory used for objfile obstack: 20320^M Total memory used for BFD obstack: 4064^M Total memory used for string cache: 4064^M ... and the regexp doesn't match because it expects the "Number of read/unread CUs" lines in a different place. Fix this by updating the regexp. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix gdb.base/maint.exp with cc-with-gdb-index gdb/testsuite/ChangeLog: 2021-08-01 Tom de Vries * gdb.base/maint.exp: Update "maint print statistics" to match output with target board cc-with-gdb-index. --- gdb/testsuite/gdb.base/maint.exp | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index 6831d1ba720..0a0cc0f813c 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -191,19 +191,27 @@ if [istarget "*-*-cygwin*"] { set timeout [expr $timeout + 500] } -send_gdb "maint print statistics\n" -gdb_expect { - -re "Statistics for\[^\n\r\]*maint\[^\n\r\]*:\r\n Number of \"minimal\" symbols read: $decimal\r\n Number of \"full\" symbols read: $decimal\r\n Number of \"types\" defined: $decimal\r\n( Number of read CUs: $decimal\r\n Number of unread CUs: $decimal\r\n)? Number of symbol tables: $decimal\r\n Number of symbol tables with line tables: $decimal\r\n Number of symbol tables with blockvectors: $decimal\r\n( Number of \"partial\" symbols read: $decimal\r\n)?( Number of psym tables \\(not yet expanded\\): $decimal\r\n)? Total memory used for psymbol cache: $decimal\r\n Total memory used for objfile obstack: $decimal\r\n Total memory used for BFD obstack: $decimal\r\n Total memory used for string cache: $decimal\r\n" { - gdb_expect { - -re "$gdb_prompt $" { - pass "maint print statistics" - } - timeout { fail "(timeout) maint print statistics" } - } - } - -re ".*$gdb_prompt $" { fail "maint print statistics" } - timeout { fail "(timeout) maint print statistics" } -} +set re \ + [list \ + "Statistics for\[^\n\r\]*maint\[^\n\r\]*:" \ + " Number of \"minimal\" symbols read: $decimal" \ + " Number of \"full\" symbols read: $decimal" \ + " Number of \"types\" defined: $decimal" \ + " Number of symbol tables: $decimal" \ + " Number of symbol tables with line tables: $decimal" \ + " Number of symbol tables with blockvectors: $decimal" \ + "( Number of read CUs: $decimal" \ + " Number of unread CUs: $decimal" \ + ")?( Number of \"partial\" symbols read: $decimal" \ + ")?( Number of psym tables \\(not yet expanded\\): $decimal" \ + ")?( Total memory used for psymbol cache: $decimal" \ + ")? Total memory used for objfile obstack: $decimal" \ + " Total memory used for BFD obstack: $decimal" \ + " Total memory used for string cache: $decimal" \ + ""] + +set re [multi_line {*}$re] +gdb_test_lines "maint print statistics" "" $re # There aren't any ... gdb_test_no_output "maint print dummy-frames"