Linux Test Project
 help / color / mirror / Atom feed
From: linuxtestproject.agent@gmail.com
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] shell: enable OOM protection by default
Date: Tue,  4 Aug 2026 10:40:47 +0000	[thread overview]
Message-ID: <20260804104047.7850-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260804-shell_oom_protection-v3-1-fe42b15d034c@suse.com>

Hi Andrea,

On Aug 4, 2026, Andrea Cervesato wrote:
> shell: enable OOM protection by default

> +	if [ "$TST_OOM_PROTECTION" = 1 ]; then
> +		_tst_enable_oom_protection
> +	fi

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.

Verdict - Needs revision

---
Note:

The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2026-08-04 10:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04  9:22 [LTP] [PATCH v3] shell: enable OOM protection by default Andrea Cervesato
2026-08-04  9:25 ` Andrea Cervesato via ltp
2026-08-04 10:40 ` linuxtestproject.agent [this message]
2026-08-04 11:30   ` [LTP] " Andrea Cervesato via ltp
2026-08-04 13:17 ` [LTP] [PATCH v3] " Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260804104047.7850-1-linuxtestproject.agent@gmail.com \
    --to=linuxtestproject.agent@gmail.com \
    --cc=andrea.cervesato@suse.de \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox