From patchwork Thu Apr 7 13:41:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yvan Roux X-Patchwork-Id: 65323 Delivered-To: patch@linaro.org Received: by 10.112.43.237 with SMTP id z13csp86490lbl; Thu, 7 Apr 2016 06:41:53 -0700 (PDT) X-Received: by 10.67.1.237 with SMTP id bj13mr4914206pad.130.1460036513307; Thu, 07 Apr 2016 06:41:53 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id r75si210039pfi.85.2016.04.07.06.41.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Apr 2016 06:41:53 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-424501-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-424501-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-424501-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=ZGArGwbhBltVa0j7HY ytum47GimzrNPRwTy1rbERCGRMlkYnKRqVeqE5eU/KMVxiaHLfsKGP503SXzm3v3 Si5knuHpovlcW3ee9rNYBYFtw4XFR0+gVgPwWwR42PuU4a6/AqdaPZ93jbXRRgHY BzdeLYpXQ4EYS8KWleLRzzNzA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=K4YDhM/GzPqdQT3MEdLte4u4 htQ=; b=gdhYS1qdkww4hOYW1SlbhPA+VbkaTubiFNHSJGeB5q5ewBh7OP1G6jf5 3mfZnQBIgg3ZdtEQ57gWctJwT+Fyk196ISvkTv6rfsPhvquTyTfNFXi08hDzTyr7 kx8w+8gKrZPCwiWT43xgOe7BGU4Q5NnnCqqfTEXibNx71Xc3jWM= Received: (qmail 823 invoked by alias); 7 Apr 2016 13:41:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 792 invoked by uid 89); 7 Apr 2016 13:41:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=armv8l, validated X-HELO: mail-yw0-f176.google.com Received: from mail-yw0-f176.google.com (HELO mail-yw0-f176.google.com) (209.85.161.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 07 Apr 2016 13:41:22 +0000 Received: by mail-yw0-f176.google.com with SMTP id d68so96673584ywe.1 for ; Thu, 07 Apr 2016 06:41:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=EuswIXIVHqf3xV4Ny/I0wPzcqWEUhN3hGF2NLdUzgEk=; b=gSXnA9xwRymsd/y4KQxzBEDR0C6edyuYYVEfJZvurbGTrn/sHJYGuigoggwIUVs3K9 9M7lXYSpci7Bpv2W0WcFLQv9B5TE2f+cYgTWCOqILEr43zeP+NAYYkFc9JBH+N9yQwDl WmB2mjArJwoCWH9dPseisN+FbSfXq6LN4cerhIH3IKiEpfA4l5Lk+RIXoEszqhNNurUh gQem9OJQhDoXYOo5ENK7NniLzEgZiPzmvkqqLg838qpXwyVWiuKtUNH5rObqq23xiE1w mPtzBmRxkbxkf74eY/ocgjxoCDZ4Fv3jox/cVLjmbZbbMz6JwYLI13xj6f3P0Ro9Va1m xMqQ== X-Gm-Message-State: AD7BkJJvSJ4aUZOAqFI3LlDoGUt0PpMhldlEoLGra9e04XlEo3VXrwJo059MDO2i0oNqa4TNM5p/8PQHF2CHBEAq MIME-Version: 1.0 X-Received: by 10.37.50.149 with SMTP id y143mr1607463yby.10.1460036479948; Thu, 07 Apr 2016 06:41:19 -0700 (PDT) Received: by 10.37.15.87 with HTTP; Thu, 7 Apr 2016 06:41:19 -0700 (PDT) In-Reply-To: References: <570526A2.70108@redhat.com> <57052A27.9080007@redhat.com> Date: Thu, 7 Apr 2016 15:41:19 +0200 Message-ID: Subject: Re: [Patch] Avoid deadlock in guality tests. From: Yvan Roux To: Pedro Alves Cc: "gcc-patches@gcc.gnu.org" X-IsSubscribed: yes Hi, On 6 April 2016 at 17:29, Yvan Roux wrote: > On 6 April 2016 at 17:24, Pedro Alves wrote: >> On 04/06/2016 04:13 PM, Yvan Roux wrote: >>> On 6 April 2016 at 17:09, Pedro Alves wrote: >>>> On 04/06/2016 03:53 PM, Yvan Roux wrote: >>>>> Dejagnu cleanup mechanism needs to be enhanced, but I think that it >>>>> would also be better if guality tests don't get stuck and/or can be >>>>> killed easily. This patch changes GDB signals handling to nostop for >>>>> SIGSEGV, SIGINT, SIGTERM and SIGBUS. I am not sure if we need to >>>>> increase the list of signals to all the stop ones (which are not used >>>>> by GDB) or to restrict it just to SIGSEGV. >>>> >>>> I'd suggest: >>>> >>>> handle all pass nostop >>>> handle SIGINT pass nostop >>>> >>>> That would make gdb pass _all_ signals except SIGTRAP >>> >>> I've committed it already :/ >>> >>> I can make the change, but isn't there cases where SIGILL is used for >>> breakpoints in GDB (I think I've seen that somewhere). >> >> True, and SIGSEGV and SIGEMT too. But GDB handles that transparently >> and won't pass such a breakpoint signal to the program, even with >> "handle pass". Only "handle SIGTRAP pass" passes a >> breakpoint/step/etc. trap to the program. > > Ah ok, thanks for the explanations Pedro, I'll prepare a new patch and > validate it. Here is the new patch which makes GDB pass all signals except SIGTRAP. validated on native armv8l target without regessions. ok for trunk ? Cheers, Yvan 2016-04-07 Yvan Roux Pedro Alves * gcc.dg/guality/guality.h (main): Make GDB pass all signals except SIGTRAP. diff --git a/gcc/testsuite/gcc.dg/guality/guality.h b/gcc/testsuite/gcc.dg/guality/guality.h index d5867d8..acf977f 100644 --- a/gcc/testsuite/gcc.dg/guality/guality.h +++ b/gcc/testsuite/gcc.dg/guality/guality.h @@ -252,10 +252,8 @@ main (int argc, char *argv[]) if (!guality_gdb_input || fprintf (guality_gdb_input, "\ set height 0\n\ +handle all pass nostop\n\ handle SIGINT pass nostop\n\ -handle SIGTERM pass nostop\n\ -handle SIGSEGV pass nostop\n\ -handle SIGBUS pass nostop\n\ attach %i\n\ set guality_attached = 1\n\ b %i\n\