[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
@@ -212,7 +212,7 @@ class Cert_5_3_3_AddressQuery(thread_cert.TestCase):
NL_ML_EID_TLV,
NL_RLOC16_TLV,
NL_TARGET_EID_TLV
} == set(p.coap.tlv.type) and\
} <= set(p.coap.tlv.type) and\
p.thread_address.tlv.target_eid == ROUTER_3_MLEID and\
p.coap.code == COAP_CODE_POST
).\