Skip to contentSkip to conversation

syscalls/fanotify03: included execve(2) to generate_events()

PATCH New Matthew Bobrowski 1 participant 1 message Jan 22, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 2/5 syscalls/fanotify03: included execve(2) to generate_events()

* Created an executable helper program 'fanotify_child' so that can be used within fanotify tests

* Defined .resource_files so that additional test resources can be copied across to the tmp working directory i.e. fanotify_child

* Updated generate_events() so that it now includes a call to execve() on fanotify_child. This is so that we can increase the overall test coverage by generating more events on a watched object

* Updated each tcase events[] to accommodate for the additional events generated by execve()

---
 testcases/kernel/syscalls/fanotify/.gitignore      |  1 +
 testcases/kernel/syscalls/fanotify/fanotify03.c    | 82 ++++++++++++++--------
 .../kernel/syscalls/fanotify/fanotify_child.c      | 14 ++++
 3 files changed, 66 insertions(+), 31 deletions(-)
 create mode 100644 testcases/kernel/syscalls/fanotify/fanotify_child.c
testcases/kernel/syscalls/fanotify/.gitignore +1 -0
index 3818e241f..e08310ed4 100644
@@ -9,3 +9,4 @@
 /fanotify09
 /fanotify10
 /fanotify11
+/fanotify_child
testcases/kernel/syscalls/fanotify/fanotify03.c +51 -31

157 lines not on this page · raw message

testcases/kernel/syscalls/fanotify/fanotify_child.c new file +14 -0
new file mode 100644
index 000000000..2e4e189cb
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2018 Matthew Bobrowski. All Rights Reserved.
+ *
+ * Started by Matthew Bobrowski <[email protected]>
+ *
+ * DESCRIPTION
+ *    Simple helper program that can be invoked from fanotify tests.
+ */
+
+int main(void)
+{
+	return 0;
+}
Signature · 5 lines
2.16.4


-- 
Matthew Bobrowski