https://github.com/da-viper updated https://github.com/llvm/llvm-project/pull/160333
>From a4f055b6d6794fca3f09e128d5f809afab8cd715 Mon Sep 17 00:00:00 2001 From: Ebuka Ezike <[email protected]> Date: Tue, 23 Sep 2025 16:46:42 +0100 Subject: [PATCH 1/2] [lldb][test] check if CoreDumping info is supported CoreDumping in /proc/pid/stat was added in kernel 4.15, this causes the test to fail in older versions. see https://man7.org/linux/man-pages/man5/proc_pid_status.5.html --- lldb/unittests/Host/posix/HostTest.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lldb/unittests/Host/posix/HostTest.cpp b/lldb/unittests/Host/posix/HostTest.cpp index 082edccf4e774..7bb44c99bc998 100644 --- a/lldb/unittests/Host/posix/HostTest.cpp +++ b/lldb/unittests/Host/posix/HostTest.cpp @@ -15,6 +15,10 @@ #include <cerrno> #include <sys/resource.h> +#ifdef __linux__ +#include <linux/version.h> +#endif // __linux__ + using namespace lldb_private; namespace { @@ -116,7 +120,12 @@ TEST_F(HostTest, GetProcessInfoSetsPriority) { ASSERT_TRUE(Info.IsZombie().has_value()); ASSERT_FALSE(Info.IsZombie().value()); + // CoreDumping was added in kernel version 4.15 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) ASSERT_TRUE(Info.IsCoreDumping().has_value()); ASSERT_FALSE(Info.IsCoreDumping().value()); +#else + ASSERT_FALSE(Info.IsCoreDumping().has_value()); +#endif } #endif >From cf3c1db81be9ae961520c9cf23df13a5a2cb5368 Mon Sep 17 00:00:00 2001 From: Ebuka Ezike <[email protected]> Date: Tue, 23 Sep 2025 16:55:15 +0100 Subject: [PATCH 2/2] [lldb][test] fix format --- lldb/unittests/Host/posix/HostTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/unittests/Host/posix/HostTest.cpp b/lldb/unittests/Host/posix/HostTest.cpp index 7bb44c99bc998..dc75b288ba76a 100644 --- a/lldb/unittests/Host/posix/HostTest.cpp +++ b/lldb/unittests/Host/posix/HostTest.cpp @@ -120,7 +120,7 @@ TEST_F(HostTest, GetProcessInfoSetsPriority) { ASSERT_TRUE(Info.IsZombie().has_value()); ASSERT_FALSE(Info.IsZombie().value()); - // CoreDumping was added in kernel version 4.15 + // CoreDumping was added in kernel version 4.15. #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) ASSERT_TRUE(Info.IsCoreDumping().has_value()); ASSERT_FALSE(Info.IsCoreDumping().value()); _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
