diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2011-07-04 05:43:03 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2011-07-04 05:43:03 +0000 |
commit | 8cf37cfbd19193cf80d60e7772669aa6e62cf728 (patch) | |
tree | 6804e5818917b5e93a892ef407d217901d89db9b /regress/sys/kern/splice/remote.pl | |
parent | f57b852a44563605cd60c0185254420b8d416162 (diff) |
Add new socket splicing tests for the idle timeout feature. Note
that you need p5-BSD-Socket-Splice version 0.03 to run the regression
tests.
Diffstat (limited to 'regress/sys/kern/splice/remote.pl')
-rwxr-xr-x | regress/sys/kern/splice/remote.pl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/regress/sys/kern/splice/remote.pl b/regress/sys/kern/splice/remote.pl index 775621779c4..05fd6c362db 100755 --- a/regress/sys/kern/splice/remote.pl +++ b/regress/sys/kern/splice/remote.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $OpenBSD: remote.pl,v 1.2 2011/03/13 03:15:41 bluhm Exp $ +# $OpenBSD: remote.pl,v 1.3 2011/07/04 05:43:02 bluhm Exp $ # Copyright (c) 2010 Alexander Bluhm <bluhm@openbsd.org> # @@ -128,6 +128,11 @@ $s->down; exit if $args{nocheck}; +$r->loggrep(qr/^Timeout$/) or die "no relay timeout" + if $args{relay}{idle}; +$r->loggrep(qr/^Max$/) or die "no relay max" + if $args{relay}{max} && $args{len}; + my $clen = $c->loggrep(qr/^LEN: /) // die "no client len" unless $args{client}{nocheck}; my $slen = $s->loggrep(qr/^LEN: /) // die "no server len" @@ -148,8 +153,8 @@ my $smd5 = $s->loggrep(qr/^MD5: /) unless $args{server}{nocheck}; !defined($args{md5}) || !$smd5 || $smd5 eq "MD5: $args{md5}\n" or die "server: $smd5", "md5 $args{md5} expected"; -$args{relay}{errorin} = 0 unless $args{relay}{nocheck}; -$args{relay}{errorout} = 0 unless $args{relay}{nocheck}; +$args{relay}{errorin} //= 0 unless $args{relay}{nocheck}; +$args{relay}{errorout} //= 0 unless $args{relay}{nocheck}; my %name2proc = (client => $c, relay => $r, server => $s); foreach my $name (qw(client relay server)) { $args{$name}{errorin} //= $args{$name}{error}; |