1# Stop syslogd. 2# The client writes 8 message with 8192 with sendsyslog(2). 3# Continue syslogd. 4# The syslogd writes it into a file and through a pipe. 5# The syslogd passes it via TCP to the loghost. 6# The server receives the message on its TCP socket. 7# Find the message in client, file, syslogd, server log. 8# Check that 8 long messages from sendsyslog(2) can be processed at once. 9 10use strict; 11use warnings; 12use Socket; 13use constant MAXLINE => 8192; 14 15our %args = ( 16 client => { 17 connect => { domain => "sendsyslog" }, 18 func => sub { 19 my $self = shift; 20 ${$self->{syslogd}}->kill_syslogd('STOP'); 21 write_lines($self, 8, MAXLINE); 22 IO::Handle::flush(\*STDOUT); 23 ${$self->{syslogd}}->kill_syslogd('CONT'); 24 ${$self->{server}}->loggrep(get_charlog(), 8) 25 or die ref($self), " server did not receive all messages"; 26 write_shutdown($self); 27 }, 28 loggrep => { get_charlog() => 8 }, 29 }, 30 syslogd => { 31 loghost => '@tcp://localhost:$connectport', 32 loggrep => { 33 qr/[gs]etsockopt bufsize/ => 0, 34 get_charlog() => 8, 35 }, 36 }, 37 server => { 38 listen => { domain => AF_UNSPEC, proto => "tcp", addr => "localhost" }, 39 loggrep => { get_charlog() => 8 }, 40 }, 41 file => { 42 loggrep => { get_charlog() => 8 }, 43 }, 44 pipe => { nocheck => 1 }, 45 tty => { nocheck => 1 }, 46); 47 481; 49