Skip to content

Commit

Permalink
zdtm/sched_policy00: use reset-on-fork flag
Browse files Browse the repository at this point in the history
This patch extends the sched_policy00 test case to verify that
the SCHED_RESET_ON_FORK flag is restored correctly.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
  • Loading branch information
rst0git committed Mar 5, 2024
1 parent cbad251 commit 6673a3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/zdtm/static/sched_policy00.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ int main(int argc, char **argv)
}

p.sched_priority = param;
if (sched_setscheduler(pid, SCHED_RR, &p)) {
if (sched_setscheduler(pid, SCHED_RR | SCHED_RESET_ON_FORK, &p)) {
pr_perror("Can't set policy");
kill(pid, SIGKILL);
return -1;
Expand All @@ -61,7 +61,7 @@ int main(int argc, char **argv)
test_waitsig();

ret = sched_getscheduler(pid);
if (ret != SCHED_RR) {
if (ret != (SCHED_RR | SCHED_RESET_ON_FORK)) {
fail("Broken/No policy");
err++;
}
Expand Down

0 comments on commit 6673a3b

Please sign in to comment.