[Lldb-commits] [lldb] [lldb][test] Fix TestStdCXXDisassembly test (PR #112357)
Dmitry Vasilyev via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 15 10:05:25 PDT 2024
https://github.com/slydiman updated https://github.com/llvm/llvm-project/pull/112357
>From 29326dedbc1c786e699fb30655d4105c867d1b84 Mon Sep 17 00:00:00 2001
From: Dmitry Vasilyev <dvassiliev at accesssoftek.com>
Date: Tue, 15 Oct 2024 17:20:13 +0400
Subject: [PATCH 1/2] [lldb][test] Fix TestStdCXXDisassembly test
The path #98694 was not enough. This test is still failed on the buildbot https://lab.llvm.org/staging/#/builders/195/builds/4438
Use `USE_LIBSTDCPP := 1` instead.
---
lldb/test/API/lang/cpp/stl/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lldb/test/API/lang/cpp/stl/Makefile b/lldb/test/API/lang/cpp/stl/Makefile
index 8534fa9b00209e..bf8e6b8703f368 100644
--- a/lldb/test/API/lang/cpp/stl/Makefile
+++ b/lldb/test/API/lang/cpp/stl/Makefile
@@ -1,5 +1,5 @@
CXX_SOURCES := main.cpp
-USE_SYSTEM_STDLIB := 1
+USE_LIBSTDCPP := 1
include Makefile.rules
>From bd0c917dd3bcf6cf4d46515ee6383b8d43dfebc8 Mon Sep 17 00:00:00 2001
From: Dmitry Vasilyev <dvassiliev at accesssoftek.com>
Date: Tue, 15 Oct 2024 19:18:10 +0400
Subject: [PATCH 2/2] Skip test if libstdc++.so is missing.
---
lldb/test/API/lang/cpp/stl/Makefile | 6 +++++-
lldb/test/API/lang/cpp/stl/TestStdCXXDisassembly.py | 5 ++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/lldb/test/API/lang/cpp/stl/Makefile b/lldb/test/API/lang/cpp/stl/Makefile
index bf8e6b8703f368..4408691f01b701 100644
--- a/lldb/test/API/lang/cpp/stl/Makefile
+++ b/lldb/test/API/lang/cpp/stl/Makefile
@@ -1,5 +1,9 @@
CXX_SOURCES := main.cpp
-USE_LIBSTDCPP := 1
+ifneq ($(OS),Darwin)
+ USE_LIBSTDCPP := 1
+else
+ USE_SYSTEM_STDLIB := 1
+endif
include Makefile.rules
diff --git a/lldb/test/API/lang/cpp/stl/TestStdCXXDisassembly.py b/lldb/test/API/lang/cpp/stl/TestStdCXXDisassembly.py
index 8676ee16d83c04..06f338b3ed1ded 100644
--- a/lldb/test/API/lang/cpp/stl/TestStdCXXDisassembly.py
+++ b/lldb/test/API/lang/cpp/stl/TestStdCXXDisassembly.py
@@ -43,7 +43,10 @@ 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"])
+ if "lib" not in lib_stdcxx:
+ self.skipTest(
+ "This test requires libstdc++.so or libc++.dylib in the target's module list."
+ )
self.runCmd("image dump symtab '%s'" % lib_stdcxx)
raw_output = self.res.GetOutput()
More information about the lldb-commits
mailing list