selftests/mm: print some details when uffd-stress gets bad params
authorBrendan Jackman <jackmanb@google.com>
Tue, 11 Mar 2025 13:18:16 +0000 (13:18 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 17 Mar 2025 05:06:38 +0000 (22:06 -0700)
So this can be debugged more easily.

Link: https://lkml.kernel.org/r/20250311-mm-selftests-v4-5-dec210a658f5@google.com
Signed-off-by: Brendan Jackman <jackmanb@google.com>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Mateusz Guzik <mjguzik@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/uffd-stress.c

index d6b57e5a2e1d7611aa1588ee41601ce16117a574..4ba5bf13a0108435ce8b53340b9e17ccd47e859e 100644 (file)
@@ -457,7 +457,8 @@ int main(int argc, char **argv)
 
        nr_pages_per_cpu = bytes / page_size / nr_parallel;
        if (!nr_pages_per_cpu) {
-               _err("invalid MiB");
+               _err("pages_per_cpu = 0, cannot test (%lu / %lu / %lu)",
+                       bytes, page_size, nr_parallel);
                usage();
        }