[LTP] shmctl03: Fix 32-bit compat mode failure by adjusting comparisons for compat mode truncation
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Wed Apr 29 14:33:55 CEST 2026
Hi Wei,
On Wed, 29 Apr 2026, Wei Gao wrote:
> shmctl03: Fix 32-bit compat mode failure by adjusting comparisons for compat mode truncation
> Link: https://lore.kernel.org/ltp/aJm5SBOaRoe1e0PB@yuki.lan/
> Signed-off-by: Wei Gao <wegao@suse.com>
This is a bugfix; please add a Fixes: tag pointing to the commit that
introduced the regression.
[...]
> +#define TST_ASSERT_SATURATED_INT 0x01
> +#define TST_ASSERT_BITWISE 0x04
0x02 is unused without explanation. Either renumber TST_ASSERT_BITWISE
to 0x02 or add a comment marking the gap as reserved.
[...]
> + if (flags & TST_ASSERT_SATURATED_INT) {
> + expected_val = (sys_val_64 > (unsigned long long)INT_MAX) ? (unsigned long)INT_MAX : (unsigned long)sys_val_64;
Line exceeds 80 columns. Split into an if/else block:
if (sys_val_64 > (unsigned long long)INT_MAX)
expected_val = (unsigned long)INT_MAX;
else
expected_val = (unsigned long)sys_val_64;
---
Note:
Our agent completed the review of the patch. The full review can be
found at: https://patchwork.ozlabs.org/project/ltp/list/?series=502039
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
More information about the ltp
mailing list