Commit f2acdc93 authored by Yuki Shiino's avatar Yuki Shiino Committed by Commit Bot

base/allocator: Disable cronet BufferTest when USE_PARTITION_ALLOC_AS_MALLOC

Disables an unittest that tests OOM allocation behaviors when
USE_PARTITION_ALLOC_AS_MALLOC because PartitionAlloc-based
malloc() does not return nullptr and crash instead.

Bug: 998048
Change-Id: I8173667512c9041fb68a4cb441ddf11766f2dbdf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2374925Reviewed-by: default avatarBenoit L <lizeb@chromium.org>
Reviewed-by: default avatarPaul Jensen <pauljensen@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803153}
parent 331bc511
...@@ -31,6 +31,7 @@ source_set("cronet_native_tests") { ...@@ -31,6 +31,7 @@ source_set("cronet_native_tests") {
deps = [ deps = [
":cronet_native_testutil", ":cronet_native_testutil",
"//base", "//base",
"//base/allocator:buildflags",
"//base/test:test_support", "//base/test:test_support",
"//components/cronet/native:cronet_native_headers", "//components/cronet/native:cronet_native_headers",
"//components/cronet/test:test_support", "//components/cronet/test:test_support",
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <limits> #include <limits>
#include "base/allocator/buildflags.h"
#include "base/check.h" #include "base/check.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/run_loop.h" #include "base/run_loop.h"
...@@ -74,10 +75,11 @@ TEST_F(BufferTest, TestInitWithAlloc) { ...@@ -74,10 +75,11 @@ TEST_F(BufferTest, TestInitWithAlloc) {
} }
#if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \ #if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \
defined(THREAD_SANITIZER) || defined(OS_FUCHSIA) defined(THREAD_SANITIZER) || defined(OS_FUCHSIA) || \
BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
// ASAN and MSAN malloc by default triggers crash instead of returning null on // ASAN and MSAN malloc by default triggers crash instead of returning null on
// failure. Fuchsia malloc() also crashes on allocation failure in some kernel // failure. Fuchsia malloc() also crashes on allocation failure in some kernel
// builds. // builds. PartitionAlloc malloc also crashes on allocation failure by design.
#define MAYBE_TestInitWithHugeAllocFails DISABLED_TestInitWithHugeAllocFails #define MAYBE_TestInitWithHugeAllocFails DISABLED_TestInitWithHugeAllocFails
#else #else
#define MAYBE_TestInitWithHugeAllocFails TestInitWithHugeAllocFails #define MAYBE_TestInitWithHugeAllocFails TestInitWithHugeAllocFails
......
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