[LTP] [PATCH] syscalls/fanotify: new test for mount ignore mask

Amir Goldstein amir73il@gmail.com
Tue Sep 11 16:32:18 CEST 2018


On Tue, Sep 11, 2018 at 12:07 PM Richard Palethorpe <rpalethorpe@suse.de> wrote:
>
> Hello,
>
> If a test can handle two different regressions with only slight
> modifications then we should use the test index feature:
> https://github.com/linux-test-project/ltp/wiki/C-Test-Case-Tutorial#6-split-the-test
>
> In more complex cases common code can be put into a shared header file
> or library. Whatever is simpler and cleaner overall. A lot of older
> tests have been copied and pasted which leads to big problems in the
> long term.
>

All right. I have already written this test with a test index to cover
all possible
mixes of mark types include and exclude masks:
https://github.com/amir73il/ltp/blob/fanotify_sb/testcases/kernel/syscalls/fanotify/fanotify13.c
This gives better coverage than fanotify06 and fanotify10 combined.

However, if I modify test fanotify06 instead of forking test fanotify10, the
test (fanotify06) is going to start failing on non-master kernels.
Is that acceptable for LTP? I am asking because in fstests project, we have
the practice not to change an existing test to failing. When we find a
new regression
we write a new variant of the test for it.

If changing an existing test to cover more cases is appropriate than I am
going to generalize fanotify06 (as fanotify13 linked above) and then
when FAN_MARK_FILESYSTEM mark type support is added to kernel
all I will need to do is change the test again to add another mark type
to  fanotify_mark_types array.

Thoughts?

Thanks,
Amir.


More information about the ltp mailing list