All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] syscalls/inotify_init: Add cleanup() before exit
@ 2021-11-25  2:27 Zhao Gongyi via ltp
  2022-01-27 14:11 ` Petr Vorel
  0 siblings, 1 reply; 2+ messages in thread
From: Zhao Gongyi via ltp @ 2021-11-25  2:27 UTC (permalink / raw)
  To: ltp

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


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [LTP] [PATCH] syscalls/inotify_init: Add cleanup() before exit
  2021-11-25  2:27 [LTP] [PATCH] syscalls/inotify_init: Add cleanup() before exit Zhao Gongyi via ltp
@ 2022-01-27 14:11 ` Petr Vorel
  0 siblings, 0 replies; 2+ messages in thread
From: Petr Vorel @ 2022-01-27 14:11 UTC (permalink / raw)
  To: Zhao Gongyi; +Cc: ltp

Hi Zhao,

> For inotify_init1_01/inotify_init1_02, Add cleanup() before exit.
While this is correct, how about rewriting tests to use new C API?

https://github.com/linux-test-project/ltp/wiki/C-Test-API

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-27 14:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25  2:27 [LTP] [PATCH] syscalls/inotify_init: Add cleanup() before exit Zhao Gongyi via ltp
2022-01-27 14:11 ` Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.