[LTP] syscalls/statx13: Add basic test for STATX_WRITE_ATOMIC on regular file
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Fri Oct 16 12:52:03 CEST 2026
Hi Gaurav,
On Fri, 16 Oct 2026, Gaurav Pathak wrote:
> syscalls/statx13: Add basic test for STATX_WRITE_ATOMIC on regular file
> +++ b/testcases/kernel/syscalls/statx/statx13.c
> + .type = "xfs",
> + .min_kver = "6.12",
> + .mkfs_opts = (const char *const []){"-f", "-bsize=16K", NULL},
With 4 KiB pages and CONFIG_TRANSPARENT_HUGEPAGE disabled, XFS rejects
this 16 KiB filesystem with ENOSYS even on kernels newer than 6.12.
mapping_max_folio_size_supported() returns PAGE_SIZE in that configuration,
so SAFE_MOUNT2 reports TBROK before the statx checks run.
Use the default XFS block size, or gate the large-block configuration on
its actual prerequisites.
> + * This test validates the STATX_WRITE_ATOMIC feature (introduced in Linux 6.13).
> + * It ensures that supported filesystems (xfs and ext4) correctly report their
> + * atomic write limits to user space when queried via statx().
> + *
> + * Minimum Linux version required is v6.12.
STATX_WRITE_ATOMIC was introduced in 6.11 for block devices; regular-file
reporting on XFS/ext4 arrived in 6.13, so the stated 6.12 minimum is
incorrect. Describe the regular-file support explicitly, correct or remove
the minimum-version sentence, and use :manpage:`statx(2)` for the syscall
reference.
> + .needs_root = 1,
Document in the high-level description 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
More information about the ltp
mailing list