Mailing List Archive

[openssh] 02/02: upstream: regress test for in-place transfers and clobbering larger
This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit bedb93415b60db3dfd704a3d525e82adb14a2481
Author: djm@openbsd.org <djm@openbsd.org>
Date: Sun May 15 23:48:07 2022 +0000

upstream: regress test for in-place transfers and clobbering larger

files with smaller ones; would have caught last regression in scp(1)

OpenBSD-Regress-ID: 19de4e88dd3a4f7e5c1618c9be3c32415bd93bc2
---
regress/scp.sh | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/regress/scp.sh b/regress/scp.sh
index 358a8df6..f47c5945 100644
--- a/regress/scp.sh
+++ b/regress/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"
@@ -49,6 +49,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}

--
To stop receiving notification emails like this one, please contact
djm@mindrot.org.
_______________________________________________
openssh-commits mailing list
openssh-commits@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-commits