[PATCH i-g-t 3/3] lib/kunit: Process module remove error after list errors

Kamil Konieczny kamil.konieczny at linux.intel.com
Fri Jan 26 09:35:57 UTC 2024


Hi Janusz,
On 2024-01-25 at 17:52:12 +0100, Janusz Krzysztofik wrote:
> Skip on any error from test case list gathering phase first, then, in
> preparation for executing those test cases, 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>

Reviewed-by: Kamil Konieczny <kamil.konieczny 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 01198e75dc..436aad58b3 100644
> --- a/lib/igt_kmod.c
> +++ b/lib/igt_kmod.c
> @@ -1245,10 +1245,10 @@ 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(kmod_module_remove_module(tst->kmod, KMOD_REMOVE_FORCE));
>  }
>  
>  static void __igt_kunit(struct igt_ktest *tst,
> -- 
> 2.43.0
> 


More information about the igt-dev mailing list