[PATCH i-g-t v2 6/6] lib/kunit: Process module remove error after list errors
Janusz Krzysztofik
janusz.krzysztofik at linux.intel.com
Wed Jan 31 18:03:53 UTC 2024
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));
+
+ 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