diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-12-02 09:56:44 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-12-02 09:57:13 +0000 |
commit | b7e51f995c35ac4d74923654e641efe93fc307ba (patch) | |
tree | 3b75e9136f181fdddf2ad0c1088f5b8622f38b3c /lib/igt_kmod.c | |
parent | 8bb6135fa50c81abe77b80cf08fc8b45445160e3 (diff) |
lib/igt_kmod: Squelch the igt assert for a module with no subtests
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/igt_kmod.c')
-rw-r--r-- | lib/igt_kmod.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index a11bb547..dd70b50e 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -347,6 +347,7 @@ void igt_kselftests(const char *module_name, const char *module_options) struct kmod_ctx *ctx = kmod_ctx(); struct kmod_module *kmod; struct kmod_list *d, *pre; + int module_subtest_count; int err, kmsg = -1; igt_require(kmod_module_new_from_name(ctx, module_name, &kmod) == 0); @@ -360,6 +361,7 @@ void igt_kselftests(const char *module_name, const char *module_options) kmsg = open("/dev/kmsg", O_RDONLY | O_NONBLOCK); } + module_subtest_count = 0; pre = NULL; if (kmod_module_get_info(kmod, &pre)) { kmod_list_foreach(d, pre) { @@ -400,6 +402,7 @@ void igt_kselftests(const char *module_name, const char *module_options) module_name, options, strerror(-err), -err); } + module_subtest_count++; } kmod_module_info_free_list(pre); } @@ -410,5 +413,7 @@ void igt_kselftests(const char *module_name, const char *module_options) if (strcmp(module_name, "i915") == 0) igt_i915_driver_load(NULL); + + igt_require(module_subtest_count); } } |