[LTP] [PATCH v7] Refactor fork05 using new LTP API

Cyril Hrubis chrubis@suse.cz
Thu Sep 12 15:38:45 CEST 2024


Hi!
Now it compiles fine but stil needs this to run:

diff --git a/testcases/kernel/syscalls/fork/fork05.c b/testcases/kernel/syscalls/fork/fork05.c
index 89dc38916..dc77b7560 100644
--- a/testcases/kernel/syscalls/fork/fork05.c
+++ b/testcases/kernel/syscalls/fork/fork05.c
@@ -104,14 +104,15 @@ static void run(void)

        SAFE_WAITPID(pid, &status, 0);

-       if (WIFEXITED(status) && WEXITSTATUS(status))
+       if (WIFEXITED(status) && WEXITSTATUS(status) == 0)
                tst_res(TPASS, "Child did exit with 0");
        else
                tst_res(TFAIL, "Child %s", tst_strstatus(status));
 }

 static struct tst_test test = {
-       .test_all = run
+       .test_all = run,
+       .forks_child = 1,
 };


-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list