All of lore.kernel.org
 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: add optional OOM protection
Date: Mon, 13 Jul 2026 14:12:52 +0000	[thread overview]
Message-ID: <20260713141252.4091-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260713-shell_oom_protection-v1-1-b732e8647894@suse.com>

Hi Andrea,

On Mon, Jul 13 2026, Andrea Cervesato <andrea.cervesato@suse.com> wrote:
> shell: add optional OOM protection

--- [PATCH 1/2] ---

> +#!/bin/sh
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +# Copyright (c) 2026 Linux Test Project
> +
> +TST_TESTFUNC=test
> +TST_OOM_PROTECTION=1

The new test is missing both the mandatory doc block and the mandatory env
block. All other tests in testcases/lib/tests/ carry them (e.g.
shell_loader.sh, shell_loader_cleanup.sh). Add at minimum:

  # ---
  # doc
  # Verify that TST_OOM_PROTECTION shields the shell harness from the OOM
  # killer and resets the test process oom_score_adj to 0.
  # ---
  #
  # ---
  # env
  # {
  # }
  # ---

> +TST_TESTFUNC=test

Is naming the test function "test" intentional? "test" is a POSIX shell
builtin and a standalone utility; shell-tests.md forbids naming functions
after common shell commands. Rename to e.g. "do_test" and update
TST_TESTFUNC accordingly.

> +. tst_test.sh
> +tst_run

Every other test in testcases/lib/tests/ uses the ". tst_loader.sh" /
". tst_run.sh" pattern. This test uses the pure-shell harness directly.
Is that because tst_loader.sh goes through the C binary (tst_run_shell)
and therefore never exercises the OOM protection that lives in tst_test.sh?

If so, can the test still be brought into the standard structure, or does
this require the OOM protection to be moved into the C backend first?

Verdict - Needs revision

Pre-existing issues:
  testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh uses
  TST_TESTFUNC=test (function named after shell builtin); it also lacks
  doc/env blocks. These pre-date this series.

---
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

  reply	other threads:[~2026-07-13 14:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13 14:01 [LTP] [PATCH 0/2] OOM protection for shell tests Andrea Cervesato
2026-07-13 14:01 ` [LTP] [PATCH 1/2] shell: add optional OOM protection Andrea Cervesato
2026-07-13 14:12   ` linuxtestproject.agent [this message]
2026-07-13 14:01 ` [LTP] [PATCH 2/2] memcg_stress: survive OOM by targeting the stressors Andrea Cervesato

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=20260713141252.4091-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.