diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2015-07-19 20:18:19 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2015-07-19 20:18:19 +0000 |
commit | f79dc909c2046b0233169ab3ef7daa14ab666fd0 (patch) | |
tree | 3f05ccb95236a6fd6d345fc4e104f8f8b1fda704 | |
parent | b2f16f49567216a5f7c1768e1b1af548fb9781b9 (diff) |
Test octet counting and non transparent framing.
-rw-r--r-- | regress/usr.sbin/syslogd/args-client-tcp-maxline.pl | 32 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-client-tcp-multichunks.pl | 15 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-client-tcp-multilines.pl | 2 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-client-tcp-nontransp-maxline.pl | 62 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-client-tcp-nontransp.pl | 43 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-client-tcp-octet-badframe.pl | 42 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-client-tcp-octet-maxline.pl | 62 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-client-tcp-octet-nontransp.pl | 63 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-client-tcp-octet.pl | 43 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-maxtcp.pl | 5 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-sync-tcp.pl | 10 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/args-sync-tls.pl | 74 | ||||
-rw-r--r-- | regress/usr.sbin/syslogd/funcs.pl | 6 |
13 files changed, 361 insertions, 98 deletions
diff --git a/regress/usr.sbin/syslogd/args-client-tcp-maxline.pl b/regress/usr.sbin/syslogd/args-client-tcp-maxline.pl index 2b35937e01d..8ee6d3439e9 100644 --- a/regress/usr.sbin/syslogd/args-client-tcp-maxline.pl +++ b/regress/usr.sbin/syslogd/args-client-tcp-maxline.pl @@ -3,7 +3,7 @@ # The syslogd writes it into a file and through a pipe. # The syslogd passes it via UDP to the loghost. # The server receives the message on its UDP socket. -# Find the message in file, syslogd, server log. +# Find the message in client, file, syslogd, server log. # Check that the file log contains the truncated message. use strict; @@ -18,25 +18,41 @@ our %args = ( func => sub { my $self = shift; local $| = 1; - my $msg = generate_chars(MAXLINE+1); + my $msg = generate_chars(5+1+MAXLINE+1); print $msg; print STDERR "<<< $msg\n"; - ${$self->{syslogd}}->loggrep("tcp logger .* incomplete line", 5) - or die ref($self), " syslogd did not receive incomplete line"; + ${$self->{syslogd}}->loggrep("tcp logger .* incomplete", 5, 1) + or die ref($self), " syslogd did not receive 1 incomplete"; + $msg = generate_chars(5+1+MAXLINE); + print $msg; + print STDERR "<<< $msg\n"; + ${$self->{syslogd}}->loggrep("tcp logger .* incomplete", 5, 2) + or die ref($self), " syslogd did not receive 2 incomplete"; + print "\n"; + print STDERR "<<< \n"; write_shutdown($self); }, - loggrep => {}, + loggrep => { + qr/<<< 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ/ => 2, + }, }, syslogd => { options => ["-T", "127.0.0.1:514"], - loggrep => qr/incomplete line, use /.(MAXLINE+1).qr/ bytes/, + loggrep => { + qr/incomplete frame, use /.(MAXLINE+7).qr/ bytes/ => 1, + qr/non transparent framing, use /.(MAXLINE+7).qr/ bytes/ => 1, + } }, server => { # >>> <13>Jul 6 22:33:32 0123456789ABC...fgh - loggrep => qr/>>> .{19} /.generate_chars(MAX_UDPMSG-20).qr/$/, + loggrep => { + qr/>>> .{19} /.generate_chars(MAX_UDPMSG-20).qr/$/ => 2, + }, }, file => { - loggrep => generate_chars(MAXLINE).qr/$/, + loggrep => { + generate_chars(MAXLINE).qr/$/ => 2, + }, }, pipe => { loggrep => {} }, # XXX syslogd ignore short writes to pipe ); diff --git a/regress/usr.sbin/syslogd/args-client-tcp-multichunks.pl b/regress/usr.sbin/syslogd/args-client-tcp-multichunks.pl index 837f0655c9a..34412c22001 100644 --- a/regress/usr.sbin/syslogd/args-client-tcp-multichunks.pl +++ b/regress/usr.sbin/syslogd/args-client-tcp-multichunks.pl @@ -9,6 +9,9 @@ use strict; use warnings; +my $msglen = length(get_testlog()); +my $framelen = $msglen + 1; + our %args = ( client => { connect => { domain => AF_INET, proto => "tcp", addr => "127.0.0.1", @@ -22,11 +25,12 @@ our %args = ( print; print STDERR "<<< $_\n"; ${$self->{syslogd}}->loggrep("tcp logger .* buffer $n bytes", 5) - or die ref($self), " syslogd did not receive $n bytes"; + or die ref($self), " syslogd did not buffer $n bytes"; } + $n++; print "\n"; - ${$self->{syslogd}}->loggrep("tcp logger .* complete line", 5) - or die ref($self), " syslogd did not receive complete line"; + ${$self->{syslogd}}->loggrep("tcp logger .* use $n bytes", 5) + or die ref($self), " syslogd did not use $n bytes"; write_shutdown($self); }, loggrep => {}, @@ -34,9 +38,8 @@ our %args = ( syslogd => { options => ["-T", "127.0.0.1:514"], loggrep => { - qr/tcp logger .* buffer \d+ bytes/ => - int((length(get_testlog())+4)/5), - qr/tcp logger .* complete line/ => 1, + qr/tcp logger .* buffer \d+ bytes/ => int(($msglen+4)/5), + qr/tcp logger .* non transparent framing, use $framelen bytes/ => 1, get_testgrep() => 1, }, }, diff --git a/regress/usr.sbin/syslogd/args-client-tcp-multilines.pl b/regress/usr.sbin/syslogd/args-client-tcp-multilines.pl index d803da6b22d..921193bdfe8 100644 --- a/regress/usr.sbin/syslogd/args-client-tcp-multilines.pl +++ b/regress/usr.sbin/syslogd/args-client-tcp-multilines.pl @@ -33,7 +33,7 @@ our %args = ( options => ["-T", "127.0.0.1:514"], loggrep => { %threegrep, - qr/tcp logger .* complete line/ => 3, + qr/tcp logger .* non transparent framing, use \d+ bytes/ => 3, }, }, server => { loggrep => \%threegrep }, diff --git a/regress/usr.sbin/syslogd/args-client-tcp-nontransp-maxline.pl b/regress/usr.sbin/syslogd/args-client-tcp-nontransp-maxline.pl new file mode 100644 index 00000000000..7c4f85dee27 --- /dev/null +++ b/regress/usr.sbin/syslogd/args-client-tcp-nontransp-maxline.pl @@ -0,0 +1,62 @@ +# The syslogd listens on 127.0.0.1 TCP socket. +# The client writes non transparent framing message that is too long. +# The syslogd writes it into a file and through a pipe. +# The syslogd passes it via UDP to the loghost. +# The server receives the message on its UDP socket. +# Find the message in client, file, syslogd, server log. +# Check that the file log contains the truncated message. + +use strict; +use warnings; +use constant MAXLINE => 8192; +use constant MAX_UDPMSG => 1180; + +our %args = ( + client => { + connect => { domain => AF_INET, proto => "tcp", addr => "127.0.0.1", + port => 514 }, + func => sub { + my $self = shift; + local $| = 1; + my $msg = generate_chars(MAXLINE+1); + print "$msg\n"; + print STDERR "<<< $msg\n"; + ${$self->{syslogd}}->loggrep(qr/tcp logger .* use \d+ bytes/, 5) + or die ref($self), " syslogd did not use bytes"; + $msg = generate_chars(MAXLINE); + print $msg; + print STDERR "<<< $msg\n"; + ${$self->{syslogd}}->loggrep("tcp logger .* incomplete", 5, 2) + or die ref($self), " syslogd did not receive 2 incomplete"; + print "\n"; + print STDERR "<<< \n"; + write_shutdown($self); + }, + loggrep => { + qr/<<< 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ/ => 2, + }, + }, + syslogd => { + options => ["-T", "127.0.0.1:514"], + loggrep => { + qr/non transparent framing, incomplete frame, /. + qr/buffer \d+ bytes/ => 2, + qr/non transparent framing, use /.(MAXLINE+2).qr/ bytes/ => 1, + qr/non transparent framing, use /.(MAXLINE+1).qr/ bytes/ => 1, + }, + }, + server => { + # >>> <13>Jul 6 22:33:32 0123456789ABC...fgh + loggrep => { + qr/>>> .{19} /.generate_chars(MAX_UDPMSG-20).qr/$/ => 2, + }, + }, + file => { + loggrep => { + generate_chars(MAXLINE).qr/$/ => 2, + }, + }, + pipe => { loggrep => {} }, # XXX syslogd ignore short writes to pipe +); + +1; diff --git a/regress/usr.sbin/syslogd/args-client-tcp-nontransp.pl b/regress/usr.sbin/syslogd/args-client-tcp-nontransp.pl new file mode 100644 index 00000000000..7630c887dc3 --- /dev/null +++ b/regress/usr.sbin/syslogd/args-client-tcp-nontransp.pl @@ -0,0 +1,43 @@ +# The syslogd listens on 127.0.0.1 TCP socket. +# The client writes non transparent framing messages into TCP socket. +# The syslogd writes it into a file and through a pipe. +# The syslogd passes it via UDP to the loghost. +# The server receives the message on its UDP socket. +# Find the message in client, file, pipe, syslogd, server log. +# Check that the file log contains all the messages. + +use strict; +use warnings; + +our %args = ( + client => { + connect => { domain => AF_INET, proto => "tcp", addr => "127.0.0.1", + port => 514 }, + func => sub { + my $self = shift; + print "\na\nbc\nde\r\nfg\000hi \njk\007\nl\n\nm\n \n n\n o \n"; + write_log($self); + }, + }, + syslogd => { + options => ["-T", "127.0.0.1:514"], + }, + file => { + loggrep => { + qr/localhost $/ => 3, + qr/localhost a$/ => 1, + qr/localhost bc$/ => 1, + qr/localhost de$/ => 1, + qr/localhost fg$/ => 1, # NUL terminates message + qr/localhost hi $/ => 1, + qr/localhost jk\\\^G$/ => 1, # bell character visual + qr/localhost l$/ => 1, + qr/localhost m$/ => 1, + qr/localhost n$/ => 1, # leading spaces are striped + qr/localhost o $/ => 1, + get_testgrep() => 1, + }, + }, +); + +1; diff --git a/regress/usr.sbin/syslogd/args-client-tcp-octet-badframe.pl b/regress/usr.sbin/syslogd/args-client-tcp-octet-badframe.pl new file mode 100644 index 00000000000..313dcf3c75c --- /dev/null +++ b/regress/usr.sbin/syslogd/args-client-tcp-octet-badframe.pl @@ -0,0 +1,42 @@ +# The syslogd listens on 127.0.0.1 TCP socket. +# The client writes octet counting messages with invalid framing. +# The syslogd writes it into a file and through a pipe. +# The syslogd passes it via UDP to the loghost. +# The server receives the message on its UDP socket. +# Find the message in file, syslogd, server log. +# Check that an invalid octet counting is handled as non transparent framing. + +use strict; +use warnings; + +our %args = ( + client => { + connect => { domain => AF_INET, proto => "tcp", addr => "127.0.0.1", + port => 514 }, + func => sub { + my $self = shift; + local $| = 1; + print "000002 ab\n"; + print STDERR "<<< 000002 ab\n"; + print "2bc\n"; + print STDERR "<<< 00002bc\n"; + write_log($self); + }, + }, + syslogd => { + options => ["-T", "127.0.0.1:514"], + loggrep => { + qr/non transparent framing/ => 3, + qr/octet counting/ => 0, + }, + }, + file => { + loggrep => { + qr/localhost 000002 ab$/ => 1, + qr/localhost 2bc$/ => 1, + get_testgrep() => 1, + }, + }, +); + +1; diff --git a/regress/usr.sbin/syslogd/args-client-tcp-octet-maxline.pl b/regress/usr.sbin/syslogd/args-client-tcp-octet-maxline.pl new file mode 100644 index 00000000000..b8a1ec41647 --- /dev/null +++ b/regress/usr.sbin/syslogd/args-client-tcp-octet-maxline.pl @@ -0,0 +1,62 @@ +# The syslogd listens on 127.0.0.1 TCP socket. +# The client writes octet counting message that is too long. +# The syslogd writes it into a file and through a pipe. +# The syslogd passes it via UDP to the loghost. +# The server receives the message on its UDP socket. +# Find the message in client, file, syslogd, server log. +# Check that the file log contains the truncated message. + +use strict; +use warnings; +use constant MAXLINE => 8192; +use constant MAX_UDPMSG => 1180; + +our %args = ( + client => { + connect => { domain => AF_INET, proto => "tcp", addr => "127.0.0.1", + port => 514 }, + func => sub { + my $self = shift; + local $| = 1; + my $msg = generate_chars(MAXLINE+1); + printf "%05d %s", MAXLINE+1, $msg; + print STDERR "<<< $msg\n"; + ${$self->{syslogd}}->loggrep(qr/tcp logger .* use \d+ bytes/, 5) + or die ref($self), " syslogd did not use bytes"; + $msg = generate_chars(MAXLINE); + printf "%05d %s", MAXLINE+1, $msg; + print STDERR "<<< $msg\n"; + ${$self->{syslogd}}->loggrep("tcp logger .* incomplete", 5) + or die ref($self), " syslogd did not receive 2 incomplete"; + print "\n"; + print STDERR "<<< \n"; + write_shutdown($self); + }, + loggrep => { + qr/<<< 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ/ => 2, + }, + }, + syslogd => { + options => ["-T", "127.0.0.1:514"], + loggrep => { + qr/octet counting /.(MAXLINE+1).qr/, incomplete frame, /. + qr/buffer \d+ bytes/ => 2, + qr/octet counting /.(MAXLINE+1). + qr/, use /.(MAXLINE+1).qr/ bytes/ => 2, + }, + }, + server => { + # >>> <13>Jul 6 22:33:32 0123456789ABC...fgh + loggrep => { + qr/>>> .{19} /.generate_chars(MAX_UDPMSG-20).qr/$/ => 2, + } + }, + file => { + loggrep => { + generate_chars(MAXLINE).qr/$/ => 2, + }, + }, + pipe => { loggrep => {} }, # XXX syslogd ignore short writes to pipe +); + +1; diff --git a/regress/usr.sbin/syslogd/args-client-tcp-octet-nontransp.pl b/regress/usr.sbin/syslogd/args-client-tcp-octet-nontransp.pl new file mode 100644 index 00000000000..b50691220c9 --- /dev/null +++ b/regress/usr.sbin/syslogd/args-client-tcp-octet-nontransp.pl @@ -0,0 +1,63 @@ +# The syslogd listens on 127.0.0.1 TCP socket. +# The client writes octet counting and non transpatent framing in chunks. +# The syslogd writes it into a file and through a pipe. +# The syslogd passes it via UDP to the loghost. +# The server receives the message on its UDP socket. +# Find the message in client, file, pipe, syslogd, server log. +# Check that the file log contains all the messages. + +use strict; +use warnings; + +our %args = ( + client => { + connect => { domain => AF_INET, proto => "tcp", addr => "127.0.0.1", + port => 514 }, + func => sub { + my $self = shift; + local $| = 1; + print "2 ab"; + ${$self->{syslogd}}->loggrep("octet counting 2", 5, 1) + or die ref($self), " syslogd did not 1 octet counting"; + print "2 c"; + ${$self->{syslogd}}->loggrep("octet counting 2", 5, 2) + or die ref($self), " syslogd did not 2 octet counting"; + print "def\n"; + ${$self->{syslogd}}->loggrep("non transparent framing", 5, 1) + or die ref($self), " syslogd did not 1 non transparent framing"; + print "g"; + ${$self->{syslogd}}->loggrep("non transparent framing", 5, 2) + or die ref($self), " syslogd did not 2 non transparent framing"; + print "h\nij\n2 kl"; + ${$self->{syslogd}}->loggrep("octet counting 2", 5, 4) + or die ref($self), " syslogd did not 4 octet counting"; + write_log($self); + }, + }, + syslogd => { + options => ["-T", "127.0.0.1:514"], + loggrep => { + qr/tcp logger .* octet counting 2, use 2 bytes/ => 3, + qr/tcp logger .* octet counting 2, incomplete frame, /. + qr/buffer 3 bytes/ => 1, + qr/tcp logger .* non transparent framing, use 3 bytes/ => 3, + qr/tcp logger .* non transparent framing, incomplete frame, /. + qr/buffer 1 bytes/ => 1, + qr/tcp logger .* use 0 bytes/ => 0, + qr/tcp logger .* unknown method/ => 0, + } + }, + file => { + loggrep => { + qr/localhost ab$/ => 1, + qr/localhost cd$/ => 1, + qr/localhost ef$/ => 1, + qr/localhost gh$/ => 1, + qr/localhost ij$/ => 1, + qr/localhost kl$/ => 1, + get_testgrep() => 1, + }, + }, +); + +1; diff --git a/regress/usr.sbin/syslogd/args-client-tcp-octet.pl b/regress/usr.sbin/syslogd/args-client-tcp-octet.pl new file mode 100644 index 00000000000..fe4a992345d --- /dev/null +++ b/regress/usr.sbin/syslogd/args-client-tcp-octet.pl @@ -0,0 +1,43 @@ +# The syslogd listens on 127.0.0.1 TCP socket. +# The client writes octet counting messages into TCP socket. +# The syslogd writes it into a file and through a pipe. +# The syslogd passes it via UDP to the loghost. +# The server receives the message on its UDP socket. +# Find the message in client, file, pipe, syslogd, server log. +# Check that the file log contains all the messages. + +use strict; +use warnings; + +our %args = ( + client => { + connect => { domain => AF_INET, proto => "tcp", addr => "127.0.0.1", + port => 514 }, + func => sub { + my $self = shift; + print "0 1 a2 bc3 de\n4 fg\000X3 hi 4 jk\n\n1 l0 1 m1 2 n2 o "; + write_log($self); + }, + }, + syslogd => { + options => ["-T", "127.0.0.1:514"], + }, + file => { + loggrep => { + qr/localhost $/ => 3, + qr/localhost a$/ => 1, + qr/localhost bc$/ => 1, + qr/localhost de$/ => 1, + qr/localhost fg$/ => 1, # NUL terminates message + qr/localhost hi $/ => 1, + qr/localhost jk $/ => 1, # new line converted to space + qr/localhost l$/ => 1, + qr/localhost m$/ => 1, + qr/localhost n$/ => 1, # leading spaces are striped + qr/localhost o $/ => 1, + get_testgrep() => 1, + }, + }, +); + +1; diff --git a/regress/usr.sbin/syslogd/args-maxtcp.pl b/regress/usr.sbin/syslogd/args-maxtcp.pl index 15ca28144d9..9044bd36e89 100644 --- a/regress/usr.sbin/syslogd/args-maxtcp.pl +++ b/regress/usr.sbin/syslogd/args-maxtcp.pl @@ -50,9 +50,8 @@ our %args = ( my $fh = $s[$i]; write_tcp($self, $fh, $i); } - ${$self->{syslogd}}->loggrep("tcp logger .* complete line", 5, - MAXTCP) or die ref($self), - " syslogd did not receive all complete lines"; + ${$self->{syslogd}}->loggrep(qr/tcp logger .* use \d+ bytes/, 5, + MAXTCP) or die ref($self), " syslogd did not use all messages"; write_shutdown($self); }, }, diff --git a/regress/usr.sbin/syslogd/args-sync-tcp.pl b/regress/usr.sbin/syslogd/args-sync-tcp.pl index f357b8c22fc..a145c21b92b 100644 --- a/regress/usr.sbin/syslogd/args-sync-tcp.pl +++ b/regress/usr.sbin/syslogd/args-sync-tcp.pl @@ -46,7 +46,13 @@ our %args = ( $self->{redo}--; return; } - ${$self->{syslogd}}->loggrep(get_thirdlog(), 40) + # read slowly to get output buffer out of sync + foreach (1..10) { + print STDERR ">>> ". scalar <STDIN>; + sleep 1; + last if ${$self->{syslogd}}->loggrep(get_thirdlog()); + } + ${$self->{syslogd}}->loggrep(get_thirdlog(), 30) or die ref($self), " syslogd did not receive third log"; shutdown(\*STDOUT, 1) or die "shutdown write failed: $!"; @@ -55,9 +61,7 @@ our %args = ( loggrep => { qr/Accepted/ => 2, get_between2loggrep(), - get_secondlog() => 0, get_thirdlog() => 0, - qr/>>> [0-9A-Za-z]{10}/ => 0, }, }, file => { diff --git a/regress/usr.sbin/syslogd/args-sync-tls.pl b/regress/usr.sbin/syslogd/args-sync-tls.pl deleted file mode 100644 index a4bf68c2267..00000000000 --- a/regress/usr.sbin/syslogd/args-sync-tls.pl +++ /dev/null @@ -1,74 +0,0 @@ -# The client writes 300 long messages to UDP socket. -# The syslogd writes it into a file and through a pipe. -# The syslogd does a TLS reconnect and passes it to loghost. -# The server blocks the message on its TLS socket. -# The server waits until the client has written all messages. -# The server closes the TLS connection and accepts a new one. -# The server receives the messages on its new accepted TLS socket. -# This way the server receives a block of messages that is truncated -# at the beginning and at the end. -# Find the message in client, file, pipe, syslogd, server log. -# Check that the server does not get lines that are cut in the middle. - -use strict; -use warnings; -use Socket; - -our %args = ( - client => { - connect => { domain => AF_UNSPEC, addr => "localhost", port => 514 }, - func => sub { write_between2logs(shift, sub { - my $self = shift; - write_message($self, get_secondlog()); - write_lines($self, 300, 2000); - write_message($self, get_thirdlog()); - ${$self->{server}}->loggrep("Accepted", 5, 2) - or die ref($self), " server did not receive second log"; - ${$self->{syslogd}}->loggrep(qr/dropped \d+ messages/, 5) - or die ref($self), " syslogd did not log dropped messages"; - })}, - }, - syslogd => { - options => ["-u"], - loghost => '@tls://127.0.0.1:$connectport', - loggrep => { - get_between2loggrep(), - get_charlog() => 300, - qr/dropped partial message/ => 1, - qr/SSL3_WRITE_PENDING/ => 0, - }, - }, - server => { - listen => { domain => AF_INET, proto => "tls", addr => "127.0.0.1" }, - redo => 0, - func => sub { read_between2logs(shift, sub { - my $self = shift; - if ($self->{redo}) { - $self->{redo}--; - return; - } - ${$self->{syslogd}}->loggrep(get_thirdlog(), 40) - or die ref($self), " syslogd did not receive third log"; - shutdown(\*STDOUT, 1) - or die "shutdown write failed: $!"; - $self->{redo}++; - })}, - loggrep => { - qr/Accepted/ => 2, - get_between2loggrep(), - get_secondlog() => 0, - get_thirdlog() => 0, - qr/>>> [0-9A-Za-z]{10}/ => 0, - }, - }, - file => { - loggrep => { - get_between2loggrep(), - get_secondlog() => 1, - get_thirdlog() => 1, - get_charlog() => 300, - }, - }, -); - -1; diff --git a/regress/usr.sbin/syslogd/funcs.pl b/regress/usr.sbin/syslogd/funcs.pl index ba84c773953..1fe21a45c16 100644 --- a/regress/usr.sbin/syslogd/funcs.pl +++ b/regress/usr.sbin/syslogd/funcs.pl @@ -1,4 +1,4 @@ -# $OpenBSD: funcs.pl,v 1.22 2015/07/16 16:34:49 bluhm Exp $ +# $OpenBSD: funcs.pl,v 1.23 2015/07/19 20:18:18 bluhm Exp $ # Copyright (c) 2010-2015 Alexander Bluhm <bluhm@openbsd.org> # @@ -167,7 +167,7 @@ sub write_unix { Type => SOCK_DGRAM, Peer => $path, ) or die ref($self), " connect to $path unix socket failed: $!"; - my $msg = "$id unix socket: $testlog"; + my $msg = "id $id unix socket: $testlog"; print $u $msg; print STDERR "<<< $msg\n"; } @@ -177,7 +177,7 @@ sub write_tcp { my $fh = shift || \*STDOUT; my $id = shift // $fh; - my $msg = "$id tcp socket: $testlog"; + my $msg = "id $id tcp socket: $testlog"; print $fh "$msg\n"; print STDERR "<<< $msg\n"; } |