From: Petr Vorel <pvorel@suse.cz>
To: Martin Doucha <mdoucha@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/2] cpuset_memory: Fix race in multinode subtests
Date: Wed, 17 Dec 2025 08:08:31 +0100 [thread overview]
Message-ID: <20251217070831.GA34230@pevik> (raw)
In-Reply-To: <20251216173053.29112-2-mdoucha@suse.cz>
Hi Martin,
> In two subtests, memory allocation races against a change of the allowed
> cpuset nodes list. This causes random failures. Add the missing sleep
> to ensure that memory allocation completes before the allowed nodes
> get changed.
> Signed-off-by: Martin Doucha <mdoucha@suse.cz>
> ---
> .../cpuset/cpuset_memory_test/cpuset_memory_testset.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh b/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh
> index 1f68d7444..d13c605e2 100755
> --- a/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh
> +++ b/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh
> @@ -354,7 +354,7 @@ talk2memory_test_for_case_12_13()
> sleep 1
> echo $1 > "$2/tasks"
> /bin/kill -s SIGUSR1 $1
> -
> + sleep 1
Thanks for the fix, this patch merged!
I wonder if this very old test is in a long run worth to rewrite into C, as depending on
sleep is not a good idea and C API would hopefully help to avoid it. (Yeah, we
discuss sleep as a part of ground rules [1].)
Kind regards,
Petr
[1] https://lore.kernel.org/ltp/20251215124404.16395-2-chrubis@suse.cz/
> echo 0 > "$2/cpuset.mems" || return 1
> sleep 1
> /bin/kill -s SIGUSR1 $1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-12-17 7:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-16 17:30 [LTP] [PATCH 1/2] cpuset_memory: Print basic subtest descriptions Martin Doucha
2025-12-16 17:30 ` [LTP] [PATCH 2/2] cpuset_memory: Fix race in multinode subtests Martin Doucha
2025-12-17 7:08 ` Petr Vorel [this message]
2025-12-17 7:13 ` Andrea Cervesato via ltp
2025-12-17 9:39 ` Cyril Hrubis
2025-12-17 7:12 ` [LTP] [PATCH 1/2] cpuset_memory: Print basic subtest descriptions Petr Vorel
2025-12-17 10:26 ` Martin Doucha
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=20251217070831.GA34230@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=mdoucha@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 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.