[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)
Will Hawkins via lldb-commits
lldb-commits at lists.llvm.org
Fri May 10 11:50:45 PDT 2024
================
@@ -86,4 +89,22 @@ TEST_F(HostTest, GetProcessInfo) {
ProcessInstanceInfo::timespec next_user_time = Info.GetUserTime();
ASSERT_TRUE(user_time.tv_sec <= next_user_time.tv_sec ||
user_time.tv_usec <= next_user_time.tv_usec);
+
+ struct rlimit rlim;
+ EXPECT_EQ(getrlimit(RLIMIT_NICE, &rlim), 0);
+ // getpriority can return -1 so we zero errno first
+ errno = 0;
+ int prio = getpriority(PRIO_PROCESS, PRIO_PROCESS);
+ ASSERT_TRUE((prio < 0 && errno == 0) || prio >= 0);
+ ASSERT_EQ(Info.GetPriorityValue(), prio);
+ // If we can't raise our nice level then this test can't be performed
----------------
hawkinsw wrote:
```suggestion
// If we can't raise our nice level then this test can't be performed.
```
https://github.com/llvm/llvm-project/pull/91544
More information about the lldb-commits
mailing list