diff options
author | Darren Tucker <dtucker@zip.com.au> | 2013-05-17 09:37:31 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2013-05-17 09:37:31 +1000 |
commit | a4df65b9fc68a555a7d8781700475fb03ed6e694 (patch) | |
tree | 7d7d12be12510cabfc98f8ab448cbecc45a06d4e | |
parent | 40aaff7e4bcb05b05e3d24938b6d34885be817da (diff) |
- dtucker@cvs.openbsd.org 2013/04/22 07:28:53
[multiplex.sh]
Add tests for -Oforward and -Ocancel for local and remote forwards
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | regress/multiplex.sh | 23 |
2 files changed, 23 insertions, 2 deletions
@@ -25,7 +25,7 @@ | |||
25 | [regress/Makefile regress/sftp-chroot.sh] | 25 | [regress/Makefile regress/sftp-chroot.sh] |
26 | test sshd ChrootDirectory+internal-sftp; feedback & ok dtucker@ | 26 | test sshd ChrootDirectory+internal-sftp; feedback & ok dtucker@ |
27 | - dtucker@cvs.openbsd.org 2013/04/22 07:23:08 | 27 | - dtucker@cvs.openbsd.org 2013/04/22 07:23:08 |
28 | [multiplex.sh] | 28 | [regress/multiplex.sh] |
29 | Write mux master logs to regress.log instead of ssh.log to keep separate | 29 | Write mux master logs to regress.log instead of ssh.log to keep separate |
30 | 30 | ||
31 | 20130516 | 31 | 20130516 |
diff --git a/regress/multiplex.sh b/regress/multiplex.sh index 619fec9b9..8389b3840 100644 --- a/regress/multiplex.sh +++ b/regress/multiplex.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: multiplex.sh,v 1.19 2013/04/22 07:23:08 dtucker Exp $ | 1 | # $OpenBSD: multiplex.sh,v 1.20 2013/04/22 07:28:53 dtucker Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | CTL=/tmp/openssh.regress.ctl-sock.$$ | 4 | CTL=/tmp/openssh.regress.ctl-sock.$$ |
@@ -12,6 +12,7 @@ fi | |||
12 | 12 | ||
13 | DATA=/bin/ls${EXEEXT} | 13 | DATA=/bin/ls${EXEEXT} |
14 | COPY=$OBJ/ls.copy | 14 | COPY=$OBJ/ls.copy |
15 | P=3301 # test port | ||
15 | 16 | ||
16 | wait_for_mux_master_ready() | 17 | wait_for_mux_master_ready() |
17 | { | 18 | { |
@@ -96,6 +97,26 @@ verbose "test $tid: cmd check" | |||
96 | ${SSH} -F $OBJ/ssh_config -S $CTL -Ocheck otherhost >>$TEST_REGRESS_LOGFILE 2>&1 \ | 97 | ${SSH} -F $OBJ/ssh_config -S $CTL -Ocheck otherhost >>$TEST_REGRESS_LOGFILE 2>&1 \ |
97 | || fail "check command failed" | 98 | || fail "check command failed" |
98 | 99 | ||
100 | verbose "test $tid: cmd forward local" | ||
101 | ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L $P:localhost:$PORT otherhost \ | ||
102 | || fail "request local forward failed" | ||
103 | ${SSH} -F $OBJ/ssh_config -p$P otherhost true \ | ||
104 | || fail "connect to local forward port failed" | ||
105 | ${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -L $P:localhost:$PORT otherhost \ | ||
106 | || fail "cancel local forward failed" | ||
107 | ${SSH} -F $OBJ/ssh_config -p$P otherhost true \ | ||
108 | && fail "local forward port still listening" | ||
109 | |||
110 | verbose "test $tid: cmd forward remote" | ||
111 | ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -R $P:localhost:$PORT otherhost \ | ||
112 | || fail "request remote forward failed" | ||
113 | ${SSH} -F $OBJ/ssh_config -p$P otherhost true \ | ||
114 | || fail "connect to remote forwarded port failed" | ||
115 | ${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -R $P:localhost:$PORT otherhost \ | ||
116 | || fail "cancel remote forward failed" | ||
117 | ${SSH} -F $OBJ/ssh_config -p$P otherhost true \ | ||
118 | && fail "remote forward port still listening" | ||
119 | |||
99 | verbose "test $tid: cmd exit" | 120 | verbose "test $tid: cmd exit" |
100 | ${SSH} -F $OBJ/ssh_config -S $CTL -Oexit otherhost >>$TEST_REGRESS_LOGFILE 2>&1 \ | 121 | ${SSH} -F $OBJ/ssh_config -S $CTL -Oexit otherhost >>$TEST_REGRESS_LOGFILE 2>&1 \ |
101 | || fail "send exit command failed" | 122 | || fail "send exit command failed" |