1fa51160fSbluhm# The client writes a message to Sys::Syslog unix method. 2fa51160fSbluhm# The syslogd writes it into a file and through a pipe. 3fa51160fSbluhm# The syslogd passes it via UDP to the loghost. 4fa51160fSbluhm# The server receives the message on its UDP socket. 5fa51160fSbluhm# Find the message in client, file, pipe, syslogd, server log. 6a2a04ee5Sbluhm# Check that the file log contains the hostname and message. 7fa51160fSbluhm 8fa51160fSbluhmuse strict; 9fa51160fSbluhmuse warnings; 10a2a04ee5Sbluhmuse Sys::Hostname; 11a2a04ee5Sbluhm 12bb7ea376Sbluhm(my $host = hostname()) =~ s/\..*//; 13fa51160fSbluhm 14fa51160fSbluhmour %args = ( 15fa51160fSbluhm client => { 16fa51160fSbluhm logsock => { type => "unix" }, 17fa51160fSbluhm }, 18bb7ea376Sbluhm syslogd => { 19bb7ea376Sbluhm loggrep => get_testlog(), 20bb7ea376Sbluhm }, 21bb7ea376Sbluhm server => { 22bb7ea376Sbluhm loggrep => get_testlog(), 23bb7ea376Sbluhm }, 24bb7ea376Sbluhm pipe => { 25bb7ea376Sbluhm loggrep => get_testlog(), 26bb7ea376Sbluhm }, 27*7b30e940Sbluhm tty => { 28*7b30e940Sbluhm loggrep => get_testlog(), 29*7b30e940Sbluhm }, 30fa51160fSbluhm file => { 31bb7ea376Sbluhm # Sys::Syslog unix is broken, it appends a \n\0. 32bb7ea376Sbluhm loggrep => qr/ $host syslogd-regress\[\d+\]: /.get_testlog().qr/ $/, 33fa51160fSbluhm }, 34fa51160fSbluhm); 35fa51160fSbluhm 36fa51160fSbluhm1; 37