mirror of
https://github.com/espressif/openthread.git
synced 2026-08-30 22:09:54 +00:00
[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:
@@ -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
|
||||
).\
|
||||
|
||||
Reference in New Issue
Block a user