[LTP] [PATCH 4/6] Add ioctl_pidfd02 test

Cyril Hrubis chrubis@suse.cz
Fri Jun 27 11:47:25 CEST 2025


Hi!
> > +	TST_EXP_EQ_LI(info->mask & PIDFD_INFO_EXIT, PIDFD_INFO_EXIT);
> > +	TST_EXP_EQ_LI(WIFEXITED(info->exit_code), WIFEXITED(status));
> > +	TST_EXP_EQ_LI(WEXITSTATUS(info->exit_code), WEXITSTATUS(status));
> 
> And here we should check that we got the same fields set as in the
> previous case when the process was still running plus the exit_code.
> 
> I suppose that we will need two info structures so that we can do the
> comparsion. Also it wouldn't harm to clear the structures with memset
> before use.

Ah no, if task has been reaped only exit value is available. So in the
latter case only the PIDFD_INFO_EXIT should be set in flags.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list