[Lldb-commits] [lldb] [lldb] PopulatePrpsInfoTest can fail due to hardcoded priority value (PR #104617)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 19 08:11:45 PDT 2024


================
@@ -120,7 +121,10 @@ TEST_F(ElfCoreTest, PopulatePrpsInfoTest) {
   ASSERT_EQ(prpsinfo_opt->pr_state, 0);
   ASSERT_EQ(prpsinfo_opt->pr_sname, 'R');
   ASSERT_EQ(prpsinfo_opt->pr_zomb, 0);
-  ASSERT_EQ(prpsinfo_opt->pr_nice, 0);
+  int priority = getpriority(PRIO_PROCESS, getpid());
+  if (priority == -1)
----------------
DavidSpickett wrote:

Sure, makes sense.

https://github.com/llvm/llvm-project/pull/104617


More information about the lldb-commits mailing list