public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] Remove fall-back prune_warnings
Date: Mon, 14 Aug 2023 12:01:07 +0000 (GMT)	[thread overview]
Message-ID: <20230814120107.4E8573857838@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9381cdb1fb820d8a83dc7de8179e4a1a806011c6

commit 9381cdb1fb820d8a83dc7de8179e4a1a806011c6
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Aug 14 11:40:52 2023 +0930

    Remove fall-back prune_warnings
    
    No one should be using versions of dejagnu without prune_warnings,
    which was available in 1996 (dejagnu-1.3).
    
    binutils/
            * testsuite/lib/binutils-common.exp: Remove fallback prune_warnings.
    gas/
            * testsuite/lib/gas-defs.exp: Remove fallback prune_warnings.

Diff:
---
 binutils/testsuite/lib/binutils-common.exp | 23 +----------------------
 gas/testsuite/lib/gas-defs.exp             | 23 -----------------------
 2 files changed, 1 insertion(+), 45 deletions(-)

diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp
index 7e6bf16ee6e..b944d0af3bc 100644
--- a/binutils/testsuite/lib/binutils-common.exp
+++ b/binutils/testsuite/lib/binutils-common.exp
@@ -672,28 +672,7 @@ proc prune_warnings_extra { text } {
     return $text
 }
 
-# This definition is taken from an unreleased version of DejaGnu.  Once
-# that version gets released, and has been out in the world for a few
-# months at least, it may be safe to delete this copy.
-if ![string length [info proc prune_warnings]] {
-    #
-    # prune_warnings -- delete various system verbosities from TEXT
-    #
-    # An example is:
-    # ld.so: warning: /usr/lib/libc.so.1.8.1 has older revision than expected 9
-    #
-    # Sites with particular verbose os's may wish to override this in site.exp.
-    #
-    proc prune_warnings { text } {
-	# This is from sun4's.  Do it for all machines for now.
-	# The "\\1" is to try to preserve a "\n" but only if necessary.
-	regsub -all "(^|\n)(ld.so: warning:\[^\n\]*\n?)+" $text "\\1" text
-	# It might be tempting to get carried away and delete blank lines, etc.
-	# Just delete *exactly* what we're ask to, and that's it.
-	set text [prune_warnings_extra $text]
-	return $text
-    }
-} elseif { [info procs saved-prune_warnings] == [list] } {
+if { [info procs saved-prune_warnings] == [list] } {
     rename prune_warnings saved-prune_warnings
     proc prune_warnings { text } {
 	set text [saved-prune_warnings $text]
diff --git a/gas/testsuite/lib/gas-defs.exp b/gas/testsuite/lib/gas-defs.exp
index 3e134ca8fa0..dbd35e9cb56 100644
--- a/gas/testsuite/lib/gas-defs.exp
+++ b/gas/testsuite/lib/gas-defs.exp
@@ -357,32 +357,9 @@ proc verbose_eval { expr { level 1 } } {
     if $verbose>$level then { eval verbose "$expr" $level }
 }
 
-# This definition is taken from an unreleased version of DejaGnu.  Once
-# that version gets released, and has been out in the world for a few
-# months at least, it may be safe to delete this copy.
-
 if { [istarget loongarch*-*-*] } {
     rename prune_warnings prune_warnings_other
 }
-if ![string length [info proc prune_warnings]] {
-    #
-    # prune_warnings -- delete various system verbosities from TEXT.
-    #
-    # An example is:
-    # ld.so: warning: /usr/lib/libc.so.1.8.1 has older revision than expected 9
-    #
-    # Sites with particular verbose os's may wish to override this in site.exp.
-    #
-    proc prune_warnings { text } {
-	# This is from sun4's.  Do it for all machines for now.
-	# The "\\1" is to try to preserve a "\n" but only if necessary.
-	regsub -all "(^|\n)(ld.so: warning:\[^\n\]*\n?)+" $text "\\1" text
-
-	# It might be tempting to get carried away and delete blank lines, etc.
-	# Just delete *exactly* what we're ask to, and that's it.
-	return $text
-    }
-}
 
 # run_list_test NAME (optional): OPTS TESTNAME
 #

                 reply	other threads:[~2023-08-14 12:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230814120107.4E8573857838@sourceware.org \
    --to=amodra@sourceware.org \
    --cc=bfd-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).