summaryrefslogtreecommitdiff
path: root/regress/usr.sbin/syslogd
diff options
context:
space:
mode:
Diffstat (limited to 'regress/usr.sbin/syslogd')
-rw-r--r--regress/usr.sbin/syslogd/Makefile3
-rw-r--r--regress/usr.sbin/syslogd/args-fdexhaustion-config.pl17
-rw-r--r--regress/usr.sbin/syslogd/args-fdexhaustion-sighup.pl10
-rw-r--r--regress/usr.sbin/syslogd/args-fdexhaustion-tcp.pl10
4 files changed, 24 insertions, 16 deletions
diff --git a/regress/usr.sbin/syslogd/Makefile b/regress/usr.sbin/syslogd/Makefile
index 9c0cf8f3d8f..181fb540801 100644
--- a/regress/usr.sbin/syslogd/Makefile
+++ b/regress/usr.sbin/syslogd/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.20 2017/09/13 00:35:53 bluhm Exp $
+# $OpenBSD: Makefile,v 1.21 2017/09/17 23:56:03 bluhm Exp $
# The following ports must be installed for the regression tests:
# p5-IO-Socket-INET6 object interface for AF_INET and AF_INET6 domain sockets
@@ -27,6 +27,7 @@ regress:
# Automatically generate regress targets from test cases in directory.
+PROGS = ttylog
PERLS = Client.pm Proc.pm RSyslogd.pm Server.pm \
Syslogc.pm Syslogd.pm funcs.pl syslogd.pl
ARGS != cd ${.CURDIR} && ls args-*.pl
diff --git a/regress/usr.sbin/syslogd/args-fdexhaustion-config.pl b/regress/usr.sbin/syslogd/args-fdexhaustion-config.pl
index b30d7ebfc2f..4598bf40d6f 100644
--- a/regress/usr.sbin/syslogd/args-fdexhaustion-config.pl
+++ b/regress/usr.sbin/syslogd/args-fdexhaustion-config.pl
@@ -6,6 +6,7 @@
# The server receives the message on its UDP socket.
# Find the message in client, file, pipe, syslogd, server log.
# Check the error messages and multiple log file content.
+# Check that the error messages appear on the console.
use strict;
use warnings;
@@ -17,16 +18,22 @@ our %args = (
RLIMIT_NOFILE => 30,
},
loggrep => {
- qr/syslogd: receive_fd: recvmsg: Message too long/ => 5*2,
+ qr/syslogd: receive_fd: recvmsg: Message too long/ => 6,
# One file is opened by test default config, 20 by multifile.
- qr/X FILE:/ => 1+15,
- qr/X UNUSED:/ => 5,
+ qr/X FILE:/ => 1+14,
+ qr/X UNUSED:/ => 6,
},
},
multifile => [
- (map { { loggrep => get_testgrep() } } 0..14),
- (map { { loggrep => { qr/./s => 0 } } } 15..19),
+ (map { { loggrep => get_testgrep() } } 0..13),
+ (map { { loggrep => { qr/./s => 0 } } } 14..19),
],
+ console => {
+ loggrep => {
+ get_testgrep() => 1,
+ qr/priv_open_log .*: Message too long/ => 6,
+ }
+ }
);
1;
diff --git a/regress/usr.sbin/syslogd/args-fdexhaustion-sighup.pl b/regress/usr.sbin/syslogd/args-fdexhaustion-sighup.pl
index b2ff42b262e..89ca9d9ee1b 100644
--- a/regress/usr.sbin/syslogd/args-fdexhaustion-sighup.pl
+++ b/regress/usr.sbin/syslogd/args-fdexhaustion-sighup.pl
@@ -28,11 +28,11 @@ our %args = (
loggrep => {
# If not in startup, each failed PRIV_OPEN_LOG is logged
# to tty, so PRIV_OPEN_TTY fails again.
- qr/syslogd: receive_fd: recvmsg: Message too long/ => '>='.(4+2*3),
+ qr/syslogd: receive_fd: recvmsg: Message too long/ => '>='.(4+2*4),
# During first initialization the lockpipe is open. When
# SIGHUP happens it is closed and one more file can be opened.
- qr/X FILE:/ => 1+15+1+16,
- qr/X UNUSED:/ => 5+4,
+ qr/X FILE:/ => 1+14+1+15,
+ qr/X UNUSED:/ => 6+5,
},
},
server => {
@@ -50,8 +50,8 @@ our %args = (
},
},
multifile => [
- (map { { loggrep => get_testgrep() } } 0..15),
- (map { { loggrep => { qr/./s => 0 } } } 16..19),
+ (map { { loggrep => get_testgrep() } } 0..14),
+ (map { { loggrep => { qr/./s => 0 } } } 15..19),
],
user => {
loggrep => {
diff --git a/regress/usr.sbin/syslogd/args-fdexhaustion-tcp.pl b/regress/usr.sbin/syslogd/args-fdexhaustion-tcp.pl
index 4cb0e8c364a..7b562c78626 100644
--- a/regress/usr.sbin/syslogd/args-fdexhaustion-tcp.pl
+++ b/regress/usr.sbin/syslogd/args-fdexhaustion-tcp.pl
@@ -25,10 +25,10 @@ our %args = (
RLIMIT_NOFILE => 30,
},
loggrep => {
- qr/syslogd: receive_fd: recvmsg: Message too long/ => 6*2,
+ qr/syslogd: receive_fd: recvmsg: Message too long/ => 7,
# One file is opened by test default config, 20 by multifile.
- qr/X FILE:/ => 1+14,
- qr/X UNUSED:/ => 6,
+ qr/X FILE:/ => 1+13,
+ qr/X UNUSED:/ => 7,
qr/Accepting tcp connection/ => 0,
qr/Listen again/ => '>=1',
},
@@ -37,8 +37,8 @@ our %args = (
loggrep => { get_testlog() => 0 },
},
multifile => [
- (map { { loggrep => qr/syslogd\[\d+\]: accept deferred/ } } 0..13),
- (map { { loggrep => { qr/./s => 0 } } } 14..19),
+ (map { { loggrep => qr/syslogd\[\d+\]: accept deferred/ } } 0..12),
+ (map { { loggrep => { qr/./s => 0 } } } 13..19),
],
file => {
loggrep => qr/syslogd\[\d+\]: accept deferred: Too many open files/,