summaryrefslogtreecommitdiff
path: root/scripts/link-vmlinux.sh
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2026-02-02 09:40:22 -1000
committerTejun Heo <tj@kernel.org>2026-02-02 09:45:09 -1000
commit4544e9c4ec9a5955a37fdd8204a3d98106f97ab7 (patch)
treedf80af29deddb81ef57145c72d105c78956a6ca0 /scripts/link-vmlinux.sh
parent2e06d54ea9a25e2925a31eb5410af0f16baa8f19 (diff)
selftests/sched_ext: Fix init_enable_count flakiness
The init_enable_count test is flaky. The test forks 1024 children before attaching the scheduler to verify that existing tasks get ops.init_task() called. The children were using sleep(1) before exiting. 7900aa699c34 ("sched_ext: Fix cgroup exit ordering by moving sched_ext_free() to finish_task_switch()") changed when tasks are removed from scx_tasks - previously when the task_struct was freed, now immediately in finish_task_switch() when the task dies. Before the commit, pre-forked children would linger on scx_tasks until freed regardless of when they exited, so the scheduler would always see them during iteration. The sleep(1) was unnecessary. After the commit, children are removed as soon as they die. The sleep(1) masks the problem in most cases but the test becomes flaky depending on timing. Fix by synchronizing properly using a pipe. All children block on read() and the parent signals them to exit by closing the write end after attaching the scheduler. The children are auto-reaped so there's no need to wait on them. Reported-by: Ihor Solodrai <ihor.solodrai@linux.dev> Cc: David Vernet <void@manifault.com> Cc: Andrea Righi <arighi@nvidia.com> Cc: Changwoo Min <changwoo@igalia.com> Cc: Emil Tsalapatis <emil@etsalapatis.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'scripts/link-vmlinux.sh')
0 files changed, 0 insertions, 0 deletions