xref: /openbsd-src/regress/usr.sbin/syslogd/args-client-unix.pl (revision 7b30e940999908574c71cf37e6d73924681037e3)
1# The client writes a message to Sys::Syslog unix method.
2# The syslogd writes it into a file and through a pipe.
3# The syslogd passes it via UDP to the loghost.
4# The server receives the message on its UDP socket.
5# Find the message in client, file, pipe, syslogd, server log.
6# Check that the file log contains the hostname and message.
7
8use strict;
9use warnings;
10use Sys::Hostname;
11
12(my $host = hostname()) =~ s/\..*//;
13
14our %args = (
15    client => {
16	logsock => { type => "unix" },
17    },
18    syslogd => {
19	loggrep => get_testlog(),
20    },
21    server => {
22	loggrep => get_testlog(),
23    },
24    pipe => {
25	loggrep => get_testlog(),
26    },
27    tty => {
28	loggrep => get_testlog(),
29    },
30    file => {
31	# Sys::Syslog unix is broken, it appends a \n\0.
32	loggrep => qr/ $host syslogd-regress\[\d+\]: /.get_testlog().qr/ $/,
33    },
34);
35
361;
37