[thread-cert] relax TLV type checks in pktverify (#10627)

This commit modifies thread-cert scripts utilizing `pktverify` to
adopt a more flexible approach to TLV type checking. Specifically, it
replaces strict equality (`==`) or strict subset (`<`) checks with a
subset or equal check (`<=`) when verifying the presence of TLVs in a
message. This adjustment ensures that test scripts adhere to the
principle of ignoring extra or unknown TLVs, thereby future-proofing
them against potential protocol updates that might introduce new
TLVs.
This commit is contained in:
Abtin Keshavarzian
2024-08-27 08:18:45 -07:00
committed by GitHub
parent abb6934cdd
commit 8f2ddf93c3
63 changed files with 205 additions and 205 deletions
@@ -302,7 +302,7 @@ class Cert_5_2_5_AddressQuery(thread_cert.TestCase):
NL_TARGET_EID_TLV,
NL_RLOC16_TLV,
NL_ML_EID_TLV
} == set(p.thread_address.tlv.type)
} <= set(p.thread_address.tlv.type)
).\
must_next()
pkts.filter_ipv6_src_dst(REED_MLEID, MED_MLEID).\
@@ -330,7 +330,7 @@ class Cert_5_2_5_AddressQuery(thread_cert.TestCase):
NL_TARGET_EID_TLV,
NL_RLOC16_TLV,
NL_ML_EID_TLV
} == set(p.thread_address.tlv.type)
} <= set(p.thread_address.tlv.type)
).\
must_next()
pkts.filter_ipv6_src_dst(REED2001, MED2001).\
@@ -358,7 +358,7 @@ class Cert_5_2_5_AddressQuery(thread_cert.TestCase):
NL_TARGET_EID_TLV,
NL_RLOC16_TLV,
NL_ML_EID_TLV
} == set(p.thread_address.tlv.type)
} <= set(p.thread_address.tlv.type)
).\
must_next()
pkts.filter_ipv6_src_dst(REED2002, MED2002).\