From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id OIq/CgUVwGIqpwoAWB0awg (envelope-from ) for ; Sat, 02 Jul 2022 05:51:01 -0400 Received: by simark.ca (Postfix, from userid 112) id 19BAC1E22B; Sat, 2 Jul 2022 05:51:01 -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=yUoldNp2; 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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.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 94A2F1E15C for ; Sat, 2 Jul 2022 05:51:00 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 351073857BBC for ; Sat, 2 Jul 2022 09:51:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 351073857BBC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1656755460; bh=YNyF08R2UEb3pt4F/ciKRxRfT/xU44kO3AaXH4m0aKg=; 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=yUoldNp2679A0aC4G7LV0Son/34ahJ8CxhpeCc4ctY6k1NUeVbAf4T+537h+k7WVu DJO+wvl56eHQeL3kHNppC8pEVbLQaReIEF5jGqIMKPc/KEtAuIZbnD3TsQUo0pomJN uJLZ68roEAQWaQJtrVk0fuYBbh+ZFpSS5ZRXEfmA= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 0A2963858C2F for ; Sat, 2 Jul 2022 09:50:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0A2963858C2F 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 D4F922239C for ; Sat, 2 Jul 2022 09:50:39 +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 C4D3A13427 for ; Sat, 2 Jul 2022 09:50:39 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id JmjCLu8UwGJYHgAAMHmgww (envelope-from ) for ; Sat, 02 Jul 2022 09:50:39 +0000 Message-ID: <3b8cd629-4949-fe2d-65a0-2bfcbc697e8d@suse.de> Date: Sat, 2 Jul 2022 11:50:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: [committed][gdb/testsuite] Fix gdb.base/early-init-file.exp with -fsanitize=thread Content-Language: en-US To: gdb-patches@sourceware.org References: <20220626131505.GA24175@delia> In-Reply-To: <20220626131505.GA24175@delia> 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 6/26/22 15:15, Tom de Vries via Gdb-patches wrote: > Hi, > > When building gdb with -fsanitize=thread, I run into: > ... > FAIL: gdb.base/early-init-file.exp: check startup version string has style \ > version > ... > due to this: > ... > warning: Found custom handler for signal 7 (Bus error) preinstalled.^M > warning: Found custom handler for signal 8 (Floating point exception) \ > preinstalled.^M > warning: Found custom handler for signal 11 (Segmentation fault) \ > preinstalled.^M > Some signal dispositions inherited from the environment (SIG_DFL/SIG_IGN)^M > won't be propagated to spawned programs.^M > ... > appearing before the "GNU gdb (GDB) $version" line. > > This is similar to the problem fixed by commit f0bbba7886f > ("gdb.debuginfod/fetch_src_and_symbols.exp: fix when GDB is built with > AddressSanitizer"). > > In that commit, the problem was fixed by starting gdb with -quiet, but using > that would mean the "GNU gdb (GDB) $version" line that we're trying to check > would disappear. > > Fix this instead by updating the regexp to allow the message. > > Tested on x86_64-linux. > > Any comments? > Committed. Thanks, - Tom > [gdb/testsuite] Fix gdb.base/early-init-file.exp with -fsanitize=thread > > --- > gdb/testsuite/gdb.base/early-init-file.exp | 19 +++++++++++++++++-- > 1 file changed, 17 insertions(+), 2 deletions(-) > > diff --git a/gdb/testsuite/gdb.base/early-init-file.exp b/gdb/testsuite/gdb.base/early-init-file.exp > index 1bc6cea13e3..b5aa5583615 100644 > --- a/gdb/testsuite/gdb.base/early-init-file.exp > +++ b/gdb/testsuite/gdb.base/early-init-file.exp > @@ -22,9 +22,23 @@ if {[build_executable "failed to build" $testfile $srcfile]} { > return -1 > } > > +set custom_signal_handle_re \ > + "warning: Found custom handler for signal $decimal \(\[^\r\n\]+\) preinstalled\." > +set signal_dispositions_re \ > + [multi_line \ > + "Some signal dispositions inherited from the environment \(\[^\r\n\]+\)" \ > + "won't be propagated to spawned programs\." ] > +set gdb_sanitizer_msg_re \ > + [multi_line \ > + "($custom_signal_handle_re" \ > + ")+$signal_dispositions_re" \ > + ""] > + > # Start gdb and ensure that the initial version string is styled in > # STYLE, use MESSAGE as the name of the test. > proc check_gdb_startup_version_string { style { message "" } } { > + global gdb_sanitizer_msg_re > + > if { $message == "" } { > set message "check startup version string has style $style" > } > @@ -32,7 +46,7 @@ proc check_gdb_startup_version_string { style { message "" } } { > gdb_exit > gdb_spawn > set vers [style "GNU gdb.*" $style] > - gdb_test "" "^${vers}.*" $message > + gdb_test "" "^(${gdb_sanitizer_msg_re})?${vers}.*" $message > } > > # Return a list containing two directory paths for newly created home > @@ -70,12 +84,13 @@ proc setup_home_directories { prefix content } { > # drop straight to the prompt. > proc check_gdb_startups_up_quietly { message } { > global gdb_prompt > + global gdb_sanitizer_msg_re > > gdb_exit > gdb_spawn > > gdb_test_multiple "" $message { > - -re "^$gdb_prompt $" { > + -re "^(${gdb_sanitizer_msg_re})?$gdb_prompt $" { > pass $gdb_test_name > } > }