Skip to content

Commit 61e2841

Browse files
authored
[lldb][test] Fix some 'import-std-module' tests (#122358)
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.
1 parent 19032bf commit 61e2841

File tree

6 files changed

+15
-3
lines changed

6 files changed

+15
-3
lines changed

lldb/test/API/commands/expression/import-std-module/array/TestArrayFromStdModule.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
class TestCase(TestBase):
1111
@add_test_categories(["libc++"])
1212
@skipIf(compiler=no_match("clang"))
13-
@skipIfLinux # https://discourse.llvm.org/t/lldb-test-failures-on-linux/80095
1413
def test(self):
1514
self.build()
1615

lldb/test/API/commands/expression/import-std-module/array/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
#include <__verbose_abort>
12
#include <array>
23

4+
// Some expressons from the test need this symbol to be compiled when libcxx is
5+
// built statically.
6+
void *libcpp_verbose_abort_ptr = (void *)&std::__libcpp_verbose_abort;
7+
38
struct DbgInfo {
49
int v = 4;
510
};

lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ class TestDbgInfoContentVector(TestBase):
1414
@skipIf(compiler="clang", compiler_version=["<", "12.0"])
1515
@skipIf(macos_version=["<", "14.0"])
1616
@skipIfDarwin # https://github.com/llvm/llvm-project/issues/106475
17-
@skipIfLinux # https://discourse.llvm.org/t/lldb-test-failures-on-linux/80095
1817
def test(self):
1918
self.build()
2019

lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
#include <__verbose_abort>
12
#include <vector>
23

4+
// Some expressons from the test need this symbol to be compiled when libcxx is
5+
// built statically.
6+
void *libcpp_verbose_abort_ptr = (void *)&std::__libcpp_verbose_abort;
7+
38
struct Foo {
49
int a;
510
};

lldb/test/API/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectorsFromStdModule.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
class TestVectorOfVectors(TestBase):
1111
@add_test_categories(["libc++"])
1212
@skipIf(compiler=no_match("clang"))
13-
@skipIfLinux # https://discourse.llvm.org/t/lldb-test-failures-on-linux/80095
1413
def test(self):
1514
self.build()
1615

lldb/test/API/commands/expression/import-std-module/vector-of-vectors/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
#include <__verbose_abort>
12
#include <vector>
23

4+
// Some expressons from the test need this symbol to be compiled when libcxx is
5+
// built statically.
6+
void *libcpp_verbose_abort_ptr = (void *)&std::__libcpp_verbose_abort;
7+
38
int main(int argc, char **argv) {
49
std::vector<std::vector<int> > a = {{1, 2, 3}, {3, 2, 1}};
510
return 0; // Set break point at this line.

0 commit comments

Comments
 (0)