[LTP] [PATCH] syscalls/inotify_init: Add cleanup() before exit

Zhao Gongyi zhaogongyi@huawei.com
Thu Nov 25 03:27:35 CET 2021


For inotify_init1_01/inotify_init1_02, Add cleanup() before exit.

Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
---
 testcases/kernel/syscalls/inotify_init/inotify_init1_01.c | 2 +-
 testcases/kernel/syscalls/inotify_init/inotify_init1_02.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/inotify_init/inotify_init1_01.c b/testcases/kernel/syscalls/inotify_init/inotify_init1_01.c
index f1203a495..2c497492b 100644
--- a/testcases/kernel/syscalls/inotify_init/inotify_init1_01.c
+++ b/testcases/kernel/syscalls/inotify_init/inotify_init1_01.c
@@ -171,6 +171,6 @@ int main(int argc, char *argv[])
 			}
 		}
 	}
-	tst_exit();
 	cleanup();
+	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/inotify_init/inotify_init1_02.c b/testcases/kernel/syscalls/inotify_init/inotify_init1_02.c
index b074214f7..3fa85644d 100644
--- a/testcases/kernel/syscalls/inotify_init/inotify_init1_02.c
+++ b/testcases/kernel/syscalls/inotify_init/inotify_init1_02.c
@@ -169,5 +169,6 @@ int main(int argc, char *argv[])
 			tst_resm(TPASS, "inotify_init1(IN_NONBLOCK) PASSED");
 		}
 	}
+	cleanup();
 	tst_exit();
 }
--
2.17.1



More information about the ltp mailing list