[Linux-kernel-mentees] [RFC v3 1/2] kunit: Support for Parameterized Testing

Brendan Higgins brendanhiggins at google.com
Fri Oct 9 18:23:49 UTC 2020


On Sat, Oct 3, 2020 at 7:50 AM Arpitha Raghunandan <98.arpi at gmail.com> wrote:
[...]
> @@ -254,7 +274,14 @@ static void kunit_run_case_internal(struct kunit *test,
>                 }
>         }
>
> -       test_case->run_case(test);
> +       if (!test->parameterized)
> +               test_case->run_case(test);
> +       else {

Sorry, I just caught this. When you put either the if or else block in
braces; the other should go in braces as well.

> +               int i;
> +
> +               for (i = 0; i < test->max_parameters_count; i++)
> +                       test_case->run_case(test);
> +       }
>  }
>
[...]


More information about the Linux-kernel-mentees mailing list