Commit 4c5ebe4c authored by Fabrice de Gans-Riberi's avatar Fabrice de Gans-Riberi Committed by Commit Bot

[fuchsia] Clarify test expectations for StackTraceTest.

On Fuchsia official builds, unwind tables are disabled. This causes
base::debug::StackTrace to not have a proper stack trace. This CL
clarifies that this is the expected behavior for Fuchsia official
builds.

Bug: 1025329
Change-Id: I1ad87efb7bf6fefb18444eea121d1ec181ae3fd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1925767
Commit-Queue: Fabrice de Gans-Riberi <fdegans@chromium.org>
Reviewed-by: default avatarWez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#716870}
parent 3733b80a
...@@ -49,18 +49,14 @@ TEST_F(StackTraceTest, OutputToStream) { ...@@ -49,18 +49,14 @@ TEST_F(StackTraceTest, OutputToStream) {
size_t frames_found = 0; size_t frames_found = 0;
const void* const* addresses = trace.Addresses(&frames_found); const void* const* addresses = trace.Addresses(&frames_found);
#if defined(OFFICIAL_BUILD) && defined(OS_POSIX) && !defined(OS_MACOSX) #if defined(OFFICIAL_BUILD) && \
((defined(OS_POSIX) && !defined(OS_MACOSX)) || defined(OS_FUCHSIA))
// Stack traces require an extra data table that bloats our binaries, // Stack traces require an extra data table that bloats our binaries,
// so they're turned off for official builds. Stop the test here, so // so they're turned off for official builds. Stop the test here, so
// it at least verifies that StackTrace calls don't crash. // it at least verifies that StackTrace calls don't crash.
return; return;
#endif // defined(OFFICIAL_BUILD) && defined(OS_POSIX) && !defined(OS_MACOSX) #endif // defined(OFFICIAL_BUILD) &&
// ((defined(OS_POSIX) && !defined(OS_MACOSX)) || defined(OS_FUCHSIA))
#if defined(OFFICIAL_BUILD) && defined(OS_FUCHSIA)
// TODO(https://crbug.com/1025329): StackTrace fails to capture any frames in
// Fuchsia Official builds.
return;
#endif // defined(OFFICIAL_BUILD) && defined(OS_FUCHSIA)
ASSERT_TRUE(addresses); ASSERT_TRUE(addresses);
ASSERT_GT(frames_found, 5u) << "Too few frames found."; ASSERT_GT(frames_found, 5u) << "Too few frames found.";
......
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