From: Cyril Hrubis <chrubis@suse.cz>
To: linuxtestproject.agent@gmail.com
Cc: ltp@lists.linux.it
Subject: Re: [LTP] syscalls: Add epoll_create03
Date: Thu, 23 Apr 2026 13:47:57 +0200 [thread overview]
Message-ID: <aeoG7byDpoWGmoYB@yuki.lan> (raw)
In-Reply-To: <20260423111755.4154-1-linuxtestproject.agent@gmail.com>
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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-04-23 11:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 9:58 [LTP] [PATCH 0/8] Add more epoll tests Cyril Hrubis
2026-04-23 9:58 ` [LTP] [PATCH 1/8] syscalls: Add epoll_create03 Cyril Hrubis
2026-04-23 11:17 ` [LTP] " linuxtestproject.agent
2026-04-23 11:47 ` Cyril Hrubis [this message]
2026-04-28 7:40 ` [LTP] [PATCH 1/8] " Andrea Cervesato via ltp
2026-04-23 9:58 ` [LTP] [PATCH 2/8] syscalls: Add epoll_wait08 Cyril Hrubis
2026-04-23 9:58 ` [LTP] [PATCH 3/8] syscalls: Add epoll_wait09 Cyril Hrubis
2026-04-23 9:58 ` [LTP] [PATCH 4/8] syscalls: Add epoll_ctl06 Cyril Hrubis
2026-04-28 7:56 ` Andrea Cervesato via ltp
2026-04-23 9:58 ` [LTP] [PATCH 5/8] syscall: Add epoll_wait10 Cyril Hrubis
2026-04-23 9:58 ` [LTP] [PATCH 6/8] syscalls: Add epoll_wait11 Cyril Hrubis
2026-04-23 9:58 ` [LTP] [PATCH 7/8] syscalls: Add epoll_wait12 Cyril Hrubis
2026-04-23 9:58 ` [LTP] [PATCH 8/8] syscalls: Remove old epoll-ltp test Cyril Hrubis
-- strict thread matches above, loose matches on Subject: below --
2026-04-23 12:03 [LTP] [PATCH v2 1/8] syscalls: Add epoll_create03 Cyril Hrubis
2026-04-23 13:43 ` [LTP] " linuxtestproject.agent
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aeoG7byDpoWGmoYB@yuki.lan \
--to=chrubis@suse.cz \
--cc=linuxtestproject.agent@gmail.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.