From: Sayali Patil <sayalip@linux.ibm.com>
To: AnishMulay <anishm7030@gmail.com>,
akpm@linux-foundation.org, david@kernel.org, shuah@kernel.org
Cc: lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com,
vbabka@suse.cz, rppt@kernel.org, surenb@google.com,
mhocko@suse.com, linux-mm@kvack.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests/mm: skip migration tests if NUMA is unavailable
Date: Thu, 19 Feb 2026 12:55:51 +0530 [thread overview]
Message-ID: <e86ce6a1-fb37-4139-a3e9-6f8ee6276737@linux.ibm.com> (raw)
In-Reply-To: <20260218163941.13499-1-anishm7030@gmail.com>
Hi Anish,
On 18/02/26 22:09, AnishMulay wrote:
> Currently, the migration test asserts that numa_available() returns 0.
> On systems where NUMA is not available (returning -1), such as certain
> ARM64 configurations or single-node systems, this assertion fails and
> crashes the test.
>
> Update the test to check the return value of numa_available(). If it
> is less than 0, skip the test gracefully instead of failing.
>
> This aligns the behavior with other MM selftests (like rmap) that
> skip when NUMA support is missing.
>
> Signed-off-by: AnishMulay <anishm7030@gmail.com>
I tested it on my system and its skipping the test if NUMA not available.
TAP version 13
1..6
# Starting 6 tests from 1 test cases.
# RUN migration.private_anon ...
# SKIP NUMA not available
# OK migration.private_anon
ok 1 migration.private_anon # SKIP NUMA not available
# RUN migration.shared_anon ...
# SKIP NUMA not available
# OK migration.shared_anon
ok 2 migration.shared_anon # SKIP NUMA not available
# RUN migration.private_anon_thp ...
# SKIP NUMA not available
# OK migration.private_anon_thp
ok 3 migration.private_anon_thp # SKIP NUMA not available
# RUN migration.shared_anon_thp ...
# SKIP NUMA not available
# OK migration.shared_anon_thp
ok 4 migration.shared_anon_thp # SKIP NUMA not available
# RUN migration.private_anon_htlb ...
# SKIP NUMA not available
# OK migration.private_anon_htlb
ok 5 migration.private_anon_htlb # SKIP NUMA not available
# RUN migration.shared_anon_htlb ...
# SKIP NUMA not available
# OK migration.shared_anon_htlb
ok 6 migration.shared_anon_htlb # SKIP NUMA not available
# PASSED: 6 / 6 tests passed.
# 6 skipped test(s) detected. Consider enabling relevant config options
to improve c
overage.
# Totals: pass:0 fail:0 xfail:0 xpass:0 skip:6 error:0
Tested-by: Sayali Patil <sayalip@linux.ibm.com>
Thanks,
Sayali
> ---
> tools/testing/selftests/mm/migration.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/mm/migration.c b/tools/testing/selftests/mm/migration.c
> index ee24b88c2b248..60e78bbfc0e3e 100644
> --- a/tools/testing/selftests/mm/migration.c
> +++ b/tools/testing/selftests/mm/migration.c
> @@ -36,7 +36,8 @@ FIXTURE_SETUP(migration)
> {
> int n;
>
> - ASSERT_EQ(numa_available(), 0);
> + if (numa_available() < 0)
> + SKIP(return, "NUMA not available");
> self->nthreads = numa_num_task_cpus() - 1;
> self->n1 = -1;
> self->n2 = -1;
next prev parent reply other threads:[~2026-02-19 7:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-18 16:39 AnishMulay
2026-02-19 1:04 ` SeongJae Park
2026-02-19 4:08 ` Dev Jain
2026-02-19 4:43 ` Anshuman Khandual
2026-02-19 7:25 ` Sayali Patil [this message]
2026-02-19 9:07 ` David Hildenbrand (Arm)
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=e86ce6a1-fb37-4139-a3e9-6f8ee6276737@linux.ibm.com \
--to=sayalip@linux.ibm.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=anishm7030@gmail.com \
--cc=david@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@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