[LTP] [PATCH v3 5/5] syscalls/clone07: Convert to new API

Cyril Hrubis chrubis@suse.cz
Wed Oct 13 12:00:11 CEST 2021


Hi!
> > I do not get why we need this complicated handler setup.
> > 
> > Why can't we just SAFE_WAITPID() for the child, check the status and
> > fail the test if the status is anything else than:
> > 
> > WIFEXITED(status) && WEXITSTATUS(status) == 0
> > 
> The processing here is to accurately determine whether a segment fault 
> signal has occurred in the child process. Of course, can also use the 
> method you provide, but you can only judge that the child process exits 
> abnormally.

Well I do not think that the SEGFAULT needs to have special treatement
here, as long as the child does anything else than exit with 0 it's a
bug, that's why I think that we should fail the test in all other cases.

I guess that we can add special check for the regression with
WIFSIGNALED() && WTERMSIG() == SIGSEGV and produce slightly different
TFAIL message, but we should really fail all the other cases as well.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list