From: linuxtestproject.agent@gmail.com
To: Wei Gao <wegao@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] shmctl03: Fix 32-bit compat mode failure by adjusting comparisons for compat mode truncation
Date: Wed, 29 Apr 2026 08:04:00 +0000 [thread overview]
Message-ID: <20260429080400.4043-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260413062002.20324-1-wegao@suse.com>
Hi Wei,
On Mon, 13 Apr 2026 06:19:53 +0000, Wei Gao wrote:
> shmctl03: Fix 32-bit compat mode failure by adjusting comparisons for compat mode truncation
> +#define TST_ASSERT_SATURATED_INT 0x01
> +#define TST_ASSERT_SATURATED_ULONG 0x02
> +#define TST_ASSERT_BITWISE 0x04
TST_ASSERT_SATURATED_ULONG is never used in this patch. Either remove it
or rename it to TST_ASSERT_SATURATED_U32 — the current name implies
saturation at ULONG_MAX but it actually clamps to UINT_MAX (32-bit).
> +void tst_assert_ulong(const char *file, const int lineno, const char *path,
> + unsigned long val, int flags)
Continuation should align with the opening '(' to match the declaration
in tst_assert.h.
> + if (tst_is_compat_mode()) {
> + TST_ASSERT_ULONG("/proc/sys/kernel/shmmax", info.shmmax, TST_ASSERT_SATURATED_INT);
> + TST_ASSERT_ULONG("/proc/sys/kernel/shmmni", info.shmmni, TST_ASSERT_BITWISE);
> + TST_ASSERT_ULONG("/proc/sys/kernel/shmall", info.shmall, TST_ASSERT_BITWISE);
Add a comment here explaining why shmmax uses saturation at INT_MAX while
shmmni/shmall use bitwise truncation — the choice is non-obvious without
knowing the kernel compat path behaviour.
> +Signed-off-by: Wei Gao <wegao@suse.com>
This is a bug fix; please add a Fixes: tag pointing to the commit that
originally added shmctl03 without compat mode handling.
Pre-existing issues noticed in the surrounding code (not introduced
by this patch):
- testcases/kernel/syscalls/ipc/shmctl/shmctl03.c:12 — includes
tse_newipc.h using the non-standard tse_ prefix instead of tst_.
---
Note:
Our agent completed the review of the patch. The full review can be
found at: https://patchwork.ozlabs.org/project/ltp/list/?series=499648
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-04-29 8:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-07 9:26 [LTP] [PATCH v1] shmctl03: Fix 32-bit compat mode failure by forcing limits Wei Gao via ltp
2026-04-10 13:14 ` Andrea Cervesato via ltp
2026-04-10 14:12 ` Wei Gao via ltp
2026-04-10 14:32 ` Andrea Cervesato via ltp
2026-04-13 6:19 ` [LTP] [PATCH v2] shmctl03: Fix 32-bit compat mode failure by adjusting comparisons for compat mode truncation Wei Gao via ltp
2026-04-29 8:04 ` linuxtestproject.agent [this message]
2026-04-29 11:18 ` [LTP] [PATCH v3] " Wei Gao via ltp
2026-04-29 12:33 ` [LTP] " linuxtestproject.agent
2026-04-30 3:47 ` [LTP] [PATCH v4] " Wei Gao via ltp
2026-04-30 6:35 ` [LTP] " linuxtestproject.agent
2026-05-06 17:28 ` Andrea Cervesato via ltp
2026-05-07 9:51 ` Wei Gao via ltp
2026-05-07 10:01 ` Andrea Cervesato via ltp
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=20260429080400.4043-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=ltp@lists.linux.it \
--cc=wegao@suse.com \
/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