On Sat, Sep 26, 2026 at 10:08:19AM +0900, Hajime Tazaki wrote: > Introduce a kselftest utility to validate memory mapping capabilities > under nommu kernels, aligned with > Documentation/admin-guide/mm/nommu-mmap.rst.
> +static int run_mapping_matrix_test(struct test_case_t *tcase)
> +{
> + int fd;
> + void *ptr;
> + char path_buf[PATH_MAX];
> + const char *path = tcase->pathname;
> + int rc = KSFT_PASS;
> + int expected_error;
> +
> + ksft_print_msg("[RUN] Testing: %s\n", tcase->name);
> + if (fd < 0) {
> + ksft_test_result_skip("Failed to setup temp node: %s\n",
> + tcase->pathname);
Your test reports should use a consistant string when reporting the
result for a given test, that way tooling can tie results together
between different runs. Report the diagnostic information with a
separate print.
> + if (result == KSFT_PASS)
> + ksft_finished();
> +
> + ksft_exit_fail();
> +}
Just unconditionally call ksft_finshed(), it will check the counts of
reported tests and exit with an appropriate error code - you don't need
to manually collate the results in your test code.
signature.asc
Description: PGP signature
