[LTP] [PATCH v2 1/1] lib: Multiply slow config only for a real tests
Cyril Hrubis
chrubis@suse.cz
Fri Jan 17 11:14:26 CET 2025
Hi!
> > This looks like there is something fundamentally wrong there. If there
> > is a TST_NO_DEFAULT_MAIN defined in the test, the test does not call
> > tst_run_tcases() and the timeout shouln't be set up.
>
> FYI tst_test.c:510 safe_clone(): call tst_multiply_timeout()
Found that one as well. I guess that we need to switch to tst_clone():
diff --git a/testcases/lib/tst_ns_exec.c b/testcases/lib/tst_ns_exec.c
index 6a8e39339..989bb8910 100644
--- a/testcases/lib/tst_ns_exec.c
+++ b/testcases/lib/tst_ns_exec.c
@@ -100,7 +100,12 @@ int main(int argc, char *argv[])
for (i = 0; i < ns_fds; i++)
SAFE_SETNS(ns_fd[i], 0);
- pid = SAFE_CLONE(&args);
+ pid = tst_clone(&args);
+ if (pid < 0) {
+ printf("clone() failed");
+ return 1;
+ }
+
if (!pid)
SAFE_EXECVP(argv[3], argv+3);
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list