[LTP] [PATCH 0/3] Make fanotify10 test yet more reliable

Jan Kara
2022-11-15T12:48:07Z

Hello!

I was debugging with Pengfei Xu why fanotify10 testcase still occasionally
fails in his test setup. After a lot of back and forth we have identified two
causes. One lies within the kernel slab reclaim itself (fix submitted), the
other one is the inherent problem that slab reclaim needs to first reclaim
dentries (which means going through round of LRU aging before dentry is
reclaimed) and then inodes have to go through LRU aging before they are
reclaimed. As a result code dropping slab caches can decide there's not enough
forward progress and stop before the inodes we are interested in are evicted.

This patch modifies fanotify10 testcase to create multiple files / dirs with
ignore marks and return success if at least half of ignore marks got reclaimed.
This both gives slab reclaim code better feel of forward progress as well as
provides some robustness against some inode not being reclaimed for some random
reason.

With the kernel fix and this modification to fanotify10 testcase, Xu cannot
trigger the failure anymore.

Honza