mirror of
https://github.com/espressif/openthread.git
synced 2026-10-09 17:27:41 +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:
@@ -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).\
|
||||
|
||||
Reference in New Issue
Block a user