[Lldb-commits] [lldb] [lldb][test] Fix some 'import-std-module' tests (PR #122358)
Vladislav Dzhidzhoev via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 9 12:07:23 PST 2025
https://github.com/dzhidzhoev updated https://github.com/llvm/llvm-project/pull/122358
>From 6e0c074b75d72c589cf15323f4b309ee5ece4875 Mon Sep 17 00:00:00 2001
From: Vladislav Dzhidzhoev <vdzhidzhoev at accesssoftek.com>
Date: Thu, 9 Jan 2025 13:18:09 +0100
Subject: [PATCH 1/2] Revert "[lldb][test] Skip Test*FromStdModule tests on
Linux for now (#112530)"
This reverts commit 87f126243beb69b8b02e5cd4df762bc8a6f1f8cc.
---
.../expression/import-std-module/array/TestArrayFromStdModule.py | 1 -
.../TestDbgInfoContentVectorFromStdModule.py | 1 -
.../vector-of-vectors/TestVectorOfVectorsFromStdModule.py | 1 -
3 files changed, 3 deletions(-)
diff --git a/lldb/test/API/commands/expression/import-std-module/array/TestArrayFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/array/TestArrayFromStdModule.py
index bafc7628296217..13ab6b0c9ac1fb 100644
--- a/lldb/test/API/commands/expression/import-std-module/array/TestArrayFromStdModule.py
+++ b/lldb/test/API/commands/expression/import-std-module/array/TestArrayFromStdModule.py
@@ -10,7 +10,6 @@
class TestCase(TestBase):
@add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang"))
- @skipIfLinux # https://discourse.llvm.org/t/lldb-test-failures-on-linux/80095
def test(self):
self.build()
diff --git a/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py
index 71eaeef20e792d..1c32222e64f14c 100644
--- a/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py
+++ b/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py
@@ -14,7 +14,6 @@ class TestDbgInfoContentVector(TestBase):
@skipIf(compiler="clang", compiler_version=["<", "12.0"])
@skipIf(macos_version=["<", "14.0"])
@skipIfDarwin # https://github.com/llvm/llvm-project/issues/106475
- @skipIfLinux # https://discourse.llvm.org/t/lldb-test-failures-on-linux/80095
def test(self):
self.build()
diff --git a/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectorsFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectorsFromStdModule.py
index e9415fd53651f7..a1f33271f39d2f 100644
--- a/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectorsFromStdModule.py
+++ b/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectorsFromStdModule.py
@@ -10,7 +10,6 @@
class TestVectorOfVectors(TestBase):
@add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang"))
- @skipIfLinux # https://discourse.llvm.org/t/lldb-test-failures-on-linux/80095
def test(self):
self.build()
>From 0c88cd45b5fe2f9330a377dbc74b5d84e7a6568c Mon Sep 17 00:00:00 2001
From: Vladislav Dzhidzhoev <vdzhidzhoev at accesssoftek.com>
Date: Thu, 9 Jan 2025 20:22:20 +0100
Subject: [PATCH 2/2] [lldb][test] Fix some 'import-std-module' tests
Some tests from 'import-std-module' used to fail on the builder
https://lab.llvm.org/staging/#/builders/195/builds/4470,
since libcxx is set up to be linked statically with test binaries
on it.
Thus, they were temporarily disabled in #112530. Here, this commit
is reverted.
Jitted expressions from the tests try to call __libcpp_verbose_abort
function that is not present in the process image, which causes
the failure.
Here, this symbol is explicitly referenced from the test source files.
---
.../API/commands/expression/import-std-module/array/main.cpp | 3 +++
.../import-std-module/vector-dbg-info-content/main.cpp | 3 +++
.../expression/import-std-module/vector-of-vectors/main.cpp | 3 +++
3 files changed, 9 insertions(+)
diff --git a/lldb/test/API/commands/expression/import-std-module/array/main.cpp b/lldb/test/API/commands/expression/import-std-module/array/main.cpp
index 9bcd0b574042a4..dae5db34b6f794 100644
--- a/lldb/test/API/commands/expression/import-std-module/array/main.cpp
+++ b/lldb/test/API/commands/expression/import-std-module/array/main.cpp
@@ -1,4 +1,7 @@
#include <array>
+#include <__verbose_abort>
+
+void *libcpp_verbose_abort_ptr = (void *) &std::__libcpp_verbose_abort;
struct DbgInfo {
int v = 4;
diff --git a/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/main.cpp b/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/main.cpp
index 24c3fec75d2f5f..ecb36ef6ccac23 100644
--- a/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/main.cpp
+++ b/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/main.cpp
@@ -1,4 +1,7 @@
#include <vector>
+#include <__verbose_abort>
+
+void *libcpp_verbose_abort_ptr = (void *) &std::__libcpp_verbose_abort;
struct Foo {
int a;
diff --git a/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/main.cpp b/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/main.cpp
index b5ada909e43976..596bbef163df0b 100644
--- a/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/main.cpp
+++ b/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/main.cpp
@@ -1,4 +1,7 @@
#include <vector>
+#include <__verbose_abort>
+
+void *libcpp_verbose_abort_ptr = (void *) &std::__libcpp_verbose_abort;
int main(int argc, char **argv) {
std::vector<std::vector<int> > a = {{1, 2, 3}, {3, 2, 1}};
More information about the lldb-commits
mailing list