[regress/multiplex.sh]
     Use DATA and COPY for test data rather than hard-coded paths; ok djm@
This commit is contained in:
Darren Tucker 2004-06-17 16:32:45 +10:00
parent ddea13d74d
commit ffaa6a5f01
2 changed files with 25 additions and 19 deletions

View File

@ -6,6 +6,9 @@
[regress/multiplex.sh] [regress/multiplex.sh]
Remove datafile between and after tests, kill sshd rather than wait; Remove datafile between and after tests, kill sshd rather than wait;
ok djm@ ok djm@
- 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@
20040616 20040616
- (dtucker) [openbsd-compat/port-aix.c] Expand whitespace -> tabs. No - (dtucker) [openbsd-compat/port-aix.c] Expand whitespace -> tabs. No
@ -1260,4 +1263,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
$Id: ChangeLog,v 1.3400 2004/06/17 06:27:43 dtucker Exp $ $Id: ChangeLog,v 1.3401 2004/06/17 06:32:45 dtucker Exp $

View File

@ -1,41 +1,44 @@
# $OpenBSD: multiplex.sh,v 1.3 2004/06/17 05:51:59 dtucker Exp $ # $OpenBSD: multiplex.sh,v 1.4 2004/06/17 06:00:05 dtucker Exp $
# Placed in the Public Domain. # Placed in the Public Domain.
CTL=$OBJ/ctl-sock CTL=$OBJ/ctl-sock
tid="connection multiplexing" tid="connection multiplexing"
DATA=/bin/ls
COPY=$OBJ/ls.copy
start_sshd start_sshd
trace "start master, fork to background" trace "start master, fork to background"
${SSH} -2 -MS$CTL -F $OBJ/ssh_config -f somehost sleep 60 ${SSH} -2 -MS$CTL -F $OBJ/ssh_config -f somehost sleep 60
rm -f $OBJ/ls.copy rm -f ${COPY}
trace "ssh transfer over multiplexed connection and check result" trace "ssh transfer over multiplexed connection and check result"
${SSH} -S$CTL otherhost cat /bin/ls > $OBJ/ls.copy ${SSH} -S$CTL otherhost cat ${DATA} > ${COPY}
test -f $OBJ/ls.copy || fail "failed copy /bin/ls" test -f ${COPY} || fail "failed copy ${DATA}"
cmp /bin/ls $OBJ/ls.copy || fail "corrupted copy of /bin/ls" cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}"
rm -f $OBJ/ls.copy rm -f ${COPY}
trace "ssh transfer over multiplexed connection and check result" trace "ssh transfer over multiplexed connection and check result"
${SSH} -S $CTL otherhost cat /bin/ls > $OBJ/ls.copy ${SSH} -S $CTL otherhost cat ${DATA} > ${COPY}
test -f $OBJ/ls.copy || fail "failed copy /bin/ls" test -f ${COPY} || fail "failed copy ${DATA}"
cmp /bin/ls $OBJ/ls.copy || fail "corrupted copy of /bin/ls" cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}"
rm -f $OBJ/ls.copy rm -f ${COPY}
trace "sftp transfer over multiplexed connection and check result" trace "sftp transfer over multiplexed connection and check result"
echo "get /bin/ls $OBJ/ls.copy" | \ echo "get ${DATA} ${COPY}" | \
${SFTP} -oControlPath=$CTL otherhost >/dev/null 2>&1 ${SFTP} -oControlPath=$CTL otherhost >/dev/null 2>&1
test -f $OBJ/ls.copy || fail "failed copy /bin/ls" test -f ${COPY} || fail "failed copy ${DATA}"
cmp /bin/ls $OBJ/ls.copy || fail "corrupted copy of /bin/ls" cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}"
rm -f $OBJ/ls.copy rm -f ${COPY}
trace "scp transfer over multiplexed connection and check result" trace "scp transfer over multiplexed connection and check result"
${SCP} -oControlPath=$CTL otherhost:/bin/ls $OBJ/ls.copy >/dev/null 2>&1 ${SCP} -oControlPath=$CTL otherhost:${DATA} ${COPY} >/dev/null 2>&1
test -f $OBJ/ls.copy || fail "failed copy /bin/ls" test -f ${COPY} || fail "failed copy ${DATA}"
cmp /bin/ls $OBJ/ls.copy || fail "corrupted copy of /bin/ls" cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}"
rm -f $OBJ/ls.copy rm -f ${COPY}
for s in 0 1 4 5 44; do for s in 0 1 4 5 44; do
trace "exit status $s over multiplexed connection" trace "exit status $s over multiplexed connection"