From nobody Tue Jun 20 09:46:07 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 4QlhbM5Whqz4gH7Q; Tue, 20 Jun 2023 09:46:07 +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 4QlhbM4v1Kz3Dbk; Tue, 20 Jun 2023 09:46:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687254367; 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=7y2m8VAt7HJq9zeyvEm1eD/JDLvAaxP8oOmpi/aQP/U=; b=ssjYlXNHY693v1ViFoC5Z0D1uIb+kYV31nLMemQUQj6FMfQFflbjRomoTSFkLt/b3Asmmp ialB/Mgsil3ORIAbAnxuW/MBiZoMUjSK9PcPTI7c00HTkVQksURnCsw9ikQWGEZ/BTqee+ gkX8e/miXQu6Wx1X49NM2/2rrCgVzpi0bYb4Dh+LJfya3mXPZwfNGvs2Hu8yjNVrKTavb1 PKTldngo8Tj2eNQF6Rggy2PdbIGgI+Bo+PLSs/sb1bnw+Uqmw+sKvF/YANeem+sgWB+x1R JAMq0TeUTtI4VjkVOOg/a674gTOIxmllnIhDxuGvwlQpT3J+cq8vYbzcZrhhMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687254367; 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=7y2m8VAt7HJq9zeyvEm1eD/JDLvAaxP8oOmpi/aQP/U=; b=Ymgt+aOC6KZDY8PfxWcWG2qor7TLTBZ9ADJWusgUjra/mh/csXyNNNMqLhpoVLwdtCHWVE DYZjApg8L+gj37HGs+tXzlee2YAij8JWieR8weekcH7mx4gdioMcS4brXXZPIgKQt3Er4e Xia8pP3jus4UBTorzYyfVGDon9SphvmxctTxlqu1TTEpkj5acVKmifs9Pdmmsc9dCx2rF4 adY6YLjLZVvHiICNzcOibXXzW6bt/admVulqASHyUcZo8nDq41/uN+/ZsEB+huQ0043+dG 1Ko7Z3qYqIiYTH0qP1y0gZ1SAwQu8otiT9MWfM0n8+1ahi2luFBKfvpdb8v8EA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687254367; a=rsa-sha256; cv=none; b=r8jxpYDlLKrZDZe+AFScGvzQ0qF6WYtZcQgxFmG4p9VuSfqSYuGtr80LLBvMRpEN+GkqIM nGhAK9oTq5WBY3D7jBkOYseDoxQk09ABzWYkL8KTFbqwshsClRechz+7Ekdy3u18Lh6Z3N zQIFKAQe7XVmm1MjZKyPGMtnymptOYWxQcVmoQ0+Rn/zrgebYWnJK4cuWLQ8WrxOA2GfRg jheKydIQx202PybkQ2oMfUDQTj5h3CSjqRrJ+JB9kR9184kGnpFqWmWOZ9y921+OXBCAY9 R6DBXdISru+RAR8dTckh4YlkiG+eKXVDB7lIQ6sGaMBnYkmXthEjZPoeLgrU1Q== 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 4QlhbM3NghztpM; Tue, 20 Jun 2023 09:46:07 +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 35K9k7Ju082587; Tue, 20 Jun 2023 09:46:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35K9k7i9082586; Tue, 20 Jun 2023 09:46:07 GMT (envelope-from git) Date: Tue, 20 Jun 2023 09:46:07 GMT Message-Id: <202306200946.35K9k7i9082586@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: f25ceb05af66 - main - pf tests: make pfsync:defer test more robust 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/main X-Git-Reftype: branch X-Git-Commit: f25ceb05af666f22ac3bf14332a6a3ec679a3332 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f25ceb05af666f22ac3bf14332a6a3ec679a3332 commit f25ceb05af666f22ac3bf14332a6a3ec679a3332 Author: Kristof Provost AuthorDate: 2023-06-19 14:41:13 +0000 Commit: Kristof Provost CommitDate: 2023-06-20 09:38:11 +0000 pf tests: make pfsync:defer test more robust Set the defer timeout to 2.5 seconds, and only make sure that there's at least a second of delay between the pfsync packet and the ping packet. The intent is to allow the test to pass even when there's considerable jitter on the timing measurement (e.g. when the test runs in a VM, such as during the CI tests). Allow the test to run in CI. Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/pfsync.sh | 7 +++---- tests/sys/netpfil/pf/pfsync_defer.py | 11 +++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/sys/netpfil/pf/pfsync.sh b/tests/sys/netpfil/pf/pfsync.sh index 8028ba9790ba..75788eed4bbe 100644 --- a/tests/sys/netpfil/pf/pfsync.sh +++ b/tests/sys/netpfil/pf/pfsync.sh @@ -125,10 +125,6 @@ defer_body() { pfsynct_init - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "Skip know failing test (likely related to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260460)" - fi - epair_sync=$(vnet_mkepair) epair_in=$(vnet_mkepair) epair_out=$(vnet_mkepair) @@ -141,6 +137,9 @@ defer_body() jexec alcatraz arp -s 203.0.113.2 00:01:02:03:04:05 jexec alcatraz sysctl net.inet.ip.forwarding=1 + # Set a long defer delay + jexec alcatraz sysctl net.pfsync.defer_delay=2500 + jexec alcatraz ifconfig pfsync0 \ syncdev ${epair_sync}a \ maxupd 1 \ diff --git a/tests/sys/netpfil/pf/pfsync_defer.py b/tests/sys/netpfil/pf/pfsync_defer.py index c1d90d4483c4..0a258c8f27b3 100644 --- a/tests/sys/netpfil/pf/pfsync_defer.py +++ b/tests/sys/netpfil/pf/pfsync_defer.py @@ -119,13 +119,12 @@ def main(): if not got_ping: sys.exit(2) - if got_pfsync > got_ping: + # Deferred packets are delayed around 2.5s (unless the pfsync peer, which + # we don't have here, acks their state update earlier) + # Expect at least a second of delay, to be somewhat robust against + # scheduling-induced jitter. + if (sent_ping + 1) > got_ping: sys.exit(3) - # Deferred packets are delayed up to 20ms (unless the pfsync peer, which we - # don't have here, acks their state update earlier) - if (sent_ping + 0.020) > got_ping: - sys.exit(4) - if __name__ == '__main__': main()