All of lore.kernel.org
 help / color / mirror / Atom feed
From: linuxtestproject.agent@gmail.com
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] syscalls: Add epoll_ctl07
Date: Wed, 15 Jul 2026 12:59:55 +0000	[thread overview]
Message-ID: <20260715125955.4118-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260715123612.1684984-2-chrubis@suse.cz>

Hi Cyril,

On Wed, Jul 15, 2026, Cyril Hrubis wrote:
> syscalls: Add epoll_ctl07

--- [PATCH 1/5] ---

> The epoll_ctl05 exercies the loop detector with a longer chain this
> test does the same but only with two epoll fds.

Typo: "exercies" should be "exercises". Also the sentence runs on --
a period or semicolon is needed after "longer chain".

--- [PATCH 2/5] ---

> That checks that subsequent calls to epoll() return all events if there
> were more events than the size of the events array passed to epoll.

The syscall under test is epoll_wait(2), not epoll(). Should read
"subsequent calls to epoll_wait()".

> +static void close_fds(int fds[][2], int n)
> +{
> +	int i;
> +
> +	for (i = 0; i < n; i++) {
> +		if (fds[i][0] > 0) {

The check `> 0` uses 0 as the "not opened" sentinel, but fd 0 is a
valid file descriptor. If SAFE_PIPE() returns fd 0 for fds[i][0]
(which happens when stdin has been closed), both pipe ends would leak.

The convention in this file is already `!= -1` (see epfd). Initialise
the arrays to {-1, -1} and guard with `!= -1`.

--- [PATCH 3/5] ---

> +	for (i = 0; i < NREADY; i++) {
> +		if (ready_fds[i][0] > 0) {

Same `> 0` sentinel issue as in epoll_wait13. The static array is
zero-initialised, but fd 0 is a valid descriptor. Use {-1, -1}
initialisation and guard with `!= -1`.

--- [PATCH 5/5] ---

> +		nwoken = tst_atomic_load(woken);
> +		if (nwoken != round+1) {
> +			tst_res(TFAIL,
> +				"event %d woke %d waiters in total, expected %d",
> +				round+1, nwoken, round);

The condition tests `nwoken != round+1`, so the expected count is
`round+1`, but the third format argument is `round`. When round=0 and
nwoken=2 the message reads "expected 0" instead of "expected 1".
The last argument should be `round+1`.

Verdict - Needs revision

---
Note:

The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2026-07-15 13:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15 12:36 [LTP] [PATCH v2 0/5] Even more epoll tests Cyril Hrubis
2026-07-15 12:36 ` [LTP] [PATCH v2 1/5] syscalls: Add epoll_ctl07 Cyril Hrubis
2026-07-15 12:59   ` linuxtestproject.agent [this message]
2026-07-15 12:36 ` [LTP] [PATCH v2 2/5] syscalls: Add epoll_wait13 Cyril Hrubis
2026-07-15 12:36 ` [LTP] [PATCH v2 3/5] syscalls: Add epoll_wait14 Cyril Hrubis
2026-07-15 12:36 ` [LTP] [PATCH v2 4/5] syscalls: Add epoll_wait15 Cyril Hrubis
2026-07-15 12:36 ` [LTP] [PATCH v2 5/5] syscalls: Add epoll_wait16 EPOLLEXCLUSIVE test Cyril Hrubis
  -- strict thread matches above, loose matches on Subject: below --
2026-07-15  9:41 [LTP] [PATCH 1/5] syscalls: Add epoll_ctl07 Cyril Hrubis
2026-07-15 11:02 ` [LTP] " linuxtestproject.agent
2026-07-15 11:07   ` Cyril Hrubis

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=20260715125955.4118-1-linuxtestproject.agent@gmail.com \
    --to=linuxtestproject.agent@gmail.com \
    --cc=chrubis@suse.cz \
    --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.