args-maxunix.pl revision 1.5
1# The client writes messages to MAXUNIX unix domain sockets.
2# The syslogd -a writes them into a file and through a pipe.
3# The syslogd -a passes them via UDP to the loghost.
4# The server receives the messages on its UDP socket.
5# Find the message in client, file, pipe, syslogd, server log.
6# Check that the file log contains a message from every socket.
7# Check that no error is printed.
8
9use strict;
10use warnings;
11use IO::Socket::UNIX;
12use constant MAXUNIX => 21;
13
14our %args = (
15    client => {
16	func => sub {
17	    my $self = shift;
18	    write_unix($self);
19	    foreach (1..(MAXUNIX-1)) {
20		write_unix($self, "unix-$_.sock");
21	    }
22	    write_shutdown($self);
23	},
24    },
25    syslogd => {
26	options => [ map { ("-a" => "unix-$_.sock") } (1..(MAXUNIX-1)) ],
27	loggrep => {
28	    qr/out of descriptors/ => 0,
29	},
30    },
31    file => {
32	loggrep => {
33	    get_testlog()." /dev/log unix socket" => 1,
34	    (map { (get_testlog()." unix-$_.sock unix socket" => 1) }
35		(1..(MAXUNIX-1))),
36	    get_testlog()." unix-".MAXUNIX.".sock unix socket" => 0,
37	},
38    },
39);
40
411;
42