Commit 6ec76365 authored by Samuel Groß's avatar Samuel Groß Committed by V8 LUCI CQ

Delete PartiallyReservedSandboxPageAllocation test

Page allocation in a partially-reserved sandbox is generally best-effort
once the reserved part is fully allocated, which happens in this test.
As such, there is no guarantee that this test succeeds, and it does seem
to fail in practice on some bots with memory sanitizers enabled. The
same logic is essentially tested by the
VirtualAddressSpaceTest.TestEmulatedSubspace test so simply deleting
this test should be fine.

Bug: v8:13040
Change-Id: I1469bd9d2e330a6e834bb565ce4e7f5985be28a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3749180Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81578}
parent 6c2a5cae
......@@ -101,7 +101,11 @@ TEST(SandboxTest, Contains) {
sandbox.TearDown();
}
void TestPageAllocationInSandbox(Sandbox& sandbox) {
TEST(SandboxTest, PageAllocation) {
base::VirtualAddressSpace root_vas;
Sandbox sandbox;
EXPECT_TRUE(sandbox.Initialize(&root_vas));
const size_t kAllocatinSizesInPages[] = {1, 1, 2, 3, 5, 8, 13, 21, 34};
constexpr int kNumAllocations = arraysize(kAllocatinSizesInPages);
......@@ -122,29 +126,6 @@ void TestPageAllocationInSandbox(Sandbox& sandbox) {
size_t length = allocation_granularity * kAllocatinSizesInPages[i];
vas->FreePages(allocations[i], length);
}
}
TEST(SandboxTest, PageAllocation) {
base::VirtualAddressSpace vas;
Sandbox sandbox;
EXPECT_TRUE(sandbox.Initialize(&vas));
TestPageAllocationInSandbox(sandbox);
sandbox.TearDown();
}
TEST(SandboxTest, PartiallyReservedSandboxPageAllocation) {
base::VirtualAddressSpace vas;
Sandbox sandbox;
size_t size = kSandboxSize;
// Only reserve two pages so the test will allocate memory inside and outside
// of the reserved region.
size_t reserved_size = 2 * vas.allocation_granularity();
EXPECT_TRUE(
sandbox.InitializeAsPartiallyReservedSandbox(&vas, size, reserved_size));
TestPageAllocationInSandbox(sandbox);
sandbox.TearDown();
}
......
......@@ -108,10 +108,6 @@
# Tests that need to run sequentially (e.g. due to memory consumption).
'MachineOperatorReducerTest.Word32EqualWithShiftedMaskedValueAndConstant': [PASS, HEAVY],
'SequentialUnmapperTest.UnmapOnTeardown': [PASS, HEAVY],
#https://crbug.com/v8/12638
# Test seems super flaky, disabling for now
'SandboxTest.PartiallyReservedSandboxPageAllocation':[SKIP],
}], # tsan == True
##############################################################################
......
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