xref: /openbsd-src/regress/usr.sbin/syslogd/args-rsyslog-tcp.pl (revision e0736e0cc3f05e46d439155189d00ee271bb9706)
1# Test with rsyslogd as receiver.
2# The client writes a message to Sys::Syslog native method.
3# The syslogd writes it into a file and through a pipe.
4# The syslogd passes it via TCP to the rsyslogd.
5# The rsyslogd receives the message on its TCP socket.
6# Find the message in client, file, pipe, syslogd, rsyslogd log.
7# Check that the message is in the rsyslogd out file.
8
9use strict;
10use warnings;
11use Socket;
12
13our %args = (
14    syslogd => {
15	loghost => '@tcp://127.0.0.1:$connectport',
16	late => 1,  # connect after the listen socket has been created
17    },
18    rsyslogd => {
19	listen => { domain => AF_INET, proto => "tcp", addr => "127.0.0.1" },
20	loggrep => {
21	    qr/omfile.* /.get_testlog() => 1,
22	    qr/Error/ => 0,
23	},
24    },
25);
26
271;
28