diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-03-24 22:25:11 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-03-24 22:25:11 +0000 |
commit | d27ffa20021c3c80526125e1e93b05a9112669da (patch) | |
tree | 833d6bedf5edc9520f7b51a159dfe97d0ed7f210 /regress/usr.sbin/syslogd | |
parent | 8d72b3f8e52bafd346f20c527a8a635d05fd59d4 (diff) |
Check that syslogd(8) is still running if non critical errors happen
during startup.
Diffstat (limited to 'regress/usr.sbin/syslogd')
-rw-r--r-- | regress/usr.sbin/syslogd/args-error.pl | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/regress/usr.sbin/syslogd/args-error.pl b/regress/usr.sbin/syslogd/args-error.pl new file mode 100644 index 00000000000..0a09410de0a --- /dev/null +++ b/regress/usr.sbin/syslogd/args-error.pl @@ -0,0 +1,42 @@ +# Command line options passed to syslogd generate errors. +# The client writes a message to Sys::Syslog native method. +# The syslogd writes it into a file and through a pipe and to tty. +# The syslogd passes it via UDP to the loghost. +# The server receives the message on its UDP socket. +# Find the message in client, file, pipe, console, user, syslogd, server log. +# Check that syslogd runs despite of errors. +# Check that startup errors are logged to stderr. + +use strict; +use warnings; + +our %args = ( + syslogd => { + cacrt => "default", + options => [qw( + -U 127.188.42.23 -U [::ffff:127.188.0.0] -U 127.0.0.1:70000 + -T 127.188.42.23:514 -T [::ffff:127.188.0.0]:514 -T 127.0.0.1:70000 + -S [::1]:70000 + -C CCCC -c cccc -K KKKK -k kkkk + ), '-a', 'A'x1000, '-p', 'P'x1000, '-s', 'S'x1000 + ], + loggrep => { + qr/address 127.188.42.23/ => 4, + qr/address ::ffff:127.188.0.0/ => 4, + qr/port 70000/ => 6, + qr/socket bind udp/ => 6, + qr/socket listen tcp/ => 6, + qr/socket listen tls/ => 2, + qr/CA file 'CCCC'/ => 2, + qr/certificate file 'cccc'/ => 2, + qr/CA file 'KKKK'/ => 2, + qr/key file 'kkkk'/ => 2, + qr/socket path too long: AAAA/ => 2, + qr/socket path too long: PPPP/ => 2, + qr/socket path too long: SSSS/ => 2, + qr/log socket failed/ => 2, + } + }, +); + +1; |