syscalls/fanotify11: new test for report thread id
PATCH v3 1/1 syscalls/fanotify11: new test for report thread id
From: nixiaoming <[email protected]>
Test fanotify_init with FAN_REPORT_TID -
Verify that event->pid is pid of the thread that caused the event
Test fanotify_init without FAN_REPORT_TID -
Verify that event->pid is tgid of the process that caused the event
Signed-off-by nixiaoming <[email protected]>
Signed-off-by Amir Goldstein <[email protected]>
---
Hi Cyril,
This is a test for yet another new fanotify API that was introduced in kernel v4.20-rc1.
The new API as well as this test were written by nixiaoming, but since I helped with review and final touches over v2 of the test, I promissed to post v3 when the time comes...
Thanks,
Amir.
runtest/syscalls | 1 + testcases/kernel/syscalls/fanotify/.gitignore | 1 + testcases/kernel/syscalls/fanotify/Makefile | 2 +- testcases/kernel/syscalls/fanotify/fanotify.h | 4 + .../kernel/syscalls/fanotify/fanotify11.c | 109 ++++++++++++++++++ 5 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 testcases/kernel/syscalls/fanotify/fanotify11.c
runtest/syscalls +1 -0
@@ -508,6 +508,7 @@ fanotify07 fanotify07 fanotify08 fanotify08 fanotify09 fanotify09 fanotify10 fanotify10 +fanotify11 fanotify11 ioperm01 ioperm01 ioperm02 ioperm02
testcases/kernel/syscalls/fanotify/.gitignore +1 -0
@@ -8,3 +8,4 @@ /fanotify08 /fanotify09 /fanotify10 +/fanotify11
testcases/kernel/syscalls/fanotify/Makefile +1 -1
@@ -17,7 +17,7 @@ # top_srcdir ?= ../../../.. - +fanotify11: CFLAGS+=-pthread include $(top_srcdir)/include/mk/testcases.mk include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/kernel/syscalls/fanotify/fanotify.h +4 -0
@@ -54,6 +54,10 @@ static long fanotify_mark(int fd, unsigned int flags, uint64_t mask,#endif /* HAVE_SYS_FANOTIFY_H */ +#ifndef FAN_REPORT_TID +#define FAN_REPORT_TID 0x00000100 +#endif +#ifndef FAN_MARK_INODE #define FAN_MARK_INODE 0#endif
testcases/kernel/syscalls/fanotify/fanotify11.c new file +109 -0
109 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v3 1/1 syscalls/fanotify11: new test for report thread id
Hi!
Pushed, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]