summaryrefslogtreecommitdiff
path: root/regress/scp.sh
diff options
context:
space:
mode:
Diffstat (limited to 'regress/scp.sh')
-rw-r--r--regress/scp.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/regress/scp.sh b/regress/scp.sh
index cda01868a..703cc0893 100644
--- a/regress/scp.sh
+++ b/regress/scp.sh
@@ -5,6 +5,13 @@ tid="scp"
5 5
6#set -x 6#set -x
7 7
8# Figure out if diff understands "-N"
9if diff -N ${SRC}/scp.sh ${SRC}/scp.sh 2>/dev/null; then
10 DIFFOPT="-rN"
11else
12 DIFFOPT="-r"
13fi
14
8DATA=/bin/ls 15DATA=/bin/ls
9COPY=${OBJ}/copy 16COPY=${OBJ}/copy
10COPY2=${OBJ}/copy2 17COPY2=${OBJ}/copy2
@@ -48,14 +55,14 @@ scpclean
48rm -rf ${DIR2} 55rm -rf ${DIR2}
49cp ${DATA} ${DIR}/copy 56cp ${DATA} ${DIR}/copy
50$SCP $scpopts -r ${DIR} somehost:${DIR2} || fail "copy failed" 57$SCP $scpopts -r ${DIR} somehost:${DIR2} || fail "copy failed"
51diff -rN ${DIR} ${DIR2} || fail "corrupted copy" 58diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy"
52 59
53verbose "$tid: recursive remote dir to local dir" 60verbose "$tid: recursive remote dir to local dir"
54scpclean 61scpclean
55rm -rf ${DIR2} 62rm -rf ${DIR2}
56cp ${DATA} ${DIR}/copy 63cp ${DATA} ${DIR}/copy
57$SCP $scpopts -r somehost:${DIR} ${DIR2} || fail "copy failed" 64$SCP $scpopts -r somehost:${DIR} ${DIR2} || fail "copy failed"
58diff -rN ${DIR} ${DIR2} || fail "corrupted copy" 65diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy"
59 66
60for i in 0 1 2 3 4; do 67for i in 0 1 2 3 4; do
61 verbose "$tid: disallow bad server #$i" 68 verbose "$tid: disallow bad server #$i"