[LTP] syscalls: Add epoll_create03
Cyril Hrubis
chrubis@suse.cz
Thu Apr 23 13:47:57 CEST 2026
Hi!
> > + TST_PROCESS_STATE_WAIT(pid, 'S', 0);
> > + SAFE_CLOSE(fds[1]);
> > + SAFE_CLOSE(fds[0]);
> > + SAFE_CLOSE(efd);
> > +}
> > +
> > +static void cleanup(void)
> > +{
> > + if (fds[1] > 0)
> > + SAFE_CLOSE(fds[1]);
>
> fds[] and efd are closed in run() but not reset to -1;
We already have "No manual reset after SAFE_CLOSE" in the c-agent.md but
I guess that the LLM didn't infer from that rule that the fd is set to
-1 by SAFE_CLOSE().
I've send a pull with more explicit description for how cleanup()
handler should be written:
https://github.com/linux-test-project/ltp-agent/pull/6
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list