diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2013-05-17 10:28:12 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2013-05-17 10:28:12 +0000 |
commit | 530f16f71a9746235782ffb6abde2e4c64fc7ac5 (patch) | |
tree | 4770156e78f742dfabfb901125e25bbc702a359b /regress | |
parent | f6ac760355b5823cbfe088cdb8af4dfe4e746222 (diff) |
only compare copied data if sftp succeeds. from portable
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/ssh/sftp.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/regress/usr.bin/ssh/sftp.sh b/regress/usr.bin/ssh/sftp.sh index 37a06cab3b0..5cd286f84e7 100644 --- a/regress/usr.bin/ssh/sftp.sh +++ b/regress/usr.bin/ssh/sftp.sh @@ -1,4 +1,4 @@ -# $OpenBSD: sftp.sh,v 1.4 2013/05/17 04:29:14 dtucker Exp $ +# $OpenBSD: sftp.sh,v 1.5 2013/05/17 10:28:11 dtucker Exp $ # Placed in the Public Domain. tid="basic sftp put/get" @@ -19,8 +19,10 @@ EOF r=$? if [ $r -ne 0 ]; then fail "sftp failed with $r" + else + cmp $DATA ${COPY}.1 || fail "corrupted copy after get" + cmp $DATA ${COPY}.2 || fail "corrupted copy after put" fi - cmp $DATA ${COPY}.1 || fail "corrupted copy after get" - cmp $DATA ${COPY}.2 || fail "corrupted copy after put" done done +rm -f ${COPY}.1 ${COPY}.2 |