summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-12-07 11:16:54 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-12-07 11:17:55 +0000
commitae49296e067d1c9c5a5d9002de0a0d02911182b0 (patch)
tree75c93cb625a5b9e64b1ce4df06ee80c142683856 /lib
parent81677444e62d11bc690bb23ae580893bf2445483 (diff)
igt/drv_selftest: Adapt to mock/late split
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_kmod.c8
-rw-r--r--lib/igt_kmod.h4
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
index a861a5f2..388be30f 100644
--- a/lib/igt_kmod.c
+++ b/lib/igt_kmod.c
@@ -341,7 +341,9 @@ static void kmsg_dump(int fd)
}
}
-void igt_kselftests(const char *module_name, const char *module_options)
+void igt_kselftests(const char *module_name,
+ const char *module_options,
+ const char *filter)
{
const char *param_prefix = "igt__";
const int param_len = strlen(param_prefix);
@@ -378,6 +380,10 @@ void igt_kselftests(const char *module_name, const char *module_options)
if (!val || strncmp(val, param_prefix, param_len))
continue;
+ if (filter &&
+ strncmp(val + param_len, filter, strlen(filter)))
+ continue;
+
subtest = strdup(val);
colon = strchr(subtest, ':');
*colon = '\0';
diff --git a/lib/igt_kmod.h b/lib/igt_kmod.h
index 2822fe25..3eb6a345 100644
--- a/lib/igt_kmod.h
+++ b/lib/igt_kmod.h
@@ -35,6 +35,8 @@ int igt_kmod_unload(const char *mod_name, unsigned int flags);
int igt_i915_driver_load(const char *opts);
int igt_i915_driver_unload(void);
-void igt_kselftests(const char *module_name, const char *module_options);
+void igt_kselftests(const char *module_name,
+ const char *module_options,
+ const char *filter);
#endif /* IGT_KMOD_H */