diff options
Diffstat (limited to 'regress')
-rw-r--r-- | regress/scp.sh | 11 |
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" | ||
9 | if diff -N ${SRC}/scp.sh ${SRC}/scp.sh 2>/dev/null; then | ||
10 | DIFFOPT="-rN" | ||
11 | else | ||
12 | DIFFOPT="-r" | ||
13 | fi | ||
14 | |||
8 | DATA=/bin/ls | 15 | DATA=/bin/ls |
9 | COPY=${OBJ}/copy | 16 | COPY=${OBJ}/copy |
10 | COPY2=${OBJ}/copy2 | 17 | COPY2=${OBJ}/copy2 |
@@ -48,14 +55,14 @@ scpclean | |||
48 | rm -rf ${DIR2} | 55 | rm -rf ${DIR2} |
49 | cp ${DATA} ${DIR}/copy | 56 | cp ${DATA} ${DIR}/copy |
50 | $SCP $scpopts -r ${DIR} somehost:${DIR2} || fail "copy failed" | 57 | $SCP $scpopts -r ${DIR} somehost:${DIR2} || fail "copy failed" |
51 | diff -rN ${DIR} ${DIR2} || fail "corrupted copy" | 58 | diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy" |
52 | 59 | ||
53 | verbose "$tid: recursive remote dir to local dir" | 60 | verbose "$tid: recursive remote dir to local dir" |
54 | scpclean | 61 | scpclean |
55 | rm -rf ${DIR2} | 62 | rm -rf ${DIR2} |
56 | cp ${DATA} ${DIR}/copy | 63 | cp ${DATA} ${DIR}/copy |
57 | $SCP $scpopts -r somehost:${DIR} ${DIR2} || fail "copy failed" | 64 | $SCP $scpopts -r somehost:${DIR} ${DIR2} || fail "copy failed" |
58 | diff -rN ${DIR} ${DIR2} || fail "corrupted copy" | 65 | diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy" |
59 | 66 | ||
60 | for i in 0 1 2 3 4; do | 67 | for i in 0 1 2 3 4; do |
61 | verbose "$tid: disallow bad server #$i" | 68 | verbose "$tid: disallow bad server #$i" |