Commit e010651f authored by Benoît Lizé's avatar Benoît Lizé Committed by Commit Bot

blink/wtf: Make PartitionAlloc decommit test less strict.

This test fails on CFI bots, see attached bug. This is due to it being too
strict. It would be correct if there are no PA allocations triggered elsewhere
in the process, which is an assumption that can break with test harness changes.

Make the assert more tolerant to these changes, by asserting that memory is
reduced, instead of having a strict value.

Bug: 993219
Change-Id: I1e5e3b1f7e1f14357171a06a31a2eba9380babfe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1751183Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Benoit L <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#686357}
parent cc08259d
...@@ -49,7 +49,7 @@ TEST_F(PartitionsTest, Decommit) { ...@@ -49,7 +49,7 @@ TEST_F(PartitionsTest, Decommit) {
EXPECT_GT(committed_after, committed_before); EXPECT_GT(committed_after, committed_before);
// Decommit works. // Decommit works.
base::PartitionAllocMemoryReclaimer::Instance()->Reclaim(); base::PartitionAllocMemoryReclaimer::Instance()->Reclaim();
EXPECT_EQ(committed_before, Partitions::TotalSizeOfCommittedPages()); EXPECT_LT(Partitions::TotalSizeOfCommittedPages(), committed_after);
} }
#endif // !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) #endif // !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment