linux/tools/testing
Ihor Solodrai 0b82cc331d selftests/sched_ext: Fix rt_stall flaky failure
The rt_stall test measures the runtime ratio between an EXT and an RT
task pinned to the same CPU, verifying that the deadline server prevents
RT tasks from starving SCHED_EXT tasks. It expects the EXT task to get
at least 4% of CPU time.

The test is flaky because sched_stress_test() calls sleep(RUN_TIME)
immediately after fork(), without waiting for the RT child to complete
its setup (set_affinity + set_sched). If the RT child experiences
scheduling latency before completing setup, that delay eats into the
measurement window: the RT child runs for less than RUN_TIME seconds,
and the EXT task's measured ratio drops below the 4% threshold.

For example, in the failing CI run [1]:
  EXT=0.140s RT=4.750s total=4.890s (expected ~5.0s)
  ratio=2.86% < 4% → FAIL

The 110ms gap (5.0 - 4.89) corresponds to the RT child's setup time
being counted inside the measurement window, during which fewer
deadline server ticks fire for the EXT task.

Fix by using pipes to synchronize: each child signals the parent after
completing its setup, and the parent waits for both signals before
starting sleep(RUN_TIME). This ensures the measurement window only
counts time when both tasks are fully configured and competing.

[1] https://github.com/kernel-patches/bpf/actions/runs/21961895809/job/63442490449

Fixes: be621a7634 ("selftests/sched_ext: Add test for sched_ext dl_server")
Assisted-by: claude-opus-4-6-v1
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2026-02-13 09:09:39 -10:00
..
crypto/chacha20-s390
cxl cxl: Check for invalid addresses returned from translation functions on errors 2026-01-13 08:30:40 -07:00
fault-injection
ktest ktest.pl: Fix uninitialized var in config-bisect.pl 2025-12-03 18:25:18 -05:00
kunit kunit: add bash completion 2026-01-20 11:17:52 -07:00
memblock
nvdimm tools/testing/nvdimm: Use per-DIMM device handle 2025-11-03 16:47:13 -06:00
radix-tree idr: fix idr_alloc() returning an ID out of range 2025-12-23 11:23:11 -08:00
rbtree
scatterlist mm: remove nth_page() 2025-09-21 14:22:10 -07:00
selftests selftests/sched_ext: Fix rt_stall flaky failure 2026-02-13 09:09:39 -10:00
shared tools: Update context analysis macros in compiler_types.h 2026-01-28 09:25:45 +01:00
vma mm: introduce VMA flags bitmap type 2025-11-29 10:41:09 -08:00
vsock vsock/test: add stream TX credit bounds test 2026-01-22 15:41:33 +01:00