mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 09:58:09 +00:00
zdtm/sched_policy00: use reset-on-fork flag
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>
This commit is contained in:
parent
75fed59ef6
commit
231ba0cd29
@ -51,7 +51,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
p.sched_priority = param;
|
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");
|
pr_perror("Can't set policy");
|
||||||
kill(pid, SIGKILL);
|
kill(pid, SIGKILL);
|
||||||
return -1;
|
return -1;
|
||||||
@ -61,7 +61,7 @@ int main(int argc, char **argv)
|
|||||||
test_waitsig();
|
test_waitsig();
|
||||||
|
|
||||||
ret = sched_getscheduler(pid);
|
ret = sched_getscheduler(pid);
|
||||||
if (ret != SCHED_RR) {
|
if (ret != (SCHED_RR | SCHED_RESET_ON_FORK)) {
|
||||||
fail("Broken/No policy");
|
fail("Broken/No policy");
|
||||||
err++;
|
err++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user