mbox series

[00/10] Fanotify tests for v5.9

Message ID 20200909175707.10670-1-amir73il@gmail.com
Headers show
Series Fanotify tests for v5.9 | expand

Message

Amir Goldstein Sept. 9, 2020, 5:56 p.m. UTC
Hi Petr,

Following are the tests that were used to develop the upcoming fanotify
features in v5.9.

The inotify/dnotify tests and fanotify09 test case are regression tests
for a mid series bug that has been fixed before the merge.

fanotify10 gets another set of test cases to catch yet another ignored
mask logic bug. The fix commit will be too hard to backport IMO, so
perhaps these test cases should go into a new test with .min_kver = "5.9".

Thanks,
Amir.

Amir Goldstein (10):
  syscalls/fanotify14: Test cases for FAN_REPORT_DFID_NAME
  syscalls/fanotify16: Adjust test to use FAN_REPORT_DFID_NAME
  syscalls/fanotify16: Test more event types with name
  syscalls/fanotify16: Add test cases more init flag combinations
  syscalls/fanotify16: Verify child fid info
  syscalls/fcntl: New test for F_NOTIFY (dnotify)
  syscalls/inotify: New test for watches on both parent and child
  syscalls/fanotify09: Add test case with parent and subdir marks
  syscalls/fanotify10: Test with group flag FAN_REPORT_NAME
  syscalls/fanotify10: Add test cases for merge with ignored mask on
    directory

 runtest/syscalls                              |   3 +
 testcases/kernel/syscalls/fanotify/fanotify.h |  29 +-
 .../kernel/syscalls/fanotify/fanotify09.c     |  57 ++--
 .../kernel/syscalls/fanotify/fanotify10.c     | 181 ++++++++---
 .../kernel/syscalls/fanotify/fanotify14.c     |  10 +-
 .../kernel/syscalls/fanotify/fanotify16.c     | 306 ++++++++++++++----
 testcases/kernel/syscalls/fcntl/fcntl38.c     |  96 ++++++
 testcases/kernel/syscalls/inotify/.gitignore  |   1 +
 testcases/kernel/syscalls/inotify/inotify10.c | 149 +++++++++
 9 files changed, 712 insertions(+), 120 deletions(-)
 create mode 100644 testcases/kernel/syscalls/fcntl/fcntl38.c
 create mode 100644 testcases/kernel/syscalls/inotify/inotify10.c

Comments

Petr Vorel Sept. 10, 2020, 8:16 a.m. UTC | #1
Hi Amir,

> Hi Petr,

> Following are the tests that were used to develop the upcoming fanotify
> features in v5.9.
Thanks a lot for perfect update. There is LTP freeze soon (in 2 weeks [1]).
I'd like to merge your patches although it'll be probably v5.9 release.

Patches LGTM, but I'd like to give change the others to look into them.

I tested all fanotify tests on 5.9.0-rc3 from openSUSE and on various old
kernels from various distros.

Kind regards,
Petr

[1] http://lists.linux.it/pipermail/ltp/2020-September/018860.html

> The inotify/dnotify tests and fanotify09 test case are regression tests
> for a mid series bug that has been fixed before the merge.

> fanotify10 gets another set of test cases to catch yet another ignored
> mask logic bug. The fix commit will be too hard to backport IMO, so
> perhaps these test cases should go into a new test with .min_kver = "5.9".

> Thanks,
> Amir.
Petr Vorel Sept. 10, 2020, 8:34 a.m. UTC | #2
Hi Amir,

> Patches LGTM, but I'd like to give change the others to look into them.
Acked-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr
Petr Vorel Sept. 10, 2020, 11:27 a.m. UTC | #3
Hi Amir,

> Following are the tests that were used to develop the upcoming fanotify
> features in v5.9.

> The inotify/dnotify tests and fanotify09 test case are regression tests
> for a mid series bug that has been fixed before the merge.
Patchset merged.

> fanotify10 gets another set of test cases to catch yet another ignored
> mask logic bug. The fix commit will be too hard to backport IMO, so
> perhaps these test cases should go into a new test with .min_kver = "5.9".
Can we just skip particular test with tst_parse_kver() or tst_kvcmp()? Because
other tests are valid, thus why to skip them (which would be when using
.min_kver).

Kind regards,
Petr
Amir Goldstein Sept. 10, 2020, 1:36 p.m. UTC | #4
On Thu, Sep 10, 2020 at 2:27 PM Petr Vorel <pvorel@suse.cz> wrote:
>
> Hi Amir,
>
> > Following are the tests that were used to develop the upcoming fanotify
> > features in v5.9.
>
> > The inotify/dnotify tests and fanotify09 test case are regression tests
> > for a mid series bug that has been fixed before the merge.
> Patchset merged.
>
> > fanotify10 gets another set of test cases to catch yet another ignored
> > mask logic bug. The fix commit will be too hard to backport IMO, so
> > perhaps these test cases should go into a new test with .min_kver = "5.9".
> Can we just skip particular test with tst_parse_kver() or tst_kvcmp()? Because
> other tests are valid, thus why to skip them (which would be when using
> .min_kver).

Sure I did not know about tst_parse_kver() I will send a patch.

BTW, sorry for the wrong commit id in the test.
Your fix missed removing the old commit from comment:

  * Test cases #17-#23 are regression tests for commit:
  *
  *     497b0c5a7c06 fsnotify: send event to parent and child with single...
  *     eca4784cbb18 fsnotify: send event to parent and child with single...
  */

Thanks,
Amir.
Amir Goldstein Sept. 10, 2020, 1:50 p.m. UTC | #5
On Thu, Sep 10, 2020 at 4:36 PM Amir Goldstein <amir73il@gmail.com> wrote:
>
> On Thu, Sep 10, 2020 at 2:27 PM Petr Vorel <pvorel@suse.cz> wrote:
> >
> > Hi Amir,
> >
> > > Following are the tests that were used to develop the upcoming fanotify
> > > features in v5.9.
> >
> > > The inotify/dnotify tests and fanotify09 test case are regression tests
> > > for a mid series bug that has been fixed before the merge.
> > Patchset merged.
> >
> > > fanotify10 gets another set of test cases to catch yet another ignored
> > > mask logic bug. The fix commit will be too hard to backport IMO, so
> > > perhaps these test cases should go into a new test with .min_kver = "5.9".
> > Can we just skip particular test with tst_parse_kver() or tst_kvcmp()? Because
> > other tests are valid, thus why to skip them (which would be when using
> > .min_kver).
>
> Sure I did not know about tst_parse_kver() I will send a patch.
>
> BTW, sorry for the wrong commit id in the test.
> Your fix missed removing the old commit from comment:
>
>   * Test cases #17-#23 are regression tests for commit:
>   *
>   *     497b0c5a7c06 fsnotify: send event to parent and child with single...
>   *     eca4784cbb18 fsnotify: send event to parent and child with single...
>   */
>

Actually, I don't see any examples of tests that use tst_kvcmp()
Do you mind making and testing this change?

All the test cases in fanotify10 with non zero tc->ignored_onchild should be
skipped for kver < 5.9

Thanks,
Amir.
Cyril Hrubis Sept. 10, 2020, 2:43 p.m. UTC | #6
Hi!
> > Sure I did not know about tst_parse_kver() I will send a patch.
> >
> > BTW, sorry for the wrong commit id in the test.
> > Your fix missed removing the old commit from comment:
> >
> >   * Test cases #17-#23 are regression tests for commit:
> >   *
> >   *     497b0c5a7c06 fsnotify: send event to parent and child with single...
> >   *     eca4784cbb18 fsnotify: send event to parent and child with single...
> >   */
> >
> 
> Actually, I don't see any examples of tests that use tst_kvcmp()

It's tst_kvercmp() the tst_kvcmp() is internal library function that
shouldn't be used in testcases.