From patchwork Fri Apr 20 17:21:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 902074 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-476684-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="kDBe5huH"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40SN2Q4k1Fz9s4q for ; Sat, 21 Apr 2018 03:22:05 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:message-id:date:mime-version:content-type; q=dns; s= default; b=si0j1W7kOVbqn0zxZbHMeUjBop1ozg/WB5LUzCAsSr4idgjVebKAa 7CD282B8iA2OBv6+lo91+XCy4A+NhnP2LlsHCBJ6YZI8vOvkQE6pkEW68OnUZzTB 4Wq0IlyR6gzEmLcyg8GpSQLcrAaqgA8jgyWswcCpQIJ+hiyvwGnWwo= 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:from :to:subject:message-id:date:mime-version:content-type; s= default; bh=z3NEzCBSRNKQz+fyjD8bYG7eWXU=; b=kDBe5huHRzOtNFLpwrKb Gz9Fw2YeJ3BU3ymyfhdWrWEWhvQ7UxiyyE0iadAbc7XJ81hw1UtLF1sS7J520DUm 1tG5ckMdcPOxE7snoC5QeEhPwSp0wPMjdjY3WOOC8VdM/J8gjvccuda+Cenl9ReW NDFVkT65pZLp7Te6DKj+UMs= Received: (qmail 41271 invoked by alias); 20 Apr 2018 17:21:57 -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 41258 invoked by uid 89); 20 Apr 2018 17:21:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.2 spammy=october X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Apr 2018 17:21:55 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 419063002A9D for ; Fri, 20 Apr 2018 17:21:54 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-53.rdu2.redhat.com [10.10.112.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 923F26313E for ; Fri, 20 Apr 2018 17:21:53 +0000 (UTC) From: Jeff Law Openpgp: preference=signencrypt Autocrypt: addr=law@redhat.com; prefer-encrypt=mutual; keydata= xsBNBFkbIO8BCACVIqDhDVh9ur8C+zNV1J/cXfwvVDAUcphDEFl4jyHqZORK4Pd3Db8oWqLm Q8lOCr/VOS7lrCtdpVMQkLGOGA16oJ8g7hzhnojpjY09UjsoUiG7oKacuxj8skfp6SIx93Zl +i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IQR+niGjtnP5P/8PpRq8fP682pgzWwUCWRsg7wIbDAAKCRC8fP682pgzW3REB/9cT7iKRPg/ OK9bpLlllIEDM90IaKC79DQrv+fRudOR78cdV4XUwPSFnyHUsP3VJ4lDy5FhiKCwGie0BK53 EsxgMrLy1L8hboFdTE4Vi0xzCheMaMVp4hATDU29k1cuxu1VPpCa8E3mYeHjNV7ip0HN5L4D rfs8lRPJE/oM1vGs9DgQFZrCPPNRNGKC97BH+DHccesEJr7tSsQrkPkt0z/FTKr5wIM02vSx OJjgmcVbGB7dc2j/Sx8loXmuKnuKtM35668kUG8jeJvSQk3o/VHpD27bhl0rR68R2jN6G6kQ egMVb6dPu1Ius8rBE5rFw88J4JEb5q4hMNClWWUFHIdP To: gcc-patches Subject: Minor testsuite improvements for stack-clash-protection tests Message-ID: Date: Fri, 20 Apr 2018 11:21:52 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 X-IsSubscribed: yes Back in October I added dg-skip-if directives for a small number of stack-clash tests which were sensitive to whether or not the stack protector was enabled. Those skips triggered on -fstack-protector. That worked, but was insufficient to DTRT for -fstack-protector-strong of -fstack-protector-all. This change uses -fstack-protector* to guard those tests. It also adds guards to some of the newer x86/x86_64 tests where the stack protector changes the assembly code in annoying ways. This is strictly a testsuite change. Committed to the trunk. Jeff commit d7fd15ccee259681ae99415e16e25c9bfceb11d8 Author: law Date: Fri Apr 20 17:20:46 2018 +0000 * gcc.dg/stack-check-5.c: Improve dg-skip-if selector for the stack protector. * gcc.dg/stack-check-6.c: Likewise. * gcc.dg/stack-check-6a.c: Likewise. * gcc.target/i386/stack-check-17.c: Add dg-skip-if selector. * gcc.target/i386/stack-check-18.c: Likewise. * gcc.target/i386/stack-check-19.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@259528 138bc75d-0d04-0410-961f-82ee72b054a4 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4bc930152b8..5c33c35892b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2018-04-20 Jeff Law + + * gcc.dg/stack-check-5.c: Improve dg-skip-if selector for the + stack protector. + * gcc.dg/stack-check-6.c: Likewise. + * gcc.dg/stack-check-6a.c: Likewise. + * gcc.target/i386/stack-check-17.c: Add dg-skip-if selector. + * gcc.target/i386/stack-check-18.c: Likewise. + * gcc.target/i386/stack-check-19.c: Likewise. + 2018-04-20 Kyrylo Tkachov PR testsuite/85483 diff --git a/gcc/testsuite/gcc.dg/stack-check-5.c b/gcc/testsuite/gcc.dg/stack-check-5.c index 850e023ea4e..604fa3cf6c5 100644 --- a/gcc/testsuite/gcc.dg/stack-check-5.c +++ b/gcc/testsuite/gcc.dg/stack-check-5.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fstack-clash-protection -fdump-rtl-pro_and_epilogue -fno-optimize-sibling-calls --param stack-clash-protection-probe-interval=12 --param stack-clash-protection-guard-size=12" } */ /* { dg-require-effective-target supports_stack_clash_protection } */ -/* { dg-skip-if "" { *-*-* } { "-fstack-protector" } { "" } } */ +/* { dg-skip-if "" { *-*-* } { "-fstack-protector*" } { "" } } */ /* Otherwise the S/390 back-end might save the stack pointer in f2 () diff --git a/gcc/testsuite/gcc.dg/stack-check-6.c b/gcc/testsuite/gcc.dg/stack-check-6.c index ab4b0e8894c..fe75612b737 100644 --- a/gcc/testsuite/gcc.dg/stack-check-6.c +++ b/gcc/testsuite/gcc.dg/stack-check-6.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fstack-clash-protection -fdump-rtl-pro_and_epilogue -fno-optimize-sibling-calls --param stack-clash-protection-probe-interval=12 --param stack-clash-protection-guard-size=12" } */ /* { dg-require-effective-target supports_stack_clash_protection } */ -/* { dg-skip-if "" { *-*-* } { "-fstack-protector" } { "" } } */ +/* { dg-skip-if "" { *-*-* } { "-fstack-protector*" } { "" } } */ extern void foo (char *); diff --git a/gcc/testsuite/gcc.dg/stack-check-6a.c b/gcc/testsuite/gcc.dg/stack-check-6a.c index 468d649a4fa..8fb9c621585 100644 --- a/gcc/testsuite/gcc.dg/stack-check-6a.c +++ b/gcc/testsuite/gcc.dg/stack-check-6a.c @@ -4,7 +4,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fstack-clash-protection -fdump-rtl-pro_and_epilogue -fno-optimize-sibling-calls --param stack-clash-protection-probe-interval=12 --param stack-clash-protection-guard-size=16" } */ /* { dg-require-effective-target supports_stack_clash_protection } */ -/* { dg-skip-if "" { *-*-* } { "-fstack-protector" } { "" } } */ +/* { dg-skip-if "" { *-*-* } { "-fstack-protector*" } { "" } } */ #include "stack-check-6.c" diff --git a/gcc/testsuite/gcc.target/i386/stack-check-17.c b/gcc/testsuite/gcc.target/i386/stack-check-17.c index d2ef83b348a..25ae9774061 100644 --- a/gcc/testsuite/gcc.target/i386/stack-check-17.c +++ b/gcc/testsuite/gcc.target/i386/stack-check-17.c @@ -1,6 +1,8 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fstack-clash-protection -mtune=generic -fomit-frame-pointer" } */ /* { dg-require-effective-target supports_stack_clash_protection } */ +/* { dg-skip-if "" { *-*-* } { "-fstack-protector*" } { "" } } */ + int x0, x1; diff --git a/gcc/testsuite/gcc.target/i386/stack-check-18.c b/gcc/testsuite/gcc.target/i386/stack-check-18.c index 6dbff4402da..1cf4bbcfafb 100644 --- a/gcc/testsuite/gcc.target/i386/stack-check-18.c +++ b/gcc/testsuite/gcc.target/i386/stack-check-18.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fstack-clash-protection -mtune=generic -fdump-rtl-expand" } */ /* { dg-require-effective-target supports_stack_clash_protection } */ +/* { dg-skip-if "" { *-*-* } { "-fstack-protector*" } { "" } } */ int f1 (char *); diff --git a/gcc/testsuite/gcc.target/i386/stack-check-19.c b/gcc/testsuite/gcc.target/i386/stack-check-19.c index b92c126d57f..bf6af5ffc3e 100644 --- a/gcc/testsuite/gcc.target/i386/stack-check-19.c +++ b/gcc/testsuite/gcc.target/i386/stack-check-19.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fstack-clash-protection -mtune=generic -fdump-rtl-expand" } */ /* { dg-require-effective-target supports_stack_clash_protection } */ +/* { dg-skip-if "" { *-*-* } { "-fstack-protector*" } { "" } } */ int f1 (char *);