[LTP] fallocate01: Convert to new API

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Fri Aug 7 12:03:58 CEST 2026


Hi Andrea,

On Fri, 7 Aug 2026, Andrea Cervesato wrote:
> fallocate01: Convert to new API

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

> Convert the fallocate01 test case from the legacy LTP API (test.h) to the
> new tst_test API using a table-driven struct tcase[] and TST_EXP_* macros.

Could the commit body explain why this nontrivial API conversion is needed?
It currently only restates what was converted and how.

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

> 	TEST(fallocate(fdw, FALLOC_FL_KEEP_SIZE, 0, BLOCK_SIZE));
> 	if (TST_RET == -1 && (TST_ERR == EOPNOTSUPP || TST_ERR == ENOSYS))
> 		tst_brk(TCONF, "fallocate() not supported");

Could the filesystem support probe be removed, or availability handling be
restricted to ENOSYS?

Linux 7.2 validates the read-only descriptor, invalid offset and length, and
offset-plus-length overflow before consulting file->f_op->fallocate. These
error cases therefore remain valid when the backing filesystem returns
EOPNOTSUPP for a valid allocation. The new probe skips that coverage, unlike
the legacy test.

> Convert the fallocate02 test case from the legacy LTP API (test.h) to the
> new tst_test API using a table-driven struct tcase[] and TST_EXP_FAIL for
> each error-path oracle.

Could the commit body explain why this nontrivial API conversion is needed?
It currently only restates what was converted and how.

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