args-memory-overflow-flags.pl revision 1.1
1# The client writes message to overflow the memory buffer method.
2# The syslogd writes it into a file and through a pipe.
3# The syslogd passes it via UDP to the loghost.
4# The server receives the message on its UDP socket.
5# Syslogc checks the memory logs.
6# Find the message in client, file, pipe, syslogd, server log.
7# Check that syslogc -o reports overflow.
8
9use strict;
10use warnings;
11
12our %args = (
13    client => {
14	func => sub {
15	    my $self = shift;
16	    foreach (1..4) {
17		write_message($self, $_ x 1024);
18	    }
19	    write_log($self);
20	},
21    },
22    syslogd => {
23	memory => 1,
24	loggrep => {
25	    qr/Accepting control connection/ => 1,
26	    qr/ctlcmd 5/ => 1,
27	    get_testlog() => 1,
28	},
29    },
30    syslogc => {
31	options => ["-o", "memory"],
32	exit => 1,
33	loggrep => {
34	    qr/^memory has overflowed/ => 1,
35	},
36    },
37);
38
391;
40