1# The syslogd binds UDP socket on localhost. 2# The client writes a message into a localhost UDP socket. 3# The syslogd writes it into a file and through a pipe. 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, syslogd, server log. 7# Check that the file log contains the localhost name. 8# Check that fstat contains a bound UDP socket. 9 10use strict; 11use warnings; 12use Socket; 13 14our %args = ( 15 client => { 16 connect => { domain => AF_UNSPEC, addr => "localhost", port => 514 }, 17 loggrep => { 18 qr/connect sock: (127.0.0.1|::1) \d+/ => 1, 19 get_testgrep() => 1, 20 }, 21 }, 22 syslogd => { 23 options => ["-U", "localhost"], 24 fstat => { 25 qr/^root .* internet/ => 0, 26 qr/ internet6? dgram udp (127.0.0.1|\[::1\]):514$/ => 1, 27 }, 28 }, 29 file => { 30 loggrep => qr/ localhost /. get_testgrep(), 31 }, 32); 33 341; 35