1221167Sgnn# $OpenBSD: Makefile,v 1.5 2021/09/30 17:57:44 anton Exp $ 2221167Sgnn 3221167Sgnn# Create chains and loops of spliced tcp and udp sockets. 4221167Sgnn# Send data through them and check that MAXLOOP is triggered in kernel. 5221167Sgnn 6221167Sgnn# The following ports must be installed for the regression tests: 7221167Sgnn# p5-BSD-Socket-Splice perl interface to OpenBSD socket splicing 8221167Sgnn# 9221167Sgnn# Check wether all required perl packages are installed. If some 10221167Sgnn# are missing print a warning and skip the tests, but do not fail. 11221167Sgnn 12221167Sgnn.if ! (make(clean) || make(cleandir) || make(obj)) 13221167Sgnn 14221167SgnnPERL_REQUIRE != perl -Mstrict -Mwarnings -e ' \ 15221167Sgnn eval { require BSD::Socket::Splice } or print $@; \ 16221167Sgnn' 17221167Sgnn.if ! empty (PERL_REQUIRE) 18221167Sgnnregress: 19221167Sgnn @echo "${PERL_REQUIRE}" 20221167Sgnn @echo Install these Perl modules for additional tests. 21221167Sgnn @echo SKIPPED 22221167Sgnn.endif 23221167Sgnn 24221167Sgnn.endif 25221167Sgnn 26221167SgnnTARGETS = 27221167SgnnVERBOSE ?= 28221167Sgnn 29221167Sgnnv = 30221167Sgnn.if !empty(VERBOSE) && ${VERBOSE:L} != "no" 31221167Sgnnv = -v 32221167Sgnn.endif 33221167Sgnn 34221167Sgnn.for i in 4 6 35221167Sgnn.for p in tcp udp 36221167Sgnn.for c in 1 2 3 127 128 129 200 37221167SgnnREGRESS_TARGETS += run-chain-ipv$i-proto$p-count$c 38221167Sgnnrun-chain-ipv$i-proto$p-count$c: chain.pl 39221167Sgnn ulimit -n 500; \ 40221167Sgnn SUDO="${SUDO}" ${KTRACE} perl ${PERLPATH}chain.pl -$i -c $c -p $p $v 41221167Sgnn.endfor 42221167Sgnn 43221167SgnnREGRESS_TARGETS += run-loop-ipv$i-proto$p 44221167Sgnnrun-loop-ipv$i-proto$p: loop.pl 45221167Sgnn SUDO="${SUDO}" ${KTRACE} perl ${PERLPATH}loop.pl -$i -p $p $v 46221167Sgnn.endfor 47221167Sgnn.endfor 48221167Sgnn 49221167SgnnREGRESS_TARGETS += run-bcast 50221167Sgnnrun-bcast: bcast.pl 51221167Sgnn SUDO="${SUDO}" ${KTRACE} perl ${PERLPATH}bcast.pl $v 52221167Sgnn 53221167Sgnn.include <bsd.regress.mk> 54221167Sgnn