mirror of
https://github.com/espressif/openthread.git
synced 2026-06-06 05:24:51 +00:00
[nexus] improve robustness of test 9.2.6 verification (#12575)
This commit addresses an intermittent failure in Nexus test 9.2.6 where Step 18 (MGMT_PENDING_SET.req) was occasionally not found. The failure occurred because the verification script started searching for the MGMT_PENDING_SET.req packet from index12. In the simulated Nexus environment, packet capture order from different nodes can occasionally vary slightly when events occur at nearly the same simulation time. The fix expands the search range by starting from index9 (the Leader's initial update), ensuring that the MGMT_PENDING_SET.req packet is correctly identified regardless of minor capture order variations. Since the URI is unique to this part of the test, this remains a precise filter. Additionally, this change ensures the global packet index moves forward correctly by taking the maximum of all relevant child filter indices.
This commit is contained in:
@@ -396,7 +396,7 @@ def verify(pv):
|
||||
} <= set(p.mle.tlv.type)).\
|
||||
must_next()
|
||||
|
||||
pkts.index = max(med_pkts.index, sed_pkts.index)
|
||||
pkts.index = max(pkts.index, med_pkts.index, sed_pkts.index)
|
||||
|
||||
# Step 18: Commissioner
|
||||
# - Description: Harness instructs Commissioner to send MGMT_PENDING_SET.req to the Leader Anycast or Routing
|
||||
@@ -408,7 +408,8 @@ def verify(pv):
|
||||
print("Step 18: Commissioner sends MGMT_PENDING_SET.req")
|
||||
# Commissioner sends MGMT_PENDING_SET.req after Step 12.
|
||||
# It might overlap with MED/SED updates (Steps 13-17).
|
||||
pkts_step18 = pv.pkts.range(index12)
|
||||
# We search from index9 to be robust.
|
||||
pkts_step18 = pkts.range(index9)
|
||||
pkts_step18.filter_coap_request(consts.MGMT_PENDING_SET_URI).\
|
||||
filter(lambda p: p.coap.tlv.type is not nullField and\
|
||||
{
|
||||
@@ -646,7 +647,7 @@ def verify(pv):
|
||||
} <= set(p.mle.tlv.type)).\
|
||||
must_next()
|
||||
|
||||
pkts.index = max(med_pkts.index, sed_pkts.index)
|
||||
pkts.index = max(pkts.index, med_pkts.index, sed_pkts.index)
|
||||
|
||||
# Step 29: Harness
|
||||
# - Description: Wait for delay timer to expire.
|
||||
|
||||
Reference in New Issue
Block a user