xref: /openbsd-src/regress/usr.sbin/syslogd/args-block-prog-host.pl (revision a17617cf4539de195b8731096bde7dd3db002987)
152a1898bSbluhm# The client writes a message to Sys::Syslog native method.
252a1898bSbluhm# The syslogd writes into multiple files depending on program and hostname.
352a1898bSbluhm# The syslogd writes it into a file and through a pipe.
452a1898bSbluhm# The syslogd passes it via UDP to the loghost.
552a1898bSbluhm# The server receives the message on its UDP socket.
652a1898bSbluhm# Find the message in client, file, pipe, syslogd, server log.
752a1898bSbluhm# Check that the message appears in the correct log files.
852a1898bSbluhm
952a1898bSbluhmuse strict;
1052a1898bSbluhmuse warnings;
1152a1898bSbluhm
1252a1898bSbluhmour %args = (
1352a1898bSbluhm    syslogd => {
14*a17617cfSbluhm	conf => <<'EOF',
1552a1898bSbluhm!nonexist
1652a1898bSbluhm+nonexist
1752a1898bSbluhm*.*	$objdir/file-0.log
1852a1898bSbluhm!syslogd-regress
1952a1898bSbluhm*.*	$objdir/file-1.log
20bb7ea376Sbluhm+$host
2152a1898bSbluhm*.*	$objdir/file-2.log
2252a1898bSbluhm!nonexist
2352a1898bSbluhm*.*	$objdir/file-3.log
2452a1898bSbluhm+nonexist
2552a1898bSbluhm*.*	$objdir/file-4.log
2652a1898bSbluhm!*
2752a1898bSbluhm*.*	$objdir/file-5.log
2852a1898bSbluhm+*
2952a1898bSbluhm*.*	$objdir/file-6.log
3052a1898bSbluhmEOF
3152a1898bSbluhm    },
3252a1898bSbluhm    multifile => [
33bb7ea376Sbluhm	{ loggrep => { get_testgrep() => 0 } },
34bb7ea376Sbluhm	{ loggrep => { get_testgrep() => 0 } },
35bb7ea376Sbluhm	{ loggrep => { get_testgrep() => 1 } },
36bb7ea376Sbluhm	{ loggrep => { get_testgrep() => 0 } },
37bb7ea376Sbluhm	{ loggrep => { get_testgrep() => 0 } },
38bb7ea376Sbluhm	{ loggrep => { get_testgrep() => 0 } },
39bb7ea376Sbluhm	{ loggrep => { get_testgrep() => 1 } },
4052a1898bSbluhm    ],
4152a1898bSbluhm);
4252a1898bSbluhm
4352a1898bSbluhm1;
44