1# The syslogd is started with reduced file descriptor limits.
2# The syslogd config contains more log files than possible.
3# The client writes a message to Sys::Syslog native method.
4# The syslogd writes it into a file and through a pipe.
5# The syslogd passes it via UDP to the loghost.
6# The server receives the message on its UDP socket.
7# Find the message in client, file, pipe, syslogd, server log.
8# Check the error messages and multiple log file content.
9# Check that the error messages appear on the console.
10
11use strict;
12use warnings;
13
14our %args = (
15    syslogd => {
16	conf => join("", map { "*.*\t\$objdir/file-$_.log\n" } 0..19),
17	rlimit => {
18	    RLIMIT_NOFILE => 30,
19	},
20	loggrep => {
21	    qr/syslogd: receive_fd: recvmsg: Message too long/ => 6+1,
22	    # One file is opened by test default config, 20 by multifile.
23	    qr/X FILE:/ => 1+14,
24	    qr/X UNUSED:/ => 6,
25	},
26    },
27    multifile => [
28	(map { { loggrep => get_testgrep() } } 0..13),
29	(map { { loggrep => { qr/./s => 0 } } } 14..19),
30    ],
31    console => {
32	loggrep => {
33	    get_testgrep() => 1,
34	    qr/priv_open_log .*: Message too long/ => 6,
35	}
36    }
37);
38
391;
40