Re: [PATCH v3 2/4] lib/test: Introduce cpumask KUnit test suite

From: Sander Vanheule
Date: Sun Jun 05 2022 - 02:31:22 EST


On Sun, 2022-06-05 at 08:22 +0200, Sander Vanheule wrote:
> Add a basic suite of tests for cpumask, providing some tests for empty
> and completely filled cpumasks.
>
> Signed-off-by: Sander Vanheule <sander@xxxxxxxxxxxxx>
> ---
> +static void test_cpumask_iterators(struct kunit *test)
> +{
> +       EXPECT_FOR_EACH_CPU_EQ(test, &mask_empty);
> +       EXPECT_FOR_EACH_CPU_NOT_EQ(test, &mask_empty);
> +       EXPECT_FOR_EACH_CPU_WRAP_EQ(test, &mask_empty);
> +
> +       EXPECT_FOR_EACH_CPU_EQ(test, &mask_empty);
> +       EXPECT_FOR_EACH_CPU_NOT_EQ(test, &mask_empty);
> +       EXPECT_FOR_EACH_CPU_WRAP_EQ(test, &mask_empty);

This should be one block of &mask_empty, and one block of cpu_possible_mask. I'll fix this in v4
with other comments, or send an update tomorrow.

Best,
Sander