Linux Test Project
 help / color / mirror / Atom feed
From: linuxtestproject.agent@gmail.com
To: lepillai@linux.ibm.com
Cc: ltp@lists.linux.it
Subject: Re: [LTP] Patch:V2:creat07():Added new_behavior flag to detect kernel version > 6.11 : Tests that creat() succeeds (write to executed file allowed) Removed the old skip logic that did TCONF on kernel >= 6.11 Added one static variable exp_errno to store expected result: -1 means creat() should succeed ETXTBSY means it should fail with that errno setup() now sets exp_errno from kernel version Simplified verify_creat(): if expected is success, call creat(), close fd, print TPASS if expected is failure, use TST_EXP_FAIL2() for ETXTBSY Removed extra verbose kernel-info messages Removed exec of external child binary and replaced it with an in-process forked child using TST_CHECKPOINT_WAKE() + pause() Removed .resource_files from test
Date: Wed, 13 May 2026 07:57:14 +0000	[thread overview]
Message-ID: <20260513075714.3992-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260513064818.1596754-1-lepillai@linux.ibm.com>

Hi Lekshmi,

On Wed, 13 May 2026, lekshmi-cpillai wrote:
> Patch:V2:creat07():Added new_behavior flag to detect kernel version > 6.11...

The commit subject must be a single concise line (<=72 chars) in imperative
form without a "Patch:V2:" prefix. The body must explain WHY the old TCONF
approach was wrong, not just list what was changed.

> -       if (pid == 0) {
> -               SAFE_EXECL(TEST_APP, TEST_APP, NULL);
> -               exit(1);
> +       if (!pid) {
> +               TST_CHECKPOINT_WAKE(0);
> +               pause();
> +               exit(0);
>         }

Removing SAFE_EXECL breaks the ETXTBSY path: creat() only returns ETXTBSY
when the target file is being executed by another process. Since the new
child never exec's creat07_child, creat(TEST_APP, O_WRONLY) will never
return ETXTBSY on kernels < 6.11 — that test branch will always fail.
Restore the exec of the child binary (or find another way to hold the
inode busy during execution).

>  /*\
>   * Check that :manpage:`creat(2)` sets ETXTBSY correctly.
>   */

Update the doc comment to describe both behaviors: ETXTBSY on kernel < 6.11
and success on kernel >= 6.11.

Pre-existing issues noticed in the surrounding code (not introduced by
this patch):

- testcases/kernel/syscalls/creat/creat07_child.c — orphaned: still
  compiled by the wildcard Makefile and listed in .gitignore, but no
  longer exec'd and removed from .resource_files. Either delete it or
  restore the SAFE_EXECL call.

---
Note:

Our agent completed the review of the patch. The full review can be
found at: https://github.com/linux-test-project/ltp-agent/actions/runs/25785799074

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-05-13  7:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13  6:48 [LTP] [PATCH] Patch:V2:creat07():Added new_behavior flag to detect kernel version > 6.11 : Tests that creat() succeeds (write to executed file allowed) Removed the old skip logic that did TCONF on kernel >= 6.11 Added one static variable exp_errno to store expected result: -1 means creat() should succeed ETXTBSY means it should fail with that errno setup() now sets exp_errno from kernel version Simplified verify_creat(): if expected is success, call creat(), close fd, print TPASS if expected is failure, use TST_EXP_FAIL2() for ETXTBSY Removed extra verbose kernel-info messages Removed exec of external child binary and replaced it with an in-process forked child using TST_CHECKPOINT_WAKE() + pause() Removed .resource_files from test lepillai
2026-05-13  7:57 ` linuxtestproject.agent [this message]
2026-05-13 12:10 ` Cyril Hrubis

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=20260513075714.3992-1-linuxtestproject.agent@gmail.com \
    --to=linuxtestproject.agent@gmail.com \
    --cc=lepillai@linux.ibm.com \
    --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