Skip to content

Commit f2991bd

Browse files
committed
[lldb][test] Disable procfile by thread ID test when LLVM_ENABLE_THREADS is not defined
When LLVM_ENABLE_THREADS is not defined, llvm::get_threadid returns 0 which makes this test case fail. This is a pretty niche setting, Linaro uses it to stop lld crashing our 32 bit containers. So the test will get plenty of runs elsewhere. In lldb's code it's not getting the current thread ID anyway, it's using a value it got from ptrace. So even if that copy of lldb was built with LLVM_ENABLE_THREADS off, it should still be able to debug threads.
1 parent 21ef272 commit f2991bd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lldb/unittests/Host/linux/SupportTest.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ TEST(Support, getProcFile_Pid) {
1818
ASSERT_TRUE(*BufferOrError);
1919
}
2020

21+
#ifdef LLVM_ENABLE_THREADING
2122
TEST(Support, getProcFile_Tid) {
2223
auto BufferOrError = getProcFile(getpid(), llvm::get_threadid(), "comm");
2324
ASSERT_TRUE(BufferOrError);
2425
ASSERT_TRUE(*BufferOrError);
2526
}
27+
#endif /*ifdef LLVM_ENABLE_THREADING */

0 commit comments

Comments
 (0)