From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/2] shmctl03: Fix shmmax clamped to INT_MAX in 32bit compat mode
Date: Wed, 23 Sep 2026 13:11:46 +0200 [thread overview]
Message-ID: <arOz8kIcqqlWEdJ6@yuki.lan> (raw)
In-Reply-To: <20260918125021.1939455-3-pvorel@suse.cz>
Hi!
> Reported-by: Wei Gao <wegao@suse.com>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
> [ pvorel: separate into its own commit, write the commit message ]
> Co-developed-by: Petr Vorel <pvorel@suse.cz>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> testcases/kernel/syscalls/shmctl/shmctl03.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/testcases/kernel/syscalls/shmctl/shmctl03.c b/testcases/kernel/syscalls/shmctl/shmctl03.c
> index 9e1c2f0990..0056f2c4b4 100644
> --- a/testcases/kernel/syscalls/shmctl/shmctl03.c
> +++ b/testcases/kernel/syscalls/shmctl/shmctl03.c
> @@ -30,7 +30,11 @@ static void verify_ipcinfo(void)
> else
> tst_res(TPASS, "shmmin = 1");
>
> - TST_ASSERT_ULONG(PATH_KERN_SHMMAX, info.shmmax);
> + if (tst_is_compat_mode() && info.shmmax == INT_MAX)
> + tst_res(TPASS, "shmmax clamped to INT_MAX in compat mode");
This should be turned into PATH_KERN_SHMMAX >= INT_MAX check instead of
printing TPASS blindly.
> + else
> + TST_ASSERT_ULONG(PATH_KERN_SHMMAX, info.shmmax);
> +
> TST_ASSERT_ULONG(PATH_KERN_SHMMNI, info.shmmni);
> TST_ASSERT_ULONG(PATH_KERN_SHMALL, info.shmall);
> }
> --
> 2.55.0
>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-09-23 11:12 UTC|newest]
Thread overview: 7+ 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 ` [LTP] " linuxtestproject.agent
2026-09-22 7:35 ` 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 [this message]
2026-09-24 11:03 ` 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=arOz8kIcqqlWEdJ6@yuki.lan \
--to=chrubis@suse.cz \
--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