aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2024-08-14 04:38:05 +0200
committerHans-Peter Nilsson <hp@bitrange.com>2024-08-16 03:06:53 +0200
commit98e1b19f6690f5e19031ba4f843c22208bbfb14a (patch)
treedbd3e1cde43f10fedad9d4443e5884c3145b1eac /libstdc++-v3/testsuite
parent0601c8824d1243200c49f0d4e49f58cc88cc367e (diff)
downloadgcc-98e1b19f6690f5e19031ba4f843c22208bbfb14a.zip
gcc-98e1b19f6690f5e19031ba4f843c22208bbfb14a.tar.gz
gcc-98e1b19f6690f5e19031ba4f843c22208bbfb14a.tar.bz2
libstdc++-v3: testsuite: Prune uncapitalized "in function" linker warning
Newer newlib trigger warnings about certain functions not implemented (_getentropy) when testing libstdc++-v3. Since 2018 (circa binutils-2.31) the "in function" prefix isn't capitalized for those "not implemented" warnings when generated from the linker (a GNU ld feature used by newlib). Dejagnu up to and including at least dejagnu-1.6.3 (and git @ 42979bd3b9) assumes a capital "In function", leaving that part unpruned, and boom we have thousands of "excess errors" from the libstdc++-v3 testsuite. While gcc/testsuite/lib/prune.exp:prune_gcc_output already deals with this quirk with a vastly more generic pattern, I choose this simpler tweak. libstdc++-v3: * testsuite/lib/prune.exp (libstdc++-dg-prune): Prune uncapitalized "in function" warning from linker.
Diffstat (limited to 'libstdc++-v3/testsuite')
-rw-r--r--libstdc++-v3/testsuite/lib/prune.exp9
1 files changed, 9 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/lib/prune.exp b/libstdc++-v3/testsuite/lib/prune.exp
index 071dcf3..4250e2d 100644
--- a/libstdc++-v3/testsuite/lib/prune.exp
+++ b/libstdc++-v3/testsuite/lib/prune.exp
@@ -80,6 +80,15 @@ proc libstdc++-dg-prune { system text } {
# Ignore dsymutil warning (tool bug is actually in the linker)
regsub -all "(^|\n)\[^\n\]*could not find object file symbol for symbol\[^\n\]*" $text "" text
+ # This pattern, except requiring a capitalized "In" and with a
+ # sub-pattern matching a subsequent line "is not implemented and will
+ # always fail", is part of the standard dejagnu prune_warnings function.
+ # There's also a separate single-line pattern pruning the "is not
+ # implemented and will always fail". Since that pattern is processed
+ # before this ${tool}-dg-prune function is called, we have to handle
+ # the single uncapitalized "in function" line.
+ regsub -all "(^|\n)\[^\n\]*: in function\[^\n\]*" $text "" text
+
# If exceptions are disabled, mark tests expecting exceptions to be enabled
# as unsupported.
if { ![check_effective_target_exceptions_enabled] } {