From 27d9b92724b7c662f93117c6d6acfdd099edab12 Mon Sep 17 00:00:00 2001 From: bluhm Date: Mon, 29 Aug 2016 16:25:14 +0000 Subject: [PATCH] Make socket splicing performance test pass in multiple environments. When running the setup over two machines, build required binaries on remote machine. Avoid localhost nameserver lookup, just use 127.0.0.1. Use greater timeout. --- regress/sys/kern/sosplice/perf/Makefile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/regress/sys/kern/sosplice/perf/Makefile b/regress/sys/kern/sosplice/perf/Makefile index a738fec5bcc..8ccf4939c5c 100644 --- a/regress/sys/kern/sosplice/perf/Makefile +++ b/regress/sys/kern/sosplice/perf/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2014/10/30 20:41:02 bluhm Exp $ +# $OpenBSD: Makefile,v 1.6 2016/08/29 16:25:14 bluhm Exp $ PROG ?= relay CFLAGS += -Wall -Werror @@ -16,18 +16,23 @@ CLEANFILES += copy splice copy splice: ${PROG} ln -s relay $@ +remote-setup: +.if ! empty (REMOTE_SSH) + ssh ${REMOTE_SSH} 'cd ${.CURDIR} && make copy splice' +.endif + .for p in tcp udp .for r in copy splice -run-regress-$p-$r: $r +run-regress-$p-$r: $r remote-setup @echo '\n======== $@ ========' -pkill -x tcpbench .if empty (REMOTE_SSH) - ./$r ${p:S/tcp//:S/udp/-u/} 12345 localhost 12346 & \ + ./$r ${p:S/tcp//:S/udp/-u/} -4 12345 127.0.0.1 12346 & \ rpid=$$! ; \ - tcpbench ${p:S/tcp//:S/udp/-u/} -t 7 -s -p 12346 & \ + tcpbench ${p:S/tcp//:S/udp/-u/} -4 -t 7 -s -p 12346 & \ sleep 1 ; \ - tcpbench ${p:S/tcp//:S/udp/-u/} -t 5 localhost ; \ + tcpbench ${p:S/tcp//:S/udp/-u/} -4 -t 5 127.0.0.1 ; \ kill $$rpid ; \ pkill -x tcpbench .else @@ -44,7 +49,7 @@ remote-regress-$p-$r: $r -pkill -x $r ./$r ${p:S/tcp//:S/udp/-u/} -b ${REMOTE_ADDR} 12345 ${LOCAL_ADDR} 12346 & \ rpid=$$! ; \ - sleep 7 ; \ + sleep 10 ; \ kill $$rpid .endfor -- 2.20.1