summaryrefslogtreecommitdiff
path: root/regress/sys/kern
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2021-05-17 13:13:28 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2021-05-17 13:13:28 +0000
commit2530ed9ac92b9f3e03c2e8854099f400b4866998 (patch)
tree427467ce3773ef1a541bac023c35aa1769a7bc4a /regress/sys/kern
parent2cf64fbbf7dfb7b01dd131e9e3391d3bf37347aa (diff)
Skip sosplice loop test if Perl packages are not installed.
Diffstat (limited to 'regress/sys/kern')
-rw-r--r--regress/sys/kern/sosplice/Makefile.inc6
-rw-r--r--regress/sys/kern/sosplice/loop/Makefile22
2 files changed, 26 insertions, 2 deletions
diff --git a/regress/sys/kern/sosplice/Makefile.inc b/regress/sys/kern/sosplice/Makefile.inc
index 10c95c7db78..a7b0c02b252 100644
--- a/regress/sys/kern/sosplice/Makefile.inc
+++ b/regress/sys/kern/sosplice/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.5 2020/12/25 16:50:40 bluhm Exp $
+# $OpenBSD: Makefile.inc,v 1.6 2021/05/17 13:13:27 bluhm Exp $
# The following ports must be installed for the regression tests:
# p5-BSD-Socket-Splice perl interface to OpenBSD socket splicing
@@ -8,6 +8,8 @@
# Check wether all required perl packages are installed. If some
# are missing print a warning and skip the tests, but do not fail.
+.if ! (make(clean) || make(cleandir) || make(obj))
+
PERL_REQUIRE != perl -Mstrict -Mwarnings -e ' \
eval { require BSD::Socket::Splice } or print $@; \
eval { require IO::Socket::INET6 } or print $@; \
@@ -20,6 +22,8 @@ regress:
@echo SKIPPED
.endif
+.endif
+
# Fill out these variables if you want to test socket splicing with
# the relay process running on a remote machine. You have to specify
# a local and remote ip address for the tcp connections. To control
diff --git a/regress/sys/kern/sosplice/loop/Makefile b/regress/sys/kern/sosplice/loop/Makefile
index d3811b627f2..312e491c9c3 100644
--- a/regress/sys/kern/sosplice/loop/Makefile
+++ b/regress/sys/kern/sosplice/loop/Makefile
@@ -1,8 +1,28 @@
-# $OpenBSD: Makefile,v 1.3 2021/01/09 15:39:37 bluhm Exp $
+# $OpenBSD: Makefile,v 1.4 2021/05/17 13:13:27 bluhm Exp $
# Create chains and loops of spliced tcp and udp sockets.
# Send data through them and check that MAXLOOP is triggered in kernel.
+# The following ports must be installed for the regression tests:
+# p5-BSD-Socket-Splice perl interface to OpenBSD socket splicing
+#
+# Check wether all required perl packages are installed. If some
+# are missing print a warning and skip the tests, but do not fail.
+
+.if ! (make(clean) || make(cleandir) || make(obj))
+
+PERL_REQUIRE != perl -Mstrict -Mwarnings -e ' \
+ eval { require BSD::Socket::Splice } or print $@; \
+'
+.if ! empty (PERL_REQUIRE)
+regress:
+ @echo "${PERL_REQUIRE}"
+ @echo Install these Perl modules for additional tests.
+ @echo SKIPPED
+.endif
+
+.endif
+
TARGETS =
VERBOSE ?=