The attached is a backported patch for fanotify09 for trusty kernel. The test result was improved (as below) but it doesn't eliminate all failures.
$ sudo ./fanotify09
tst_test.c:1118: INFO: Timeout per run is 0h 05m 00s
fanotify09.c:161: INFO: Test #0: Events on children with both inode and mount marks
fanotify09.c:150: PASS: group 0 got event: mask 2 pid=7950 fd=6 path=/tmp/4gc48T/mntpoint/tfile_7950
fanotify09.c:202: FAIL: first group got more than 1 events (48 > 24)
fanotify09.c:218: FAIL: group 1 got event
fanotify09.c:150: PASS: group 1 got event: mask 10 pid=7950 fd=6 path=/tmp/4gc48T/mntpoint/testdir
fanotify09.c:218: FAIL: group 2 got event
fanotify09.c:150: PASS: group 2 got event: mask 10 pid=7950 fd=6 path=/tmp/4gc48T/mntpoint/testdir
fanotify09.c:161: INFO: Test #1: Events on children and subdirs with both inode and mount marks
fanotify09.c:150: PASS: group 0 got event: mask 2 pid=7950 fd=6 path=/tmp/4gc48T/mntpoint/tfile_7950
fanotify09.c:150: PASS: group 0 got event: mask 10 pid=7950 fd=7 path=/tmp/4gc48T/mntpoint/testdir
fanotify09.c:218: FAIL: group 1 got event
fanotify09.c:150: PASS: group 1 got event: mask 10 pid=7950 fd=6 path=/tmp/4gc48T/mntpoint/testdir
fanotify09.c:218: FAIL: group 2 got event
fanotify09.c:150: PASS: group 2 got event: mask 10 pid=7950 fd=6 path=/tmp/4gc48T/mntpoint/testdir
The attached is a backported patch for fanotify09 for trusty kernel. The test result was improved (as below) but it doesn't eliminate all failures.
$ sudo ./fanotify09 4gc48T/ mntpoint/ tfile_7950 4gc48T/ mntpoint/ testdir 4gc48T/ mntpoint/ testdir 4gc48T/ mntpoint/ tfile_7950 4gc48T/ mntpoint/ testdir 4gc48T/ mntpoint/ testdir 4gc48T/ mntpoint/ testdir
tst_test.c:1118: INFO: Timeout per run is 0h 05m 00s
fanotify09.c:161: INFO: Test #0: Events on children with both inode and mount marks
fanotify09.c:150: PASS: group 0 got event: mask 2 pid=7950 fd=6 path=/tmp/
fanotify09.c:202: FAIL: first group got more than 1 events (48 > 24)
fanotify09.c:218: FAIL: group 1 got event
fanotify09.c:150: PASS: group 1 got event: mask 10 pid=7950 fd=6 path=/tmp/
fanotify09.c:218: FAIL: group 2 got event
fanotify09.c:150: PASS: group 2 got event: mask 10 pid=7950 fd=6 path=/tmp/
fanotify09.c:161: INFO: Test #1: Events on children and subdirs with both inode and mount marks
fanotify09.c:150: PASS: group 0 got event: mask 2 pid=7950 fd=6 path=/tmp/
fanotify09.c:150: PASS: group 0 got event: mask 10 pid=7950 fd=7 path=/tmp/
fanotify09.c:218: FAIL: group 1 got event
fanotify09.c:150: PASS: group 1 got event: mask 10 pid=7950 fd=6 path=/tmp/
fanotify09.c:218: FAIL: group 2 got event
fanotify09.c:150: PASS: group 2 got event: mask 10 pid=7950 fd=6 path=/tmp/