2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 01:51:51 +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:
Radostin Stoyanov 2024-03-05 08:53:56 +00:00 committed by Andrei Vagin
parent 75fed59ef6
commit 231ba0cd29

View File

@ -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;
@ -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++;
}