aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReyk Floeter <reyk@esdenera.com>2016-08-15 20:54:30 +0200
committerReyk Floeter <reyk@esdenera.com>2016-08-15 20:54:30 +0200
commit5a83fddddbf34b5da95507bbca99427616d37f79 (patch)
tree00c73a277a4114430b81ba8a81e4552a1f54ceec
parent308ad496d559f26d7975aedbdbb252a704e8d9a6 (diff)
downloadhttpd-5a83fddddbf34b5da95507bbca99427616d37f79.tar.gz
httpd-5a83fddddbf34b5da95507bbca99427616d37f79.zip
sync tests
-rw-r--r--regress/tests/Proc.pm5
-rw-r--r--regress/tests/funcs.pl8
-rw-r--r--regress/tests/httpd.pl7
3 files changed, 12 insertions, 8 deletions
diff --git a/regress/tests/Proc.pm b/regress/tests/Proc.pm
index 8f46012..a98cc17 100644
--- a/regress/tests/Proc.pm
+++ b/regress/tests/Proc.pm
@@ -1,4 +1,4 @@
-# $OpenBSD: Proc.pm,v 1.1 2015/07/16 16:35:57 reyk Exp $
+# $OpenBSD: Proc.pm,v 1.2 2016/05/03 19:13:04 bluhm Exp $
# Copyright (c) 2010-2014 Alexander Bluhm <bluhm@openbsd.org>
#
@@ -147,7 +147,8 @@ sub loggrep {
my $self = shift;
my($regex, $timeout) = @_;
- my $end = time() + $timeout if $timeout;
+ my $end;
+ $end = time() + $timeout if $timeout;
do {
my($kid, $status, $code) = $self->wait(WNOHANG);
diff --git a/regress/tests/funcs.pl b/regress/tests/funcs.pl
index 9a0db7e..beda09a 100644
--- a/regress/tests/funcs.pl
+++ b/regress/tests/funcs.pl
@@ -1,4 +1,4 @@
-# $OpenBSD: funcs.pl,v 1.5 2015/07/18 19:17:13 benno Exp $
+# $OpenBSD: funcs.pl,v 1.6 2016/05/03 19:13:04 bluhm Exp $
# Copyright (c) 2010-2015 Alexander Bluhm <bluhm@openbsd.org>
#
@@ -425,7 +425,8 @@ sub check_len {
$args{len} ||= 512 unless $args{lengths};
- my @clen = $c->loggrep(qr/^LEN: /) or die "no client len"
+ my @clen;
+ @clen = $c->loggrep(qr/^LEN: /) or die "no client len"
unless $args{client}{nocheck};
# !@clen
# or die "client: @clen", "len mismatch";
@@ -445,7 +446,8 @@ sub check_len {
sub check_md5 {
my ($c, $r, %args) = @_;
- my @cmd5 = $c->loggrep(qr/^MD5: /) unless $args{client}{nocheck};
+ my @cmd5;
+ @cmd5 = $c->loggrep(qr/^MD5: /) unless $args{client}{nocheck};
my @md5 = ref($args{md5}) eq 'ARRAY' ? @{$args{md5}} : $args{md5} || ()
or return;
foreach my $md5 (@md5) {
diff --git a/regress/tests/httpd.pl b/regress/tests/httpd.pl
index 481a587..6ca2d83 100644
--- a/regress/tests/httpd.pl
+++ b/regress/tests/httpd.pl
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-# $OpenBSD: httpd.pl,v 1.1 2015/07/16 16:35:57 reyk Exp $
+# $OpenBSD: httpd.pl,v 1.2 2016/05/03 19:13:04 bluhm Exp $
# Copyright (c) 2010-2015 Alexander Bluhm <bluhm@openbsd.org>
# Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
@@ -41,7 +41,8 @@ if (@ARGV and -f $ARGV[-1]) {
my $redo = $args{lengths} && @{$args{lengths}};
$redo = 0 if $args{client}{http_vers}; # run only one persistent connection
my($sport, $rport) = find_ports(num => 2);
-my $d = Httpd->new(
+my($d, $c);
+$d = Httpd->new(
chroot => $ARGV[0],
listendomain => AF_INET,
listenaddr => "127.0.0.1",
@@ -52,7 +53,7 @@ my $d = Httpd->new(
%{$args{httpd}},
testfile => $testfile,
);
-my $c = Client->new(
+$c = Client->new(
chroot => $ARGV[0],
func => \&http_client,
connectdomain => AF_INET,