args-memory-overflow-cont.pl revision 1.1
1# Syslogc reads the memory logs continously.
2# The client writes message to overflow the memory buffer method.
3# The syslogd writes it into a file and through a pipe.
4# The syslogd passes it via UDP to the loghost.
5# The server receives the message on its UDP socket.
6# Check that syslogc logs lost lines.
7
8use strict;
9use warnings;
10use Time::HiRes 'sleep';
11
12our %args = (
13    client => {
14	func => sub {
15	    my $self = shift;
16	    foreach (1..300) {
17		write_message($self, $_ x 1024);
18		# if client sends too fast, syslogd will not see everything
19		sleep .01;
20	    }
21	    write_log($self);
22	},
23    },
24    syslogd => {
25	memory => 1,
26	loggrep => {
27	    qr/Accepting control connection/ => 1,
28	    qr/ctlcmd 6/ => 1,  # read cont
29	},
30    },
31    syslogc => [ {
32	early => 1,
33	stop => 1,
34	options => ["-f", "memory"],
35	down => qr/Lines were dropped!/,
36	loggrep => {},
37    } ],
38);
39
401;
41