We discovered today that using remote_exec with just an output file
doesn't work. Put this in a .exp file and run it with runtest:
remote_exec host "sh -c {gcc -v 2>&1}" "" "" "outfile"
You'll get a TCL exception. After a while debugging it, we worked out
that this is because local_exec uses:
open "| sh ..." w
The problem with that is we then open that as a spawn, and read from
it, waiting for EOF. But you can't read from the write end of a pipe.
The read returns EBADF and expect throws in the towel.
This works fine:
remote_exec host "sh -c {gcc -v 2>&1}" "" "/dev/null" "outfile"
I think using mode w here is invalid.
--
Daniel Jacobowitz
CodeSourcery
_______________________________________________
DejaGnu mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/dejagnu