mirror of
https://github.com/espressif/openthread.git
synced 2026-06-05 21:14:49 +00:00
[nexus] fix race condition in test 1.1.7.1.4 verification (#12620)
The packet verification script for Nexus test 1.1.7.1.4 failed sporadically because Step 5 (ROUTER_1 multicast MLE Data Response) was being searched starting from the cursor position after Step 4 (Leader's MLE Data Response and CoAP ACK). Depending on the timing/non-determinism from entropy, ROUTER_1's response could arrive before the Leader's packets, causing it to be skipped when searching from the Step 4 cursor. This change saves the cursor position after Step 3 and uses it as the starting point for the Step 5 search, ensuring the packet is found regardless of its order relative to the Step 4 packets.
This commit is contained in:
@@ -118,6 +118,11 @@ def verify(pv):
|
||||
filter(lambda p: consts.NL_THREAD_NETWORK_DATA_TLV in p.coap.tlv.type).\
|
||||
must_next()
|
||||
|
||||
# Save the cursor after Step 3 to search from here in Step 5.
|
||||
# ROUTER_1's multicast MLE Data Response (Step 5) can arrive before or after
|
||||
# the Leader's MLE Data Response or CoAP ACK (Step 4).
|
||||
pkts_after_step3 = pkts.copy()
|
||||
|
||||
# Step 4: Leader
|
||||
# - Description: Automatically transmits a 2.04 Changed CoAP response to the DUT. Automatically multicasts a MLE
|
||||
# Data Response, including the new information collected from the DUT.
|
||||
@@ -149,7 +154,7 @@ def verify(pv):
|
||||
# - 6LowPAN ID TLV
|
||||
# - Border Router TLV
|
||||
print("Step 5: Router_1 (DUT)")
|
||||
pkts.copy().\
|
||||
pkts_after_step3.\
|
||||
filter_wpan_src64(ROUTER_1).\
|
||||
filter_LLANMA().\
|
||||
filter_mle_cmd(consts.MLE_DATA_RESPONSE).\
|
||||
|
||||
Reference in New Issue
Block a user