On Tue, 17 Aug 2021 at 20:15, Thomas Schwinge <tho...@codesourcery.com> wrote: > > Hi! > > On 2020-04-16T15:21:44+0200, Matthias Kretz <m.kr...@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.
Thanks. This makes the logs "denser", as there isn't the extra line break between each test. I think I can live with it ;-) but if anybody objects we can add a \n into that string.