From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id QPkhLKpCG2RG9RYAWB0awg (envelope-from ) for ; Wed, 22 Mar 2023 14:02:18 -0400 Received: by simark.ca (Postfix, from userid 112) id B27621E223; Wed, 22 Mar 2023 14:02:18 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=ucCbOIi5; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 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 0C7B41E110 for ; Wed, 22 Mar 2023 14:02:18 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 86F3F385B521 for ; Wed, 22 Mar 2023 18:02:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 86F3F385B521 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679508137; bh=SnNwO/611RlUO+XhF4Og3nOXknkgNvHl5MQp+0W3IdU=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ucCbOIi5Zo6A/Jahh4xaDbdrqaGiEKXvEFLoJ6A6j/bQ24HNOjUoOgFtB90Ayk1nH nICt66BdjJS72agJvXZmO9xEy5hMSLj8sisWq+iLeTF7CoMta5Q1Jgd7MPpUixn7GV kXS5xG8e4eeZlKCOJ6rv8J2cag2X4HQsL3xjNlAo= Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 5582E3858433 for ; Wed, 22 Mar 2023 18:01:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5582E3858433 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 6EFA95BCE4; Wed, 22 Mar 2023 18:01:55 +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 586E513416; Wed, 22 Mar 2023 18:01:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id eoskFJNCG2RFJQAAMHmgww (envelope-from ); Wed, 22 Mar 2023 18:01:55 +0000 Message-ID: Date: Wed, 22 Mar 2023 19:01:58 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH] gdb/testsuite: adjust test cases to previous "maintenance info line-table" change Content-Language: en-US To: Simon Marchi , gdb-patches@sourceware.org References: <20230322151701.453666-1-simon.marchi@polymtl.ca> In-Reply-To: <20230322151701.453666-1-simon.marchi@polymtl.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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" On 3/22/23 16:17, Simon Marchi via Gdb-patches wrote: > Commit 904d9b02a185 ("gdb: make "maintenance info line-table" show > relocated addresses again") changed the format of that command, but > failed to adjust some test cases that relied on it. This patch fixes > it. > > The failures fixed are: > > FAIL: gdb.base/maint.exp: maint info line-table w/o a file name > FAIL: gdb.dwarf2/dw2-out-of-range-end-of-seq.exp: END with address 1 eliminated > FAIL: gdb.dwarf2/dw2-ranges-base.exp: count END markers in line table > Hi, I did a clean build and test run, and confirmed that these are the only three regressions. Then I applied this patch, and verified that if fixes the regressions. LGTM. Thanks, - Tom > Change-Id: I946580d5e100f1beeac99a9e90d7819c6bb4ac6c > --- > gdb/testsuite/gdb.base/maint.exp | 8 ++++---- > gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp | 4 ++-- > gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp | 6 +++--- > 3 files changed, 9 insertions(+), 9 deletions(-) > > diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp > index 98e23b40ef65..c05d0987e7fa 100644 > --- a/gdb/testsuite/gdb.base/maint.exp > +++ b/gdb/testsuite/gdb.base/maint.exp > @@ -386,11 +386,11 @@ gdb_test "maint" \ > set saw_srcfile 0 > gdb_test_multiple "maint info line-table" \ > "maint info line-table w/o a file name" { > - -re "symtab: \[^\n\r\]+${srcfile} \\(\\(struct symtab \\*\\) $hex\\)\r\nlinetable: \\(\\(struct linetable \\*\\) $hex\\):\r\nINDEX\[ \t\]+LINE\[ \t\]+ADDRESS\[^\r\n\]*" { > + -re "symtab: \[^\n\r\]+${srcfile} \\(\\(struct symtab \\*\\) $hex\\)\r\nlinetable: \\(\\(struct linetable \\*\\) $hex\\):\r\nINDEX\[ \t\]+LINE\[ \t\]+REL-ADDRESS\[ \t\]+UNREL-ADDRESS\[^\r\n\]*" { > set saw_srcfile 1 > exp_continue > } > - -re "symtab: \[^\n\r\]+ \\(\\(struct symtab \\*\\) $hex\\)\r\nlinetable: \\(\\(struct linetable \\*\\) $hex\\):\r\nINDEX\[ \t\]+LINE\[ \t\]+ADDRESS\[^\r\n\]*" { > + -re "symtab: \[^\n\r\]+ \\(\\(struct symtab \\*\\) $hex\\)\r\nlinetable: \\(\\(struct linetable \\*\\) $hex\\):\r\nINDEX\[ \t\]+LINE\[ \t\]+REL-ADDRESS\[ \t\]+UNREL-ADDRESS\[^\r\n\]*" { > # Match each symtab to avoid overflowing expect's buffer. > exp_continue > } > @@ -398,7 +398,7 @@ gdb_test_multiple "maint info line-table" \ > # For symtabs with no linetable. > exp_continue > } > - -re "^$decimal\[ \t\]+$decimal\[ \t\]+$hex\[^\r\n\]*\r\n" { > + -re "^$decimal\[ \t\]+$decimal\[ \t\]+$hex\[ \t\]+$hex\[^\r\n\]*\r\n" { > # Line table entries can be long too: > # > # INDEX LINE ADDRESS > @@ -416,7 +416,7 @@ gdb_test_multiple "maint info line-table" \ > # Match each line to avoid overflowing expect's buffer. > exp_continue > } > - -re "^$decimal\[ \t\]+END\[ \t\]+$hex\[^\r\n\]*\r\n" { > + -re "^$decimal\[ \t\]+END\[ \t\]+$hex\[ \t\]+$hex\[^\r\n\]*\r\n" { > # Matches an end marker in the above. > exp_continue > } > diff --git a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp > index c0a33b95b653..bd3ea5b5d548 100644 > --- a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp > +++ b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp > @@ -85,10 +85,10 @@ if ![runto_main] { > > set test "END with address 1 eliminated" > gdb_test_multiple "maint info line-table $srcfile$" $test { > - -re -wrap "END *0x0*1 *Y *\r\n.*" { > + -re -wrap "END *0x0*1 *$hex *Y *\r\n.*" { > fail $gdb_test_name > } > - -re -wrap "END *$hex *Y *" { > + -re -wrap "END *$hex *$hex *Y *" { > pass $gdb_test_name > } > } > diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp > index 147e943361e0..ee274ee128c4 100644 > --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp > +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp > @@ -145,7 +145,7 @@ set prev -1 > set seq_count 0 > gdb_test_multiple "maint info line-table gdb.dwarf2/dw2-ranges-base.c" \ > "count END markers in line table" { > - -re "^$decimal\[ \t\]+$decimal\[ \t\]+$hex\(\[ \t\]+Y\)? *\r\n" { > + -re "^$decimal\[ \t\]+$decimal\[ \t\]+$hex\[ \t\]+$hex\(\[ \t\]+Y\)? *\r\n" { > if { $prev != -1 } { > gdb_assert "$prev == 1" \ > "prev of normal entry at $seq_count is end marker" > @@ -154,7 +154,7 @@ gdb_test_multiple "maint info line-table gdb.dwarf2/dw2-ranges-base.c" \ > incr seq_count > exp_continue > } > - -re "^$decimal\[ \t\]+END\[ \t\]+$hex\(\[ \t\]+Y\)? *\r\n" { > + -re "^$decimal\[ \t\]+END\[ \t\]+$hex\[ \t\]+$hex\(\[ \t\]+Y\)? *\r\n" { > if { $prev != -1 } { > gdb_assert "$prev == 0" \ > "prev of end marker at $seq_count is normal entry" > @@ -174,7 +174,7 @@ gdb_test_multiple "maint info line-table gdb.dwarf2/dw2-ranges-base.c" \ > -re ".*linetable: \\(\\(struct linetable \\*\\) 0x0\\):\r\nNo line table.\r\n" { > exp_continue > } > - -re ".*linetable: \\(\\(struct linetable \\*\\) $hex\\):\r\nINDEX\[ \t\]+LINE\[ \t\]+ADDRESS\[ \t\]+IS-STMT\[ \t\]PROLOGUE-END *\r\n" { > + -re ".*linetable: \\(\\(struct linetable \\*\\) $hex\\):\r\nINDEX\[ \t\]+LINE\[ \t\]+REL-ADDRESS\[ \t\]+UNREL-ADDRESS\[ \t\]+IS-STMT\[ \t\]PROLOGUE-END *\r\n" { > exp_continue > } > } > > base-commit: bf3f6c02d73f9823b8cb4f59524f29fbbfb6126d