diff options
Diffstat (limited to 'regress/usr.bin/ssh')
-rw-r--r-- | regress/usr.bin/ssh/scp.sh | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/regress/usr.bin/ssh/scp.sh b/regress/usr.bin/ssh/scp.sh index 84411536824..f7fd1f7b8e3 100644 --- a/regress/usr.bin/ssh/scp.sh +++ b/regress/usr.bin/ssh/scp.sh @@ -1,4 +1,4 @@ -# $OpenBSD: scp.sh,v 1.13 2021/08/10 03:35:45 djm Exp $ +# $OpenBSD: scp.sh,v 1.14 2022/05/15 23:48:07 djm Exp $ # Placed in the Public Domain. tid="scp" @@ -42,6 +42,31 @@ for mode in scp sftp ; do $SCP $scpopts somehost:${DATA} ${COPY} || fail "copy failed" cmp ${DATA} ${COPY} || fail "corrupted copy" + verbose "$tag: copy local file to remote file in place" + scpclean + cp ${DATA} ${COPY} + $SCP $scpopts ${COPY} somehost:${COPY} || fail "copy failed" + cmp ${DATA} ${COPY} || fail "corrupted copy" + + verbose "$tag: copy remote file to local file in place" + scpclean + cp ${DATA} ${COPY} + $SCP $scpopts somehost:${COPY} ${COPY} || fail "copy failed" + cmp ${DATA} ${COPY} || fail "corrupted copy" + + verbose "$tag: copy local file to remote file clobber" + scpclean + cat ${DATA} ${DATA} > ${COPY} + $SCP $scpopts ${DATA} somehost:${COPY} || fail "copy failed" + ls -l $DATA $COPY + cmp ${DATA} ${COPY} || fail "corrupted copy" + + verbose "$tag: copy remote file to local file clobber" + scpclean + cat ${DATA} ${DATA} > ${COPY} + $SCP $scpopts somehost:${DATA} ${COPY} || fail "copy failed" + cmp ${DATA} ${COPY} || fail "corrupted copy" + verbose "$tag: simple copy local file to remote dir" scpclean cp ${DATA} ${COPY} |