[LTP] shell: enable OOM protection by default
Andrea Cervesato
andrea.cervesato@suse.com
Tue Aug 4 13:30:21 CEST 2026
Hi,
> Major: Could the test body run in an unprotected child here, as it does in
> the C harness?
>
> This sets -1000 on the same shell that later executes the test functions, so
> all workloads forked by existing tests inherit OOM protection. For example,
> memcg_limit_in_bytes.sh reaches test_proc_kill() and starts memcg_process in
> the background. Linux 7.2 copies oom_score_adj on fork, and its cgroup
> documentation says that tasks with -1000 are never killed. That path will
> therefore report that memcg_process was not killed instead of observing the
> expected cgroup OOM kill.
>
> The commit message says that the test runs in a child, but this patch does not
> create that boundary. tst_oom_unprotect() is only called by the new self-test,
> so it does not reset the existing workload launch sites.
the review is correct, I will sent a new version.
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
More information about the ltp
mailing list