From owner-dev-commits-src-all@freebsd.org Wed Apr 14 13:08:30 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB3FB5D8706; Wed, 14 Apr 2021 13:08:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FL2pk5NKzz3FTZ; Wed, 14 Apr 2021 13:08:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AC1121DEEE; Wed, 14 Apr 2021 13:08:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13ED8UjP019385; Wed, 14 Apr 2021 13:08:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13ED8Uv2019384; Wed, 14 Apr 2021 13:08:30 GMT (envelope-from git) Date: Wed, 14 Apr 2021 13:08:30 GMT Message-Id: <202104141308.13ED8Uv2019384@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 38b25dade179 - stable/12 - pf tests: make synproxy and nat work correctly even if inetd is running MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 38b25dade179bec0eeccff95a5ae354e7304e474 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2021 13:08:30 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=38b25dade179bec0eeccff95a5ae354e7304e474 commit 38b25dade179bec0eeccff95a5ae354e7304e474 Author: Kurosawa Takahiro AuthorDate: 2021-04-07 06:17:51 +0000 Commit: Kristof Provost CommitDate: 2021-04-14 08:17:14 +0000 pf tests: make synproxy and nat work correctly even if inetd is running tests/sys/netfil/pf/synproxy fails if inetd has been running outside of the jail because pidfile_open() fails with EEXIST. tests/sys/netfil/pf/nat has the same problem but the test succeeds because whether inetd is running is not so important. Fix the problem by changing the pidfile path from the default location. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D29622 (cherry picked from commit 5a5623397c73e46b206289d32d1d6b9de420da9c) --- tests/sys/netpfil/pf/nat.sh | 3 ++- tests/sys/netpfil/pf/synproxy.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/sys/netpfil/pf/nat.sh b/tests/sys/netpfil/pf/nat.sh index 6ce84310ce84..99a0ca870c85 100755 --- a/tests/sys/netpfil/pf/nat.sh +++ b/tests/sys/netpfil/pf/nat.sh @@ -27,7 +27,7 @@ exhaust_body() jexec nat sysctl net.inet.ip.forwarding=1 jexec echo ifconfig ${epair_echo}b 198.51.100.2/24 up - jexec echo /usr/sbin/inetd $(atf_get_srcdir)/echo_inetd.conf + jexec echo /usr/sbin/inetd -p inetd-echo.pid $(atf_get_srcdir)/echo_inetd.conf # Enable pf! jexec nat pfctl -e @@ -55,6 +55,7 @@ exhaust_body() exhaust_cleanup() { + rm -f inetd-echo.pid pft_cleanup } diff --git a/tests/sys/netpfil/pf/synproxy.sh b/tests/sys/netpfil/pf/synproxy.sh index bb4161f58d42..6203723adbe8 100755 --- a/tests/sys/netpfil/pf/synproxy.sh +++ b/tests/sys/netpfil/pf/synproxy.sh @@ -28,7 +28,7 @@ synproxy_body() jexec singsing ifconfig ${link}b 198.51.100.2/24 up jexec singsing route add default 198.51.100.1 - jexec singsing /usr/sbin/inetd $(atf_get_srcdir)/echo_inetd.conf + jexec singsing /usr/sbin/inetd -p inetd-singsing.pid $(atf_get_srcdir)/echo_inetd.conf jexec alcatraz pfctl -e pft_set_rules alcatraz "set fail-policy return" \ @@ -50,6 +50,7 @@ synproxy_body() synproxy_cleanup() { + rm -f inetd-singsing.pid pft_cleanup }