diff mbox series

Minor testsuite improvements for stack-clash-protection tests

Message ID ab625332-f902-3925-3790-8ebcdf8687a1@redhat.com
State New
Headers show
Series Minor testsuite improvements for stack-clash-protection tests | expand

Commit Message

Jeff Law April 20, 2018, 5:21 p.m. UTC
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 <law@138bc75d-0d04-0410-961f-82ee72b054a4>
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 mbox series

Patch

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  <law@redhat.com>
+
+	* 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  <kyrylo.tkachov@arm.com>
 
 	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 *);