summaryrefslogtreecommitdiff
path: root/regress/multiplex.sh
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-06-17 16:32:45 +1000
committerDarren Tucker <dtucker@zip.com.au>2004-06-17 16:32:45 +1000
commitffaa6a5f01483d5b43c9165176713d730ec8a2c7 (patch)
treebde30690fb57182fc51502d65c747021bf064072 /regress/multiplex.sh
parentddea13d74ddaba7951c61d50a798f1c345d677c2 (diff)
- dtucker@cvs.openbsd.org 2004/06/17 06:00:05
[regress/multiplex.sh] Use DATA and COPY for test data rather than hard-coded paths; ok djm@
Diffstat (limited to 'regress/multiplex.sh')
-rw-r--r--regress/multiplex.sh39
1 files changed, 21 insertions, 18 deletions
diff --git a/regress/multiplex.sh b/regress/multiplex.sh
index fb4927e62..9fea117bd 100644
--- a/regress/multiplex.sh
+++ b/regress/multiplex.sh
@@ -1,41 +1,44 @@
1# $OpenBSD: multiplex.sh,v 1.3 2004/06/17 05:51:59 dtucker Exp $ 1# $OpenBSD: multiplex.sh,v 1.4 2004/06/17 06:00:05 dtucker Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4CTL=$OBJ/ctl-sock 4CTL=$OBJ/ctl-sock
5 5
6tid="connection multiplexing" 6tid="connection multiplexing"
7 7
8DATA=/bin/ls
9COPY=$OBJ/ls.copy
10
8start_sshd 11start_sshd
9 12
10trace "start master, fork to background" 13trace "start master, fork to background"
11${SSH} -2 -MS$CTL -F $OBJ/ssh_config -f somehost sleep 60 14${SSH} -2 -MS$CTL -F $OBJ/ssh_config -f somehost sleep 60
12 15
13rm -f $OBJ/ls.copy 16rm -f ${COPY}
14trace "ssh transfer over multiplexed connection and check result" 17trace "ssh transfer over multiplexed connection and check result"
15${SSH} -S$CTL otherhost cat /bin/ls > $OBJ/ls.copy 18${SSH} -S$CTL otherhost cat ${DATA} > ${COPY}
16test -f $OBJ/ls.copy || fail "failed copy /bin/ls" 19test -f ${COPY} || fail "failed copy ${DATA}"
17cmp /bin/ls $OBJ/ls.copy || fail "corrupted copy of /bin/ls" 20cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}"
18 21
19rm -f $OBJ/ls.copy 22rm -f ${COPY}
20trace "ssh transfer over multiplexed connection and check result" 23trace "ssh transfer over multiplexed connection and check result"
21${SSH} -S $CTL otherhost cat /bin/ls > $OBJ/ls.copy 24${SSH} -S $CTL otherhost cat ${DATA} > ${COPY}
22test -f $OBJ/ls.copy || fail "failed copy /bin/ls" 25test -f ${COPY} || fail "failed copy ${DATA}"
23cmp /bin/ls $OBJ/ls.copy || fail "corrupted copy of /bin/ls" 26cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}"
24 27
25rm -f $OBJ/ls.copy 28rm -f ${COPY}
26trace "sftp transfer over multiplexed connection and check result" 29trace "sftp transfer over multiplexed connection and check result"
27echo "get /bin/ls $OBJ/ls.copy" | \ 30echo "get ${DATA} ${COPY}" | \
28 ${SFTP} -oControlPath=$CTL otherhost >/dev/null 2>&1 31 ${SFTP} -oControlPath=$CTL otherhost >/dev/null 2>&1
29test -f $OBJ/ls.copy || fail "failed copy /bin/ls" 32test -f ${COPY} || fail "failed copy ${DATA}"
30cmp /bin/ls $OBJ/ls.copy || fail "corrupted copy of /bin/ls" 33cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}"
31 34
32rm -f $OBJ/ls.copy 35rm -f ${COPY}
33trace "scp transfer over multiplexed connection and check result" 36trace "scp transfer over multiplexed connection and check result"
34${SCP} -oControlPath=$CTL otherhost:/bin/ls $OBJ/ls.copy >/dev/null 2>&1 37${SCP} -oControlPath=$CTL otherhost:${DATA} ${COPY} >/dev/null 2>&1
35test -f $OBJ/ls.copy || fail "failed copy /bin/ls" 38test -f ${COPY} || fail "failed copy ${DATA}"
36cmp /bin/ls $OBJ/ls.copy || fail "corrupted copy of /bin/ls" 39cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}"
37 40
38rm -f $OBJ/ls.copy 41rm -f ${COPY}
39 42
40for s in 0 1 4 5 44; do 43for s in 0 1 4 5 44; do
41 trace "exit status $s over multiplexed connection" 44 trace "exit status $s over multiplexed connection"