[LTP] [PATCH v2 2/3] syscalls/pause02: Refactor into new API

Cyril Hrubis chrubis@suse.cz
Fri Feb 21 11:39:38 CET 2025


Hi!
This is the same as pause01.c there is no point in having two tests that
do the same.

So rather than rewriting this test we should add a check to the
pause01.c that the process resumed after the signal. Which should be as
easy as:

diff --git a/testcases/kernel/syscalls/pause/pause01.c b/testcases/kernel/syscalls/pause/pause01.c
index adce0ddcf..74a7e514e 100644
--- a/testcases/kernel/syscalls/pause/pause01.c
+++ b/testcases/kernel/syscalls/pause/pause01.c
@@ -20,6 +20,8 @@ static void do_child(void)
        SAFE_SIGNAL(SIGINT, sig_handler);
        TST_EXP_FAIL(pause(), EINTR);
        TST_CHECKPOINT_WAKE(0);
+
+       tst_res(TPASS, "Process resumed from pause()");
 }


And it would also make sense to add more coverage to pause01 in a
subsequent patch. Currently it tests only a single signal, we should
iterate over all signals instead (minus the SIGKILL that is covered by
pause03).

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list