[LTP] Could you provide some debug method for fanotify10 case?
Pengfei Xu
pengfei.xu@intel.com
Thu Oct 13 14:44:20 CEST 2022
Hi Amir,
On 2022-10-13 at 12:25:59 +0300, Amir Goldstein wrote:
> On Thu, Oct 13, 2022 at 11:28 AM Xu, Pengfei <pengfei.xu@intel.com> wrote:
> >
> >
> >
> > Hi Jan and Amir,
> >
> >
> >
> > Greeting!
> >
> >
> >
> > I saw FAN_MARK_EVICTABLE has been added in 6.0-rc5 mainline kernel by Amir.
>
> FYI, it was merged in v5.19.
>
Ah, thanks for correction!
> >
> > commit 7d5e005d982527e4029b0139823d179986e34cdc
> >
> > Author: Amir Goldstein amir73il@gmail.com
> >
> > Date: Fri Apr 22 15:03:25 2022 +0300
> >
> >
> >
> > And I saw the FAN_MARK_EVICTABLE cases in LTP author is also Amir.
> >
> >
> >
> > Could you provide me some debug method for fanotify10 FAN_MARK_EVICTABLE failed cases?
> >
> >
> >
> > Thanks a lot!
> >
> >
> >
> > Platform: server
> >
> > Kernel: 6.0 mainline kernel
> >
> >
> >
> >
> >
> > This case could be reproduced about 30% rate. (case start from 0, and there are about 30% reproduce rate for case25, 26 and 27)
> >
> > There are 31 cases in fanotify10.c (start from 0, end with 30.)
> >
> > https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/syscalls/fanotify/fanotify10.c
> >
> > https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/syscalls/fanotify/fanotify_child.c (For child process)
> >
> >
> >
> > Case 25: "don't ignore fs events created on a file with evicted ignore mark"
> >
> > Case 26: "don't ignore mount events created inside a parent with evicted ignore mark"
> >
> > Case 27: "don't ignore fs events created inside a parent with evicted ignore mark"
> >
> > I comments all other case and only left case 25, case 26 and case 27 in fanotify10_25 fanotify10_26 fanotify10_27.
> >
>
> The problem is that the test is not very reliable, because there is no
> reliable API
> to evict an inode from cache.
>
> Do you have this commit in the LTP version that you are running?
>
> commit 48cfd7a9977e6268b4aa2600608cebad7e0e42b8
> Author: Jan Kara <jack@suse.cz>
> Date: Thu Aug 25 16:03:06 2022 +0200
>
> syscalls/fanotify10: Make evictable marks test more reliable
>
> In some setups evictable marks tests are failing because the inode with
> evictable mark does not get evicted. Make sure we sync the filesystem
> before we try to drop caches to increase likelyhood the inode will get
> evicted.
>
Yes, I used LTP head commit 8f7120b04f018e93f43834c7da63252290c4abc8
Author: Avinesh Kumar <akumar@suse.de>
Date: Wed Jul 20 12:47:43 2022 +0530
getitimer01.c: convert to new LTP API
It includes the commit 48cfd7a9977 you mentioned.
And I will have a try debug kernel which suggested by Jan Kara.
Thanks Amir and Jan both!
Thanks!
BR.
>
> Thanks,
> Amir.
>
> >
> >
> > Case 25 failed info:
> >
> > fanotify10.c:586: TINFO: Test #25: don't ignore fs events created on a file with evicted ignore mark
> >
> > fanotify10.c:370: TPASS: No fanotify inode ignore marks as expected
> >
> > fanotify10.c:370: TPASS: No fanotify inode ignore marks as expected
> >
> > fanotify10.c:370: TPASS: No fanotify inode ignore marks as expected
> >
> > fanotify10.c:374: TFAIL: Found unexpected inode ignore mark (mflags=240, mask=0 ignored_mask=20)
> >
> > fanotify10.c:374: TFAIL: Found unexpected inode ignore mark (mflags=240, mask=0 ignored_mask=20)
> >
> > fanotify10.c:374: TFAIL: Found unexpected inode ignore mark (mflags=240, mask=0 ignored_mask=20)
> >
> > fanotify10.c:374: TFAIL: Found unexpected inode ignore mark (mflags=240, mask=0 ignored_mask=20)
> >
> > fanotify10.c:374: TFAIL: Found unexpected inode ignore mark (mflags=240, mask=0 ignored_mask=20)
> >
> > fanotify10.c:374: TFAIL: Found unexpected inode ignore mark (mflags=240, mask=0 ignored_mask=20)
> >
> > fanotify10.c:374: TFAIL: Found unexpected inode ignore mark (mflags=240, mask=0 ignored_mask=20)
> >
> > fanotify10.c:374: TFAIL: Found unexpected inode ignore mark (mflags=240, mask=0 ignored_mask=20)
> >
> > fanotify10.c:374: TFAIL: Found unexpected inode ignore mark (mflags=240, mask=0 ignored_mask=20)
> >
> > fanotify10.c:547: TPASS: group 0 (8) got event: mask 20 pid=183494 fd=16
> >
> > fanotify10.c:547: TPASS: group 1 (8) got event: mask 20 pid=183494 fd=16
> >
> > fanotify10.c:547: TPASS: group 2 (8) got event: mask 20 pid=183494 fd=16
> >
> > fanotify10.c:642: TFAIL: group 0 (4) with FAN_MARK_FILESYSTEM did not get event
> >
> > fanotify10.c:642: TFAIL: group 1 (4) with FAN_MARK_FILESYSTEM did not get event
> >
> > fanotify10.c:642: TFAIL: group 2 (4) with FAN_MARK_FILESYSTEM did not get event
> >
> > fanotify10.c:642: TFAIL: group 0 (0) with FAN_MARK_FILESYSTEM did not get event
> >
> > fanotify10.c:642: TFAIL: group 1 (0) with FAN_MARK_FILESYSTEM did not get event
> >
> > fanotify10.c:642: TFAIL: group 2 (0) with FAN_MARK_FILESYSTEM did not get event
> >
> > fanotify10.c:642: TFAIL: group 0 (e00) with FAN_MARK_FILESYSTEM did not get event
> >
> > fanotify10.c:642: TFAIL: group 1 (e00) with FAN_MARK_FILESYSTEM did not get event
> >
> > fanotify10.c:642: TFAIL: group 2 (e00) with FAN_MARK_FILESYSTEM did not get event
> >
> >
> >
> > Case 25 passed dmesg part and case 25 failed dmesg part are in attached, I didn’t see some abnormal from dmesg.
> >
> >
> >
> >
> >
> > Could you provide me some debug way to check the failed case further?
> >
> >
> >
> >
> >
> >
> >
> > Thanks!
> >
> > BR
> >
> > Pengfei
> >
> >
> >
> >
> >
> >
> >
> >
More information about the ltp
mailing list