public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Clément Chigot" <chigot@adacore.com>
Cc: amodra@gmail.com, binutils@sourceware.org
Subject: Re: [PATCH] testsuite: prune DOS drive letter in test outputs
Date: Wed, 22 Feb 2023 09:26:34 +0100	[thread overview]
Message-ID: <c0ee9ddd-488b-cd48-9924-a4774c18108d@suse.com> (raw)
In-Reply-To: <20230221161442.1554824-1-chigot@adacore.com>

On 21.02.2023 17:14, Clément Chigot wrote:
> --- a/binutils/testsuite/lib/binutils-common.exp
> +++ b/binutils/testsuite/lib/binutils-common.exp
> @@ -687,6 +687,22 @@ if ![string length [info proc prune_warnings]] {
>      }
>  }
>  
> +# prune_dump_output OUTPUT
> +#
> +# Clean up the output from system specific or unwanted characters.
> +# This allows to simplify the regexp inside dump tests.
> +proc prune_dump_output { output } {
> +    if [ishost "*-*-mingw*"] {

Cygwin as well then?

> +	# Prune DOS drive letter from an absolute path if it appears
> +	# at the beginning of a line.
> +	regsub -all "(^|\n)\[\[:upper:\]\]:" $output "\\1" output

Drive letters aren't guaranteed upper case, are they? I also think this
may end up too lax, as there may be messages which don't start with a
path. I would expect that you want to also match "warning:", "error:",
and alike infixes. Plus wouldn't you better match (but not remove) the
first \ or / following the colon?

> --- a/ld/testsuite/ld-elf/noinit-sections-2.l
> +++ b/ld/testsuite/ld-elf/noinit-sections-2.l
> @@ -1,5 +1,5 @@
>  #...
> -(|.:)[^:]*: warning: orphan section `.noinit.var_noinit' from \S+ being placed in section `.noinit.var_noinit'
> +[^:]*: warning: orphan section `.noinit.var_noinit' from \S+ being placed in section `.noinit.var_noinit'
>  #...
> -(|.:)[^:]*: warning: orphan section `.gnu.linkonce.n.var_noinit2' from \S+ being placed in section `.gnu.linkonce.n.var_noinit2'
> +[^:]*: warning: orphan section `.gnu.linkonce.n.var_noinit2' from \S+ being placed in section `.gnu.linkonce.n.var_noinit2'
>  #pass

Did you commit the earlier patch, which now needs reverting?

Jan

  reply	other threads:[~2023-02-22  8:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 16:14 Clément Chigot
2023-02-22  8:26 ` Jan Beulich [this message]
2023-02-22 12:57   ` Clément Chigot

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=c0ee9ddd-488b-cd48-9924-a4774c18108d@suse.com \
    --to=jbeulich@suse.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=chigot@adacore.com \
    /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).