From nobody Mon Mar 20 16:39:32 2023 X-Original-To: dev-commits-src-main@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 4PgL6r6LKsz3yxJ9; Mon, 20 Mar 2023 16:39:32 +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 4PgL6r5dxzz4Bp9; Mon, 20 Mar 2023 16:39:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679330372; 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=DY0iJ68JXXDzJATZ+kHPjM0R0qp8OIiXNKAJfN72/5Y=; b=MLqPwCjkaH/RMaljjhToH50Jo08CK9WivThLt5BN2bGwdF9prkvPZqSPQmHdX63xFmdwey K/At50Lm5P7tqqgYJcuPs/4KDsYixXqQEK4UYh19S9hBXZV0BlaCnWz0We3Oo1YsNBaMbL yrzgSg3CSFjZfec1lNit9b8f//T7RTQRXrCD9QaNWv30exRFUFecegfeSX+q7Dkug6kFjL 06z0z/PGxojafar/o+Q4GXlfLhtpAcEs1syRxzoJBkyD2kuZlXoroMx+DkgFz2S72c+01x bhfgsTMJkB1CyVcwhTxxwpJYUcUYaq3Mq6Yd9ZMTTfauoV7ragPeYGnZv+dtmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679330372; 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=DY0iJ68JXXDzJATZ+kHPjM0R0qp8OIiXNKAJfN72/5Y=; b=hZTeakX+xUVRhjqFAJq/FUwOz6I2b2AEm1E9hk3/4tfe65gSybsFYobD4/BrlqChhlBYoW 3PSPM9uSFb5GntgQiPjrkraDv1fMUjZKpYWXOP8wMAA4JPuko+jdaSQF2vkhI+0NBZM2Xs Z29lt/skhKNG74eayGLas8CRwADWMc/3uLqD3VlRZrrTdXaEy9NHpAcwmru8+Eey5pJCHg /hoj3OcoFh6TYztlz2ZIZsGOlexkvqRlXFOPvCd0vb80QaO8RGuq36O0Yk0JrpV4uRI7w6 i0AKhYXx7JVHoleGZ4C20u77dr4/LFAWnC2q1Cs295zEefgbMwNp3FFuxGt0Jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679330372; a=rsa-sha256; cv=none; b=rsftlYcA60C9aVwzA9ONJivZeB43F1HmdmVxL48gpF60tWkpje6eE5Z83a2NLSFJnoX2L/ 5pBVW8LHggooxuHs7c/OTb6HpPCo+yk7fHcxuM/1IAGTxeGPkL1y57VJ+UWDeuHqG4mfMI ZVCZ2SMI2FNtfiF3NmExc9n9sy7kKo7TBf79k7tgp9uBRaOFw12ELYalRyiS/35zB9i9V3 XCACUnGhHdZMB9z+1NbVEJZDXny2qtYKW0svpShOInKUzDr/Px+1AwbnuCQClmHMupl+KI BL6xxdYt7pYSUWG2DTiFGh9br++OdMjux6piczPgi+Ge0ErL/hAvzilWkNKjMA== 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 4PgL6r4k6qzcwj; Mon, 20 Mar 2023 16:39:32 +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 32KGdW2i071233; Mon, 20 Mar 2023 16:39:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32KGdWUv071232; Mon, 20 Mar 2023 16:39:32 GMT (envelope-from git) Date: Mon, 20 Mar 2023 16:39:32 GMT Message-Id: <202303201639.32KGdWUv071232@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: a6719858a480 - main - pf tests: try to trigger locking issues in pfsync_timeout() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: a6719858a48019aa54e1ea3be57d17fa88b080c6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a6719858a48019aa54e1ea3be57d17fa88b080c6 commit a6719858a48019aa54e1ea3be57d17fa88b080c6 Author: Kristof Provost AuthorDate: 2023-03-20 13:58:34 +0000 Commit: Kristof Provost CommitDate: 2023-03-20 15:39:14 +0000 pf tests: try to trigger locking issues in pfsync_timeout() PR: 268246 MFC after: 1 week Sponsored by: Rubicon Communications, LLC (Netgate) --- 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 3871d6be8e14..810b4e203a1f 100644 --- a/tests/sys/netpfil/pf/pfsync.sh +++ b/tests/sys/netpfil/pf/pfsync.sh @@ -669,6 +669,39 @@ ipsec_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" @@ -678,4 +711,5 @@ atf_init_test_cases() atf_add_test_case "pbr" atf_add_test_case "pfsync_pbr" atf_add_test_case "ipsec" + atf_add_test_case "timeout" }