Commit 4132093a authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Chromium LUCI CQ

Disable MultiprocessExec.MultiprocessExec on posix when PartitionAlloc is default allocator.

PartitionAllocator opens /dev/urandom for address randomization when allocating memory.(c.f. //base/allocator/partition_allocator/random.cc and //base/rand_util_posix.cc)
This causes MultiprocessExec.MultiprocessExec test failure. So temporarily disable the test on posix when PartitionAllocator is default.

Bug: 1153544

Change-Id: I19ea568745caf01c6c7fe9d2ad3f845891b2a9ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2562811Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Reviewed-by: default avatarBartek Nowierski <bartekn@chromium.org>
Commit-Queue: Takashi Sakamoto <tasak@google.com>
Cr-Commit-Position: refs/heads/master@{#832264}
parent 32377981
...@@ -36,3 +36,6 @@ $ git am --3way --message-id -p4 /tmp/patchdir ...@@ -36,3 +36,6 @@ $ git am --3way --message-id -p4 /tmp/patchdir
Local Modifications: Local Modifications:
- codereview.settings has been excluded. - codereview.settings has been excluded.
- MultiprocessExec.MultiprocessExec is disabled when OS_POSIX and
BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) are defined. crbug.com/1153544
(third_party/crashpad/crashpad/test/multiprocess_exec_test.cc)
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "test/multiprocess_exec.h" #include "test/multiprocess_exec.h"
#include "base/allocator/buildflags.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
...@@ -48,7 +49,19 @@ class TestMultiprocessExec final : public MultiprocessExec { ...@@ -48,7 +49,19 @@ class TestMultiprocessExec final : public MultiprocessExec {
DISALLOW_COPY_AND_ASSIGN(TestMultiprocessExec); DISALLOW_COPY_AND_ASSIGN(TestMultiprocessExec);
}; };
TEST(MultiprocessExec, MultiprocessExec) { // TODO(tasak): enable this test after making address randomization not to
// keep /dev/urandom open.
// PartitionAllocator opens /dev/urandom because of address randomization.
// (c.f. //base/rand_util_posix.cc and
// //base/allocator/partition_allocator/random.cc) So when making
// PartitionAllocator default, multiprocess_exec_test_child will crash because
// of LOG(FATAL) << "close". https://crbug.com/1153544
#if defined(OS_POSIX) && BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
#define MAYBE_MultiprocessExec DISABLED_MultiprocessExec
#else
#define MAYBE_MultiprocessExec MultiprocessExec
#endif
TEST(MultiprocessExec, MAYBE_MultiprocessExec) {
TestMultiprocessExec multiprocess_exec; TestMultiprocessExec multiprocess_exec;
base::FilePath child_test_executable = TestPaths::BuildArtifact( base::FilePath child_test_executable = TestPaths::BuildArtifact(
FILE_PATH_LITERAL("test"), FILE_PATH_LITERAL("test"),
......
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