From 95780fd03f104facc4e00b263f1ae024d98acc99 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Mon, 16 Feb 2026 16:57:37 -0600 Subject: [PATCH] [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. --- tests/nexus/verify_5_5_1.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/nexus/verify_5_5_1.py b/tests/nexus/verify_5_5_1.py index fdad1b896..da21c0be2 100644 --- a/tests/nexus/verify_5_5_1.py +++ b/tests/nexus/verify_5_5_1.py @@ -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