Skip to content

[lldb][test] Fix TestStdCXXDisassembly test for case when tests are linked with libc++ statically #98694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

dzhidzhoev
Copy link
Member

@dzhidzhoev dzhidzhoev commented Jul 12, 2024

This is to fix buildbot failure https://lab.llvm.org/staging/#/builders/195/builds/4255.

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 the presence of any of them.

@llvmbot
Copy link
Member

llvmbot commented Jul 12, 2024

@llvm/pr-subscribers-lldb

Author: Vladislav Dzhidzhoev (dzhidzhoev)

Changes

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 the presence of any of them.


Full diff: https://github.com/llvm/llvm-project/pull/98694.diff

2 Files Affected:

  • (modified) lldb/test/API/lang/cpp/stl/Makefile (+2)
  • (modified) lldb/test/API/lang/cpp/stl/TestStdCXXDisassembly.py (+1-1)
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)

Copy link

github-actions bot commented Jul 12, 2024

✅ With the latest revision this PR passed the Python code formatter.

@dzhidzhoev dzhidzhoev marked this pull request as draft July 12, 2024 20:54
@dzhidzhoev dzhidzhoev requested a review from slydiman October 10, 2024 16:26
…h 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.
@dzhidzhoev dzhidzhoev force-pushed the lldb/fix-TestStdCXXDisassembly-system branch from e98b2f7 to 35db69b Compare October 10, 2024 16:28
@dzhidzhoev dzhidzhoev marked this pull request as ready for review October 10, 2024 16:28
@dzhidzhoev
Copy link
Member Author

Rebased&undrafted

Copy link
Contributor

@slydiman slydiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@slydiman slydiman merged commit f035d9f into llvm:main Oct 15, 2024
7 checks passed
slydiman added a commit to slydiman/llvm-project that referenced this pull request Oct 15, 2024
The path llvm#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.
slydiman added a commit that referenced this pull request Oct 15, 2024
The patch #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 for non Darwin OS and skip the test if
libstdc++.so is missing.
DanielCChen pushed a commit to DanielCChen/llvm-project that referenced this pull request Oct 16, 2024
…inked with libc++ statically (llvm#98694)

This is to fix buildbot failure
https://lab.llvm.org/staging/#/builders/195/builds/4255.

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 the presence of any of them.

---------

Co-authored-by: Vladimir Vereschaka <[email protected]>
DanielCChen pushed a commit to DanielCChen/llvm-project that referenced this pull request Oct 16, 2024
The patch llvm#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 for non Darwin OS and skip the test if
libstdc++.so is missing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants