Author: David Spickett Date: 2024-08-12T12:41:49Z New Revision: f2991bd93146162bcc30bc5e8da8707074f3fdef
URL: https://github.com/llvm/llvm-project/commit/f2991bd93146162bcc30bc5e8da8707074f3fdef DIFF: https://github.com/llvm/llvm-project/commit/f2991bd93146162bcc30bc5e8da8707074f3fdef.diff LOG: [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. Added: Modified: lldb/unittests/Host/linux/SupportTest.cpp Removed: ################################################################################ diff --git a/lldb/unittests/Host/linux/SupportTest.cpp b/lldb/unittests/Host/linux/SupportTest.cpp index 680893c03d0a20..6d1d28cd4caad5 100644 --- a/lldb/unittests/Host/linux/SupportTest.cpp +++ b/lldb/unittests/Host/linux/SupportTest.cpp @@ -18,8 +18,10 @@ TEST(Support, getProcFile_Pid) { ASSERT_TRUE(*BufferOrError); } +#ifdef LLVM_ENABLE_THREADING TEST(Support, getProcFile_Tid) { auto BufferOrError = getProcFile(getpid(), llvm::get_threadid(), "comm"); ASSERT_TRUE(BufferOrError); ASSERT_TRUE(*BufferOrError); } +#endif /*ifdef LLVM_ENABLE_THREADING */ _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits