summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-03-28 17:55:25 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-03-28 17:55:25 +0000
commitabb21b1648479789c8b4313535e7079006589109 (patch)
tree1e15a5eeb169c2c909eb89f8925d1fe275f9871d
parent189e52089d0d9722c35aa4df7572da62bcd03126 (diff)
parent0aa5cee99136b9ff5137e51981576529fbd6f00e (diff)
downloadunwinding-build-tools-release.tar.gz
Snap for 11641499 from 0aa5cee99136b9ff5137e51981576529fbd6f00e to build-tools-releasebuild-tools-release
Change-Id: I80b9054c9c11df91f77a2602e9916e84e7a14669
-rw-r--r--libunwindstack/tests/UnwindOfflineTest.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libunwindstack/tests/UnwindOfflineTest.cpp b/libunwindstack/tests/UnwindOfflineTest.cpp
index 7f7dee3..f8ee566 100644
--- a/libunwindstack/tests/UnwindOfflineTest.cpp
+++ b/libunwindstack/tests/UnwindOfflineTest.cpp
@@ -16,6 +16,7 @@
#include <sys/mman.h>
+#include <android-base/strings.h>
#include <gtest/gtest.h>
#include <cstddef>
@@ -88,6 +89,15 @@ class UnwindOfflineTest : public ::testing::Test {
std::string actual_frame_info = DumpFrames(unwinder);
ASSERT_EQ(expected_num_frames, unwinder.NumFrames()) << "Unwind:\n" << actual_frame_info;
+
+ // The old demangler in external/libcxx adds an extra space when closing
+ // multiple sets of template args (e.g. "Foo<Bar<Baz> >"), but the new
+ // libc++ demangler omits it. Replace "> >" with ">>" to work with either
+ // demangler until libc++ is upgraded.
+ // TODO(b/329940638). Remove this workaround and fix the tests.
+ actual_frame_info = android::base::StringReplace(actual_frame_info, "> >", ">>", true);
+ expected_frame_info = android::base::StringReplace(expected_frame_info, "> >", ">>", true);
+
EXPECT_EQ(expected_frame_info, actual_frame_info);
}
}