testsuite: prune -freport-bug output

Message ID 20240419215411.52301-1-polacek@redhat.com
State Committed
Commit 0db19228a9feba5a8f4e13b21f25f3aa8a6c5e85
Headers
Series testsuite: prune -freport-bug output |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gcc_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 success Testing passed

Commit Message

Marek Polacek April 19, 2024, 9:54 p.m. UTC
  Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk?
I can defer to 15 if needed, of course.

-- >8 --
When the compiler defaults to -freport-bug, a few dg-ice tests fail
with:

Excess errors:
Preprocessed source stored into /tmp/cc6hldZ0.out file, please attach this to your bugreport.

We could add -fno-report-bug to those tests.  But it seems to me that a
better fix would be to prune the "Preprocessed source stored..." message
in prune_gcc_output.

gcc/testsuite/ChangeLog:

	* lib/prune.exp (prune_gcc_output): Also prune -freport-bug output.
---
 gcc/testsuite/lib/prune.exp | 1 +
 1 file changed, 1 insertion(+)


base-commit: d86472a6f041ccf3d1be0cf6bb15d1e0ad8f6dbe
  

Comments

Jakub Jelinek April 22, 2024, 3:16 p.m. UTC | #1
On Fri, Apr 19, 2024 at 05:54:11PM -0400, Marek Polacek wrote:
> Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk?
> I can defer to 15 if needed, of course.
> 
> -- >8 --
> When the compiler defaults to -freport-bug, a few dg-ice tests fail
> with:
> 
> Excess errors:
> Preprocessed source stored into /tmp/cc6hldZ0.out file, please attach this to your bugreport.
> 
> We could add -fno-report-bug to those tests.  But it seems to me that a
> better fix would be to prune the "Preprocessed source stored..." message
> in prune_gcc_output.
> 
> gcc/testsuite/ChangeLog:
> 
> 	* lib/prune.exp (prune_gcc_output): Also prune -freport-bug output.

LGTM.
> --- a/gcc/testsuite/lib/prune.exp
> +++ b/gcc/testsuite/lib/prune.exp
> @@ -51,6 +51,7 @@ proc prune_gcc_output { text } {
>      regsub -all "(^|\n)\[^\n\]*: re(compiling|linking)\[^\n\]*" $text "" text
>      regsub -all "(^|\n)Please submit.*instructions\[^\n\]*" $text "" text
>      regsub -all "(^|\n)\[0-9\]\[0-9\]* errors\." $text "" text
> +    regsub -all "(^|\n)Preprocessed.*bugreport\[^\n\]*" $text "" text
>  
>      # Diagnostic inclusion stack
>      regsub -all "(^|\n)(In file)?\[ \]+included from \[^\n\]*" $text "" text
> 
> base-commit: d86472a6f041ccf3d1be0cf6bb15d1e0ad8f6dbe
> -- 
> 2.44.0

	Jakub
  

Patch

diff --git a/gcc/testsuite/lib/prune.exp b/gcc/testsuite/lib/prune.exp
index f3d3c99fbcb..d00d37f015f 100644
--- a/gcc/testsuite/lib/prune.exp
+++ b/gcc/testsuite/lib/prune.exp
@@ -51,6 +51,7 @@  proc prune_gcc_output { text } {
     regsub -all "(^|\n)\[^\n\]*: re(compiling|linking)\[^\n\]*" $text "" text
     regsub -all "(^|\n)Please submit.*instructions\[^\n\]*" $text "" text
     regsub -all "(^|\n)\[0-9\]\[0-9\]* errors\." $text "" text
+    regsub -all "(^|\n)Preprocessed.*bugreport\[^\n\]*" $text "" text
 
     # Diagnostic inclusion stack
     regsub -all "(^|\n)(In file)?\[ \]+included from \[^\n\]*" $text "" text