[LTP] fanotify21: fix test failure when running iterations

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Thu May 28 20:43:53 CEST 2026


Hi Amir,

On Thu, 28 May 2026 18:29:19 +0200, Amir Goldstein wrote:
> fanotify21: fix test failure when running iterations

All good. Reviewed.

On Thu, 28 May 2026 18:29:20 +0200, Amir Goldstein wrote:
> fanotify13: fix test failure when running iterations

> +if (tst_variant && (tc->mask & FAN_DELETE_SELF) &&
> +    (!ovl_bind_mounted || rename_exchange_unsupported)) {
> +/* The eviction of base fs inodes is defered due to overlay held reference */

Typo: "defered" → "deferred". (Moved from old location.)

[...]

> +#define TST_VARIANT_OVL_LOWER (tst_variant & 1)
> +#define TST_VARIANT_OVL_WATCH (tst_variant > 2)

These macros are defined after do_test() but do_test() does not use them —
only do_setup() does. Placement is fine.

[...]

All good otherwise. Reviewed.

Pre-existing issues noticed in the surrounding code (not introduced
by this patch):

- fanotify21.c — fanotify_fd is a global static initialised to 0; if
  do_setup() exits early for tst_variant=0 before SAFE_FANOTIFY_INIT(),
  do_cleanup() would call SAFE_CLOSE(0), closing stdin. Same pattern
  exists in the pre-patch code.

---
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