From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id 58CA63858036 for ; Thu, 4 Nov 2021 21:14:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 58CA63858036 X-ASG-Debug-ID: 1636060454-0c856e03889181c0001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id 2NtoqAy5PaiRaAVa (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 04 Nov 2021 17:14:14 -0400 (EDT) X-Barracuda-Envelope-From: simon.marchi@efficios.com X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from epycamd.internal.efficios.com (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtp.ebox.ca (Postfix) with ESMTP id 1896D441B21; Thu, 4 Nov 2021 17:14:14 -0400 (EDT) From: Simon Marchi X-Barracuda-RBL-IP: 192.222.180.24 X-Barracuda-Effective-Source-IP: 192-222-180-24.qc.cable.ebox.net[192.222.180.24] X-Barracuda-Apparent-Source-IP: 192.222.180.24 To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH] gdb.debuginfod/fetch_src_and_symbols.exp: fix when GDB is built with AddressSanitizer Date: Thu, 4 Nov 2021 17:14:12 -0400 X-ASG-Orig-Subj: [PATCH] gdb.debuginfod/fetch_src_and_symbols.exp: fix when GDB is built with AddressSanitizer Message-Id: <20211104211412.22991-1-simon.marchi@efficios.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1636060454 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-Scan-Msg-Size: 1979 X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests=BSF_RULE_7582B X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.93740 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE_7582B Custom Rule 7582B X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_SOFTFAIL, 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: Thu, 04 Nov 2021 21:14:23 -0000 This test fails for me, showing: ERROR: tcl error sourcing /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp. ERROR: This GDB was configured as follows: configure --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-auto-load-dir=$debugdir:$datadir/auto-load --with-auto-load-safe-path=$debugdir:$datadir/auto-load ... and much more ... The problem is that TCL's exec throws an error as soon as the exec'ed process outputs on stderr. When GDB is built with ASan, it prints some warnings about pre-existing signal handlers: warning: Found custom handler for signal 7 (Bus error) preinstalled. warning: Found custom handler for signal 8 (Floating point exception) preinstalled. warning: Found custom handler for signal 11 (Segmentation fault) preinstalled. Pass --quiet to GDB to avoid these warnings. Change-Id: I3751d89b9b1df646da19149d7cb86775e2d3e80f --- gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp index 92f3cd8b01d..31e9e4a92f0 100644 --- a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp +++ b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp @@ -30,8 +30,13 @@ if { [which curl] == 0 } { } # Skip testing if gdb was not configured with debuginfod +# +# If GDB is built with ASan, it warns that some signal handlers (installed by +# ASan) exist on startup. That makes TCL's exec throw an error. Disable that +# by passing --quiet. + if { [string first "with-debuginfod" \ - [eval exec $GDB $INTERNAL_GDBFLAGS --configuration]] == -1 } { + [eval exec $GDB --quiet $INTERNAL_GDBFLAGS --configuration]] == -1 } { untested "gdb not configured with debuginfod" return -1 } -- 2.33.0