summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--regress/usr.sbin/syslogd/args-client-native.pl23
-rw-r--r--regress/usr.sbin/syslogd/args-client-unix.pl7
2 files changed, 28 insertions, 2 deletions
diff --git a/regress/usr.sbin/syslogd/args-client-native.pl b/regress/usr.sbin/syslogd/args-client-native.pl
new file mode 100644
index 00000000000..62045adf3e9
--- /dev/null
+++ b/regress/usr.sbin/syslogd/args-client-native.pl
@@ -0,0 +1,23 @@
+# The client writes a message to Sys::Syslog native method.
+# 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 the hostname and message.
+
+use strict;
+use warnings;
+use Sys::Hostname;
+
+(my $host = hostname()) =~ s/\..*//; # short name
+
+our %args = (
+ client => {
+ logsock => { type => "native" },
+ },
+ file => {
+ loggrep => qr/ $host syslogd-regress\[\d+\]: /. get_log(),
+ },
+);
+
+1;
diff --git a/regress/usr.sbin/syslogd/args-client-unix.pl b/regress/usr.sbin/syslogd/args-client-unix.pl
index 6906ffc4619..c9fcec554ea 100644
--- a/regress/usr.sbin/syslogd/args-client-unix.pl
+++ b/regress/usr.sbin/syslogd/args-client-unix.pl
@@ -3,17 +3,20 @@
# 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 the message.
+# Check that the file log contains the hostname and message.
use strict;
use warnings;
+use Sys::Hostname;
+
+(my $host = hostname()) =~ s/\..*//; # short name
our %args = (
client => {
logsock => { type => "unix" },
},
file => {
- loggrep => qr/ syslogd-regress\[\d+\]: /. get_log(),
+ loggrep => qr/ $host syslogd-regress\[\d+\]: /. get_log(),
},
);