public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] testsuite: Use -fno-report-bug in gcc.dg/plugin/
@ 2023-06-29 19:03 Marek Polacek
  2023-06-29 20:27 ` David Malcolm
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Polacek @ 2023-06-29 19:03 UTC (permalink / raw)
  To: GCC Patches, David Malcolm

Certain downstream compilers (for example, in Fedora) default to
-freport-bug.  The extra output breaks the following tests.  We can use
-fno-report-bug to fix that.  Patch verified with:

$ make check RUNTESTFLAGS='--target_board=unix\{,-freport-bug\} plugin.exp'

Tested x86_64-pc-linux-gnu, ok for trunk/13?

gcc/testsuite/ChangeLog:

	* gcc.dg/plugin/crash-test-ice-sarif.c: Use -fno-report-bug.  Adjust
	scan-sarif-file.
	* gcc.dg/plugin/crash-test-ice-stderr.c: Use -fno-report-bug.
	* gcc.dg/plugin/crash-test-write-though-null-sarif.c: Use
	-fno-report-bug.  Adjust scan-sarif-file.
	* gcc.dg/plugin/crash-test-write-though-null-stderr.c: Use
	-fno-report-bug.
---
 gcc/testsuite/gcc.dg/plugin/crash-test-ice-sarif.c             | 3 ++-
 gcc/testsuite/gcc.dg/plugin/crash-test-ice-stderr.c            | 1 +
 .../gcc.dg/plugin/crash-test-write-though-null-sarif.c         | 3 ++-
 .../gcc.dg/plugin/crash-test-write-though-null-stderr.c        | 1 +
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/plugin/crash-test-ice-sarif.c b/gcc/testsuite/gcc.dg/plugin/crash-test-ice-sarif.c
index 3b773a9a84c..84a4347a17e 100644
--- a/gcc/testsuite/gcc.dg/plugin/crash-test-ice-sarif.c
+++ b/gcc/testsuite/gcc.dg/plugin/crash-test-ice-sarif.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fdiagnostics-format=sarif-file" } */
+/* { dg-additional-options "-fno-report-bug" } */
 
 extern void inject_ice (void);
 
@@ -56,7 +57,7 @@ void test_inject_ice (void)
              { dg-final { scan-sarif-file "\"contextRegion\": " } }
              { dg-final { scan-sarif-file "\"artifactLocation\": " } }
              { dg-final { scan-sarif-file "\"region\": " } }
-               { dg-final { scan-sarif-file "\"startLine\": 8" } }
+               { dg-final { scan-sarif-file "\"startLine\": 9" } }
                { dg-final { scan-sarif-file "\"startColumn\": 3" } }
                { dg-final { scan-sarif-file "\"endColumn\": 16" } }
          { dg-final { scan-sarif-file "\"message\": " } }
diff --git a/gcc/testsuite/gcc.dg/plugin/crash-test-ice-stderr.c b/gcc/testsuite/gcc.dg/plugin/crash-test-ice-stderr.c
index cee701b135c..0064d3bc447 100644
--- a/gcc/testsuite/gcc.dg/plugin/crash-test-ice-stderr.c
+++ b/gcc/testsuite/gcc.dg/plugin/crash-test-ice-stderr.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-additional-options "-fno-report-bug" } */
 
 extern void inject_ice (void);
 
diff --git a/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-sarif.c b/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-sarif.c
index 57caa20155f..83b38d2ffb5 100644
--- a/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-sarif.c
+++ b/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-sarif.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fdiagnostics-format=sarif-file" } */
+/* { dg-additional-options "-fno-report-bug" } */
 
 extern void inject_write_through_null (void);
 
@@ -56,7 +57,7 @@ void test_inject_write_through_null (void)
              { dg-final { scan-sarif-file "\"contextRegion\": " } }
              { dg-final { scan-sarif-file "\"artifactLocation\": " } }
              { dg-final { scan-sarif-file "\"region\": " } }
-               { dg-final { scan-sarif-file "\"startLine\": 8" } }
+               { dg-final { scan-sarif-file "\"startLine\": 9" } }
                { dg-final { scan-sarif-file "\"startColumn\": 3" } }
                { dg-final { scan-sarif-file "\"endColumn\": 31" } }
          { dg-final { scan-sarif-file "\"message\": " } }
diff --git a/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-stderr.c b/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-stderr.c
index 7b43e423633..a9a211a3b1f 100644
--- a/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-stderr.c
+++ b/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-stderr.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-additional-options "-fno-report-bug" } */
 
 extern void inject_write_through_null (void);
 

base-commit: 070a6bf0bdc6761ad77ac97404c98f00a7007d54
-- 
2.41.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] testsuite: Use -fno-report-bug in gcc.dg/plugin/
  2023-06-29 19:03 [PATCH] testsuite: Use -fno-report-bug in gcc.dg/plugin/ Marek Polacek
@ 2023-06-29 20:27 ` David Malcolm
  0 siblings, 0 replies; 2+ messages in thread
From: David Malcolm @ 2023-06-29 20:27 UTC (permalink / raw)
  To: Marek Polacek, GCC Patches

On Thu, 2023-06-29 at 15:03 -0400, Marek Polacek wrote:
> Certain downstream compilers (for example, in Fedora) default to
> -freport-bug.  The extra output breaks the following tests.  We can
> use
> -fno-report-bug to fix that.  Patch verified with:
> 
> $ make check RUNTESTFLAGS='--target_board=unix\{,-freport-bug\}
> plugin.exp'
> 
> Tested x86_64-pc-linux-gnu, ok for trunk/13?

Looks good to me; thanks

Dave


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-29 20:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-29 19:03 [PATCH] testsuite: Use -fno-report-bug in gcc.dg/plugin/ Marek Polacek
2023-06-29 20:27 ` David Malcolm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).