1# syslogd creates and drops some error messages during startup. 2# The client writes a message to Sys::Syslog native method. 3# The syslogd writes it into a file and through a pipe and to tty. 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, console, user, syslogd, server log. 7# Check that the dropped during initialization is in all log files. 8# Check that startup error message is in syslogd stderr. 9# Check that initialization error message is in console. 10 11use strict; 12use warnings; 13 14our %args = ( 15 syslogd => { 16 options => [qw(-U 0.0.0.0:123456)], 17 conf => "*.*\t/nonexistent\n", 18 loggrep => { 19 qr/port 123456: service not supported/ => 1, 20 qr/socket bind udp failed/ => 1, 21 qr/"\/nonexistent": No such file or directory/ => 1, 22 qr/dropped 3 messages during initialization/ => 1, 23 } 24 }, 25 console => { 26 loggrep => { 27 qr/port 123456: service not supported/ => 0, 28 qr/socket bind udp failed/ => 0, 29 qr/"\/nonexistent": No such file or directory/ => 1, 30 qr/dropped 3 messages during initialization/ => 1, 31 }, 32 }, 33 server => { 34 loggrep => { 35 qr/port 123456: service not supported/ => 0, 36 qr/socket bind udp failed/ => 0, 37 qr/"\/nonexistent": No such file or directory/ => 0, 38 qr/dropped 3 messages during initialization/ => 1, 39 }, 40 }, 41 file => { 42 loggrep => { 43 qr/port 123456: service not supported/ => 0, 44 qr/socket bind udp failed/ => 0, 45 qr/"\/nonexistent": No such file or directory/ => 0, 46 qr/dropped 3 messages during initialization/ => 1, 47 }, 48 }, 49 pipe => { 50 loggrep => { 51 qr/dropped 3 messages during initialization/ => 1, 52 }, 53 }, 54 user => { 55 loggrep => { 56 qr/dropped 3 messages during initialization/ => 1, 57 }, 58 }, 59); 60 611; 62