Skip to content

[libc] Fix scheduler test incorrectly guessing user privileges #95562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions libc/test/src/sched/param_and_scheduler_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,11 @@ class SchedTest : public LIBC_NAMESPACE::testing::Test {
using LlvmLibcSchedTest = SchedTest; \
TEST_F(LlvmLibcSchedTest, Sched_##policy) { testSched(policy, can_set); }

// Root is required to set these policies.
LIST_SCHED_TESTS(SCHED_FIFO, LIBC_NAMESPACE::getuid() == 0)
LIST_SCHED_TESTS(SCHED_RR, LIBC_NAMESPACE::getuid() == 0)
// Temporarily disabled as these tests are failing on Arch Linux where
// scheduling policy setting succeeds without running as root.
// // Root is required to set these policies.
// LIST_SCHED_TESTS(SCHED_FIFO, LIBC_NAMESPACE::getuid() == 0)
// LIST_SCHED_TESTS(SCHED_RR, LIBC_NAMESPACE::getuid() == 0)

// No root is required to set these policies.
LIST_SCHED_TESTS(SCHED_OTHER, true)
Expand Down
Loading