From 35db69bd4f65c2b99ba8f366d7de36e7901ccb88 Mon Sep 17 00:00:00 2001 From: Vladimir Vereschaka Date: Thu, 30 May 2024 03:04:58 +0000 Subject: [PATCH 1/2] [lldb][test] Fix TestStdCXXDisassembly test when tests are linked with libc++ statically The test expects 'libstdc++' or 'libc++' SO module in the module list. In case when static linking with libc++ is on by default, none of them may be present. Thus, USE_SYSTEM_STDLIB is added to ensure presence of any of them. --- lldb/test/API/lang/cpp/stl/Makefile | 2 ++ lldb/test/API/lang/cpp/stl/TestStdCXXDisassembly.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lldb/test/API/lang/cpp/stl/Makefile b/lldb/test/API/lang/cpp/stl/Makefile index 99998b20bcb05..8534fa9b00209 100644 --- a/lldb/test/API/lang/cpp/stl/Makefile +++ b/lldb/test/API/lang/cpp/stl/Makefile @@ -1,3 +1,5 @@ CXX_SOURCES := main.cpp +USE_SYSTEM_STDLIB := 1 + include Makefile.rules diff --git a/lldb/test/API/lang/cpp/stl/TestStdCXXDisassembly.py b/lldb/test/API/lang/cpp/stl/TestStdCXXDisassembly.py index 1e1b0a4d621f0..cc46989f984b2 100644 --- a/lldb/test/API/lang/cpp/stl/TestStdCXXDisassembly.py +++ b/lldb/test/API/lang/cpp/stl/TestStdCXXDisassembly.py @@ -44,7 +44,7 @@ def test_stdcxx_disasm(self): # module is the corresponding SBModule. self.expect( - lib_stdcxx, "Libraray StdC++ is located", exe=False, substrs=["lib"] + lib_stdcxx, "Library StdC++ is located", exe=False, substrs=["lib"] ) self.runCmd("image dump symtab '%s'" % lib_stdcxx) From 479d5a5b377578af28f1fb1d8142d61317aa680c Mon Sep 17 00:00:00 2001 From: Vladislav Dzhidzhoev Date: Thu, 10 Oct 2024 18:36:18 +0200 Subject: [PATCH 2/2] Fixed formatting --- lldb/test/API/lang/cpp/stl/TestStdCXXDisassembly.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lldb/test/API/lang/cpp/stl/TestStdCXXDisassembly.py b/lldb/test/API/lang/cpp/stl/TestStdCXXDisassembly.py index cc46989f984b2..8676ee16d83c0 100644 --- a/lldb/test/API/lang/cpp/stl/TestStdCXXDisassembly.py +++ b/lldb/test/API/lang/cpp/stl/TestStdCXXDisassembly.py @@ -43,9 +43,7 @@ def test_stdcxx_disasm(self): # At this point, lib_stdcxx is the full path to the stdc++ library and # module is the corresponding SBModule. - self.expect( - lib_stdcxx, "Library StdC++ is located", exe=False, substrs=["lib"] - ) + self.expect(lib_stdcxx, "Library StdC++ is located", exe=False, substrs=["lib"]) self.runCmd("image dump symtab '%s'" % lib_stdcxx) raw_output = self.res.GetOutput()