From nobody Mon Mar 27 08:16:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PlQdM1x1wz41xFj; Mon, 27 Mar 2023 08:16:39 +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 4PlQdM1Qm9z4CMp; Mon, 27 Mar 2023 08:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679904999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JkMmS+aMurobtBhCGY9jOb8b+F0dfWMNshqHtlQH+N8=; b=HSupuv3wtnv9iZcxC7kVOoTT23sQw4SNtJl0Kk+byAte3Kq+dgyLWMLzxyzyw5sRaD9Zqn iouL7YR6+WuAA79O69zTwz/EG0J2DkwDLCYbVDODpDT1Lqva5iDqCeum+zbadPU3sXs7Z9 AsS1aEtkh57QXIlqGG9asllmIsljAuWxJWHYBjCm1npUtUnCsNNVz4SfMxSNUx3EY7noSg Q1avPuPjImkPtCKtKLMWGm/Vuv6mhBGUC+rrb10VPVp04/XyVQyIJfgMZZ/K2+qYZTA4Rn 4vFwJ3mbQ78gMFyH42pl8s0swrQZp5GFFIFWtfQkyz4vTDM8mXp10jyjzVQI1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679904999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JkMmS+aMurobtBhCGY9jOb8b+F0dfWMNshqHtlQH+N8=; b=ZqZ5YWGa47gxneYTBNsn50Z0pCVBdclBFzsWwztvwvFbT4ph26OzO66Dw8XuFepvFyma+6 skhVyac1bO2VIrwd95HAkjBwcMBe3XQNN7QxzHcwQ+wPQDs92p3R+IbbQeh7CYfj71Ipd+ LusH3hDO7pkeQzYZSxURLaS26/FmhIEbe3nGpMRw9979LXvE65VUH9LQbQFX4gvvoQ9iUB rrrskGcSm+3ZleNuqoy9v6HPvPp9UyKBFzVuvZGY2lo+dfIt/9eb9h3JtmOX27swhuOQoU vQM4IGM6lxKtsieoypvtV947CEVe52A2kxjZX24oXe0CVjIORygevVDKI9S4vA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679904999; a=rsa-sha256; cv=none; b=tGW2+R3RRJFS0SJeDwQ3xYnpysxDip04pJEIzP+YwwZoYBXamhtit1fEioFefAHPdOriJ0 v3C9dgnso2aB/iV8VUkdlqU3QvdgSjjEDs4v/KfveopnnLhspnB7ecDn/uTwbdziYPUxK0 5qQvE/1yWz7XIcQoeig6tTqigOOnJWjEwHzmAv9n1AvVM9uXZHIEZVl7dp7fNwcj0oKrzh gwFWo/aVrs0tfy2pXUR5wRKb1a0SAV9PUp1wfwqLkwLSB1GjQ14EgXhvpc7nrb0x1M0gaL yOql+JTXPXp0pX/c0sXadZjw9go6A/DzhwA7i93yCKBPbr/kAbrbPF/A+Dda3A== 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 4PlQdM0QlJzFCG; Mon, 27 Mar 2023 08:16:39 +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 32R8GcJ5045676; Mon, 27 Mar 2023 08:16:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32R8GcVZ045675; Mon, 27 Mar 2023 08:16:38 GMT (envelope-from git) Date: Mon, 27 Mar 2023 08:16:38 GMT Message-Id: <202303270816.32R8GcVZ045675@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: 5d6b503ed097 - stable/13 - pf tests: try to trigger locking issues in pfsync_timeout() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org 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/13 X-Git-Reftype: branch X-Git-Commit: 5d6b503ed097733af83003cf675f3d55c2b90756 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=5d6b503ed097733af83003cf675f3d55c2b90756 commit 5d6b503ed097733af83003cf675f3d55c2b90756 Author: Kristof Provost AuthorDate: 2023-03-20 13:58:34 +0000 Commit: Kristof Provost CommitDate: 2023-03-27 08:16:03 +0000 pf tests: try to trigger locking issues in pfsync_timeout() PR: 268246 MFC after: 1 week Sponsored by: Rubicon Communications, LLC (Netgate) (cherry picked from commit a6719858a48019aa54e1ea3be57d17fa88b080c6) --- tests/sys/netpfil/pf/pfsync.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tests/sys/netpfil/pf/pfsync.sh b/tests/sys/netpfil/pf/pfsync.sh index a5dc3716bbfe..748c0b2fcf29 100644 --- a/tests/sys/netpfil/pf/pfsync.sh +++ b/tests/sys/netpfil/pf/pfsync.sh @@ -584,6 +584,39 @@ pbr_common_cleanup() pft_cleanup } +atf_test_case "timeout" "cleanup" +timeout_head() +{ + atf_set descr 'Trigger pfsync_timeout()' + atf_set require.user root +} + +timeout_body() +{ + pft_init + + vnet_mkjail one + + jexec one ifconfig lo0 127.0.0.1/8 up + jexec one ifconfig lo0 inet6 ::1/128 up + + pft_set_rules one \ + "pass all" + jexec one pfctl -e + jexec one ifconfig pfsync0 defer up + + jexec one ping -c 1 ::1 + jexec one ping -c 1 127.0.0.1 + + # Give pfsync_timeout() time to fire (a callout on a 1 second delay) + sleep 2 +} + +timeout_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "basic" @@ -592,4 +625,5 @@ atf_init_test_cases() atf_add_test_case "bulk" atf_add_test_case "pbr" atf_add_test_case "pfsync_pbr" + atf_add_test_case "timeout" }