Date: Tue, 11 Feb 2020 20:41:52 +0000 (UTC) From: Li-Wen Hsu <lwhsu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357778 - head/tests/sys/mac/portacl Message-ID: <202002112041.01BKfqhk058935@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: lwhsu Date: Tue Feb 11 20:41:51 2020 New Revision: 357778 URL: https://svnweb.freebsd.org/changeset/base/357778 Log: Reduce nc timeout in sys.mac.portacl.* It is not necessary to wait that long for localhost. Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/mac/portacl/misc.sh Modified: head/tests/sys/mac/portacl/misc.sh ============================================================================== --- head/tests/sys/mac/portacl/misc.sh Tue Feb 11 20:15:49 2020 (r357777) +++ head/tests/sys/mac/portacl/misc.sh Tue Feb 11 20:41:51 2020 (r357778) @@ -17,6 +17,7 @@ check_bind() { local host idtype name proto port udpflag host="127.0.0.1" + timeout=1 idtype=${1} name=${2} @@ -28,7 +29,7 @@ check_bind() { out=$( case "${idtype}" in uid|gid) - ( echo -n | su -m ${name} -c "nc ${udpflag} -l -w 10 $host $port" 2>&1 ) & + ( echo -n | su -m ${name} -c "nc ${udpflag} -l -w ${timeout} $host $port" 2>&1 ) & ;; jail) kill $$ @@ -37,7 +38,7 @@ check_bind() { kill $$ esac sleep 0.3 - echo | nc ${udpflag} -w 10 $host $port >/dev/null 2>&1 + echo | nc ${udpflag} -w ${timeout} $host $port >/dev/null 2>&1 wait ) case "${out}" in
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002112041.01BKfqhk058935>