Skip to contentSkip to conversation

syscalls/fanotify11: new test for report thread id

PATCH Superseded nixiaoming 2 participants 3 messages Sep 28, 2018

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

nixiaoming

author
#0 lore raw

PATCH v4 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 v4 1/1 syscalls/fanotify11: new test for report thread id

Quoted 71 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.

 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 +12 -0
new file mode 100644
index 0000000..45959b4
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2018 Huawei.  All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * Further, this software is distributed without any warranty that it is

testcases/kernel/syscalls/fanotify/fanotify11.c line 22

Quoted 10 lines
testcases/kernel/syscalls/fanotify/fanotify11.c new file +10 -0
+ * free of the rightful claim of any third person regarding infringement
+ * or the like.  Any license provided herein, whether implied or
+ * otherwise, applies only to this software file.  Patent licenses, if
+ * any, provided herein do not apply to combinations of this program with
+ * other software, or any other product whatsoever.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *

I also need your permission to use license
SPDX-License-Identifier: GPL-2.0-or-later

Instead of only GPL 2.0.

Thanks,
Amir.

author
#2 lore raw

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

Quoted 13 lines · Amir Goldstein
Quoted 12 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.

.....

Quoted 32 lines
Quoted 18 lines
testcases/kernel/syscalls/fanotify/fanotify11.c new file +12 -0
new file mode 100644
index 0000000..45959b4
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2018 Huawei.  All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * Further, this software is distributed without any warranty that it is

testcases/kernel/syscalls/fanotify/fanotify11.c line 22

Quoted 10 lines
testcases/kernel/syscalls/fanotify/fanotify11.c new file +10 -0
+ * free of the rightful claim of any third person regarding infringement
+ * or the like.  Any license provided herein, whether implied or
+ * otherwise, applies only to this software file.  Patent licenses, if
+ * any, provided herein do not apply to combinations of this program with
+ * other software, or any other product whatsoever.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *

I also need your permission to use license
SPDX-License-Identifier: GPL-2.0-or-later

Quoted 5 lines

Instead of only GPL 2.0.

Thanks,
Amir.

ok, I will update and re-send patch
thanks