From: linuxtestproject.agent@gmail.com
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] tst_assert: Use 'long long' to fix 32bit compat mode truncation
Date: Fri, 18 Sep 2026 17:06:42 +0000 [thread overview]
Message-ID: <20260918170642.4762-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260918125021.1939455-2-pvorel@suse.cz>
Hi Andrea,
On Fri, 18 Sep 2026, Andrea Cervesato wrote:
> [PATCH 1/2] tst_assert: Use 'long long' to fix 32bit compat mode truncation
--- [PATCH 1/2] ---
> - if (val == sys_val) {
> + if (val == (unsigned long)sys_val) {
> tst_res_(file, lineno, TPASS, "%s = %lu", path, val);
> return;
> }
>
> - tst_res_(file, lineno, TFAIL, "%s != %lu got %lu", path, val, sys_val);
> + tst_res_(file, lineno, TFAIL, "%s != %lu got %lu",
> + path, val, (unsigned long)sys_val);
Casting sys_val to unsigned long causes false passes on 32-bit systems
whenever sys_val exceeds ULONG_MAX and (sys_val & 0xFFFFFFFF) equals val,
while masking the actual value read in the failure log. Compare
val == sys_val directly and report sys_val with %llu on mismatch;
compat-mode truncation should be handled in test-specific code instead of
altering generic assertion semantics.
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-09-18 17:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 12:50 [LTP] [PATCH 0/2] shmctl03 fix on 32bit compat mode Petr Vorel
2026-09-18 12:50 ` [LTP] [PATCH 1/2] tst_assert: Use 'long long' to fix 32bit compat mode truncation Petr Vorel
2026-09-18 17:06 ` linuxtestproject.agent [this message]
2026-09-22 7:35 ` [LTP] " Petr Vorel
2026-09-18 12:50 ` [LTP] [PATCH 2/2] shmctl03: Fix shmmax clamped to INT_MAX in 32bit compat mode Petr Vorel
2026-09-23 11:11 ` Cyril Hrubis
2026-09-24 11:03 ` Petr Vorel
-- strict thread matches above, loose matches on Subject: below --
2026-09-24 11:25 [LTP] [PATCH v2 1/3] tst_assert: Use 'long long' to fix 32bit compat mode truncation Petr Vorel
2026-09-24 13:24 ` [LTP] " linuxtestproject.agent
2026-09-25 6:55 ` Petr Vorel
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=20260918170642.4762-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
/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