summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2015-08-01 00:20:38 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2015-08-01 00:20:38 +0000
commitd70f9b19cda1988e4dc66381d6645f3a6891109d (patch)
tree54dae601aa683d60db294eba6abdc60558a61e3b
parent24b3128a8c4a3865f436ce2143e8a8a988078419 (diff)
Make syslogd tests more reliable. Allow TLS tests to drop a wider
rage of messages and make dropped regexes more specific.
-rw-r--r--regress/usr.sbin/syslogd/args-dropped-tcp.pl2
-rw-r--r--regress/usr.sbin/syslogd/args-dropped-tls.pl16
-rw-r--r--regress/usr.sbin/syslogd/args-sync-tcp.pl4
3 files changed, 11 insertions, 11 deletions
diff --git a/regress/usr.sbin/syslogd/args-dropped-tcp.pl b/regress/usr.sbin/syslogd/args-dropped-tcp.pl
index 5e3dd19cd82..aa7e4ce8d20 100644
--- a/regress/usr.sbin/syslogd/args-dropped-tcp.pl
+++ b/regress/usr.sbin/syslogd/args-dropped-tcp.pl
@@ -22,7 +22,7 @@ our %args = (
write_message($self, get_thirdlog());
${$self->{server}}->loggrep(get_secondlog(), 5)
or die ref($self), " server did not receive second log";
- ${$self->{syslogd}}->loggrep(qr/dropped \d+ messages/, 5)
+ ${$self->{syslogd}}->loggrep(qr/syslogd: dropped \d+ messages/, 5)
or die ref($self), " syslogd did not write dropped message";
})},
},
diff --git a/regress/usr.sbin/syslogd/args-dropped-tls.pl b/regress/usr.sbin/syslogd/args-dropped-tls.pl
index bcb6c69a0bd..26f66d0cc17 100644
--- a/regress/usr.sbin/syslogd/args-dropped-tls.pl
+++ b/regress/usr.sbin/syslogd/args-dropped-tls.pl
@@ -1,4 +1,4 @@
-# The client writes 300 messages to Sys::Syslog native method.
+# The client writes 310 messages to Sys::Syslog native method.
# The syslogd writes it into a file and through a pipe.
# The syslogd passes it via TLS to the loghost.
# The server blocks the message on its TLS socket.
@@ -6,7 +6,7 @@
# The server receives the message on its TLS socket.
# The client waits until the server as read the first message.
# Find the message in client, file, pipe, syslogd, server log.
-# Check that the 300 messages are in syslogd and file log.
+# Check that the 310 messages are in syslogd and file log.
# Check that the dropped message is in server and file log.
use strict;
@@ -18,11 +18,11 @@ our %args = (
func => sub { write_between2logs(shift, sub {
my $self = shift;
write_message($self, get_secondlog());
- write_lines($self, 300, 1024);
+ write_lines($self, 310, 1024);
write_message($self, get_thirdlog());
${$self->{server}}->loggrep(get_secondlog(), 5)
or die ref($self), " server did not receive second log";
- ${$self->{syslogd}}->loggrep(qr/dropped \d+ messages/, 5)
+ ${$self->{syslogd}}->loggrep(qr/syslogd: dropped \d+ messages/, 5)
or die ref($self), " syslogd did not write dropped message";
})},
},
@@ -30,7 +30,7 @@ our %args = (
loghost => '@tls://localhost:$connectport',
loggrep => {
get_between2loggrep(),
- get_charlog() => 300,
+ get_charlog() => 310,
qr/ \(dropped\)/ => '>=10',
qr/SSL3_WRITE_PENDING/ => 0,
},
@@ -48,7 +48,7 @@ our %args = (
get_secondlog() => 1,
get_thirdlog() => 0,
get_charlog() => '~287',
- qr/syslogd: dropped 1[0-9] messages to loghost/ => 1,
+ qr/syslogd: dropped [12][0-9] messages to loghost/ => 1,
},
},
file => {
@@ -56,8 +56,8 @@ our %args = (
get_between2loggrep(),
get_secondlog() => 1,
get_thirdlog() => 1,
- get_charlog() => 300,
- qr/syslogd: dropped 1[0-9] messages to loghost/ => 1,
+ get_charlog() => 310,
+ qr/syslogd: dropped [12][0-9] messages to loghost/ => 1,
},
},
);
diff --git a/regress/usr.sbin/syslogd/args-sync-tcp.pl b/regress/usr.sbin/syslogd/args-sync-tcp.pl
index a145c21b92b..4754c170ab8 100644
--- a/regress/usr.sbin/syslogd/args-sync-tcp.pl
+++ b/regress/usr.sbin/syslogd/args-sync-tcp.pl
@@ -24,7 +24,7 @@ our %args = (
write_message($self, get_thirdlog());
${$self->{server}}->loggrep("Accepted", 5, 2)
or die ref($self), " server did not receive second log";
- ${$self->{syslogd}}->loggrep(qr/dropped \d+ messages/, 5)
+ ${$self->{syslogd}}->loggrep(qr/syslogd: dropped \d+ messages/, 5)
or die ref($self), " syslogd did not log dropped messages";
})},
},
@@ -34,7 +34,7 @@ our %args = (
loggrep => {
get_between2loggrep(),
get_charlog() => 300,
- qr/dropped partial message/ => 1,
+ qr/loghost .* dropped partial message/ => 1,
},
},
server => {