[PATCH i-g-t v2 6/6] lib/kunit: Process module remove error after list errors
Kamil Konieczny
kamil.konieczny at linux.intel.com
Thu Feb 1 14:55:01 UTC 2024
Hi Janusz,
On 2024-01-31 at 19:03:53 +0100, Janusz Krzysztofik wrote:
> Skip on any error from test case list gathering first, then, in
> preparation for executing those test cases, on an error from unloading the
> test module loaded in list only mode, so it is more clear if listing the
> test cases was successful or not.
>
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>
> ---
> lib/igt_kmod.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
> index 53c54b1a0d..741c7fd055 100644
> --- a/lib/igt_kmod.c
> +++ b/lib/igt_kmod.c
> @@ -1225,11 +1225,11 @@ static void kunit_get_tests(struct igt_list_head *tests,
> free(case_name);
> }
>
> - igt_skip_on(kmod_module_remove_module(tst->kmod, KMOD_REMOVE_FORCE));
> -
> igt_skip_on_f(err,
> "KTAP parser failed while getting a list of test cases\n");
> igt_skip_on(igt_list_empty(tests));
This skip_on will prevent module unload below... What about
remembering both and skipping on list_empty() only after module unload?
For example:
testslist_is_empty = igt_list_empty(tests);
unload_failed = kmod_module_remove_module(tst->kmod, KMOD_REMOVE_FORCE);
igt_skip_on(testslist_is_empty);
igt_skip_on_f(unload_failed, "kmod %s unload failed\n", tst->kmod);
Regards,
Kamil
> +
> + igt_skip_on(kmod_module_remove_module(tst->kmod, KMOD_REMOVE_FORCE));
> }
>
> static void __igt_kunit(struct igt_ktest *tst,
> --
> 2.43.0
>
More information about the Intel-xe
mailing list