public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: Matthias Kretz <m.kretz@gsi.de>, <gcc-patches@gcc.gnu.org>,
	<libstdc++@gcc.gnu.org>
Cc: Jonathan Wakely <jwakely@redhat.com>
Subject: Re: [PATCH] Avoid illegal argument to verbose in dg-test callback
Date: Tue, 17 Aug 2021 21:14:32 +0200	[thread overview]
Message-ID: <87wnoj289z.fsf@euler.schwinge.homeip.net> (raw)
In-Reply-To: <2031740.irdbgypaU6@minbar>

[-- Attachment #1: Type: text/plain, Size: 2269 bytes --]

Hi!

On 2020-04-16T15:21:44+0200, Matthias Kretz <m.kretz@gsi.de> wrote:
> If extra_tool_flags starts with a dash, an error like 'ERROR: verbose:
> illegal argument: -march=native -O2 -std=c++17' is printed. This is
> easily fixed by inserting a double dash before the variable.

> --- a/libstdc++-v3/testsuite/lib/libstdc++.exp
> +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
> @@ -408,7 +408,7 @@ proc libstdc++-dg-test { prog do_what extra_tool_flags } {
>      set options ""
>      if { $extra_tool_flags != "" } {
>       verbose -log "extra_tool_flags are:"
> -     verbose -log $extra_tool_flags
> +     verbose -log -- $extra_tool_flags

I'm confirming the original problem, but on one system, it's not
resolved by this change, because instead we get:

    extra_tool_flags are:
    ERROR: tcl error sourcing [...]/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp.
    ERROR: usage: send [args] string
        while executing
    "send_log "$message\n""
        (procedure "verbose" line 48)
        invoked from within
    "verbose -log -- $extra_tool_flags"
        (procedure "libstdc++-dg-test" line 45)
        invoked from within
    "${tool}-dg-test $prog [lindex ${dg-do-what} 0] "$tool_flags ${dg-extra-tool-flags}""
        (procedure "saved-dg-test" line 115)
        invoked from within
    [...]

That's Ubuntu's dejagnu 1.5-3ubuntu1 being so old that it doesn't include
DejaGnu commit 57c22601afe43d2c2b8819df4f2ecacb034516fd "Protect from leading
dash in message".  (I suppose that's what'd make this work, but have not
verified.)

Thus, as obvious, pushed "libstdc++: Avoid illegal argument to verbose in
dg-test callback, continued" to master branch in commit
60b94d8bd2280837e980a53cf81bdf902d726e61, and cherry-picked into
releases/gcc-11 branch in commit
112bbc8d1d81c1b6375ea3cfb083cdeb0a06ea3a, and into releases/gcc-10 branch
in commit 6e64bbec7dead374628abe525b6f56e20f9507c3, see attached.


Grüße
 Thomas


-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-libstdc-Avoid-illegal-argument-to-verbose-in-dg-test.patch --]
[-- Type: text/x-diff, Size: 2215 bytes --]

From 60b94d8bd2280837e980a53cf81bdf902d726e61 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Tue, 17 Aug 2021 17:58:30 +0200
Subject: [PATCH] libstdc++: Avoid illegal argument to verbose in dg-test
 callback, continued

This is a follow-up to commit 697b94cfaef4a958132faf0cf4b35b15dfb29acc
"libstdc++: Avoid illegal argument to verbose in dg-test callback".
I'm confirming the original problem, but on one system, it's not
resolved by this change, because instead we get:

    extra_tool_flags are:
    ERROR: tcl error sourcing [...]/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp.
    ERROR: usage: send [args] string
        while executing
    "send_log "$message\n""
        (procedure "verbose" line 48)
        invoked from within
    "verbose -log -- $extra_tool_flags"
        (procedure "libstdc++-dg-test" line 45)
        invoked from within
    "${tool}-dg-test $prog [lindex ${dg-do-what} 0] "$tool_flags ${dg-extra-tool-flags}""
        (procedure "saved-dg-test" line 115)
        invoked from within
    [...]

That's Ubuntu's dejagnu 1.5-3ubuntu1 being so old that it doesn't include
DejaGnu commit 57c22601afe43d2c2b8819df4f2ecacb034516fd "Protect from leading
dash in message".  (I suppose that's what'd make this work, but have not
verified.)

	libstdc++-v3/
	* testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose,
	continued.
---
 libstdc++-v3/testsuite/lib/libstdc++.exp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index 73b202ce212..35ccbe47c39 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -410,8 +410,7 @@ proc libstdc++-dg-test { prog do_what extra_tool_flags } {
     set select_compile "v3_target_compile"
     set options ""
     if { $extra_tool_flags != "" } {
-	verbose -log "extra_tool_flags are:"
-	verbose -log -- $extra_tool_flags
+	verbose -log "extra_tool_flags are: $extra_tool_flags"
 	if { [string first "-x c" $extra_tool_flags ] != -1 } {
 	    verbose -log "compiling and executing as C, not C++"
 	    set edit_tool_flags $extra_tool_flags
-- 
2.30.2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0001-libstdc-Avoid-illegal-argument-to-verbose-in-dg-.g11.patch --]
[-- Type: text/x-diff, Size: 2285 bytes --]

From 112bbc8d1d81c1b6375ea3cfb083cdeb0a06ea3a Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Tue, 17 Aug 2021 17:58:30 +0200
Subject: [PATCH] libstdc++: Avoid illegal argument to verbose in dg-test
 callback, continued

This is a follow-up to commit 697b94cfaef4a958132faf0cf4b35b15dfb29acc
"libstdc++: Avoid illegal argument to verbose in dg-test callback".
I'm confirming the original problem, but on one system, it's not
resolved by this change, because instead we get:

    extra_tool_flags are:
    ERROR: tcl error sourcing [...]/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp.
    ERROR: usage: send [args] string
        while executing
    "send_log "$message\n""
        (procedure "verbose" line 48)
        invoked from within
    "verbose -log -- $extra_tool_flags"
        (procedure "libstdc++-dg-test" line 45)
        invoked from within
    "${tool}-dg-test $prog [lindex ${dg-do-what} 0] "$tool_flags ${dg-extra-tool-flags}""
        (procedure "saved-dg-test" line 115)
        invoked from within
    [...]

That's Ubuntu's dejagnu 1.5-3ubuntu1 being so old that it doesn't include
DejaGnu commit 57c22601afe43d2c2b8819df4f2ecacb034516fd "Protect from leading
dash in message".  (I suppose that's what'd make this work, but have not
verified.)

	libstdc++-v3/
	* testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose,
	continued.

(cherry picked from commit 60b94d8bd2280837e980a53cf81bdf902d726e61)
---
 libstdc++-v3/testsuite/lib/libstdc++.exp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index 7f9580db8ed..27fac23500c 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -410,8 +410,7 @@ proc libstdc++-dg-test { prog do_what extra_tool_flags } {
     set select_compile "v3_target_compile"
     set options ""
     if { $extra_tool_flags != "" } {
-	verbose -log "extra_tool_flags are:"
-	verbose -log -- $extra_tool_flags
+	verbose -log "extra_tool_flags are: $extra_tool_flags"
 	if { [string first "-x c" $extra_tool_flags ] != -1 } {
 	    verbose -log "compiling and executing as C, not C++"
 	    set edit_tool_flags $extra_tool_flags
-- 
2.30.2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0001-libstdc-Avoid-illegal-argument-to-verbose-in-dg-.g10.patch --]
[-- Type: text/x-diff, Size: 2285 bytes --]

From 6e64bbec7dead374628abe525b6f56e20f9507c3 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Tue, 17 Aug 2021 17:58:30 +0200
Subject: [PATCH] libstdc++: Avoid illegal argument to verbose in dg-test
 callback, continued

This is a follow-up to commit 697b94cfaef4a958132faf0cf4b35b15dfb29acc
"libstdc++: Avoid illegal argument to verbose in dg-test callback".
I'm confirming the original problem, but on one system, it's not
resolved by this change, because instead we get:

    extra_tool_flags are:
    ERROR: tcl error sourcing [...]/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp.
    ERROR: usage: send [args] string
        while executing
    "send_log "$message\n""
        (procedure "verbose" line 48)
        invoked from within
    "verbose -log -- $extra_tool_flags"
        (procedure "libstdc++-dg-test" line 45)
        invoked from within
    "${tool}-dg-test $prog [lindex ${dg-do-what} 0] "$tool_flags ${dg-extra-tool-flags}""
        (procedure "saved-dg-test" line 115)
        invoked from within
    [...]

That's Ubuntu's dejagnu 1.5-3ubuntu1 being so old that it doesn't include
DejaGnu commit 57c22601afe43d2c2b8819df4f2ecacb034516fd "Protect from leading
dash in message".  (I suppose that's what'd make this work, but have not
verified.)

	libstdc++-v3/
	* testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose,
	continued.

(cherry picked from commit 60b94d8bd2280837e980a53cf81bdf902d726e61)
---
 libstdc++-v3/testsuite/lib/libstdc++.exp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index 3b8587cd01d..45dd2c8c02e 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -410,8 +410,7 @@ proc libstdc++-dg-test { prog do_what extra_tool_flags } {
     set select_compile "v3_target_compile"
     set options ""
     if { $extra_tool_flags != "" } {
-	verbose -log "extra_tool_flags are:"
-	verbose -log -- $extra_tool_flags
+	verbose -log "extra_tool_flags are: $extra_tool_flags"
 	if { [string first "-x c" $extra_tool_flags ] != -1 } {
 	    verbose -log "compiling and executing as C, not C++"
 	    set edit_tool_flags $extra_tool_flags
-- 
2.30.2


  parent reply	other threads:[~2021-08-17 19:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16 13:21 Matthias Kretz
2020-04-20 14:30 ` Jonathan Wakely
2021-08-17 19:14 ` Thomas Schwinge [this message]
2021-08-17 19:23   ` Jonathan Wakely

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=87wnoj289z.fsf@euler.schwinge.homeip.net \
    --to=thomas@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@gcc.gnu.org \
    --cc=m.kretz@gsi.de \
    /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).