1# The client writes long messages to UDP socket.
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# Find the message in client, file, pipe, syslogd log.
6# Check that lines with visual encoding at the end are truncated.
7
8use strict;
9use warnings;
10use Socket;
11
12our %args = (
13    client => {
14	connect => { domain => AF_UNSPEC, addr => "localhost", port => 514 },
15	func => sub {
16	    my $self = shift;
17	    write_lengths($self, [8186..8195,9000], "foo\200"),
18	    write_log($self);
19	},
20    },
21    syslogd => {
22	options => ["-u"],
23	loggrep => {
24	    get_charlog() => 11,
25	},
26    },
27    file => {
28	# Jan 31 00:12:39 localhost 0123456789ABC...567
29	loggrep => {
30	    get_charlog() => 11,
31	    qr/^.{25} .{8183}fooM\^\@$/ => 1,
32	    qr/^.{25} .{8184}fooM\^\@$/ => 1,
33	    qr/^.{25} .{8185}fooM\^\@$/ => 1,
34	    qr/^.{25} .{8186}fooM\^\@$/ => 1,
35	    qr/^.{25} .{8187}fooM\^$/ => 1,
36	    qr/^.{25} .{8188}fooM$/ => 1,
37	    qr/^.{25} .{8189}foo$/ => 1,
38	    qr/^.{25} .{8190}fo$/ => 1,
39	    qr/^.{25} .{8191}f$/ => 1,
40	    qr/^.{25} .{8192}$/ => 7,
41	},
42    },
43);
44
451;
46