mirror of
https://github.com/espressif/openthread.git
synced 2026-08-06 18:57:47 +00:00
[nexus] fix flakiness in Test 5.5.1 (#12460)
This commit fixes a flakiness issue in Nexus Test 5.5.1 where valid MLE Advertisements from the Leader were occasionally caught by the "must not send advertisements" check during reset. The issue was caused by using the ICMPv6 Echo Request as the start boundary for the "no advertisement" check. Since there is a small delay between the Echo Request and the actual Leader reset, the Leader might send a perfectly valid advertisement during this window. To fix this, the verification script now: 1. Captures the Echo Reply to ensure the network is responsive before the reset. 2. Uses the Echo Reply timestamp plus a 2.0-second buffer as the actual start time for the "no advertisement" check. 3. Filters advertisements in the reset range to only trigger if they occur after this buffered reset time. This approach robustly distinguishes between pre-reset and post-reset packet flows, even with timing jitter or pcap delivery delays.
This commit is contained in:
@@ -101,12 +101,18 @@ def verify(pv):
|
||||
p.ipv6.hlim == 255).\
|
||||
must_next()
|
||||
|
||||
pkts.filter_ping_request().\
|
||||
_pkt = pkts.filter_ping_request().\
|
||||
filter_wpan_src64(ROUTER_1).\
|
||||
filter_wpan_dst64(LEADER).\
|
||||
must_next()
|
||||
lstart = pkts.index
|
||||
|
||||
pkts.filter_ping_reply(identifier=_pkt.icmpv6.echo.identifier).\
|
||||
filter_wpan_src64(LEADER).\
|
||||
filter_wpan_dst64(ROUTER_1).\
|
||||
must_next()
|
||||
reset_time = pkts.last().sniff_timestamp + 2.0
|
||||
|
||||
# Step 3: Leader
|
||||
# - Description: Reset Leader.
|
||||
# - If DUT=Leader and testing is manual, this is a UI pop-up box interaction.
|
||||
@@ -144,6 +150,7 @@ def verify(pv):
|
||||
pkts.range(lstart, lend).\
|
||||
filter_wpan_src64(LEADER).\
|
||||
filter_mle_cmd(consts.MLE_ADVERTISEMENT).\
|
||||
filter(lambda p: p.sniff_timestamp > reset_time).\
|
||||
must_not_next()
|
||||
|
||||
# Step 5: Router_1
|
||||
|
||||
Reference in New Issue
Block a user