[LTP] Added new_behavior flag to detect kernel version Kernel >= 6.11: Tests that creat() succeeds (write to executed file allowed)

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Tue Apr 21 07:35:23 CEST 2026


Hi Lekshmi,

On 2026-04-21, lekshmi-cpillai wrote:
> Added new_behavior flag to detect kernel version Kernel >= 6.11: Tests that creat() succeeds (write to executed file allowed)

Use imperative mood in the subject: "creat07: Support both old and new
write-to-executed-file behavior". Also add a commit body explaining why
the change is needed — that the previous tst_brk(TCONF) silently skipped
the test on all kernels >= 6.11 instead of verifying the allowed behavior.
Finally, the Signed-off-by tag is missing.

> +static int new_behavior;

[...]

> -               tst_brk(TCONF, "Skipping test, write to executed file is "
> -                       "allowed since 6.11-rc1.\n"
> -                       "2a010c412853 (\"fs: don't block i_writecount during exec\")");
> +               new_behavior = 1;

The logic change is correct. However the doc comment at the top of the
file still only mentions ETXTBSY — update it to describe both behaviors.

[...]

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

- creat07.c:35 — O_WRONLY (value 1) is passed as the mode argument to
  creat(); the second parameter is mode_t, not open flags — likely
  intended to be 0600.

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

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


More information about the ltp mailing list