[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:
Abtin Keshavarzian
2023-11-14 11:42:18 +01:00
committed by GitHub
parent f239c49d78
commit 6eb358f6e3
+1 -1
View File
@@ -3543,7 +3543,7 @@ void TestBorderRoutingProcessPlatfromGeneratedNd(void)
}
SuccessOrQuit(otBorderRoutingSetEnabled(sInstance, false));
VerifyOrQuit(sHeapAllocatedPtrs.GetLength() == heapAllocations);
VerifyOrQuit(sHeapAllocatedPtrs.GetLength() <= heapAllocations);
Log("End of TestBorderRoutingProcessPlatfromGeneratedNd");
}