[LTP] [PATCH v2 2/3] syscalls/pause02: Refactor into new API
Ricardo B. Marlière
rbm@suse.com
Mon Feb 24 11:49:54 CET 2025
Hello Cyril,
On Fri Feb 21, 2025 at 7:39 AM -03, Cyril Hrubis wrote:
> 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).
Thanks for the review and explanations! I'll address your points in the
next revision.
- Ricardo.
More information about the ltp
mailing list