xref: /openbsd-src/regress/sys/kern/sosplice/loop/Makefile (revision 3e8b1db74c103e81d872d6148750233658a8adf7)
1# $OpenBSD: Makefile,v 1.5 2021/09/30 17:57:44 anton Exp $
2
3# Create chains and loops of spliced tcp and udp sockets.
4# Send data through them and check that MAXLOOP is triggered in kernel.
5
6# The following ports must be installed for the regression tests:
7# p5-BSD-Socket-Splice	perl interface to OpenBSD socket splicing
8#
9# Check wether all required perl packages are installed.  If some
10# are missing print a warning and skip the tests, but do not fail.
11
12.if ! (make(clean) || make(cleandir) || make(obj))
13
14PERL_REQUIRE !=	perl -Mstrict -Mwarnings -e ' \
15    eval { require BSD::Socket::Splice } or print $@; \
16'
17.if ! empty (PERL_REQUIRE)
18regress:
19	@echo "${PERL_REQUIRE}"
20	@echo Install these Perl modules for additional tests.
21	@echo SKIPPED
22.endif
23
24.endif
25
26TARGETS =
27VERBOSE ?=
28
29v =
30.if !empty(VERBOSE) && ${VERBOSE:L} != "no"
31v =	-v
32.endif
33
34.for i in 4 6
35.for p in tcp udp
36.for c in 1 2 3 127 128 129 200
37REGRESS_TARGETS +=	run-chain-ipv$i-proto$p-count$c
38run-chain-ipv$i-proto$p-count$c: chain.pl
39	ulimit -n 500; \
40	SUDO="${SUDO}" ${KTRACE} perl ${PERLPATH}chain.pl -$i -c $c -p $p $v
41.endfor
42
43REGRESS_TARGETS +=	run-loop-ipv$i-proto$p
44run-loop-ipv$i-proto$p: loop.pl
45	SUDO="${SUDO}" ${KTRACE} perl ${PERLPATH}loop.pl -$i -p $p $v
46.endfor
47.endfor
48
49REGRESS_TARGETS +=	run-bcast
50run-bcast: bcast.pl
51	SUDO="${SUDO}" ${KTRACE} perl ${PERLPATH}bcast.pl $v
52
53.include <bsd.regress.mk>
54