mirror of
https://github.com/espressif/openthread.git
synced 2026-09-02 15:20:07 +00:00
[test] address occasional failure of test_routing_manager (#9603)
This commit addresses occasional failures in `test_routing_manager` in the `TestBorderRoutingProcessPlatfromGeneratedNd` case. Unlike other tests, this test sets the `heapAllocations` after the call `InitTest (/* aEnableBorderRouting */ true)` (which enables `RoutingManager`). This means that depending on the random timing, the `heapAllocations` may already count some allocated heap items by `RoutingManager` itself. With the change in this commit, at the end of the test, we check that the number of remaining heap allocations is less than `heapAllocations`.
This commit is contained in:
@@ -3543,7 +3543,7 @@ void TestBorderRoutingProcessPlatfromGeneratedNd(void)
|
||||
}
|
||||
|
||||
SuccessOrQuit(otBorderRoutingSetEnabled(sInstance, false));
|
||||
VerifyOrQuit(sHeapAllocatedPtrs.GetLength() == heapAllocations);
|
||||
VerifyOrQuit(sHeapAllocatedPtrs.GetLength() <= heapAllocations);
|
||||
|
||||
Log("End of TestBorderRoutingProcessPlatfromGeneratedNd");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user