diff options
author | Darren Tucker <dtucker@zip.com.au> | 2004-06-17 16:32:45 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2004-06-17 16:32:45 +1000 |
commit | ffaa6a5f01483d5b43c9165176713d730ec8a2c7 (patch) | |
tree | bde30690fb57182fc51502d65c747021bf064072 /regress/multiplex.sh | |
parent | ddea13d74ddaba7951c61d50a798f1c345d677c2 (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.sh | 39 |
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 | ||
4 | CTL=$OBJ/ctl-sock | 4 | CTL=$OBJ/ctl-sock |
5 | 5 | ||
6 | tid="connection multiplexing" | 6 | tid="connection multiplexing" |
7 | 7 | ||
8 | DATA=/bin/ls | ||
9 | COPY=$OBJ/ls.copy | ||
10 | |||
8 | start_sshd | 11 | start_sshd |
9 | 12 | ||
10 | trace "start master, fork to background" | 13 | trace "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 | ||
13 | rm -f $OBJ/ls.copy | 16 | rm -f ${COPY} |
14 | trace "ssh transfer over multiplexed connection and check result" | 17 | trace "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} |
16 | test -f $OBJ/ls.copy || fail "failed copy /bin/ls" | 19 | test -f ${COPY} || fail "failed copy ${DATA}" |
17 | cmp /bin/ls $OBJ/ls.copy || fail "corrupted copy of /bin/ls" | 20 | cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}" |
18 | 21 | ||
19 | rm -f $OBJ/ls.copy | 22 | rm -f ${COPY} |
20 | trace "ssh transfer over multiplexed connection and check result" | 23 | trace "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} |
22 | test -f $OBJ/ls.copy || fail "failed copy /bin/ls" | 25 | test -f ${COPY} || fail "failed copy ${DATA}" |
23 | cmp /bin/ls $OBJ/ls.copy || fail "corrupted copy of /bin/ls" | 26 | cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}" |
24 | 27 | ||
25 | rm -f $OBJ/ls.copy | 28 | rm -f ${COPY} |
26 | trace "sftp transfer over multiplexed connection and check result" | 29 | trace "sftp transfer over multiplexed connection and check result" |
27 | echo "get /bin/ls $OBJ/ls.copy" | \ | 30 | echo "get ${DATA} ${COPY}" | \ |
28 | ${SFTP} -oControlPath=$CTL otherhost >/dev/null 2>&1 | 31 | ${SFTP} -oControlPath=$CTL otherhost >/dev/null 2>&1 |
29 | test -f $OBJ/ls.copy || fail "failed copy /bin/ls" | 32 | test -f ${COPY} || fail "failed copy ${DATA}" |
30 | cmp /bin/ls $OBJ/ls.copy || fail "corrupted copy of /bin/ls" | 33 | cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}" |
31 | 34 | ||
32 | rm -f $OBJ/ls.copy | 35 | rm -f ${COPY} |
33 | trace "scp transfer over multiplexed connection and check result" | 36 | trace "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 |
35 | test -f $OBJ/ls.copy || fail "failed copy /bin/ls" | 38 | test -f ${COPY} || fail "failed copy ${DATA}" |
36 | cmp /bin/ls $OBJ/ls.copy || fail "corrupted copy of /bin/ls" | 39 | cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}" |
37 | 40 | ||
38 | rm -f $OBJ/ls.copy | 41 | rm -f ${COPY} |
39 | 42 | ||
40 | for s in 0 1 4 5 44; do | 43 | for s in 0 1 4 5 44; do |
41 | trace "exit status $s over multiplexed connection" | 44 | trace "exit status $s over multiplexed connection" |