[LTP] [COMMITTED] [PATCH 6/7] syscalls/inotify06: Cleanup

Cyril Hrubis chrubis@suse.cz
Fri Mar 2 16:48:40 CET 2018


* Remove empty cleanup

* Make use of SAFE_MACROS()

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
 testcases/kernel/syscalls/inotify/inotify06.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/testcases/kernel/syscalls/inotify/inotify06.c b/testcases/kernel/syscalls/inotify/inotify06.c
index aff07e84c..a3a60180a 100644
--- a/testcases/kernel/syscalls/inotify/inotify06.c
+++ b/testcases/kernel/syscalls/inotify/inotify06.c
@@ -55,10 +55,6 @@
 
 char names[FILES][PATH_MAX];
 
-static void cleanup(void)
-{
-}
-
 static void setup(void)
 {
 	int i;
@@ -105,15 +101,14 @@ static void verify_inotify(void)
 	tst_res(TPASS, "kernel survived inotify beating");
 
 	/* Kill the child creating / deleting files and wait for it */
-	kill(pid, SIGKILL);
-	wait(NULL);
+	SAFE_KILL(pid, SIGKILL);
+	SAFE_WAIT(NULL);
 }
 
 static struct tst_test test = {
 	.needs_tmpdir = 1,
 	.forks_child = 1,
 	.setup = setup,
-	.cleanup = cleanup,
 	.test_all = verify_inotify,
 };
 
-- 
2.13.6



More information about the ltp mailing list