[Lldb-commits] [lldb] [lldb] PopulatePrpsInfoTest can fail due to hardcoded priority value (PR #104617)
Fred Grim via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 19 07:35:32 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)
----------------
feg208 wrote:
In this test the process for which the prpsinfo object is being populated is the test process. The issue I saw in the build kites was that, rather than the test process being prioritized at the default for linux, it got 5. So the fix here is just to make sure that, whatever the priority of the test process, what is verified that the populated value in the prpsinfo object matches the priority that we know the process runs as.
https://github.com/llvm/llvm-project/pull/104617
More information about the lldb-commits
mailing list