1# The client writes a message to Sys::Syslog native method.
2# The syslogd writes it into a file and through a pipe.
3# The syslogd passes it via TCP to an explicit loghost.
4# The server receives the message on its TCP socket.
5# Find the message in client, file, pipe, syslogd, server log.
6# Check that syslogd and server log contain localhost address.
7# Check that with TCP server all other sockets are closed.
8
9use strict;
10use warnings;
11use Socket;
12
13our %args = (
14    syslogd => {
15	loghost => '@tcp://localhost:$connectport',
16	loggrep => {
17	    qr/Logging to FORWTCP \@tcp:\/\/localhost:\d+/ => '>=4',
18	    get_testgrep() => 1,
19	},
20	fstat => {
21	    qr/internet/ => 1,
22	    qr/^_syslogd .* stream tcp / => 1,
23	},
24    },
25    server => {
26	listen => { domain => AF_UNSPEC, proto => "tcp", addr => "localhost" },
27	loggrep => {
28	    qr/listen sock: (127.0.0.1|::1) \d+/ => 1,
29	    get_testgrep() => 1,
30	},
31    },
32);
33
341;
35