Commit e9841805 authored by Wez's avatar Wez Committed by Commit Bot

Disable PartitionAllocReturnNullTest.* under Fuchsia, and remove filter.

Fuchsia does not support setrlimit(), which is required for these tests
to run under 64-bit systems.

Bug: 779645
Change-Id: Ia2c910d641656986c2a88d5d8992e6dcd347a498
Reviewed-on: https://chromium-review.googlesource.com/1006191
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: default avatarAlbert J. Wong <ajwong@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549724}
parent 9f2e46f5
...@@ -1260,53 +1260,44 @@ TEST_F(PartitionAllocTest, LostFreePagesBug) { ...@@ -1260,53 +1260,44 @@ TEST_F(PartitionAllocTest, LostFreePagesBug) {
EXPECT_TRUE(bucket->decommitted_pages_head); EXPECT_TRUE(bucket->decommitted_pages_head);
} }
#if !defined(ARCH_CPU_64_BITS) || defined(OS_POSIX)
// This is defined as a separate test class because MAYBE_RepeatedReturnNull
// test exhausts the process memory, and breaks any test in the same
// class that runs after it.
class PartitionAllocReturnNullTest : public PartitionAllocTest {};
// Unit tests that check if an allocation fails in "return null" mode, // Unit tests that check if an allocation fails in "return null" mode,
// repeating it doesn't crash, and still returns null. The tests need to // repeating it doesn't crash, and still returns null. The tests need to
// stress memory subsystem limits to do so, hence they try to allocate // stress memory subsystem limits to do so, hence they try to allocate
// 6 GB of memory, each with a different per-allocation block sizes. // 6 GB of memory, each with a different per-allocation block sizes.
// //
// On 64-bit POSIX systems, the address space is limited to 6 GB using // On 64-bit systems we need to restrict the address space to force allocation
// setrlimit() first. // failure, so these tests run only on POSIX systems that provide setrlimit(),
// and use it to limit address space to 6GB.
//
// Disable these tests on Android because, due to the allocation-heavy behavior,
// they tend to get OOM-killed rather than pass.
// TODO(https://crbug.com/779645): Fuchsia currently sets OS_POSIX, but does
// not provide a working setrlimit().
#if !defined(ARCH_CPU_64_BITS) || \
(defined(OS_POSIX) && \
!(defined(OS_FUCHSIA) || defined(OS_MACOSX) || defined(OS_ANDROID)))
// This is defined as a separate test class because RepeatedReturnNull
// test exhausts the process memory, and breaks any test in the same
// class that runs after it.
class PartitionAllocReturnNullTest : public PartitionAllocTest {};
// Test "return null" for larger, direct-mapped allocations first. As a // Test "return null" for larger, direct-mapped allocations first. As a
// direct-mapped allocation's pages are unmapped and freed on release, this // direct-mapped allocation's pages are unmapped and freed on release, this
// test is performd first for these "return null" tests in order to leave // test is performd first for these "return null" tests in order to leave
// sufficient unreserved virtual memory around for the later one(s). // sufficient unreserved virtual memory around for the later one(s).
TEST_F(PartitionAllocReturnNullTest, RepeatedReturnNullDirect) {
// Disable this test on Android because, due to its allocation-heavy behavior,
// it tends to get OOM-killed rather than pass.
#if defined(OS_MACOSX) || defined(OS_ANDROID) || defined(OS_FUCHSIA)
#define MAYBE_RepeatedReturnNullDirect DISABLED_RepeatedReturnNullDirect
#else
#define MAYBE_RepeatedReturnNullDirect RepeatedReturnNullDirect
#endif
TEST_F(PartitionAllocReturnNullTest, MAYBE_RepeatedReturnNullDirect) {
// A direct-mapped allocation size. // A direct-mapped allocation size.
DoReturnNullTest(32 * 1024 * 1024); DoReturnNullTest(32 * 1024 * 1024);
} }
// Test "return null" with a 512 kB block size. // Test "return null" with a 512 kB block size.
TEST_F(PartitionAllocReturnNullTest, RepeatedReturnNull) {
// Disable this test on Android because, due to its allocation-heavy behavior,
// it tends to get OOM-killed rather than pass.
#if defined(OS_MACOSX) || defined(OS_ANDROID)
#define MAYBE_RepeatedReturnNull DISABLED_RepeatedReturnNull
#else
#define MAYBE_RepeatedReturnNull RepeatedReturnNull
#endif
TEST_F(PartitionAllocReturnNullTest, MAYBE_RepeatedReturnNull) {
// A single-slot but non-direct-mapped allocation size. // A single-slot but non-direct-mapped allocation size.
DoReturnNullTest(512 * 1024); DoReturnNullTest(512 * 1024);
} }
#endif // !defined(ARCH_CPU_64_BITS) || (defined(OS_POSIX) &&
#endif // !defined(ARCH_CPU_64_BITS) || defined(OS_POSIX) // !(defined(OS_FUCHSIA) || defined(OS_MACOSX) || defined(OS_ANDROID)))
// Death tests misbehave on Android, http://crbug.com/643760. // Death tests misbehave on Android, http://crbug.com/643760.
#if defined(GTEST_HAS_DEATH_TEST) && !defined(OS_ANDROID) #if defined(GTEST_HAS_DEATH_TEST) && !defined(OS_ANDROID)
......
...@@ -63,10 +63,6 @@ ...@@ -63,10 +63,6 @@
-FieldTrialListTest.ClearParamsFromSharedMemory -FieldTrialListTest.ClearParamsFromSharedMemory
-FieldTrialListTest.TestCopyFieldTrialStateToFlags -FieldTrialListTest.TestCopyFieldTrialStateToFlags
# https://crbug.com/779645 - requires ability to set address-space limits.
-PartitionAllocTest.RepeatedReturnNull
-PartitionAllocTest.RepeatedReturnNullDirect
# Flaky, https://crbug.com/768436, https://crbug.com/792310. # Flaky, https://crbug.com/768436, https://crbug.com/792310.
-TaskSchedulerWorkerPoolBlockingTest.MaximumWorkersTest -TaskSchedulerWorkerPoolBlockingTest.MaximumWorkersTest
-TaskSchedulerWorkerPoolBlockingTest.MayBlockIncreaseCapacityNestedWillBlock -TaskSchedulerWorkerPoolBlockingTest.MayBlockIncreaseCapacityNestedWillBlock
......
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