Skip to contentSkip to conversation

syscalls/fanotify11: new test for report thread id

PATCH Superseded nixiaoming 2 participants 3 messages Sep 27, 2018 – Sep 28, 2018

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

nixiaoming

author
#0 lore raw

PATCH v3 1/1 syscalls/fanotify11: new test for report thread id

syscalls/fanotify11
test fanotify_init with FAN_EVENT_INFO_TID

	data->pid is ID(pid)  of the thread that caused the event
test fanotify_init without FAN_EVENT_INFO_TID
	data->pid is ID(tgid) of the process that caused the event

---

this is not testing an upstream feature, only RFC.

 runtest/syscalls                                |   1 +
 testcases/kernel/syscalls/fanotify/.gitignore   |   1 +
 testcases/kernel/syscalls/fanotify/Makefile     |   2 +-
 testcases/kernel/syscalls/fanotify/fanotify11.c | 131 ++++++++++++++++++++++++
 4 files changed, 134 insertions(+), 1 deletion(-)
 create mode 100644 testcases/kernel/syscalls/fanotify/fanotify11.c
runtest/syscalls +1 -0
index 0d0be77..84b0d6e 100644
@@ -497,6 +497,7 @@ fanotify06 fanotify06
 fanotify07 fanotify07
 fanotify08 fanotify08
 fanotify09 fanotify09
+fanotify11 fanotify11
 
 ioperm01 ioperm01
 ioperm02 ioperm02
testcases/kernel/syscalls/fanotify/.gitignore +1 -0
index ec75539..62180ab 100644
@@ -7,3 +7,4 @@
 /fanotify07
 /fanotify08
 /fanotify09
+/fanotify11
testcases/kernel/syscalls/fanotify/Makefile +1 -1
index bb58878..5d01b48 100644
@@ -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/fanotify11.c new file +131 -0

131 lines not on this page · raw message

Signature · 1 line
2.10.1
#1 lore raw

PATCH v3 1/1 syscalls/fanotify11: new test for report thread id

Quoted 11 lines · nixiaoming

syscalls/fanotify11
test fanotify_init with FAN_EVENT_INFO_TID

        data->pid is ID(pid)  of the thread that caused the event
test fanotify_init without FAN_EVENT_INFO_TID
        data->pid is ID(tgid) of the process that caused the event

---

this is not testing an upstream feature, only RFC.

Nixiaoming,

This is very close to the test I wanted to see. Now I have are a few more nits and some comments I made on previous version that were probably not communicated properly, so I rather take your test to my development tree and make some small changes myself if you don't mind.

I do need one more legal thing from you is that you re-send the patch with correct Copyright line, unless you intended to assign copyright to SUSE...
Either ask your employer or copy from an existing LTP test contributed from your employer and use the current year.

I will then post it along with FAN_FILESYSTEM_MARK test if and when they get merged upstreamed and I will be do the same with the man page update patches.

Thanks and good job!
Amir.

author
#2 lore raw

PATCH v3 1/1 syscalls/fanotify11: new test for report thread id

Quoted 21 lines · Amir Goldstein
Quoted 11 lines · nixiaoming

syscalls/fanotify11
test fanotify_init with FAN_EVENT_INFO_TID

        data->pid is ID(pid)  of the thread that caused the event
test fanotify_init without FAN_EVENT_INFO_TID
        data->pid is ID(tgid) of the process that caused the event

---

this is not testing an upstream feature, only RFC.

Nixiaoming,

This is very close to the test I wanted to see. Now I have are a few more nits and some comments I made on previous version that were probably not communicated properly, so I rather take your test to my development tree and make some small changes myself if you don't mind.

Quoted 6 lines

I do need one more legal thing from you is that you re-send the patch with correct Copyright line, unless you intended to assign copyright to SUSE...
Either ask your employer or copy from an existing LTP test contributed from your employer and use the current year.

thanks for your reminder
My employer is Huawei.
"Copyring to suse" is really inappropriate here.
I will fix it, and re-send patch
thanks

Quoted 7 lines

I will then post it along with FAN_FILESYSTEM_MARK test if and when they get merged upstreamed and I will be do the same with the man page update patches.

Thanks and good job!
Amir.