From 9e300024dceefe0e116bc32715fca976fbbe58f9 Mon Sep 17 00:00:00 2001 From: zhou_xq Date: Thu, 11 Sep 2025 16:00:58 +0800 Subject: [PATCH 1/2] Fix the issue of MiniDebug InfoFactory not being defined in the emulator environment Signed-off-by: zhou_xq --- test/unittest/unwind/elf_factory_test.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/unittest/unwind/elf_factory_test.cpp b/test/unittest/unwind/elf_factory_test.cpp index e93b1ab03..9ee795497 100644 --- a/test/unittest/unwind/elf_factory_test.cpp +++ b/test/unittest/unwind/elf_factory_test.cpp @@ -31,7 +31,9 @@ using namespace std; namespace OHOS { namespace HiviewDFX { namespace { +#if defined(ENABLE_MINIDEBUGINFO) constexpr const char* const DUMPCATCHER_ELF_FILE = "/system/bin/dumpcatcher"; +#endif //ENABLE_MINIDEBUGINFO } class ElfFactoryTest : public testing::Test { public: @@ -120,6 +122,7 @@ HWTEST_F(ElfFactoryTest, ElfFactoryTest003, TestSize.Level2) GTEST_LOG_(INFO) << "ElfFactoryTest003 : end."; } +#if defined(ENABLE_MINIDEBUGINFO) #ifndef __x86_64__ /** * @tc.name: ElfFactoryTest004 @@ -219,7 +222,8 @@ HWTEST_F(ElfFactoryTest, ElfFactoryTest008, TestSize.Level2) ASSERT_TRUE(elf == nullptr); GTEST_LOG_(INFO) << "ElfFactoryTest008: end."; } -#endif +#endif //__x86_64__ +#endif //ENABLE_MINIDEBUGINFO /** * @tc.name: ElfFactoryTest009 -- Gitee From a2426c92acdc47b44a3a32bfc59be971bfda3301 Mon Sep 17 00:00:00 2001 From: zhou_xq Date: Fri, 12 Sep 2025 06:58:31 +0000 Subject: [PATCH 2/2] update test/unittest/unwind/elf_factory_test.cpp. Signed-off-by: zhou_xq --- test/unittest/unwind/elf_factory_test.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/unittest/unwind/elf_factory_test.cpp b/test/unittest/unwind/elf_factory_test.cpp index 9ee795497..c8590aef1 100644 --- a/test/unittest/unwind/elf_factory_test.cpp +++ b/test/unittest/unwind/elf_factory_test.cpp @@ -32,7 +32,9 @@ namespace OHOS { namespace HiviewDFX { namespace { #if defined(ENABLE_MINIDEBUGINFO) +#ifndef __x86_64__ constexpr const char* const DUMPCATCHER_ELF_FILE = "/system/bin/dumpcatcher"; +#endif //__x86_64__ #endif //ENABLE_MINIDEBUGINFO } class ElfFactoryTest : public testing::Test { -- Gitee