From: bluhm Date: Mon, 17 May 2021 13:13:27 +0000 (+0000) Subject: Skip sosplice loop test if Perl packages are not installed. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f1dd7b858388b4a23f4f67a4957ec5ff656ebbe8;p=openbsd Skip sosplice loop test if Perl packages are not installed. --- 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 ?=