diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-10-19 22:19:17 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-10-19 22:19:17 +0000 |
commit | 948ce4498b76ac8be5e70de5484911a40929b662 (patch) | |
tree | 93282d3a79d3d97940616ee378ad17c1f809e477 /regress/usr.sbin | |
parent | 45e0e9fb6d771a6129902ef305ed5fd418bd5d30 (diff) |
Add test for dropped messages to UDP loghost.
Diffstat (limited to 'regress/usr.sbin')
-rw-r--r-- | regress/usr.sbin/syslogd/args-dropped-tcp.pl | 2 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-dropped-tls.pl | 2 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-dropped-udp.pl | 28 |
3 files changed, 30 insertions, 2 deletions
diff --git a/regress/usr.sbin/syslogd/args-dropped-tcp.pl b/regress/usr.sbin/syslogd/args-dropped-tcp.pl index 5640ac056d6..b0876ca0f34 100644 --- a/regress/usr.sbin/syslogd/args-dropped-tcp.pl +++ b/regress/usr.sbin/syslogd/args-dropped-tcp.pl @@ -31,7 +31,7 @@ our %args = ( loggrep => { get_between2loggrep(), get_charlog() => 400, - qr/ \(dropped\)/ => '~61', + qr/ \(dropped tcpbuf full\)/ => '~61', }, }, server => { diff --git a/regress/usr.sbin/syslogd/args-dropped-tls.pl b/regress/usr.sbin/syslogd/args-dropped-tls.pl index 81a84ff2548..425d12ca3e5 100644 --- a/regress/usr.sbin/syslogd/args-dropped-tls.pl +++ b/regress/usr.sbin/syslogd/args-dropped-tls.pl @@ -31,7 +31,7 @@ our %args = ( loggrep => { get_between2loggrep(), get_charlog() => 400, - qr/ \(dropped\)/ => '~65', + qr/ \(dropped tcpbuf full\)/ => '~65', qr/SSL3_WRITE_PENDING/ => 0, }, }, diff --git a/regress/usr.sbin/syslogd/args-dropped-udp.pl b/regress/usr.sbin/syslogd/args-dropped-udp.pl new file mode 100644 index 00000000000..a809debadcd --- /dev/null +++ b/regress/usr.sbin/syslogd/args-dropped-udp.pl @@ -0,0 +1,28 @@ +# 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 non exising loghost with reject route +# Find dropped udp loghost message in log file. + +use strict; +use warnings; +use Socket; + +our %args = ( + syslogd => { + loghost => '@udp://127.1.2.3:4567', + loggrep => { + # more messages after 'dropped 4 messages' are dropped + qr/Logging to FORWUDP .* \(dropped send error\)/ => '>=4', + }, + }, + server => { + noserver => 1, + }, + file => { + loggrep => { + qr/syslogd\[\d+\]: dropped 4 messages to udp loghost/ => 1, + }, + }, +); + +1; |