[PATCH] Avoid illegal argument to verbose in dg-test callback
Thomas Schwinge
thomas@codesourcery.com
Tue Aug 17 19:14:32 GMT 2021
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libstdc-Avoid-illegal-argument-to-verbose-in-dg-test.patch
Type: text/x-diff
Size: 2216 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20210817/fad08272/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libstdc-Avoid-illegal-argument-to-verbose-in-dg-.g11.patch
Type: text/x-diff
Size: 2286 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20210817/fad08272/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libstdc-Avoid-illegal-argument-to-verbose-in-dg-.g10.patch
Type: text/x-diff
Size: 2286 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20210817/fad08272/attachment-0002.bin>
More information about the Libstdc++
mailing list