On Mon, Apr 06, 2026 at 05:16:54PM +0300, Mike Rapoport wrote:
> From: "Mike Rapoport (Microsoft)" <[email protected]>

> Currently khugepaged decides if a test can run using TEST() macro that
> checks what mem_ops and collapse_context are set by the command line
> arguments.

> For better compatibility with ksefltest framework, add an array of 'struct
> test_case's and redefine TEST() macro to conditionally add enabled tests to
> that array.

It would feel more idiomatic to skip rather than ignore the tests but
both approaches work in the end.

> +     for (int i = 0; i < nr_test_cases; i++) {
> +             struct test_case *t = &test_cases[i];
> +
> +             exit_status = KSFT_PASS;
> +             printf("\nRun test: %s: (%s:%s)\n", t->desc, t->ctx->name, 
> t->ops->name);
> +             t->fn(t->ctx, t->ops);
> +     }

The exit_status handling here is a bit weird but it looks like the test
is a bit weird and I didn't spend time figuring out what the best thing
is.

Attachment: signature.asc
Description: PGP signature

Reply via email to