Hi Everybody,
These are small errors with regard to quoting
with "rm -f" and "sh -c" commands used with remote shell (RSH) ... i
was using dejagnu to test my arm toolchain remotely when i ran into
those bugs.
I hope this is useful and integrated into the next release of dejagnu.
Regards
Deepak
P.S This is my first post in dejagnu mailing list.
--
Hack Hack Hack
diff -urN dejagnu-1.4.4/lib/remote.exp dejagnu-1.4.4/lib/remote.exp
--- dejagnu-1.4.4/lib/remote.exp 2003-10-11 12:12:46.000000000 +0530
+++ dejagnu-1.4.4/lib/remote.exp 2008-04-01 20:43:22.000000000 +0530
@@ -732,7 +732,7 @@
append file " $x"
}
verbose "remote_file deleting $file"
- set status [remote_exec $dest "rm -f $file"]
+ set status [remote_exec $dest rm "$file"]
return [lindex $status 0]
}
}
diff -urN dejagnu-1.4.4/lib/rsh.exp dejagnu-1.4.4/lib/rsh.exp
--- dejagnu-1.4.4/lib/rsh.exp 2003-10-11 12:12:46.000000000 +0530
+++ dejagnu-1.4.4/lib/rsh.exp 2008-04-01 20:43:13.000000000 +0530
@@ -183,7 +183,7 @@
set desthost [board_info $desthost hostname]
}
- set status [catch "exec $RSH $rsh_useropts $desthost rm -f $destfile |& cat" output]
+ set status [catch "exec $RSH $rsh_useropts $desthost \"rm -f\" $destfile |& cat" output]
set status [catch "exec $RCP $srcfile $rcp_user$desthost:$destfile |& cat" output]
if { $status == 0 } {
verbose "Copied $srcfile to $desthost:$destfile" 2
@@ -277,7 +277,7 @@
set inp "/dev/null"
}
- set status [catch "exec cat $inp | $RSH $rsh_useropts $hostname sh -c '$cmd $pargs \\; echo XYZ\\\${?}ZYX' |& cat" output]
+ set status [catch "exec cat $inp | $RSH $rsh_useropts $hostname \"sh -c\" '$cmd $pargs \\; echo XYZ\\\${?}ZYX' |& 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.
_______________________________________________
DejaGnu mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/dejagnu