1# Start syslogd with -r option.
2# The client writes messages repeatedly to Sys::Syslog native method.
3# The syslogd writes it into a file and through a pipe and to tty.
4# The syslogd passes it via UDP to the loghost.
5# The server receives the message on its UDP socket.
6# Find the message in client, file, pipe, console, user, syslogd, server log.
7# Check that message repeated is not in server or pipe log.
8
9use strict;
10use warnings;
11
12our %args = (
13    client => {
14	func => sub {
15	    my $self = shift;
16	    write_message($self, "foo");
17	    write_message($self, "bar");
18	    write_message($self, "bar");
19	    write_message($self, "bar");
20	    write_message($self, "foo");
21	    write_message($self, "bar");
22	    write_log($self);
23	},
24    },
25    syslogd => {
26	options => ["-r"],
27    },
28    server => {
29	loggrep => {
30	    qr/foo/ => 2,
31	    qr/bar/ => 4,
32	    qr/message repeated/ => 0,
33	},
34    },
35    pipe => {
36	loggrep => {
37	    qr/foo/ => 2,
38	    qr/bar/ => 4,
39	    qr/message repeated/ => 0,
40	},
41    },
42    file => {
43	loggrep => {
44	    qr/foo/ => 2,
45	    qr/bar/ => 2,
46	    qr/message repeated 2 times/ => 1,
47	},
48    },
49    tty => {
50	loggrep => {
51	    qr/foo/ => 2,
52	    qr/bar/ => 2,
53	    qr/message repeated 2 times/ => 1,
54	},
55    },
56);
57
581;
59