diff options
author | Damien Miller <djm@mindrot.org> | 2008-06-30 08:07:56 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2008-06-30 08:07:56 +1000 |
commit | 4268a136d4da035a3d53dd6bc52ff1221240d9d8 (patch) | |
tree | 4eac7622b9b948e9cc7c5da7e363e2efdccce9bc /regress | |
parent | d9bfce83b73409f1e37cb051aaa28c307e0e28e1 (diff) |
- djm@cvs.openbsd.org 2008/06/28 13:57:25
[regress/Makefile regress/test-exec.sh regress/conch-ciphers.sh]
very basic regress test against Twisted Conch in "make interop"
target (conch is available in ports/devel/py-twisted/conch);
ok markus@
Diffstat (limited to 'regress')
-rw-r--r-- | regress/Makefile | 4 | ||||
-rw-r--r-- | regress/conch-ciphers.sh | 30 | ||||
-rw-r--r-- | regress/test-exec.sh | 12 |
3 files changed, 43 insertions, 3 deletions
diff --git a/regress/Makefile b/regress/Makefile index 6ec310fb7..3b8ea245b 100644 --- a/regress/Makefile +++ b/regress/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.47 2008/06/11 23:11:40 dtucker Exp $ | 1 | # $OpenBSD: Makefile,v 1.48 2008/06/28 13:57:25 djm Exp $ |
2 | 2 | ||
3 | REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t-exec | 3 | REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t-exec |
4 | tests: $(REGRESS_TARGETS) | 4 | tests: $(REGRESS_TARGETS) |
@@ -52,7 +52,7 @@ LTESTS= connect \ | |||
52 | localcommand \ | 52 | localcommand \ |
53 | forcecommand | 53 | forcecommand |
54 | 54 | ||
55 | INTEROP_TESTS= putty-transfer putty-ciphers putty-kex | 55 | INTEROP_TESTS= putty-transfer putty-ciphers putty-kex conch-ciphers |
56 | #INTEROP_TESTS+=ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp | 56 | #INTEROP_TESTS+=ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp |
57 | 57 | ||
58 | USER!= id -un | 58 | USER!= id -un |
diff --git a/regress/conch-ciphers.sh b/regress/conch-ciphers.sh new file mode 100644 index 000000000..c371d3030 --- /dev/null +++ b/regress/conch-ciphers.sh | |||
@@ -0,0 +1,30 @@ | |||
1 | # $OpenBSD: conch-ciphers.sh,v 1.1 2008/06/28 13:57:25 djm Exp $ | ||
2 | # Placed in the Public Domain. | ||
3 | |||
4 | tid="conch ciphers" | ||
5 | |||
6 | DATA=/bin/ls | ||
7 | COPY=${OBJ}/copy | ||
8 | |||
9 | set -e | ||
10 | |||
11 | if test "x$REGRESS_INTEROP_CONCH" != "xyes" ; then | ||
12 | fatal "conch interop tests not enabled" | ||
13 | fi | ||
14 | |||
15 | start_sshd | ||
16 | |||
17 | for c in aes256-ctr aes256-cbc aes192-ctr aes192-cbc aes128-ctr aes128-cbc \ | ||
18 | cast128-cbc blowfish 3des-cbc ; do | ||
19 | verbose "$tid: cipher $c" | ||
20 | rm -f ${COPY} | ||
21 | ${CONCH} --identity $OBJ/rsa --port $PORT --user $USER \ | ||
22 | --known-hosts $OBJ/known_hosts \ | ||
23 | 127.0.0.1 cat ${DATA} > ${COPY} 2>/dev/null | ||
24 | if [ $? -ne 0 ]; then | ||
25 | fail "ssh cat $DATA failed" | ||
26 | fi | ||
27 | cmp ${DATA} ${COPY} || fail "corrupted copy" | ||
28 | done | ||
29 | rm -f ${COPY} | ||
30 | |||
diff --git a/regress/test-exec.sh b/regress/test-exec.sh index 72fc99951..652bd49d3 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: test-exec.sh,v 1.34 2008/06/10 15:28:49 dtucker Exp $ | 1 | # $OpenBSD: test-exec.sh,v 1.35 2008/06/28 13:57:25 djm Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | #SUDO=sudo | 4 | #SUDO=sudo |
@@ -72,6 +72,7 @@ SCP=scp | |||
72 | # Interop testing | 72 | # Interop testing |
73 | PLINK=/usr/local/bin/plink | 73 | PLINK=/usr/local/bin/plink |
74 | PUTTYGEN=/usr/local/bin/puttygen | 74 | PUTTYGEN=/usr/local/bin/puttygen |
75 | CONCH=/usr/local/bin/conch | ||
75 | 76 | ||
76 | if [ "x$TEST_SSH_SSH" != "x" ]; then | 77 | if [ "x$TEST_SSH_SSH" != "x" ]; then |
77 | SSH="${TEST_SSH_SSH}" | 78 | SSH="${TEST_SSH_SSH}" |
@@ -114,6 +115,9 @@ if [ "x$TEST_SSH_PUTTYGEN" != "x" ]; then | |||
114 | *) PUTTYGEN=`which ${TEST_SSH_PUTTYGEN} 2>/dev/null` ;; | 115 | *) PUTTYGEN=`which ${TEST_SSH_PUTTYGEN} 2>/dev/null` ;; |
115 | esac | 116 | esac |
116 | fi | 117 | fi |
118 | if [ "x$TEST_SSH_CONCH" != "x" ]; then | ||
119 | CONCH="${TEST_SSH_CONCH}" | ||
120 | fi | ||
117 | 121 | ||
118 | # Path to sshd must be absolute for rexec | 122 | # Path to sshd must be absolute for rexec |
119 | case "$SSHD" in | 123 | case "$SSHD" in |
@@ -287,6 +291,12 @@ for t in rsa rsa1; do | |||
287 | done | 291 | done |
288 | chmod 644 $OBJ/authorized_keys_$USER | 292 | chmod 644 $OBJ/authorized_keys_$USER |
289 | 293 | ||
294 | # Activate Twisted Conch tests if the binary is present | ||
295 | REGRESS_INTEROP_CONCH=no | ||
296 | if test -x "$CONCH" ; then | ||
297 | REGRESS_INTEROP_CONCH=yes | ||
298 | fi | ||
299 | |||
290 | # If PuTTY is present and we are running a PuTTY test, prepare keys and | 300 | # If PuTTY is present and we are running a PuTTY test, prepare keys and |
291 | # configuration | 301 | # configuration |
292 | REGRESS_INTEROP_PUTTY=no | 302 | REGRESS_INTEROP_PUTTY=no |