diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2023-03-17 17:03:34 +0100 |
---|---|---|
committer | Hans-Peter Nilsson <hp@bitrange.com> | 2023-03-18 00:44:05 +0100 |
commit | ac81fea349b7af8a9aa1dc47b5f9a07a0f9a73f6 (patch) | |
tree | c805ebe640636d6d70dcf987080b1d2ce2d0a7e4 | |
parent | 6f90de97634d6f1617a054429f28b85fbfbd8b6f (diff) | |
download | gcc-ac81fea349b7af8a9aa1dc47b5f9a07a0f9a73f6.zip gcc-ac81fea349b7af8a9aa1dc47b5f9a07a0f9a73f6.tar.gz gcc-ac81fea349b7af8a9aa1dc47b5f9a07a0f9a73f6.tar.bz2 |
testsuite: Skip some gcc.dg/plugin tests for default_packed targets
Avoid unweildy structure-layout-specific message-matching
expressions by exluding targets that lay out structures as
if they had been specified with __attribute__ ((__packed__)),
for tests where multiple messages depend on the structure
layout.
It's arguably a judgement call whether to skip some of these
tests or add multiple lines of matches depending on the
layout of structures.
* gcc.dg/plugin/infoleak-2.c,
gcc.dg/plugin/infoleak-CVE-2011-1078-1.c,
gcc.dg/plugin/infoleak-CVE-2011-1078-2.c,
gcc.dg/plugin/infoleak-CVE-2017-18549-1.c,
gcc.dg/plugin/infoleak-CVE-2017-18550-1.c,
gcc.dg/plugin/infoleak-antipatterns-1.c,
gcc.dg/plugin/infoleak-fixit-1.c: Skip for default_packed targets.
7 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/plugin/infoleak-2.c b/gcc/testsuite/gcc.dg/plugin/infoleak-2.c index 252f8f2..43ab41b 100644 --- a/gcc/testsuite/gcc.dg/plugin/infoleak-2.c +++ b/gcc/testsuite/gcc.dg/plugin/infoleak-2.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-fanalyzer" } */ /* { dg-require-effective-target analyzer } */ +/* { dg-skip-if "structure layout assumption not met" { default_packed } } */ #include <string.h> diff --git a/gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2011-1078-1.c b/gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2011-1078-1.c index 3616fbe..8afce8e 100644 --- a/gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2011-1078-1.c +++ b/gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2011-1078-1.c @@ -9,6 +9,7 @@ /* { dg-do compile } */ /* { dg-options "-fanalyzer" } */ /* { dg-require-effective-target analyzer } */ +/* { dg-skip-if "structure layout assumption not met" { default_packed } } */ #include <string.h> diff --git a/gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2011-1078-2.c b/gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2011-1078-2.c index 2096bda..1142cf2 100644 --- a/gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2011-1078-2.c +++ b/gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2011-1078-2.c @@ -3,6 +3,7 @@ /* { dg-do compile } */ /* { dg-options "-fanalyzer" } */ /* { dg-require-effective-target analyzer } */ +/* { dg-skip-if "structure layout assumption not met" { default_packed } } */ #include <string.h> diff --git a/gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2017-18549-1.c b/gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2017-18549-1.c index 8a1c816..239c7d1 100644 --- a/gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2017-18549-1.c +++ b/gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2017-18549-1.c @@ -10,6 +10,7 @@ /* { dg-do compile } */ /* { dg-options "-fanalyzer" } */ /* { dg-require-effective-target analyzer } */ +/* { dg-skip-if "structure layout assumption not met" { default_packed } } */ #include <string.h> diff --git a/gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2017-18550-1.c b/gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2017-18550-1.c index 4272da9..449348a 100644 --- a/gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2017-18550-1.c +++ b/gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2017-18550-1.c @@ -10,6 +10,7 @@ /* { dg-do compile } */ /* { dg-options "-fanalyzer" } */ /* { dg-require-effective-target analyzer } */ +/* { dg-skip-if "structure layout assumption not met" { default_packed } } */ #include <string.h> diff --git a/gcc/testsuite/gcc.dg/plugin/infoleak-antipatterns-1.c b/gcc/testsuite/gcc.dg/plugin/infoleak-antipatterns-1.c index 5008453..84789a7 100644 --- a/gcc/testsuite/gcc.dg/plugin/infoleak-antipatterns-1.c +++ b/gcc/testsuite/gcc.dg/plugin/infoleak-antipatterns-1.c @@ -3,6 +3,7 @@ /* { dg-do compile } */ /* { dg-options "-fanalyzer" } */ /* { dg-require-effective-target analyzer } */ +/* { dg-skip-if "structure layout assumption not met" { default_packed } } */ typedef unsigned char u8; typedef unsigned __INT16_TYPE__ u16; diff --git a/gcc/testsuite/gcc.dg/plugin/infoleak-fixit-1.c b/gcc/testsuite/gcc.dg/plugin/infoleak-fixit-1.c index 6961b44..56158c1 100644 --- a/gcc/testsuite/gcc.dg/plugin/infoleak-fixit-1.c +++ b/gcc/testsuite/gcc.dg/plugin/infoleak-fixit-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-fanalyzer" } */ /* { dg-require-effective-target analyzer } */ +/* { dg-skip-if "structure layout assumption not met" { default_packed } } */ #include <string.h> |