Commit acead0ee authored by Hans Wennborg's avatar Hans Wennborg Committed by Chromium LUCI CQ

Fix ContentBrowserTest.BrowserCrashCallStack in Linux ThinLTO tests

The test was failing due to
ContentBrowserTest_MANUAL_BrowserCrash_Test::RunTestOnMainThread
not appearing in the stack trace in ThinLTO builds (link below).
Add pragmas to prevent the compiler from optimizing it away.

https://ci.chromium.org/ui/p/chromium/builders/ci/ToTLinuxThinLTO/13086

Bug: 1155142
Change-Id: I191e7642f65c5f2dc17cccef449ca0746e31922d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2566968
Auto-Submit: Hans Wennborg <hans@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#833399}
parent c846f9b8
...@@ -145,9 +145,16 @@ IN_PROC_BROWSER_TEST_F(ContentBrowserTest, RendererCrashCallStack) { ...@@ -145,9 +145,16 @@ IN_PROC_BROWSER_TEST_F(ContentBrowserTest, RendererCrashCallStack) {
} }
} }
#ifdef __clang__
// Don't optimize this out of stack traces in ThinLTO builds.
#pragma clang optimize off
#endif
IN_PROC_BROWSER_TEST_F(ContentBrowserTest, MANUAL_BrowserCrash) { IN_PROC_BROWSER_TEST_F(ContentBrowserTest, MANUAL_BrowserCrash) {
CHECK(false); CHECK(false);
} }
#ifdef __clang__
#pragma clang optimize on
#endif
// Tests that browser tests print the callstack on asserts. // Tests that browser tests print the callstack on asserts.
// Disabled on Windows crbug.com/1034784 // Disabled on Windows crbug.com/1034784
......
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