[LTP] fanotify20: Skip FAN_REPORT_PIDFD | FAN_REPORT_TID test on v7.2+
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Wed Jun 17 09:37:57 CEST 2026
Hi AnonymeMeow,
On Wed, Jun 17, 2026, AnonymeMeow wrote:
> fanotify20: Skip FAN_REPORT_PIDFD | FAN_REPORT_TID test on v7.2+
--- [PATCH 1/5] ---
> + if (tst_kvercmp(7, 2, 0) >= 0)
> + tst_brk(TCONF, "FAN_REPORT_PIDFD | FAN_REPORT_TID is supported "
> + "since v7.2, skipping test");
tst_brk(TCONF) in setup aborts ALL test cases. The second test case
(FAN_REPORT_PIDFD | FAN_REPORT_FID | FAN_REPORT_DFID_NAME expected to
succeed) is still valid on v7.2+ but will never run.
Should this be a per-test-case skip instead, so that only the EINVAL
case is skipped on v7.2+?
--- [PATCH 4/5] ---
> fanotify21: Add test variants for FAN_REPORT_TID
> + if (TST_VARIANT_PIDFD_THREAD) {
> + fanotify_fd = -1;
> + thread_pidfd_unsupported = fanotify_init_flags_supported_on_fs(
> + FAN_REPORT_PIDFD | FAN_REPORT_TID, ".");
> + if (thread_pidfd_unsupported)
> + return;
> + init_flags |= FAN_REPORT_TID;
> + }
FAN_REPORT_PIDFD combined with FAN_REPORT_TID is a v7.2 feature and
v7.2 has not been released yet (latest stable is v7.1). Per LTP
convention, tests exercising unreleased kernel features need a
[STAGING] subject prefix and should go into runtest/staging until
the kernel release is finalized.
This applies to patches 4/5 and 5/5 which add FAN_REPORT_TID variant
coverage.
Verdict - Needs revision
Pre-existing issues (not introduced by this series):
- testcases/kernel/syscalls/fanotify/Makefile: per-target CFLAGS is
placed before testcases.mk instead of between the two includes.
- testcases/kernel/syscalls/fanotify/fanotify21.c: `fanotify_fd` is
initialized to 0 (implicit) and the cleanup guard uses `>= 0`
instead of the LTP-conventional `-1` init + `!= -1` guard.
---
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