summaryrefslogtreecommitdiff
path: root/tests/atf_python
diff options
context:
space:
mode:
authorAlexander V. Chernikov <melifaro@FreeBSD.org>2023-06-15 06:36:16 +0000
committerAlexander V. Chernikov <melifaro@FreeBSD.org>2023-06-15 06:36:16 +0000
commit84b41342da1ff3b9cf4eb785752201575c5e4391 (patch)
treec3309c4f3503799e8020d37644e53c4f0fc5dd98 /tests/atf_python
parent32b28e3ae28f4d48520ada6ca703b508da8761a7 (diff)
ipfw: add eaction tests
MFC after: 2 weeks
Diffstat (limited to 'tests/atf_python')
-rw-r--r--tests/atf_python/sys/netpfil/ipfw/ioctl.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/atf_python/sys/netpfil/ipfw/ioctl.py b/tests/atf_python/sys/netpfil/ipfw/ioctl.py
index 45ba96a7fb70..4c6d3f234c6c 100644
--- a/tests/atf_python/sys/netpfil/ipfw/ioctl.py
+++ b/tests/atf_python/sys/netpfil/ipfw/ioctl.py
@@ -90,6 +90,11 @@ class BaseTlv(object):
for obj in self.obj_list:
obj.print_obj(prepend)
+ def print_obj_hex(self, prepend=""):
+ print(prepend)
+ print()
+ print(" ".join(["x{:02X}".format(b) for b in bytes(self)]))
+
@classmethod
def _validate(cls, data):
if len(data) < sizeof(IpFwObjTlv):
@@ -487,6 +492,7 @@ rule_attrs = prepare_attrs_map(
[
AttrDescr(IpFwTlvType.IPFW_TLV_TBL_NAME, NTlv),
AttrDescr(IpFwTlvType.IPFW_TLV_STATE_NAME, NTlv),
+ AttrDescr(IpFwTlvType.IPFW_TLV_EACTION, NTlv),
],
True,
),