args-maxunix.pl revision 1.1
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 sockets. 7# Check that the one socket above the limit prints an error. 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.$_"); 21 } 22 write_shutdown($self, @_); 23 }, 24 }, 25 syslogd => { 26 options => [ map { ("-a" => "unix.$_") } (1..MAXUNIX) ], 27 loggrep => { 28 qr/syslogd: out of descriptors, ignoring unix.20/ => 0, 29 qr/syslogd: out of descriptors, ignoring unix.21/ => 1, 30 qr/syslogd: out of descriptors, ignoring unix.22/ => 0, 31 }, 32 }, 33 file => { 34 loggrep => { 35 get_log()." /dev/log unix socket" => 1, 36 (map { (get_log()." unix.$_ unix socket" => 1) } (1..(MAXUNIX-1))), 37 38 get_log()." unix.".MAXUNIX." unix socket" => 0, 39 } 40 }, 41); 42 431; 44