1# The client writes a messages to /dev/log and an alternative log socket. 2# The syslogd listens on /var/run/log but not on /dev/log. 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 only the meassge to the alternative log socket is logged. 8 9use strict; 10use warnings; 11 12our %args = ( 13 client => { 14 func => sub { 15 my $self = shift; 16 eval { write_unix($self, "/dev/log") }; 17 $@ =~ m,connect to /dev/log unix socket failed, 18 or die ref($self), " connect to /dev/log succeeded"; 19 write_unix($self, "/var/run/log"); 20 ${$self->{syslogd}}->loggrep(get_testgrep(), 2) 21 or die ref($self), " syslogd did not receive message"; 22 write_shutdown($self); 23 }, 24 }, 25 syslogd => { 26 options => ["-p", "/var/run/log"], 27 }, 28 file => { 29 loggrep => { 30 "id /dev/log unix socket" => 0, 31 "id /var/run/log unix socket" => 1, 32 }, 33 }, 34); 35 361; 37