mirror of
https://github.com/espressif/openthread.git
synced 2026-08-17 07:59:51 +00:00
[thread-cert] enhance case 5.6.6 for potential SED packet out-of-order (#5597)
This commit is contained in:
@@ -162,7 +162,9 @@ class Cert_5_6_6_NetworkDataExpiration(thread_cert.TestCase):
|
||||
|
||||
# Step 5: The DUT MUST send a multicast MLE Data Response with
|
||||
# the new network information collected from Router_1
|
||||
_lpkts.filter_mle_cmd(MLE_DATA_RESPONSE).must_next().must_verify(
|
||||
_lpkts_med = _lpkts.copy()
|
||||
_lpkts_sed = _lpkts.copy()
|
||||
_lpkts.filter_LLANMA().filter_mle_cmd(MLE_DATA_RESPONSE).must_next().must_verify(
|
||||
lambda p: {
|
||||
NWD_SERVICE_TLV, NWD_PREFIX_TLV, NWD_BORDER_ROUTER_TLV, NWD_6LOWPAN_ID_TLV, NWD_PREFIX_TLV,
|
||||
NWD_BORDER_ROUTER_TLV, NWD_6LOWPAN_ID_TLV, NWD_PREFIX_TLV, NWD_BORDER_ROUTER_TLV, NWD_6LOWPAN_ID_TLV
|
||||
@@ -170,8 +172,6 @@ class Cert_5_6_6_NetworkDataExpiration(thread_cert.TestCase):
|
||||
Ipv6Addr('2001:2:0:1::'), Ipv6Addr('2001:2:0:2::'),
|
||||
Ipv6Addr('2001:2:0:3::')
|
||||
} == set(p.thread_nwd.tlv.prefix) and p.thread_nwd.tlv.stable == [0, 1, 1, 1, 0, 0, 0, 1, 1, 1])
|
||||
_lpkts_med = _lpkts.copy()
|
||||
_lpkts_sed = _lpkts.copy()
|
||||
|
||||
# Step 7: The DUT MUST send a unicast MLE Child Update Response to MED_1
|
||||
_lpkts_med.filter_wpan_dst64(MED).filter_mle_cmd(MLE_CHILD_UPDATE_RESPONSE).must_next().must_verify(
|
||||
@@ -196,31 +196,30 @@ class Cert_5_6_6_NetworkDataExpiration(thread_cert.TestCase):
|
||||
# from Network Data TLV after Router_1 power off
|
||||
# Step 13: The DUT MUST multicast a MLE Data Response with the
|
||||
# new network information
|
||||
_lpkts.filter_mle_cmd(MLE_DATA_RESPONSE).filter_ipv6_dst(LINK_LOCAL_ALL_NODES_MULTICAST_ADDRESS).must_next(
|
||||
).must_verify(
|
||||
_lpkts.filter_LLANMA().filter_mle_cmd(MLE_DATA_RESPONSE).filter_ipv6_dst(
|
||||
LINK_LOCAL_ALL_NODES_MULTICAST_ADDRESS
|
||||
).must_next().must_verify(
|
||||
lambda p: {
|
||||
NWD_SERVICE_TLV, NWD_PREFIX_TLV, NWD_BORDER_ROUTER_TLV, NWD_6LOWPAN_ID_TLV, NWD_PREFIX_TLV,
|
||||
NWD_BORDER_ROUTER_TLV, NWD_6LOWPAN_ID_TLV, NWD_PREFIX_TLV, NWD_BORDER_ROUTER_TLV, NWD_6LOWPAN_ID_TLV
|
||||
} == set(p.thread_nwd.tlv.type) and
|
||||
{Ipv6Addr('2001:2:0:1::'), Ipv6Addr('2001:2:0:2::'),
|
||||
Ipv6Addr('2001:2:0:3::')} == set(p.thread_nwd.tlv.prefix) and p.mle.tlv.leader_data.data_version == _pkt.
|
||||
mle.tlv.leader_data.data_version + 1 and p.mle.tlv.leader_data.stable_data_version == _pkt.mle.tlv.
|
||||
leader_data.stable_data_version + 1)
|
||||
|
||||
_lpkts_med = _lpkts.copy()
|
||||
_lpkts_sed = _lpkts.copy()
|
||||
Ipv6Addr('2001:2:0:3::')} == set(p.thread_nwd.tlv.prefix) and p.mle.tlv.leader_data.data_version ==
|
||||
(_pkt.mle.tlv.leader_data.data_version + 1) % 256 and p.mle.tlv.leader_data.stable_data_version ==
|
||||
(_pkt.mle.tlv.leader_data.stable_data_version + 1) % 256)
|
||||
|
||||
# Step 15: The DUT MUST send a unicast MLE Child Update Response to MED_1
|
||||
_lpkts_med.filter_mle_cmd(MLE_CHILD_UPDATE_RESPONSE).filter_wpan_dst64(MED).must_next().must_verify(
|
||||
lambda p: {SOURCE_ADDRESS_TLV, MODE_TLV, LEADER_DATA_TLV, ADDRESS_REGISTRATION_TLV} < set(
|
||||
p.mle.tlv.type) and p.mle.tlv.leader_data.data_version == _pkt.mle.tlv.leader_data.data_version + 1 and
|
||||
p.mle.tlv.leader_data.stable_data_version == _pkt.mle.tlv.leader_data.stable_data_version + 1)
|
||||
lambda p: {SOURCE_ADDRESS_TLV, MODE_TLV, LEADER_DATA_TLV, ADDRESS_REGISTRATION_TLV} < set(p.mle.tlv.type)
|
||||
and p.mle.tlv.leader_data.data_version == (_pkt.mle.tlv.leader_data.data_version + 1) % 256 and p.mle.tlv.
|
||||
leader_data.stable_data_version == (_pkt.mle.tlv.leader_data.stable_data_version + 1) % 256)
|
||||
|
||||
# Step 16: The DUT MUST send a unicast MLE Child Update Request to SED_1
|
||||
_lpkts_sed.filter_mle_cmd(MLE_CHILD_UPDATE_REQUEST).filter_wpan_dst64(SED).must_next().must_verify(
|
||||
lambda p: {SOURCE_ADDRESS_TLV, LEADER_DATA_TLV, NETWORK_DATA_TLV, ACTIVE_TIMESTAMP_TLV} == set(
|
||||
p.mle.tlv.type) and p.mle.tlv.leader_data.data_version == _pkt.mle.tlv.leader_data.data_version + 1 and
|
||||
p.mle.tlv.leader_data.stable_data_version == _pkt.mle.tlv.leader_data.stable_data_version + 1)
|
||||
p.mle.tlv.type) and p.mle.tlv.leader_data.data_version ==
|
||||
(_pkt.mle.tlv.leader_data.data_version + 1) % 256 and p.mle.tlv.leader_data.stable_data_version ==
|
||||
(_pkt.mle.tlv.leader_data.stable_data_version + 1) % 256)
|
||||
|
||||
# Step 18: The DUT MUST send a unicast MLE Child Update Response to SED_1
|
||||
_lpkts_sed.filter_mle_cmd(MLE_CHILD_UPDATE_RESPONSE).filter_wpan_dst64(SED).must_next().must_verify(
|
||||
|
||||
Reference in New Issue
Block a user