* [LTP] [PATCH v3] syscalls/msgstress01: Set upper bound for num_messages
@ 2025-05-21 8:31 Ricardo B. Marlière via ltp
2025-05-21 8:51 ` Martin Doucha
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ricardo B. Marlière via ltp @ 2025-05-21 8:31 UTC (permalink / raw)
To: Linux Test Project; +Cc: Ricardo B. Marlière
From: Ricardo B. Marlière <rbm@suse.com>
The msgstress01 test has a workaround to limit the amount of processes it
will spawn, but it is only used if the option str_num_messages (-n) is
passed. This is known to be problematic in low memory SUTs, so make sure
it's used.
Suggested-by: Martin Doucha <mdoucha@suse.cz>
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
Changes in v3:
- Simplify TWARN|TINFO check
- Link to v2: https://lore.kernel.org/r/20250512-fixes-msgstress01-v2-1-49df739d93ca@suse.com
Changes in v2:
- Print a message if num_messages value is reduced
- Link to v1: https://lore.kernel.org/r/20250512-fixes-msgstress01-v1-1-d335f7c131c0@suse.com
---
testcases/kernel/syscalls/ipc/msgstress/msgstress01.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/testcases/kernel/syscalls/ipc/msgstress/msgstress01.c b/testcases/kernel/syscalls/ipc/msgstress/msgstress01.c
index ae637e5d7ad89c1257c9cce0145122497c19ee64..22a2c0e7aa52a3956f6221fa2d09991b9871d40d 100644
--- a/testcases/kernel/syscalls/ipc/msgstress/msgstress01.c
+++ b/testcases/kernel/syscalls/ipc/msgstress/msgstress01.c
@@ -271,6 +271,12 @@ static void setup(void)
if (tst_parse_int(str_num_messages, &num_messages, 1, avail_msg))
tst_brk(TBROK, "Invalid number of messages '%s'", str_num_messages);
+ if (num_messages > avail_msg) {
+ tst_res(avail_msg < num_messages / 2 ? TWARN : TINFO,
+ "Number of messages reduced to %d", avail_msg);
+ num_messages = avail_msg;
+ }
+
if (tst_parse_int(str_num_iterations, &num_iterations, 1, MAXNREPS))
tst_brk(TBROK, "Invalid number of messages iterations '%s'", str_num_iterations);
---
base-commit: 5d8cb5a3ef3749eb26ee22d96c9654bfde43030f
change-id: 20250512-fixes-msgstress01-4157ceb54b38
Best regards,
--
Ricardo B. Marlière <rbm@suse.com>
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [LTP] [PATCH v3] syscalls/msgstress01: Set upper bound for num_messages
2025-05-21 8:31 [LTP] [PATCH v3] syscalls/msgstress01: Set upper bound for num_messages Ricardo B. Marlière via ltp
@ 2025-05-21 8:51 ` Martin Doucha
2025-05-21 18:56 ` Cyril Hrubis
2025-05-26 11:05 ` Cyril Hrubis
2 siblings, 0 replies; 4+ messages in thread
From: Martin Doucha @ 2025-05-21 8:51 UTC (permalink / raw)
To: Ricardo B. Marlière, Linux Test Project
Hi,
Reviewed-by: Martin Doucha <mdoucha@suse.cz>
On 21. 05. 25 10:31, Ricardo B. Marlière wrote:
> From: Ricardo B. Marlière <rbm@suse.com>
>
> The msgstress01 test has a workaround to limit the amount of processes it
> will spawn, but it is only used if the option str_num_messages (-n) is
> passed. This is known to be problematic in low memory SUTs, so make sure
> it's used.
>
> Suggested-by: Martin Doucha <mdoucha@suse.cz>
> Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
> ---
> Changes in v3:
> - Simplify TWARN|TINFO check
> - Link to v2: https://lore.kernel.org/r/20250512-fixes-msgstress01-v2-1-49df739d93ca@suse.com
>
> Changes in v2:
> - Print a message if num_messages value is reduced
> - Link to v1: https://lore.kernel.org/r/20250512-fixes-msgstress01-v1-1-d335f7c131c0@suse.com
> ---
> testcases/kernel/syscalls/ipc/msgstress/msgstress01.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/testcases/kernel/syscalls/ipc/msgstress/msgstress01.c b/testcases/kernel/syscalls/ipc/msgstress/msgstress01.c
> index ae637e5d7ad89c1257c9cce0145122497c19ee64..22a2c0e7aa52a3956f6221fa2d09991b9871d40d 100644
> --- a/testcases/kernel/syscalls/ipc/msgstress/msgstress01.c
> +++ b/testcases/kernel/syscalls/ipc/msgstress/msgstress01.c
> @@ -271,6 +271,12 @@ static void setup(void)
> if (tst_parse_int(str_num_messages, &num_messages, 1, avail_msg))
> tst_brk(TBROK, "Invalid number of messages '%s'", str_num_messages);
>
> + if (num_messages > avail_msg) {
> + tst_res(avail_msg < num_messages / 2 ? TWARN : TINFO,
> + "Number of messages reduced to %d", avail_msg);
> + num_messages = avail_msg;
> + }
> +
> if (tst_parse_int(str_num_iterations, &num_iterations, 1, MAXNREPS))
> tst_brk(TBROK, "Invalid number of messages iterations '%s'", str_num_iterations);
>
>
> ---
> base-commit: 5d8cb5a3ef3749eb26ee22d96c9654bfde43030f
> change-id: 20250512-fixes-msgstress01-4157ceb54b38
>
> Best regards,
--
Martin Doucha mdoucha@suse.cz
SW Quality Engineer
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [LTP] [PATCH v3] syscalls/msgstress01: Set upper bound for num_messages
2025-05-21 8:31 [LTP] [PATCH v3] syscalls/msgstress01: Set upper bound for num_messages Ricardo B. Marlière via ltp
2025-05-21 8:51 ` Martin Doucha
@ 2025-05-21 18:56 ` Cyril Hrubis
2025-05-26 11:05 ` Cyril Hrubis
2 siblings, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2025-05-21 18:56 UTC (permalink / raw)
To: Ricardo B. Marlière; +Cc: Linux Test Project
Hi!
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH v3] syscalls/msgstress01: Set upper bound for num_messages
2025-05-21 8:31 [LTP] [PATCH v3] syscalls/msgstress01: Set upper bound for num_messages Ricardo B. Marlière via ltp
2025-05-21 8:51 ` Martin Doucha
2025-05-21 18:56 ` Cyril Hrubis
@ 2025-05-26 11:05 ` Cyril Hrubis
2 siblings, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2025-05-26 11:05 UTC (permalink / raw)
To: Ricardo B. Marlière; +Cc: Linux Test Project
Hi!
Pushed, thanks.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-05-26 11:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-21 8:31 [LTP] [PATCH v3] syscalls/msgstress01: Set upper bound for num_messages Ricardo B. Marlière via ltp
2025-05-21 8:51 ` Martin Doucha
2025-05-21 18:56 ` Cyril Hrubis
2025-05-26 11:05 ` Cyril Hrubis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.