diff options
author | djm@openbsd.org <djm@openbsd.org> | 2023-09-08 08:10:57 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2023-09-08 08:12:05 +0200 |
commit | c4f966482983e18601eec70a1563115de836616f (patch) | |
tree | b430964834f9ab4670f4dd9335fcf9e8f775643f /regress | |
parent | upstream: fix recursive remote-remote copies of directories that (diff) | |
download | openssh-c4f966482983e18601eec70a1563115de836616f.tar.xz openssh-c4f966482983e18601eec70a1563115de836616f.zip |
upstream: regress test recursive remote-remote directories copies where
the directory contains a symlink to another directory.
also remove errant `set -x` that snuck in at some point
OpenBSD-Regress-ID: 1c94a48bdbd633ef2285954ee257725cd7bc456f
Diffstat (limited to 'regress')
-rw-r--r-- | regress/scp3.sh | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/regress/scp3.sh b/regress/scp3.sh index 383121f45..eeb7a9dde 100644 --- a/regress/scp3.sh +++ b/regress/scp3.sh @@ -1,10 +1,8 @@ -# $OpenBSD: scp3.sh,v 1.4 2023/01/13 04:47:34 dtucker Exp $ +# $OpenBSD: scp3.sh,v 1.5 2023/09/08 06:10:57 djm Exp $ # Placed in the Public Domain. tid="scp3" -set -x - COPY2=${OBJ}/copy2 DIR=${COPY}.dd DIR2=${COPY}.dd2 @@ -22,6 +20,17 @@ scpclean() { chmod 755 ${DIR} ${DIR2} } +# Create directory structure for recursive copy tests. +forest() { + scpclean + rm -rf ${DIR2} + cp ${DATA} ${DIR}/copy + ln -s ${DIR}/copy ${DIR}/copy-sym + mkdir ${DIR}/subdir + cp ${DATA} ${DIR}/subdir/copy + ln -s ${DIR}/subdir ${DIR}/subdir-sym +} + for mode in scp sftp ; do scpopts="-F${OBJ}/ssh_proxy -S ${SSH} -q" tag="$tid: $mode mode" @@ -43,9 +52,7 @@ for mode in scp sftp ; do cmp ${COPY} ${DIR}/copy || fail "corrupted copy" verbose "$tag: recursive remote dir to remote dir" - scpclean - rm -rf ${DIR2} - cp ${DATA} ${DIR}/copy + forest $SCP $scpopts -3r hostA:${DIR} hostB:${DIR2} || fail "copy failed" diff -r ${DIR} ${DIR2} || fail "corrupted copy" diff -r ${DIR2} ${DIR} || fail "corrupted copy" |