summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2014-10-05 18:43:06 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2014-10-05 18:43:06 +0000
commit768ca480cb1f353f72b4597e10a5f65f63911a3a (patch)
tree114cc056938ce202f91e37f63727901dd9c53f5c /regress
parent7423e300b226d793e4e8751e10c94ccb6360027a (diff)
Test that the specified libevent backend kqueue(2) or poll(2) or
select(2) is used by syslogd.
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.sbin/syslogd/args-libevent-kqueue.pl23
-rw-r--r--regress/usr.sbin/syslogd/args-libevent-poll.pl23
-rw-r--r--regress/usr.sbin/syslogd/args-libevent-select.pl23
3 files changed, 69 insertions, 0 deletions
diff --git a/regress/usr.sbin/syslogd/args-libevent-kqueue.pl b/regress/usr.sbin/syslogd/args-libevent-kqueue.pl
new file mode 100644
index 00000000000..570c5ee9f05
--- /dev/null
+++ b/regress/usr.sbin/syslogd/args-libevent-kqueue.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 in log and ktrace that kqueue has been used.
+
+use strict;
+use warnings;
+
+$ENV{EVENT_NOKQUEUE} = 0;
+$ENV{EVENT_NOPOLL} = 1;
+$ENV{EVENT_NOSELECT} = 1;
+
+our %args = (
+ syslogd => {
+ loggrep => qr/libevent using: kqueue/,
+ ktrace => 1,
+ kdump => qr/CALL kqueue/,
+ },
+);
+
+1;
diff --git a/regress/usr.sbin/syslogd/args-libevent-poll.pl b/regress/usr.sbin/syslogd/args-libevent-poll.pl
new file mode 100644
index 00000000000..1dd688a1ab6
--- /dev/null
+++ b/regress/usr.sbin/syslogd/args-libevent-poll.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 in log and ktrace that poll has been used.
+
+use strict;
+use warnings;
+
+$ENV{EVENT_NOKQUEUE} = 1;
+$ENV{EVENT_NOPOLL} = 0;
+$ENV{EVENT_NOSELECT} = 1;
+
+our %args = (
+ syslogd => {
+ loggrep => qr/libevent using: poll/,
+ ktrace => 1,
+ kdump => qr/CALL poll/,
+ },
+);
+
+1;
diff --git a/regress/usr.sbin/syslogd/args-libevent-select.pl b/regress/usr.sbin/syslogd/args-libevent-select.pl
new file mode 100644
index 00000000000..9c9bb3662ba
--- /dev/null
+++ b/regress/usr.sbin/syslogd/args-libevent-select.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 in log and ktrace that select has been used.
+
+use strict;
+use warnings;
+
+$ENV{EVENT_NOKQUEUE} = 1;
+$ENV{EVENT_NOPOLL} = 1;
+$ENV{EVENT_NOSELECT} = 0;
+
+our %args = (
+ syslogd => {
+ loggrep => qr/libevent using: select/,
+ ktrace => 1,
+ kdump => qr/CALL select/,
+ },
+);
+
+1;