Skip to contentSkip to conversation

syscalls/fanotify02: Fixup testcase

PATCH In review Jan Kara 2 participants 2 messages Apr 2, 2015

lore
Share & tools
lore

Jan Kara

author
#0 lore raw

PATCH 1/1 syscalls/fanotify02: Fixup testcase

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.

---
 testcases/kernel/syscalls/fanotify/fanotify02.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
testcases/kernel/syscalls/fanotify/fanotify02.c +4 -3
index 35e73b156d2f..c9aeca183c02 100644
@@ -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);
 		}
 
 		/*
Signature · 13 lines
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw

Hi!

Quoted 3 lines

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.

Pushed, thanks.

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list