From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-io1-xd33.google.com with SMTP id n63so303561iod.7 for ; Thu, 15 Dec 2022 13:14:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1gTPrhmp4UAkHQ9WgC/qiKFsfID7a+KaybI3N9FbIg8=; b=VtafcPz4xVDrnOaRf/Lv5Je0gpNUeWe6QTjeE081ghiCKSS3m++eEdSi3EA7gAkI4N bS8UQNP8Ph7nAIsPvJ6hAssO21/C/68IFosh7l2WLrTvUMqj5ykbIreZ0LMI3ygvYvNA 22rrTqjQKAnjU8Y//E31u1Rml1vlPTYSGrar9w0yx2w/pKnnbDeFZMEnaiE+Pb36RFca XTxOyP+e7ZKZ5qjqsg9crHwmFrLNyRC4FICt7/aF3YZa8ENpoXXCPkBnraDals8WuzH2 lam6w9E9WxAAd7yUoberMCAnQ2o9F38a+72dmTbgKJdcroFAHsaSOmac6W4lYT+lNF5n Fc/A== 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) From: Tom Tromey 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-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,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 List-Id: 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