Message ID | 20231003091044.407965-13-janusz.krzysztofik@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Kunit fixes and improvements | expand |
Hi Janusz, On 2023-10-03 at 11:10:47 +0200, Janusz Krzysztofik wrote: > Use a more verbose variant of igt_fail() when failing a dynamic sub- > subtest on kernel taint. Also, print a debug message on string > duplication failure. > > Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@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 05ff178b27..df0e650d49 100644 > --- a/lib/igt_kmod.c > +++ b/lib/igt_kmod.c > @@ -834,7 +834,7 @@ static void __igt_kunit(struct igt_ktest *tst, const char *opts) > if (!pthread_tryjoin_np(modprobe_thread, NULL)) > igt_assert_eq(modprobe.err, 0); > > - igt_fail_on(igt_kernel_tainted(&taints)); > + igt_assert_eq(igt_kernel_tainted(&taints), 0); > } > > free(result); > @@ -861,7 +861,7 @@ void igt_kunit(const char *module_name, const char *name, const char *opts) > */ > if (!name) { > name = strdup(module_name); > - if (name) { > + if (!igt_debug_on(!name)) { > char *suffix = strstr(name, "_test"); > > if (!suffix) > -- > 2.42.0 >
diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 05ff178b27..df0e650d49 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -834,7 +834,7 @@ static void __igt_kunit(struct igt_ktest *tst, const char *opts) if (!pthread_tryjoin_np(modprobe_thread, NULL)) igt_assert_eq(modprobe.err, 0); - igt_fail_on(igt_kernel_tainted(&taints)); + igt_assert_eq(igt_kernel_tainted(&taints), 0); } free(result); @@ -861,7 +861,7 @@ void igt_kunit(const char *module_name, const char *name, const char *opts) */ if (!name) { name = strdup(module_name); - if (name) { + if (!igt_debug_on(!name)) { char *suffix = strstr(name, "_test"); if (!suffix)
Use a more verbose variant of igt_fail() when failing a dynamic sub- subtest on kernel taint. Also, print a debug message on string duplication failure. Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> --- lib/igt_kmod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)