-# $OpenBSD: Makefile,v 1.4 2024/01/02 15:06:48 bluhm Exp $
+# $OpenBSD: Makefile,v 1.5 2024/01/04 00:19:17 bluhm Exp $
PROG= bindconnect
LDADD= -lpthread
LOCAL_NET ?=
LOCAL_NET6 ?=
+REGRESS_ROOT_TARGETS += setup-maxfiles
REGRESS_SETUP_ONCE += setup-maxfiles
setup-maxfiles:
[[ $$(sysctl -n kern.maxfiles) -ge 110000 ]] || \
${SUDO_${proto}} time ${KTRACE} ./${PROG} \
-f ${af} -p ${proto} -n 16 -s 2 -o 1 -b 3 -c 3
+# skip test on armv7, it fails with malloc: out of space in kmem_map
+.if "${MACHINE}" == armv7
+REGRESS_SKIP_TARGETS += run-${af}-${proto}-100000
+.endif
+REGRESS_ROOT_TARGETS += run-${af}-${proto}-100000
REGRESS_TARGETS += run-${af}-${proto}-100000
run-${af}-${proto}-100000:
${SUDO} time ${KTRACE} ./${PROG} \
${SUDO_${proto}} time ${KTRACE} ./${PROG} \
-f ${af} -p ${proto} -n 16 -s 2 -o 1 -b 3 -c 3 -N ${NET_${af}}
+REGRESS_ROOT_TARGETS += run-${af}-${proto}-localnet-connect-delete
REGRESS_TARGETS += run-${af}-${proto}-localnet-connect-delete
run-${af}-${proto}-localnet-connect-delete:
${SUDO} time ${KTRACE} ./${PROG} \
.endfor
.endfor
-REGRESS_ROOT_TARGETS += setup-maxfiles run-100000 run-localnet-connect-delete
-REGRESS_ROOT_TARGETS += ${REGRESS_TARGETS:N*-udp-*:N*-tcp-*}
+REGRESS_ROOT_TARGETS += ${REGRESS_TARGETS:M*-any-*}
.include <bsd.regress.mk>
Stress test bind(2) and connect(2) system calls in OpenBSD regress.
-bindconnect [-r] [-b bind] [-c connect] [-d delroute]
-[-N addr/net] [-n num] [-o close] [-s socket] [-t time]
+bindconnect [-r] [-b bind] [-c connect] [-d delroute] [-f family] [-N addr/net]
+[-n num] [-o close] [-p proto] [-s socket] [-t time]
-b bind threads binding sockets, default 1
-c connect threads connecting sockets, default 1
-d delroute threads deleting cloned routes, default 0
-N addr/net connect to any address within network
-n num number of file descriptors, default 128
-o close threads closing sockets, default 1
+ -p proto protocol udp, tcp, name or number, default udp
-r set reuse port socket option
-s socket threads creating sockets, default 1
-t time run time in seconds, default 10
-/* $OpenBSD: bindconnect.c,v 1.4 2024/01/02 15:06:48 bluhm Exp $ */
+/* $OpenBSD: bindconnect.c,v 1.5 2024/01/04 00:19:17 bluhm Exp $ */
/*
- * Copyright (c) 2023 Alexander Bluhm <bluhm@openbsd.org>
+ * Copyright (c) 2023-2024 Alexander Bluhm <bluhm@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
usage(void)
{
fprintf(stderr,
- "bindconnect [-r] [-b bind] [-c connect] [-d delroute]\n"
- "[-f family] [-N addr/net] [-n num] [-o close] [-s socket]\n"
- "[-t time]\n"
+ "bindconnect [-r] [-b bind] [-c connect] [-d delroute] "
+ "[-f family] [-N addr/net] [-n num] [-o close] [-p proto] "
+ "[-s socket] [-t time]\n"
" -b bind threads binding sockets, default %u\n"
" -c connect threads connecting sockets, default %u\n"
" -d delroute threads deleting cloned routes, default %u\n"