mirror of
https://github.com/espressif/openthread.git
synced 2026-08-13 22:27:47 +00:00
[nexus] fix flakiness in test 5.5.4.1 (#12455)
This commit addresses the occasional failure of Nexus test 5.5.4.1 by increasing the merge wait time and improving the robustness of the packet verification script. Summary of changes: - In test_5_5_4_1.cpp, increased kMergeWaitTime from 200s to 300s. This provides sufficient time for all nodes to synchronize their Mesh-Local Prefix and update their routing tables after the network partitions merge. - In verify_5_5_4_1.py, updated Step 6 verification to filter ICMPv6 Echo Request and Reply packets by their specific identifier (0xabcd). This ensures that the verifier correctly identifies the packets from the intended test step and avoids matching stale or transient packets from earlier parts of the test.
This commit is contained in:
@@ -57,7 +57,7 @@ static constexpr uint32_t kResetTime = 300 * 1000;
|
||||
/**
|
||||
* Time to wait for network merge.
|
||||
*/
|
||||
static constexpr uint32_t kMergeWaitTime = 200 * 1000;
|
||||
static constexpr uint32_t kMergeWaitTime = 300 * 1000;
|
||||
|
||||
/**
|
||||
* The identifier used for Echo Request.
|
||||
|
||||
@@ -37,6 +37,10 @@ sys.path.append(CUR_DIR)
|
||||
import verify_utils
|
||||
from pktverify import consts
|
||||
|
||||
ECHO_IDENTIFIER = 0xabcd
|
||||
STEP_3_START_IDENTIFIER = 0x5303
|
||||
STEP_3_END_IDENTIFIER = 0x5304
|
||||
|
||||
|
||||
def verify(pv):
|
||||
# 5.5.4 Split and Merge with Routers
|
||||
@@ -90,15 +94,16 @@ def verify(pv):
|
||||
# - Description: Reset the DUT for 300 seconds (longer than NETWORK_ID_TIMEOUT default value of 120 seconds).
|
||||
# - Pass Criteria: The DUT MUST stop sending MLE advertisements,.
|
||||
print("Step 3: Leader (DUT)")
|
||||
|
||||
# Find the markers for the reset period.
|
||||
markers = pv.pkts.copy()
|
||||
markers.filter_ping_request().\
|
||||
filter(lambda p: p.icmpv6.echo.identifier == 0x5303).\
|
||||
filter(lambda p: p.icmpv6.echo.identifier == STEP_3_START_IDENTIFIER).\
|
||||
must_next()
|
||||
start_index = markers.index
|
||||
|
||||
markers.filter_ping_request().\
|
||||
filter(lambda p: p.icmpv6.echo.identifier == 0x5304).\
|
||||
filter(lambda p: p.icmpv6.echo.identifier == STEP_3_END_IDENTIFIER).\
|
||||
must_next()
|
||||
stop_index = markers.index
|
||||
|
||||
@@ -124,13 +129,16 @@ def verify(pv):
|
||||
# - Description: Harness instructs device to send an ICMPv6 Echo Request to Router_4.
|
||||
# - Pass Criteria: Router_4 MUST send an ICMPv6 Echo Reply to Router_3.
|
||||
print("Step 6: Router_3")
|
||||
|
||||
pkts.filter_ping_request().\
|
||||
filter_ipv6_src(ROUTER_3_MLEID).\
|
||||
filter_ipv6_dst(ROUTER_4_MLEID).\
|
||||
filter(lambda p: p.icmpv6.echo.identifier == ECHO_IDENTIFIER).\
|
||||
must_next()
|
||||
pkts.filter_ping_reply().\
|
||||
filter_ipv6_src(ROUTER_4_MLEID).\
|
||||
filter_ipv6_dst(ROUTER_3_MLEID).\
|
||||
filter(lambda p: p.icmpv6.echo.identifier == ECHO_IDENTIFIER).\
|
||||
must_next()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user