Commit 6f01cd17 authored by Adam Kallai's avatar Adam Kallai Committed by Commit Bot

Disable heap corruption related tests on Windows on ARM

These tests rely on some traditional internal heap implementation
and try to corrupt HEAP_ENTRY structure right before
the heap address is returned to user. On Windows ARM64,
segment heap is default on, so there is no HEAP_ENTRY anymore.
The STATUS_HEAP_CORRUPTION is not reported on WoA, as it is expected
on these test cases. For more details, please see the bug.

Bug: 1054423
Change-Id: I3f275e2188d362848f64ff6601e376a3a6ffbb82
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2066731
Commit-Queue: kylechar <kylechar@chromium.org>
Reviewed-by: default avatarWill Harris <wfh@chromium.org>
Reviewed-by: default avatarkylechar <kylechar@chromium.org>
Reviewed-by: default avatarBrian White <bcwhite@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751376}
parent e434135f
...@@ -376,12 +376,20 @@ TEST_F(ProcessTest, PredefinedProcessIsRunning) { ...@@ -376,12 +376,20 @@ TEST_F(ProcessTest, PredefinedProcessIsRunning) {
} }
#endif #endif
// Test is disabled on Windows AMR64 because
// TerminateWithHeapCorruption() isn't expected to work there.
// See: https://crbug.com/1054423
#if defined(OS_WIN) #if defined(OS_WIN)
TEST_F(ProcessTest, HeapCorruption) { #if defined(ARCH_CPU_ARM64)
#define MAYBE_HeapCorruption DISABLED_HeapCorruption
#else
#define MAYBE_HeapCorruption HeapCorruption
#endif
TEST_F(ProcessTest, MAYBE_HeapCorruption) {
EXPECT_EXIT(base::debug::win::TerminateWithHeapCorruption(), EXPECT_EXIT(base::debug::win::TerminateWithHeapCorruption(),
::testing::ExitedWithCode(STATUS_HEAP_CORRUPTION), ""); ::testing::ExitedWithCode(STATUS_HEAP_CORRUPTION), "");
} }
#endif #endif // OS_WIN
TEST_F(ProcessTest, ChildProcessIsRunning) { TEST_F(ProcessTest, ChildProcessIsRunning) {
Process process(SpawnChild("SleepyChildProcess")); Process process(SpawnChild("SleepyChildProcess"));
......
...@@ -199,8 +199,17 @@ IN_PROC_BROWSER_TEST_F(MetricsServiceBrowserTest, MAYBE_CrashRenderers) { ...@@ -199,8 +199,17 @@ IN_PROC_BROWSER_TEST_F(MetricsServiceBrowserTest, MAYBE_CrashRenderers) {
histogram_tester.ExpectUniqueSample("Tabs.SadTab.CrashCreated", 1, 1); histogram_tester.ExpectUniqueSample("Tabs.SadTab.CrashCreated", 1, 1);
} }
// Test is disabled on Windows AMR64 because
// TerminateWithHeapCorruption() isn't expected to work there.
// See: https://crbug.com/1054423
#if defined(OS_WIN) #if defined(OS_WIN)
IN_PROC_BROWSER_TEST_F(MetricsServiceBrowserTest, HeapCorruptionInRenderer) { #if defined(ARCH_CPU_ARM64)
#define MAYBE_HeapCorruptionInRenderer DISABLED_HeapCorruptionInRenderer
#else
#define MAYBE_HeapCorruptionInRenderer HeapCorruptionInRenderer
#endif
IN_PROC_BROWSER_TEST_F(MetricsServiceBrowserTest,
MAYBE_HeapCorruptionInRenderer) {
base::HistogramTester histogram_tester; base::HistogramTester histogram_tester;
OpenTabsAndNavigateToCrashyUrl(content::kChromeUIHeapCorruptionCrashURL); OpenTabsAndNavigateToCrashyUrl(content::kChromeUIHeapCorruptionCrashURL);
......
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