diff options
Diffstat (limited to 'regress')
-rw-r--r-- | regress/Makefile | 5 | ||||
-rw-r--r-- | regress/banner.sh | 31 |
2 files changed, 34 insertions, 2 deletions
diff --git a/regress/Makefile b/regress/Makefile index 623be8d82..da4a6731c 100644 --- a/regress/Makefile +++ b/regress/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.24 2003/07/03 08:24:13 markus Exp $ | 1 | # $OpenBSD: Makefile,v 1.25 2003/10/07 01:52:13 dtucker 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) |
@@ -14,6 +14,7 @@ LTESTS= connect \ | |||
14 | proto-mismatch \ | 14 | proto-mismatch \ |
15 | exit-status \ | 15 | exit-status \ |
16 | transfer \ | 16 | transfer \ |
17 | banner \ | ||
17 | rekey \ | 18 | rekey \ |
18 | stderr-data \ | 19 | stderr-data \ |
19 | stderr-after-eof \ | 20 | stderr-after-eof \ |
@@ -40,7 +41,7 @@ CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ | |||
40 | ssh_config ssh_proxy sshd_config sshd_proxy \ | 41 | ssh_config ssh_proxy sshd_config sshd_proxy \ |
41 | rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \ | 42 | rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \ |
42 | rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \ | 43 | rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \ |
43 | ls.copy remote_pid | 44 | ls.copy banner.in banner.out remote_pid |
44 | 45 | ||
45 | #LTESTS += ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp | 46 | #LTESTS += ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp |
46 | 47 | ||
diff --git a/regress/banner.sh b/regress/banner.sh new file mode 100644 index 000000000..03e2fc8f1 --- /dev/null +++ b/regress/banner.sh | |||
@@ -0,0 +1,31 @@ | |||
1 | # $OpenBSD: banner.sh,v 1.1 2003/10/07 01:52:13 dtucker Exp $ | ||
2 | # Placed in the Public Domain. | ||
3 | |||
4 | tid="banner" | ||
5 | echo "Banner $OBJ/banner.in" >> $OBJ/sshd_proxy | ||
6 | |||
7 | for s in 0 10 100 1000 10000 100000 ; do | ||
8 | if [ "$s" = "0" ]; then | ||
9 | # create empty banner | ||
10 | rm -f $OBJ/banner.in | ||
11 | touch $OBJ/banner.in | ||
12 | elif [ "$s" = "10" ]; then | ||
13 | # create 10-byte banner file | ||
14 | echo "abcdefghi" >$OBJ/banner.in | ||
15 | else | ||
16 | # increase size 10x | ||
17 | cp $OBJ/banner.in $OBJ/banner.out | ||
18 | for i in 0 1 2 3 4 5 6 7 8 ; do | ||
19 | cat $OBJ/banner.out >> $OBJ/banner.in | ||
20 | done | ||
21 | fi | ||
22 | |||
23 | trace "test banner size $s" | ||
24 | verbose "test $tid: size $s" | ||
25 | ${SSH} -2 -F $OBJ/ssh_proxy otherhost true 2>$OBJ/banner.out | ||
26 | if ! cmp $OBJ/banner.in $OBJ/banner.out ; then | ||
27 | fail "banner size $s mismatch" | ||
28 | fi | ||
29 | done | ||
30 | |||
31 | rm -f $OBJ/banner.out $OBJ/banner.in | ||