[LTP] landlock04: Fix false TFAIL in _test_truncate() deny path
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Mon Aug 24 12:38:32 CEST 2026
Hi Avinesh,
On Mon, Aug 24, 2026, Avinesh Kumar wrote:
> landlock04: Fix false TFAIL in _test_truncate() deny path
> + fd = exp_err ? open(FILE_TRUNCATE, O_WRONLY, PERM_MODE)
> + : SAFE_OPEN(FILE_TRUNCATE, O_WRONLY, PERM_MODE);
> if (fd != -1) {
Could the deny branch report open() errors other than EACCES? EACCES is an
expected reason to skip ftruncate() when write access is denied, but open(2)
can also fail with EMFILE, ENFILE, or ENOMEM. Those failures currently take
the same fd == -1 path, silently skip the ftruncate() assertion, and let the
variant pass without testing it.
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