The local "exists" case: return [file exists $file]
returns 1 when the file exists, 0 otherwise. The remote case does the opposite, because it returns the process return code directly, where 0 is true/success/exists and non-zero is false/fail/does not exist. This patch fixes the remote case by reversing the logic. ChangeLog: * lib/remote.exp (standard_file): Reverse return logic for remote exists case. --- lib/remote.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/remote.exp b/lib/remote.exp index 688680b..359cf31 100644 --- a/lib/remote.exp +++ b/lib/remote.exp @@ -766,7 +766,7 @@ proc standard_file { dest op args } { switch $op { exists { set status [remote_exec $dest "test -f $file"] - return [lindex $status 0] + return [expr [lindex $status 0] == 0] } delete { set file "" -- 2.5.1 _______________________________________________ DejaGnu mailing list DejaGnu@gnu.org https://lists.gnu.org/mailman/listinfo/dejagnu