drm/tests: Add Kunit Helpers

As the number of kunit tests in KMS grows further, we start to have
multiple test suites that, for example, need to register a mock DRM
driver to interact with the KMS function they are supposed to test.

Let's add a file meant to provide those kind of helpers to avoid
duplication.

Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Tested-by: Mateusz Kwiatkowski <kfyatek+publicgit@gmail.com>
Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v9-2-24b168e5bcd5@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
This commit is contained in:
Maxime Ripard
2022-11-14 14:00:21 +01:00
parent 99e49bfd93
commit 44a3928324
3 changed files with 74 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
#ifndef DRM_KUNIT_HELPERS_H_
#define DRM_KUNIT_HELPERS_H_
struct drm_device;
struct kunit;
struct drm_device *drm_kunit_device_init(struct kunit *test, u32 features, char *name);
#endif // DRM_KUNIT_HELPERS_H_