1# The client writes a message to Sys::Syslog UDP method. 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, server log. 6# Check that the file log contains the localhost name. 7 8use strict; 9use warnings; 10 11our %args = ( 12 client => { 13 logsock => { type => "udp", host => "127.0.0.1", port => 514 }, 14 }, 15 syslogd => { 16 options => ["-u"], 17 fstat => { 18 qr/^root .* internet/ => 0, 19 qr/^_syslogd .* internet/ => 2, 20 }, 21 loggrep => get_testlog(), 22 }, 23 server => { 24 loggrep => get_testlog(), 25 }, 26 pipe => { 27 loggrep => get_testlog(), 28 }, 29 tty => { 30 loggrep => get_testlog(), 31 }, 32 file => { 33 # Sys::Syslog UDP is broken, it appends a \n\0. 34 loggrep => qr/ localhost syslogd-regress\[\d+\]: /.get_testlog().qr/ $/, 35 }, 36); 37 381; 39