[LTP] [PATCH] fanotify01: Test setting two marks on different filesystems

Amir Goldstein amir73il@gmail.com
Fri Jan 26 08:38:14 CET 2024


On Thu, Jan 25, 2024 at 4:44 PM Petr Vorel <pvorel@suse.cz> wrote:
>
> > On Thu, Jan 25, 2024 at 2:23 PM Petr Vorel <pvorel@suse.cz> wrote:
>
> > > > When tested fs has zero fsid (e.g. fuse) and events are reported
> > > > with fsid+fid, watching different filesystems with the same group is
> > > > not supported.
>
> > > > Try to setup a bogus mark on test tmp dir, in addition to the mark
> > > > on the tested filesystem, to check if marks on different filesystems
> > > > are supported.
>
> > > > Run on all filesystem to test both fs with zero fsid (e.g. fuse) and
> > > > fs with valid fsid.
>
> > > > Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> > > > ---
>
> > > Hi Amir,
>
> > > > Petr,
>
> > > > The fanotify tests changes that you already picked from my github [1]
> > > > have to do with fixing new test failures in v6.7 and v6.8-rc1, dues to
> > > > the fact that each of those kernel versions added new filesystems that
> > > > support fanotify events with fid+fsid.
>
> > > > This is the only change to test new functionality in v6.8-rc1, namely,
> > > > that for fs with zero fsid (e.g. fuse), an fanotify group can watch a
> > > > single fs instance.
>
> > > This patch would have to be rebased, to be applicable of the previous one (which
> > > touches more tests) in your branch.
>
> > I don't understand - this patch is already rebased.
> I meant, you sent just this 2nd commit, without 1st commit
> f80dc512e ("fanotify{01,09,10}: Check for report fid support with mount mark")
> Therefore this commit is not applicable. I got just confused you send only
> this commit with without the previous one...
>
> > I have it in my branch after the fix patches:
>
> > 7db2dac9f (HEAD -> fanotify_fsid) fanotify01: Test setting two marks
> > on different filesystems
> > f80dc512e fanotify{01,09,10}: Check for report fid support with mount mark
> > 9062824a7 (master) fanotify16: Fix test failure on FUSE
> > ea085713f fanotify{14,15,16}: Check for filesystem mark support on filesystem
> > 921f0ce86 fanotify13: Use generic check for mark type support on filesystem
>
>
> > > I also wonder what I did wrong, the branch works after reboot, tested on:
> > > 1) mainline kernel 6.8.0-rc1 in rapido-linux
> > > 2) openSUSE kernel 6.8.0-rc1-2.gf4ba5db-default
> > > 3) 6.7.0-9.gaedda80-default
>
>
> > Which branch works? LTP master branch?
>
> I meant HEAD of your fanotify_fsid branch.
>
> > My claim is that with the current LTP master branch, fanotify01,09,10
> > would fail on kernel 6.8.0-rc1 when running with
> > LTP_DEV_FS_TYPE=exfat (not LTP_SINGLE_FS_TYPE=exfat)
>
> I'm sorry, I overlooked the different variable.
> I see LTP_DEV_FS_TYPE=exfat gets EOPNOTSUPP on LTP master on 6.8.0-rc1:
> fanotify01.c:106: TBROK: fanotify_mark(3, 0x11, 0x3b, ..., fs_mnt/tfile_4503) failed: EOPNOTSUPP (95)
>
> > So at least you should consider applying this fix for the release:
> > f80dc512e fanotify{01,09,10}: Check for report fid support with mount mark
>
> I see. Yes, I reproduced the problem and thus cherry-picked and merged this one
> as bae8ec9a3.
>
> Although this patch (the 2nd commit) should also work everywhere, I'll backport
> it just after the release.

Sounds good.
Better also wait for ACK from Jan on this new test.

>
> Thanks a lot for explanation and sorry for the confusion.
>

No worries.

The change of behavior that many fs started supporting fanotify
with fid events was a bit challenging for those tests.

Sorry for not foreseeing this outcome. Glad it all worked out.

Thanks,
Amir.


More information about the ltp mailing list