Message ID | 20230323134716.2853-1-tdevries@suse.de |
---|---|
State | Committed |
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B89938515C9 for <patchwork@sourceware.org>; Thu, 23 Mar 2023 13:47:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B89938515C9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679579267; bh=QPJ0xmYjJO2KkV2HrAqIVU9YsMka2VPlqrDWoCa2HR8=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=v0RSC3XgyBqRbeXAGNfaaT56P89kZ0qUT5LAmuroc8ICLbwKD2eyTC/pFP34wtCSA e422y25FArIgSd79LWtKUNodPjl2aL3zCMb9O/dqIDwnp3Eyx7DglRZb5udypnP/go sQ3gM/4YRo6lUJylE6c4kuOV/mxdY7EISM+SuHrY= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 3173C387089F for <gdb-patches@sourceware.org>; Thu, 23 Mar 2023 13:47:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3173C387089F 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 6AEE11FDD4; Thu, 23 Mar 2023 13:47:17 +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 45F6513596; Thu, 23 Mar 2023 13:47:17 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id QZgRD2VYHGTdZAAAMHmgww (envelope-from <tdevries@suse.de>); Thu, 23 Mar 2023 13:47:17 +0000 To: gdb-patches@sourceware.org Cc: Simon Marchi <simon.marchi@polymtl.ca> Subject: [PATCH] [gdb/testsuite] Fix gdb.cp/m-static.exp regression on Ubuntu 20.04 Date: Thu, 23 Mar 2023 14:47:16 +0100 Message-Id: <20230323134716.2853-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> Reply-To: Tom de Vries <tdevries@suse.de> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
[gdb/testsuite] Fix gdb.cp/m-static.exp regression on Ubuntu 20.04
|
|
Commit Message
Tom de Vries
March 23, 2023, 1:47 p.m. UTC
In commit 722c4596034 ("[gdb/testsuite] Fix gdb.cp/*.exp for remote host"), I needed to change ".*/" into "(.*/)?" in: ... gdb_test "info variable everywhere" \ "File .*/m-static\[.\]h.*const int gnu_obj_4::everywhere;" ... However, due to that fact that I got this output: ... (gdb) info variable everywhere^M All variables matching regular expression "everywhere":^M ^M File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static.h:^M 8: const int gnu_obj_4::everywhere;^M ^M File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static1.cc:^M 8: const int gnu_obj_4::everywhere;^M ... I decided to make the matching somewhat stricter, to make sure that the two matched lines were subsequent. The commit turned out to be more strict than intended, and caused a regression on Ubuntu 20.04, where the output was instead: ... (gdb) info variable everywhere^M All variables matching regular expression "everywhere":^M ^M File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static.h:^M 8: const int gnu_obj_4::everywhere;^M ... At that point I realized I'm looking at a bug (filed as PR symtab/30265), which manifests on openSUSE Leap 15.4 for native and readnow, and on Ubuntu 20.04 for readnow, but not for native. Before my commit, the test-case passed whether the bug manifested or not. After my commit, the test-case only passed when the bug manifested. Fix the test-case regression by reverting to the situation before the commit: pass whether the bug manifests or not. We could add an xfail for the PR, but I'm expecting a fix soon, so that doesn't look worth the effort. Tested on x86_64-linux, both on openSUSE Leap 15.4 and Ubuntu 20.04, both with native and readnow. Reported-By: Simon Marchi <simon.marchi@efficios.com> --- gdb/testsuite/gdb.cp/m-static.exp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) base-commit: 5834f36d93cabf1a8bcc7dd7654141aed3d296bc
Comments
On 3/23/23 09:47, Tom de Vries wrote: > In commit 722c4596034 ("[gdb/testsuite] Fix gdb.cp/*.exp for remote host"), I > needed to change ".*/" into "(.*/)?" in: > ... > gdb_test "info variable everywhere" \ > "File .*/m-static\[.\]h.*const int gnu_obj_4::everywhere;" > ... > > However, due to that fact that I got this output: > ... > (gdb) info variable everywhere^M > All variables matching regular expression "everywhere":^M > ^M > File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static.h:^M > 8: const int gnu_obj_4::everywhere;^M > ^M > File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static1.cc:^M > 8: const int gnu_obj_4::everywhere;^M > ... > I decided to make the matching somewhat stricter, to make sure that the two > matched lines were subsequent. > > The commit turned out to be more strict than intended, and caused a regression > on Ubuntu 20.04, where the output was instead: > ... > (gdb) info variable everywhere^M > All variables matching regular expression "everywhere":^M > ^M > File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static.h:^M > 8: const int gnu_obj_4::everywhere;^M > ... > > At that point I realized I'm looking at a bug (filed as PR symtab/30265), > which manifests on openSUSE Leap 15.4 for native and readnow, and on Ubuntu > 20.04 for readnow, but not for native. > > Before my commit, the test-case passed whether the bug manifested or not. > > After my commit, the test-case only passed when the bug manifested. > > Fix the test-case regression by reverting to the situation before the commit: > pass whether the bug manifests or not. We could add an xfail for the PR, but > I'm expecting a fix soon, so that doesn't look worth the effort. > > Tested on x86_64-linux, both on openSUSE Leap 15.4 and Ubuntu 20.04, both with > native and readnow. > > Reported-By: Simon Marchi <simon.marchi@efficios.com> For those wondering, this is already pushed :) Simon
On 3/24/23 15:17, Simon Marchi wrote: > On 3/23/23 09:47, Tom de Vries wrote: >> In commit 722c4596034 ("[gdb/testsuite] Fix gdb.cp/*.exp for remote host"), I >> needed to change ".*/" into "(.*/)?" in: >> ... >> gdb_test "info variable everywhere" \ >> "File .*/m-static\[.\]h.*const int gnu_obj_4::everywhere;" >> ... >> >> However, due to that fact that I got this output: >> ... >> (gdb) info variable everywhere^M >> All variables matching regular expression "everywhere":^M >> ^M >> File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static.h:^M >> 8: const int gnu_obj_4::everywhere;^M >> ^M >> File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static1.cc:^M >> 8: const int gnu_obj_4::everywhere;^M >> ... >> I decided to make the matching somewhat stricter, to make sure that the two >> matched lines were subsequent. >> >> The commit turned out to be more strict than intended, and caused a regression >> on Ubuntu 20.04, where the output was instead: >> ... >> (gdb) info variable everywhere^M >> All variables matching regular expression "everywhere":^M >> ^M >> File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static.h:^M >> 8: const int gnu_obj_4::everywhere;^M >> ... >> >> At that point I realized I'm looking at a bug (filed as PR symtab/30265), >> which manifests on openSUSE Leap 15.4 for native and readnow, and on Ubuntu >> 20.04 for readnow, but not for native. >> >> Before my commit, the test-case passed whether the bug manifested or not. >> >> After my commit, the test-case only passed when the bug manifested. >> >> Fix the test-case regression by reverting to the situation before the commit: >> pass whether the bug manifests or not. We could add an xfail for the PR, but >> I'm expecting a fix soon, so that doesn't look worth the effort. >> >> Tested on x86_64-linux, both on openSUSE Leap 15.4 and Ubuntu 20.04, both with >> native and readnow. >> >> Reported-By: Simon Marchi <simon.marchi@efficios.com> > > For those wondering, this is already pushed :) Hi Simon, sorry, forgot to mention that here, thanks for the note. Thanks, - Tom
diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp index 419d772e28e..37d3289a751 100644 --- a/gdb/testsuite/gdb.cp/m-static.exp +++ b/gdb/testsuite/gdb.cp/m-static.exp @@ -186,8 +186,7 @@ if { $non_dwarf } { setup_xfail *-*-* } gdb_test "info variable everywhere" \ [multi_line \ "File (.*/)?m-static\[.\]h:" \ - "$decimal:\tconst int gnu_obj_4::everywhere;" \ - ".*"] + "$decimal:\tconst int gnu_obj_4::everywhere;.*"] # Perhaps at some point test4 should also include a test for a static # const int that was initialized in the header file. But I'm not sure