From: linuxtestproject.agent@gmail.com
To: Gaurav Pathak <gpathak@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] syscalls/statx13: Add basic test for STATX_WRITE_ATOMIC on regular file
Date: Wed, 14 Oct 2026 07:52:53 +0000 [thread overview]
Message-ID: <20261014075253.9979-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20261014062016.178140-1-gpathak@suse.de>
Hi Gaurav,
On 13 Oct 2026, Gaurav Pathak wrote:
> syscalls/statx13: Add basic test for STATX_WRITE_ATOMIC on regular file
> + struct ltp_statx buff;
> +
> + TST_EXP_PASS(statx(AT_FDCWD, TESTFILE, 0, STATX_BASIC_STATS | STATX_WRITE_ATOMIC, &buff.buff),
> + "statx(AT_FDCWD, %s, 0, STATX_BASIC_STATS | STATX_WRITE_ATOMIC, &buf)", TESTFILE);
TST_EXP_PASS reports failure but does not return, so a statx() error leaves
the following checks reading uninitialized output. Return immediately when
!TST_PASS before accessing buff. Allocate this syscall buffer through .bufs
rather than on the stack.
> + .min_kver = "6.11",
> ...
> + .type = "xfs",
> + .mkfs_opts = (const char *const []){"-f", "-bsize=16K", NULL},
Linux 6.11 rejects XFS blocks larger than PAGE_SIZE, so this configuration
fails to mount on a 4 KiB-page system admitted by min_kver. The framework
reports TBROK before setup or feature detection, also preventing the ext4
case from running. Use a portable block size or separately gate this
large-block configuration.
> + if (!(buff.data.stx_attributes & STATX_ATTR_WRITE_ATOMIC))
> + tst_brk(TCONF, "STATX_WRITE_ATOMIC unsupported by block dev or filesystem: STATX_ATTR_WRITE_ATOMIC missing from stx_attributes");
A response with nonzero atomic limits but a missing support attribute is
inconsistent, not simply unsupported. This branch hides that regression as
TCONF despite the stated goal of validating the attribute. Check
attribute/limit consistency first and reserve TCONF for unsupported results
with zero limits.
> + uint32_t stx_atomic_write_segments_max; \
verify_statx() never checks this returned limit. A response advertising
atomic writes with segments_max = 0 passes every assertion, although it
cannot describe a nonempty atomic write. Require
stx_atomic_write_segments_max > 0 when support is advertised.
> + if (buff.data.stx_atomic_write_unit_min <= buff.data.stx_atomic_write_unit_max)
> + tst_res(TPASS, "stx_atomic_write_unit_min(%u) <= stx_atomic_write_unit_max(%u)",
> + buff.data.stx_atomic_write_unit_min, buff.data.stx_atomic_write_unit_max);
> + else
> + tst_res(TFAIL, "stx_atomic_write_unit_min(%u) > stx_atomic_write_unit_max(%u)",
> + buff.data.stx_atomic_write_unit_min, buff.data.stx_atomic_write_unit_max);
Use TST_EXP_EXPR for this comparison and the repeated power-of-two
assertions instead of manual TPASS/TFAIL branches.
> + * It ensures that supported filesystems (xfs and nfs) correctly report their
> + * atomic write limits to user space when queried via statx().
The filesystem list tests XFS and ext4, not NFS. Describe the actual
regular-file checks using :manpage:`statx(2)` and document that root is
required to format and mount the test filesystems.
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
prev parent reply other threads:[~2026-10-14 8:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 2:56 [LTP] [PATCH] syscalls/statx13: Add basic test for STATX_WRITE_ATOMIC on regular file Gaurav Pathak
2026-09-17 10:53 ` Gaurav Pathak
2026-09-17 11:17 ` [LTP] " linuxtestproject.agent
2026-09-17 14:19 ` [LTP] [PATCH] " Petr Vorel
2026-09-18 11:04 ` gpathak
2026-09-17 14:23 ` Petr Vorel
2026-09-18 11:12 ` [LTP] [PATCH v3] " Gaurav Pathak
2026-09-18 12:51 ` [LTP] " linuxtestproject.agent
2026-10-05 13:18 ` Andrea Cervesato via ltp
2026-10-08 14:26 ` [LTP] [PATCH] " Andrea Cervesato via ltp
2026-09-17 11:15 ` [LTP] " linuxtestproject.agent
2026-10-12 7:23 ` [LTP] [PATCH v4 0/1] " Gaurav Pathak
2026-10-12 7:23 ` [LTP] [PATCH v4 1/1] " Gaurav Pathak
2026-10-12 12:43 ` Andrea Cervesato via ltp
2026-10-13 9:07 ` [LTP] [PATCH v5] " Gaurav Pathak
2026-10-13 11:27 ` [LTP] " linuxtestproject.agent
2026-10-14 6:20 ` [LTP] [PATCH v6] " Gaurav Pathak
2026-10-14 7:52 ` linuxtestproject.agent [this message]
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=20261014075253.9979-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=gpathak@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.