diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2015-02-13 21:40:51 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2015-02-13 21:40:51 +0000 |
commit | 2715b90c2f519cd9e6dabdb59345433e115587b8 (patch) | |
tree | 0889783e3f4430ce374f3e930b99d8f4dea4c3c3 | |
parent | 299a3baa51bbe67538cab7d28b2d80bba1346198 (diff) |
Adapt the maxunix test, the syslogd -a error semantic has changed.
Increase timeouts and remove races, so that the syslogd tests pass
on my sparc64 machine.
-rw-r--r-- | regress/usr.sbin/syslogd/Proc.pm | 4 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/Syslogd.pm | 3 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-dropped-sighup-tls.pl | 2 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-dropped-sigterm-tls.pl | 2 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-maxunix.pl | 10 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-sighup-privsep.pl | 1 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-sighup.pl | 1 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-sync-tcp.pl | 4 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-sync-tls.pl | 5 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/syslogd.pl | 4 |
10 files changed, 19 insertions, 17 deletions
diff --git a/regress/usr.sbin/syslogd/Proc.pm b/regress/usr.sbin/syslogd/Proc.pm index deee1328b91..9b328a93e60 100644 --- a/regress/usr.sbin/syslogd/Proc.pm +++ b/regress/usr.sbin/syslogd/Proc.pm @@ -1,4 +1,4 @@ -# $OpenBSD: Proc.pm,v 1.5 2015/01/28 19:23:22 bluhm Exp $ +# $OpenBSD: Proc.pm,v 1.6 2015/02/13 21:40:50 bluhm Exp $ # Copyright (c) 2010-2015 Alexander Bluhm <bluhm@openbsd.org> # Copyright (c) 2014 Florian Riehm <mail@friehm.de> @@ -189,7 +189,7 @@ sub up { sub down { my $self = shift; - my $timeout = shift || 30; + my $timeout = shift || 60; $self->loggrep(qr/$self->{down}/, $timeout) or croak ref($self), " no '$self->{down}' in $self->{logfile} ". "after $timeout seconds"; diff --git a/regress/usr.sbin/syslogd/Syslogd.pm b/regress/usr.sbin/syslogd/Syslogd.pm index 16b4b1118b0..94e5f5ad3de 100644 --- a/regress/usr.sbin/syslogd/Syslogd.pm +++ b/regress/usr.sbin/syslogd/Syslogd.pm @@ -1,4 +1,4 @@ -# $OpenBSD: Syslogd.pm,v 1.10 2015/01/28 19:23:22 bluhm Exp $ +# $OpenBSD: Syslogd.pm,v 1.11 2015/02/13 21:40:50 bluhm Exp $ # Copyright (c) 2010-2015 Alexander Bluhm <bluhm@openbsd.org> # Copyright (c) 2014 Florian Riehm <mail@friehm.de> @@ -197,6 +197,7 @@ my $rotate_num = 0; sub rotate { my $self = shift; + $self->loggrep("bytes transferred", 1) or sleep 1; foreach my $name (qw(file pipe)) { my $file = $self->{"out$name"}; for (my $i = $rotate_num; $i >= 0; $i--) { diff --git a/regress/usr.sbin/syslogd/args-dropped-sighup-tls.pl b/regress/usr.sbin/syslogd/args-dropped-sighup-tls.pl index cbcd8c12a60..4a3a51f460f 100644 --- a/regress/usr.sbin/syslogd/args-dropped-sighup-tls.pl +++ b/regress/usr.sbin/syslogd/args-dropped-sighup-tls.pl @@ -57,7 +57,7 @@ our %args = ( get_thirdlog() => 0, qr/syslogd: start/ => 1, qr/syslogd: restart/ => 1, - get_charlog() => 41, + get_charlog() => '~41', qr/syslogd: dropped 2[56][0-9] messages to remote loghost/ => 1, }, }, diff --git a/regress/usr.sbin/syslogd/args-dropped-sigterm-tls.pl b/regress/usr.sbin/syslogd/args-dropped-sigterm-tls.pl index 52486f2c9ee..4320ff612b5 100644 --- a/regress/usr.sbin/syslogd/args-dropped-sigterm-tls.pl +++ b/regress/usr.sbin/syslogd/args-dropped-sigterm-tls.pl @@ -51,7 +51,7 @@ our %args = ( get_thirdlog() => 0, get_testlog() => 0, qr/syslogd: start/ => 1, - get_charlog() => 40, + get_charlog() => '~40', }, }, pipe => { diff --git a/regress/usr.sbin/syslogd/args-maxunix.pl b/regress/usr.sbin/syslogd/args-maxunix.pl index 753d89b664f..f670b888727 100644 --- a/regress/usr.sbin/syslogd/args-maxunix.pl +++ b/regress/usr.sbin/syslogd/args-maxunix.pl @@ -3,8 +3,8 @@ # The syslogd -a passes them via UDP to the loghost. # The server receives the messages on its UDP socket. # Find the message in client, file, pipe, syslogd, server log. -# Check that the file log contains a message from every sockets. -# Check that the one socket above the limit prints an error. +# Check that the file log contains a message from every socket. +# Check that no error is printed. use strict; use warnings; @@ -23,11 +23,9 @@ our %args = ( }, }, syslogd => { - options => [ map { ("-a" => "unix-$_.sock") } (1..MAXUNIX) ], + options => [ map { ("-a" => "unix-$_.sock") } (1..(MAXUNIX-1)) ], loggrep => { - qr/syslogd: out of descriptors, ignoring unix-20.sock/ => 0, - qr/syslogd: out of descriptors, ignoring unix-21.sock/ => 1, - qr/syslogd: out of descriptors, ignoring unix-22.sock/ => 0, + qr/out of descriptors/ => 0, }, }, file => { diff --git a/regress/usr.sbin/syslogd/args-sighup-privsep.pl b/regress/usr.sbin/syslogd/args-sighup-privsep.pl index 7df36f043de..83415866d5b 100644 --- a/regress/usr.sbin/syslogd/args-sighup-privsep.pl +++ b/regress/usr.sbin/syslogd/args-sighup-privsep.pl @@ -43,6 +43,7 @@ our %args = ( check => sub { my $self = shift; my $r = $self->{syslogd}; + $r->loggrep("bytes transferred", 1, 2) or sleep 1; foreach my $name (qw(file pipe)) { my $file = $r->{"out$name"}.".1"; my $pattern = (get_between2loggrep())[0]; diff --git a/regress/usr.sbin/syslogd/args-sighup.pl b/regress/usr.sbin/syslogd/args-sighup.pl index edbc2e42eda..41b4b0dbbe5 100644 --- a/regress/usr.sbin/syslogd/args-sighup.pl +++ b/regress/usr.sbin/syslogd/args-sighup.pl @@ -48,6 +48,7 @@ our %args = ( check => sub { my $self = shift; my $r = $self->{syslogd}; + $r->loggrep("bytes transferred", 1, 2) or sleep 1; foreach my $name (qw(file pipe)) { my $file = $r->{"out$name"}.".0"; my $pattern = (get_between2loggrep())[0]; diff --git a/regress/usr.sbin/syslogd/args-sync-tcp.pl b/regress/usr.sbin/syslogd/args-sync-tcp.pl index 0908c844d10..e4f69b2e1eb 100644 --- a/regress/usr.sbin/syslogd/args-sync-tcp.pl +++ b/regress/usr.sbin/syslogd/args-sync-tcp.pl @@ -20,7 +20,7 @@ our %args = ( func => sub { write_between2logs(shift, sub { my $self = shift; write_message($self, get_secondlog()); - write_lines($self, 300, 3000); + write_lines($self, 300, 2000); write_message($self, get_thirdlog()); ${$self->{server}}->loggrep("Accepted", 5, 2) or die ref($self), " server did not receive second log"; @@ -44,7 +44,7 @@ our %args = ( $self->{redo}--; return; } - ${$self->{syslogd}}->loggrep(get_thirdlog(), 20) + ${$self->{syslogd}}->loggrep(get_thirdlog(), 40) or die ref($self), " syslogd did not receive third log"; shutdown(\*STDOUT, 1) or die "shutdown write failed: $!"; diff --git a/regress/usr.sbin/syslogd/args-sync-tls.pl b/regress/usr.sbin/syslogd/args-sync-tls.pl index e88b3e09126..3b9e31375ea 100644 --- a/regress/usr.sbin/syslogd/args-sync-tls.pl +++ b/regress/usr.sbin/syslogd/args-sync-tls.pl @@ -20,7 +20,7 @@ our %args = ( func => sub { write_between2logs(shift, sub { my $self = shift; write_message($self, get_secondlog()); - write_lines($self, 300, 3000); + write_lines($self, 300, 2000); write_message($self, get_thirdlog()); ${$self->{server}}->loggrep("Accepted", 5, 2) or die ref($self), " server did not receive second log"; @@ -33,6 +33,7 @@ our %args = ( get_between2loggrep(), get_charlog() => 300, qr/dropped partial message/ => 1, + qr/SSL3_WRITE_PENDING/ => 0, }, }, server => { @@ -44,7 +45,7 @@ our %args = ( $self->{redo}--; return; } - ${$self->{syslogd}}->loggrep(get_thirdlog(), 20) + ${$self->{syslogd}}->loggrep(get_thirdlog(), 40) or die ref($self), " syslogd did not receive third log"; shutdown(\*STDOUT, 1) or die "shutdown write failed: $!"; diff --git a/regress/usr.sbin/syslogd/syslogd.pl b/regress/usr.sbin/syslogd/syslogd.pl index 9c5a852e17a..758d6d1aa40 100644 --- a/regress/usr.sbin/syslogd/syslogd.pl +++ b/regress/usr.sbin/syslogd/syslogd.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $OpenBSD: syslogd.pl,v 1.4 2014/12/28 14:08:01 bluhm Exp $ +# $OpenBSD: syslogd.pl,v 1.5 2015/02/13 21:40:50 bluhm Exp $ # Copyright (c) 2010-2014 Alexander Bluhm <bluhm@openbsd.org> # @@ -128,5 +128,5 @@ foreach (@m) { $r->kill_child; $r->down; -check_logs($c, $r, $s, \@m, %args); $args{check}->({client => $c, syslogd => $r, server => $s}) if $args{check}; +check_logs($c, $r, $s, \@m, %args); |