While testing the C++ profiling tests in g++.dg/bprob and using the qemu simulator we discovered that these tests were passing when we ran the testsuite with no extra options but that if we specified some options on the testsuite run then the tests would fail with this message in the c++.log file:
rsh: Could not resolve hostname multi-sim/-EL: Name or service not known After some poking around I found that profopt-execute in lib/profopt.exp was using remote_file and remote_upload with 'target' where I believe it should be using 'host'. No other *.exp file uses 'target' on their remote_file or remote_update calls, they either use 'build' or 'host'. So while it seems weird that 'host' is the proper replacement for 'target' as the machine where the executable is run, this seems to be the right fix and it does give me a clean run now with or without extra arguments on the test run. OK for checkin? Steve Ellcey sell...@mips.com 2014-02-13 Steve Ellcey <sell...@mips.com> * lib/profopt.exp (profopt-execute): Use host instead of target in remote_file and remote_upload calls. diff --git a/gcc/testsuite/lib/profopt.exp b/gcc/testsuite/lib/profopt.exp index e0d849e..e045b53 100644 --- a/gcc/testsuite/lib/profopt.exp +++ b/gcc/testsuite/lib/profopt.exp @@ -264,7 +264,7 @@ proc profopt-execute { src } { # Remove old profiling and performance data files. foreach ext $prof_ext { - remote_file target delete $tmpdir/$base.$ext + remote_file host delete $tmpdir/$base.$ext } if [info exists perf_ext] { profopt-cleanup $testcase $perf_ext @@ -312,7 +312,7 @@ proc profopt-execute { src } { # Make sure the profile data was generated, and fail if not. if { $status == "pass" } { foreach ext $prof_ext { - remote_upload target $tmpdir/$base.$ext + remote_upload host $tmpdir/$base.$ext set files [glob -nocomplain $base.$ext] if { $files == "" } { set status "fail" @@ -368,7 +368,7 @@ proc profopt-execute { src } { # Remove the profiling data files. foreach ext $prof_ext { - remote_file target delete $tmpdir/$base.$ext + remote_file host delete $tmpdir/$base.$ext } if { $status != "pass" } {