diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2014-08-25 19:32:30 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2014-08-25 19:32:30 +0000 |
commit | a5aef212047c1910e8fd4365972badb27267c35b (patch) | |
tree | 06295736789ef16ec1abb2ab0b61717b45030a17 /regress/usr.sbin/syslogd/args-proto-invalid.pl | |
parent | a86e2f422c84636fad81d3d00d340c88159118b9 (diff) |
Add tests where the IP address family has been chosen by -4 or -6
command line switch and udp4:// or udp6:// loghost prefix.
Diffstat (limited to 'regress/usr.sbin/syslogd/args-proto-invalid.pl')
-rw-r--r-- | regress/usr.sbin/syslogd/args-proto-invalid.pl | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/regress/usr.sbin/syslogd/args-proto-invalid.pl b/regress/usr.sbin/syslogd/args-proto-invalid.pl new file mode 100644 index 00000000000..9394660aa22 --- /dev/null +++ b/regress/usr.sbin/syslogd/args-proto-invalid.pl @@ -0,0 +1,23 @@ +# The client writes a message to Sys::Syslog native method. +# The syslogd writes it into a file and through a pipe. +# The syslogd does not pass it via invalid IPv4 UDP to the loghost. +# Find the message in client, file, pipe, syslogd log. +# Check that the syslogd logs the error. + +use strict; +use warnings; + +our %args = ( + syslogd => { + loghost => '@invalid://127.0.0.1', + loggrep => { + qr/syslogd: bad protocol "\@invalid:\/\/127.0.0.1"/ => 2, # XXX 2? + get_log() => 1, + }, + }, + server => { + noserver => 1, + }, +); + +1; |