Rsh.exp
Fabio ARNONE <[email protected]>
| Newsgroups | gmane.comp.sysutils.dejagnu.bugs |
|---|---|
| Message-ID | <[email protected]> |
Dear all, I use Dejagnu to run binutils testsuite in the following enviroment: - Host: Linux PC; sh4 cross compiler installed. - Target: embedded sh4 board; sh4-linux-gcc installed - FS: NFS I launch the testsuite from my linux PC to the Sh4 board by ssh. The attached patches fixes the unexpected failures, dued to: proc rsh_exec cmd check. Welcome comments Fabio Arnone _______________________________________________ Bug-dejagnu mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-dejagnu
rsh_fix.patch
(application/octet-stream, 1.3 KB)
--- dejagnu-1.4.4/lib/rsh.exp 2003-10-11 08:42:46.000000000 +0200
+++ dejagnu-1.4.4/lib/rsh.exp.fixed 2008-05-28 13:56:51.855960000 +0200
@@ -22,7 +22,6 @@
#
proc rsh_open { hostname } {
global spawn_id
-
set tries 0
set result -1
@@ -233,14 +232,20 @@ proc rsh_exec { boardname cmd args } {
set pargs [lindex $args 0]
if { [llength $args] > 1 } {
set inp [lindex $args 1]
+ if { [llength $args] > 2 } {
+ set outp [lindex $args 2]
+ } else {
+ set outp ""
+ }
} else {
set inp ""
+ set outp ""
}
} else {
set pargs ""
set inp ""
+ set outp ""
}
-
verbose "Executing $boardname:$cmd $pargs < $inp"
if ![board_info $boardname exists rsh_prog] {
@@ -277,7 +282,11 @@ proc rsh_exec { boardname cmd args } {
set inp "/dev/null"
}
- set status [catch "exec cat $inp | $RSH $rsh_useropts $hostname sh -c '$cmd $pargs \\; echo XYZ\\\${?}ZYX' |& cat" output]
+ if { $outp != "" } {
+ set outp "> $outp"
+ }
+
+ set status [catch "exec cat $inp | $RSH $rsh_useropts $hostname sh -c '$cmd $pargs \\; echo XYZ\\\${?}ZYX' $outp |& cat" output]
verbose "$RSH output is $output"
# `status' doesn't mean much here other than rsh worked ok.
# What we want is whether $cmd ran ok.
config.guess
(application/octet-stream, 41.1 KB) - not displayed