[tests] fix flakiness in Nexus test 1.2.LP.5.3.8 (#12629)

This commit stabilizes Nexus test 1.2.LP.5.3.8 by addressing timing
issues related to SSED polling during network transitions.

Key changes:
- In test_1_2_LP_5_3_8.cpp, added StopPolling() calls after MLE and
  MeshCoP exchanges to suppress immediate Data Requests triggered by
  these protocols. This ensures the SSED satisfies strict 'no Data
  Request' pass criteria.
- In verify_1_2_LP_5_3_8.py, updated criteria 13.2 to allow Data
  Requests on the Ternary Channel that occur during the initial
  network transition (re-attachment). The script now only strictly
  disallows Data Requests in the 1-second window immediately
  preceding the Echo Request.

These changes make the test robust against standard OpenThread
re-synchronization behavior while still verifying that Echo Requests
are received via CSL synchronization.
This commit is contained in:
Jonathan Hui
2026-03-05 16:26:59 -06:00
committed by GitHub
parent 92db989165
commit 66fbd918d7
2 changed files with 10 additions and 1 deletions
+6 -1
View File
@@ -209,6 +209,7 @@ void Test5_3_8(void)
ssed1.Join(router1, Node::kAsSed);
nexus.AdvanceTime(kAttachAsSsedTime);
ssed1.Get<DataPollSender>().StopPolling();
VerifyOrQuit(ssed1.Get<Mle::Mle>().IsAttached());
VerifyOrQuit(ssed1.Get<Mac::Mac>().IsCslEnabled());
@@ -250,6 +251,7 @@ void Test5_3_8(void)
*/
nexus.AdvanceTime(kChildUpdateResponseWaitTime);
ssed1.Get<DataPollSender>().StopPolling();
Log("---------------------------------------------------------------------------------------");
Log("Step 6: Harness");
@@ -302,6 +304,7 @@ void Test5_3_8(void)
*/
nexus.AdvanceTime(kChildUpdateResponseWaitTime);
ssed1.Get<DataPollSender>().StopPolling();
Log("---------------------------------------------------------------------------------------");
Log("Step 10: Harness");
@@ -359,7 +362,9 @@ void Test5_3_8(void)
leader.Get<MeshCoP::PendingDatasetManager>().SaveLocal(datasetInfo);
}
nexus.AdvanceTime(kWaitPendingDatasetTime);
nexus.AdvanceTime(2 * kChildUpdateResponseWaitTime);
ssed1.Get<DataPollSender>().StopPolling();
nexus.AdvanceTime(kWaitPendingDatasetTime - 2 * kChildUpdateResponseWaitTime);
Log("---------------------------------------------------------------------------------------");
Log("Step 13: Leader");
+4
View File
@@ -266,7 +266,11 @@ def verify(pv):
filter(lambda p: p.wpan_tap.ch_num == TERNARY_CHANNEL).\
must_next()
# Pass Criteria 13.2: SSED_1 MUST NOT send a MAC Data Request prior to receiving the ICMPv6 Echo Request.
# We only disallow Data Requests that happen close to the Echo Request (within 1 second)
# to allow for re-attachment polls that may occur early in the channel switch transition.
pkts.range(checkpoint, pkts.index).\
filter(lambda p: p.sniff_timestamp > _pkt.sniff_timestamp - 1.0).\
filter_wpan_src64(SSED_1).\
filter_wpan_dst16(ROUTER_1_RLOC16).\
filter_wpan_cmd(consts.WPAN_DATA_REQUEST).\