From: linuxtestproject.agent@gmail.com
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] landlock: fix make check warnings/errors
Date: Mon, 6 Jul 2026 14:38:06 +0000 [thread overview]
Message-ID: <20260706143806.4130-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260706-fix_make_check_landlock-v1-1-46f821b20128@suse.com>
Hi Andrea,
On Mon, 06 Jul 2026, Andrea Cervesato wrote:
> landlock: fix make check warnings/errors
> - if (strstr(readdir_files[i], de->d_name) != NULL)
> + if (!strstr(readdir_files[i], de->d_name))
> files_counted++;
This inverts the condition. The original incremented files_counted when
de->d_name was found in readdir_files[i]. The patched version increments
it when de->d_name is NOT found.
Removing the redundant != NULL comparison should produce:
if (strstr(readdir_files[i], de->d_name))
files_counted++;
With the ! prefix the count tracks non-matches instead of matches, so
TST_EXP_EQ_LI(files_counted, ARRAY_SIZE(readdir_files)) at the end of
_test_readdir() will produce wrong results.
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
next prev parent reply other threads:[~2026-07-06 14:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 10:32 [LTP] [PATCH] landlock: fix make check warnings/errors Andrea Cervesato
2026-07-06 14:38 ` linuxtestproject.agent [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-07-06 19:17 [LTP] [PATCH v2] " Andrea Cervesato
2026-07-06 20:03 ` [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=20260706143806.4130-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=andrea.cervesato@suse.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox