From nobody Fri Oct 3 11:09:00 2025 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 4cdQs84qrYz69Vmv; Fri, 03 Oct 2025 11:09:00 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdQs844Xhz3MXR; Fri, 03 Oct 2025 11:09:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759489740; 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=j/U1XQ6MaszWJ/yfmHds/TMLldb2OUgrcIK3KZWRjuM=; b=iFYzVK588uf4NRkcQTRznIcSG3V04vm1K8KEgvxaH+iOwe3yGck0U6eVrZ2JGWM7EsWzg+ f5eoM0IovfdwU//GGD2KYRIFoaEIwtungK3Sbf45cgLPJ2q0d8bX8OYl1Cp3t0Ad/LAGxS BQTnuJqAGz04b9lOb6YOhIseQxlePRqUG9TGMZxq9hbw5rRRIyg6kGl3hSLe0dO6+Hv9Mn /xWll9oxPVHOX/zyFldWokXcf3wSp3twrvAJ6L4UcsGQqbNQVAt665NFr8kjQ0q7ECIaVk 95FiAYRm+TNcf+Xyx60JKoDr9xvIea5lcUoyBT+oE2R2iLtDEJb4QvfPWnG80g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759489740; 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=j/U1XQ6MaszWJ/yfmHds/TMLldb2OUgrcIK3KZWRjuM=; b=fmx81cDu2kgXLERd3RmIhdqQ/DsY02CwCI3hjlcBYhLyCvc2A6MGDU452X8LZSHA2tY2w7 j0U0zDrA6WbGyFC+r8UUvqLFA1pfKMonCfodAs9pTrc2U40mUgCCi5j7TcoTWmK6e/85Zy 3Os0cr2QA0GSS+9nhrz1B5yib+9NAc3gu/EKlrjTVUocyjO/1g0ug+Tud/BbQ72Fqsm7tj 0SXdCHvxpvjtcuJyP5K54Eou+q2IdkkbV3Y6o+on3DfrWDUzdwOzUd09uDIqO2tpJ8SJU2 5BRT6VUkZNaY6O2T4SJjfJNr/D41MFmil34E9U55in3rCdmKTXn0I4ymyh6UVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759489740; a=rsa-sha256; cv=none; b=kg+PZDlv55BYGn4ZK6lVPwtkowLhQAAp73sMiEkDyKncYWE6SVGOZFY4opjsEgwi1C61+F kXuv9kEDyY3cK4rpp8zGu/CPYAYqcUjbUV27BtI8V6t7TJG9WSOt00MprrZ1ImUt+O0SfM QR9ICymgTSgvRpROppTR3/B0l385MgCArCyD6S/AwW0RG14W/8yr92Yj+SEIiJsRnnwmx/ e8iRCkbrWFG5Nz17lozWZOjTKEReqWGnZxrtpZujx7769uBorWGZscMZQBisDnSwOSAm+Y R8pVCvCnDKckn/LysJ1lKBGZMVKmPcmO7k4H0aSQC2rhPL8DUudeCaeBR/74hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4cdQs83dKDzsSF; Fri, 03 Oct 2025 11:09:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593B90Y6006854; Fri, 3 Oct 2025 11:09:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593B90qg006851; Fri, 3 Oct 2025 11:09:00 GMT (envelope-from git) Date: Fri, 3 Oct 2025 11:09:00 GMT Message-Id: <202510031109.593B90qg006851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Cochard Subject: git: 01d5a6f30ce8 - main - tests/ipfw: Update regression tests to match new 32-bit size rule numbers 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olivier X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 01d5a6f30ce8f5006bd9d5528a487ef4d79c48c3 Auto-Submitted: auto-generated The branch main has been updated by olivier: URL: https://cgit.FreeBSD.org/src/commit/?id=01d5a6f30ce8f5006bd9d5528a487ef4d79c48c3 commit 01d5a6f30ce8f5006bd9d5528a487ef4d79c48c3 Author: Olivier Cochard AuthorDate: 2025-10-03 10:56:27 +0000 Commit: Olivier Cochard CommitDate: 2025-10-03 11:06:49 +0000 tests/ipfw: Update regression tests to match new 32-bit size rule numbers Commit 4a77657cbc01 increased the size of several opcodes to ipfw_insn_u32. Approved by: ae Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D52876 --- sbin/ipfw/tests/test_add_rule.py | 25 +++++++++++++------------ tests/atf_python/sys/netpfil/ipfw/insns.py | 19 +++++++++++-------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/sbin/ipfw/tests/test_add_rule.py b/sbin/ipfw/tests/test_add_rule.py index 60c8cebaceaa..c2c4bf0b360c 100755 --- a/sbin/ipfw/tests/test_add_rule.py +++ b/sbin/ipfw/tests/test_add_rule.py @@ -36,6 +36,7 @@ from atf_python.sys.netpfil.ipfw.insns import InsnProb from atf_python.sys.netpfil.ipfw.insns import InsnProto from atf_python.sys.netpfil.ipfw.insns import InsnReject from atf_python.sys.netpfil.ipfw.insns import InsnTable +from atf_python.sys.netpfil.ipfw.insns import InsnU32 from atf_python.sys.netpfil.ipfw.insns import IpFwOpcode from atf_python.sys.netpfil.ipfw.ioctl import CTlv from atf_python.sys.netpfil.ipfw.ioctl import CTlvRule @@ -152,8 +153,8 @@ class TestAddRule(BaseTest): NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=2, name="BBB"), ], "insns": [ - InsnTable(IpFwOpcode.O_IP_SRC_LOOKUP, arg1=1), - InsnTable(IpFwOpcode.O_IP_DST_LOOKUP, arg1=2), + InsnU32(IpFwOpcode.O_IP_SRC_LOOKUP, u32=1), + InsnU32(IpFwOpcode.O_IP_DST_LOOKUP, u32=2), InsnEmpty(IpFwOpcode.O_ACCEPT), ], }, @@ -182,7 +183,7 @@ class TestAddRule(BaseTest): ], "insns": [ InsnIp(IpFwOpcode.O_IP_DST, ip="1.2.3.4"), - Insn(IpFwOpcode.O_EXTERNAL_ACTION, arg1=1), + InsnU32(IpFwOpcode.O_EXTERNAL_ACTION, u32=1), Insn(IpFwOpcode.O_EXTERNAL_DATA, arg1=123), ], }, @@ -199,8 +200,8 @@ class TestAddRule(BaseTest): ], "insns": [ InsnIp(IpFwOpcode.O_IP_DST, ip="1.2.3.4"), - Insn(IpFwOpcode.O_EXTERNAL_ACTION, arg1=1), - Insn(IpFwOpcode.O_EXTERNAL_INSTANCE, arg1=2), + InsnU32(IpFwOpcode.O_EXTERNAL_ACTION, u32=1), + InsnU32(IpFwOpcode.O_EXTERNAL_INSTANCE, u32=2), ], }, }, @@ -227,7 +228,7 @@ class TestAddRule(BaseTest): ], "insns": [ InsnComment(comment="test comment"), - Insn(IpFwOpcode.O_CHECK_STATE, arg1=1), + InsnU32(IpFwOpcode.O_CHECK_STATE, u32=1), ], }, }, @@ -241,9 +242,9 @@ class TestAddRule(BaseTest): NTlv(IpFwTlvType.IPFW_TLV_STATE_NAME, idx=1, name="OUT"), ], "insns": [ - Insn(IpFwOpcode.O_PROBE_STATE, arg1=1), + InsnU32(IpFwOpcode.O_PROBE_STATE, u32=1), Insn(IpFwOpcode.O_PROTO, arg1=6), - Insn(IpFwOpcode.O_KEEP_STATE, arg1=1), + InsnU32(IpFwOpcode.O_KEEP_STATE, u32=1), InsnEmpty(IpFwOpcode.O_ACCEPT), ], }, @@ -259,7 +260,7 @@ class TestAddRule(BaseTest): ], "insns": [ Insn(IpFwOpcode.O_PROTO, arg1=6), - Insn(IpFwOpcode.O_KEEP_STATE, arg1=1), + InsnU32(IpFwOpcode.O_KEEP_STATE, u32=1), InsnEmpty(IpFwOpcode.O_ACCEPT), ], }, @@ -370,7 +371,7 @@ class TestAddRule(BaseTest): ), pytest.param(("pipe 42", Insn(IpFwOpcode.O_PIPE, arg1=42)), id="pipe_42"), pytest.param( - ("skipto 42", Insn(IpFwOpcode.O_SKIPTO, arg1=42)), id="skipto_42" + ("skipto 42", InsnU32(IpFwOpcode.O_SKIPTO, u32=42)), id="skipto_42" ), pytest.param( ("netgraph 42", Insn(IpFwOpcode.O_NETGRAPH, arg1=42)), id="netgraph_42" @@ -386,7 +387,7 @@ class TestAddRule(BaseTest): ), pytest.param(("tee 42", Insn(IpFwOpcode.O_TEE, arg1=42)), id="tee_42"), pytest.param( - ("call 420", Insn(IpFwOpcode.O_CALLRETURN, arg1=420)), id="call_420" + ("call 420", InsnU32(IpFwOpcode.O_CALLRETURN, u32=420)), id="call_420" ), # TOK_FORWARD pytest.param( @@ -400,7 +401,7 @@ class TestAddRule(BaseTest): ), pytest.param(("reass", InsnEmpty(IpFwOpcode.O_REASS)), id="reass"), pytest.param( - ("return", InsnEmpty(IpFwOpcode.O_CALLRETURN, is_not=True)), id="return" + ("return", InsnU32(IpFwOpcode.O_CALLRETURN, is_not=True)), id="return" ), ], ) diff --git a/tests/atf_python/sys/netpfil/ipfw/insns.py b/tests/atf_python/sys/netpfil/ipfw/insns.py index 12f145f49393..f8a56de901ae 100644 --- a/tests/atf_python/sys/netpfil/ipfw/insns.py +++ b/tests/atf_python/sys/netpfil/ipfw/insns.py @@ -510,7 +510,7 @@ class InsnIp6(Insn): insn_attrs = prepare_attrs_map( [ - AttrDescr(IpFwOpcode.O_CHECK_STATE, Insn), + AttrDescr(IpFwOpcode.O_CHECK_STATE, InsnU32), AttrDescr(IpFwOpcode.O_ACCEPT, InsnEmpty), AttrDescr(IpFwOpcode.O_COUNT, InsnEmpty), @@ -521,16 +521,19 @@ insn_attrs = prepare_attrs_map( AttrDescr(IpFwOpcode.O_COUNT, InsnEmpty), AttrDescr(IpFwOpcode.O_QUEUE, Insn), AttrDescr(IpFwOpcode.O_PIPE, Insn), - AttrDescr(IpFwOpcode.O_SKIPTO, Insn), + AttrDescr(IpFwOpcode.O_SKIPTO, InsnU32), AttrDescr(IpFwOpcode.O_NETGRAPH, Insn), AttrDescr(IpFwOpcode.O_NGTEE, Insn), AttrDescr(IpFwOpcode.O_DIVERT, Insn), AttrDescr(IpFwOpcode.O_TEE, Insn), - AttrDescr(IpFwOpcode.O_CALLRETURN, Insn), + AttrDescr(IpFwOpcode.O_CALLRETURN, InsnU32), AttrDescr(IpFwOpcode.O_SETFIB, Insn), AttrDescr(IpFwOpcode.O_SETDSCP, Insn), AttrDescr(IpFwOpcode.O_REASS, InsnEmpty), - AttrDescr(IpFwOpcode.O_SETMARK, Insn), + AttrDescr(IpFwOpcode.O_SETMARK, InsnU32), + + AttrDescr(IpFwOpcode.O_EXTERNAL_ACTION, InsnU32), + AttrDescr(IpFwOpcode.O_EXTERNAL_INSTANCE, InsnU32), @@ -545,11 +548,11 @@ insn_attrs = prepare_attrs_map( AttrDescr(IpFwOpcode.O_IP_DST, InsnIp), AttrDescr(IpFwOpcode.O_IP6_DST, InsnIp6), AttrDescr(IpFwOpcode.O_IP6_SRC, InsnIp6), - AttrDescr(IpFwOpcode.O_IP_SRC_LOOKUP, InsnTable), - AttrDescr(IpFwOpcode.O_IP_DST_LOOKUP, InsnTable), + AttrDescr(IpFwOpcode.O_IP_SRC_LOOKUP, InsnU32), + AttrDescr(IpFwOpcode.O_IP_DST_LOOKUP, InsnU32), AttrDescr(IpFwOpcode.O_IP_SRCPORT, InsnPorts), AttrDescr(IpFwOpcode.O_IP_DSTPORT, InsnPorts), - AttrDescr(IpFwOpcode.O_PROBE_STATE, Insn), - AttrDescr(IpFwOpcode.O_KEEP_STATE, Insn), + AttrDescr(IpFwOpcode.O_PROBE_STATE, InsnU32), + AttrDescr(IpFwOpcode.O_KEEP_STATE, InsnU32), ] )