From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id XrNfJmWOm2P/sAEAWB0awg (envelope-from ) for ; Thu, 15 Dec 2022 16:15:17 -0500 Received: by simark.ca (Postfix, from userid 112) id 8AF581E11F; Thu, 15 Dec 2022 16:15:17 -0500 (EST) 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=HEKSdW2F; 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=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, 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 3B4BC1E0CD for ; Thu, 15 Dec 2022 16:15:17 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BDC2E381D462 for ; Thu, 15 Dec 2022 21:15:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BDC2E381D462 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1671138916; bh=1gTPrhmp4UAkHQ9WgC/qiKFsfID7a+KaybI3N9FbIg8=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=HEKSdW2F6S7a1g5v8XdAhqVXXsfnUN5FgmsX8eVTzDRa0KW+MoVRNV1or7GNTg6sq BDsSG3BpOxKyVCANmoaeumYp4es9xUh44b0OkShyv5GXs3jeYAGyBkAgVTdwUuW7yJ xYKoBNhrRhZZ5Jrj/CnR62op35PwMhQqzwv52Bc8= Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by sourceware.org (Postfix) with ESMTPS id 895243896C01 for ; Thu, 15 Dec 2022 21:14:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 895243896C01 Received: by mail-io1-xd33.google.com with SMTP id n63so303561iod.7 for ; Thu, 15 Dec 2022 13:14:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1gTPrhmp4UAkHQ9WgC/qiKFsfID7a+KaybI3N9FbIg8=; b=qL2byOElK6cX2+o94MqnpC3wsfM1SVgNebeJb5Dt9qp/Ayoujwh1NnbcxfHOaAA/AB V/1/bH9VZNWj8fzbo2dQ/SJEJ/Sm4NVgvPrAacFlpJorEg4moo7MxMGaqygozXjcc2pt lKQIXX7ieUR2apeCOkT/38TZRJsj2baFXEr3oH1Mb4QCtyuBxHRfiL8g760NPs8AcDZV mafnLzhZF+nvL7jAxaIB1p90fUsrFRXWNiYBEjQy1ieYuWImW7gmUTC9uRgv6e0o/ZMD uFNbbiXVd7IM+PpLSrGi0n2m//q+tB+uyNgfdU5qVaKZOezOmqknVWBTdnrgxiH24z/U 45jw== X-Gm-Message-State: ANoB5pmVOYhDvZ0WWO1HHK1/6fA8xESBGpluKti4S9CqVgGB6F9UdeNC TVnt8K5cwQNleC025HkEhTuY74rWZyKZ8oD+ X-Google-Smtp-Source: AA0mqf492ephJdpIFstExDjJSQPl2xyvau7oOY/Yn+YA6H2p7Ze2MeofLQ9FF1tl16PuemYE2zd9cQ== X-Received: by 2002:a5d:8414:0:b0:6df:4762:84fd with SMTP id i20-20020a5d8414000000b006df476284fdmr18338981ion.17.1671138892857; Thu, 15 Dec 2022 13:14:52 -0800 (PST) Received: from localhost.localdomain (97-122-76-186.hlrn.qwest.net. [97.122.76.186]) by smtp.gmail.com with ESMTPSA id z28-20020a027a5c000000b00363e4730a41sm114056jad.175.2022.12.15.13.14.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Dec 2022 13:14:52 -0800 (PST) To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] Handle SIGSEGV in gdb selftests Date: Thu, 15 Dec 2022 14:14:42 -0700 Message-Id: <20221215211442.2515108-1-tromey@adacore.com> X-Mailer: git-send-email 2.34.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Tromey via Gdb-patches Reply-To: Tom Tromey Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" The gdb.gdb self-tests were timing out for me. Looking into it, the problem is that the version of the Boehm GC that is used by Guile on my machine causes a SEGV during stack probing. This unexpected stop confuses the tests and causes repeated timeouts. This patch adapts the two failing tests. This makes them work for me, and reduces the running time of gdb.gdb from 20 minutes to about 11 seconds. --- gdb/testsuite/gdb.gdb/python-helper.exp | 6 ++++++ gdb/testsuite/gdb.gdb/selftest.exp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/gdb/testsuite/gdb.gdb/python-helper.exp b/gdb/testsuite/gdb.gdb/python-helper.exp index 3585ac9f0bf..fc52929489e 100644 --- a/gdb/testsuite/gdb.gdb/python-helper.exp +++ b/gdb/testsuite/gdb.gdb/python-helper.exp @@ -93,6 +93,12 @@ proc test_python_helper {} { # here. gdb_test_multiple "continue" "start inner gdb" { -i "$inferior_spawn_id" + -re "received signal SIGSEGV.* in GC_.*$outer_prompt_re" { + # Some versions of the GC used by Guile cause a SEGV + # during stack probing. Ignore this and carry on. + send_gdb "continue\n" + exp_continue + } -re "\r\n$gdb_prompt $" { pass $gdb_test_name } diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp index ca1e7cffb4e..e2b9247f65d 100644 --- a/gdb/testsuite/gdb.gdb/selftest.exp +++ b/gdb/testsuite/gdb.gdb/selftest.exp @@ -75,6 +75,12 @@ proc test_with_self { } { set test "xgdb is at prompt" gdb_test_multiple "continue" $test { -i "$inferior_spawn_id" + -re "received signal SIGSEGV.* in GC_.*$gdb_prompt" { + # Some versions of the GC used by Guile cause a SEGV + # during stack probing. Ignore this and carry on. + send_gdb "continue\n" + exp_continue + } -re "$banner" { pass $test } -- 2.34.3