diff options
| author | Sayali Patil <sayalip@linux.ibm.com> | 2026-05-21 13:32:51 +0530 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-05-28 21:31:58 -0700 |
| commit | be6b91b52d4491dfc6e22a6541b0b31c8843874a (patch) | |
| tree | df4acf248bc1dd6a0208da7b6d39b1aa6146a564 /tools | |
| parent | 00c29a0ba7ad21ed4fd99f22d51169e2053ad55e (diff) | |
| download | linux-next-history-be6b91b52d4491dfc6e22a6541b0b31c8843874a.tar.gz | |
selftests/mm: use ksft_exit_skip() instead of KSFT_SKIP in uffd-stress
When nr_pages_per_cpu evaluates to zero, the test is skipped by printing a
message and returning KSFT_SKIP manually.
Replace this with ksft_exit_skip(), which prints the skip message and
exits with the correct skip status in a single helper, making the code
consistent with other selftests.
Link: https://lore.kernel.org/88202b56-1dc5-43e2-9d1f-a0823a9531f0@linux.ibm.com
Signed-off-by: Sayali Patil <sayalip@linux.ibm.com>
Cc: David Hildenbrand (Arm) <david@kernel.org>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/testing/selftests/mm/uffd-stress.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/selftests/mm/uffd-stress.c b/tools/testing/selftests/mm/uffd-stress.c index 39e13e2078a9e..3401dd6028f06 100644 --- a/tools/testing/selftests/mm/uffd-stress.c +++ b/tools/testing/selftests/mm/uffd-stress.c @@ -489,9 +489,8 @@ int main(int argc, char **argv) gopts->nr_pages_per_cpu = bytes / gopts->page_size / gopts->nr_parallel; if (!gopts->nr_pages_per_cpu) { - ksft_print_msg("pages_per_cpu = 0, cannot test (%zu / %lu / %lu)\n", + ksft_exit_skip("pages_per_cpu = 0, cannot test (%zu / %lu / %lu)\n", bytes, gopts->page_size, gopts->nr_parallel); - return KSFT_SKIP; } bounces = atoi(argv[3]); |
