1# The syslogd binds UDP socket on localhost with -4. 2# The client writes a message into a localhost IPv4 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 127.0.0.1 name. 8# Check that fstat contains a only bound IPv4 UDP socket. 9 10use strict; 11use warnings; 12use Socket; 13 14our %args = ( 15 client => { 16 connect => { domain => AF_INET, addr => "127.0.0.1", port => 514 }, 17 }, 18 syslogd => { 19 options => ["-4nU", "localhost"], 20 fstat => { 21 qr/^root .* internet/ => 0, 22 qr/^_syslogd .* internet/ => 2, 23 qr/ internet dgram udp 127.0.0.1:514$/ => 1, 24 qr/ internet6 dgram udp \[::1\]:514$/ => 0, 25 }, 26 loghost => '@127.0.0.1:$connectport', 27 }, 28 server => { 29 listen => { domain => AF_INET, addr => "127.0.0.1" }, 30 }, 31 file => { 32 loggrep => qr/ 127.0.0.1 /. get_testgrep(), 33 }, 34); 35 361; 37