The tescase incorrectly assumed that events will be generated for a
directory when FAN_ONDIR was not specified. That used to be the case due
to a kernel bug but it's not the case anymore.

Signed-off-by: Jan Kara <j...@suse.cz>
---
 testcases/kernel/syscalls/fanotify/fanotify02.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/testcases/kernel/syscalls/fanotify/fanotify02.c 
b/testcases/kernel/syscalls/fanotify/fanotify02.c
index 35e73b156d2f..c9aeca183c02 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify02.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify02.c
@@ -78,12 +78,13 @@ int main(int ac, char **av)
 
                if (fanotify_mark(fd_notify, FAN_MARK_ADD, FAN_ACCESS |
                                    FAN_MODIFY | FAN_CLOSE | FAN_OPEN |
-                                   FAN_EVENT_ON_CHILD, AT_FDCWD, ".") < 0) {
+                                   FAN_EVENT_ON_CHILD | FAN_ONDIR, AT_FDCWD,
+                                 ".") < 0) {
                        tst_brkm(TBROK | TERRNO, cleanup,
                            "fanotify_mark (%d, FAN_MARK_ADD, FAN_ACCESS | "
                            "FAN_MODIFY | FAN_CLOSE | FAN_OPEN | "
-                           "FAN_EVENT_ON_CHILD, AT_FDCWD, '.') failed",
-                           fd_notify);
+                           "FAN_EVENT_ON_CHILD | FAN_ONDIR, AT_FDCWD, '.') "
+                           "failed", fd_notify);
                }
 
                /*
-- 
2.1.4


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to