diff mbox series

[RFC,10/10] drm: test: Simplify testing on UML with kunit.py

Message ID 20220117232259.180459-11-michal.winiarski@intel.com (mailing list archive)
State New
Headers show
Series drm: selftests: Convert to KUnit | expand

Commit Message

Michał Winiarski Jan. 17, 2022, 11:22 p.m. UTC
DRM depends on IOMEM and DMA, introduce an additional Kconfig to pull in
IOMEM and DMA emulation on UML.
Also, add .kunitconfig to simplify running DRM tests with:
./tools/testing/kunit/kunit.py run --kunitconfig=drivers/gpu/drm

Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
---
 drivers/gpu/drm/.kunitconfig | 3 +++
 drivers/video/Kconfig        | 4 ++++
 2 files changed, 7 insertions(+)
 create mode 100644 drivers/gpu/drm/.kunitconfig
diff mbox series

Patch

diff --git a/drivers/gpu/drm/.kunitconfig b/drivers/gpu/drm/.kunitconfig
new file mode 100644
index 000000000000..6ec04b4c979d
--- /dev/null
+++ b/drivers/gpu/drm/.kunitconfig
@@ -0,0 +1,3 @@ 
+CONFIG_KUNIT=y
+CONFIG_DRM=y
+CONFIG_DRM_KUNIT_TEST=y
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 427a993c7f57..0e6028f9b09e 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -46,5 +46,9 @@  if FB || SGI_NEWPORT_CONSOLE
 
 endif
 
+config DRM_UML_IO_EMULATION
+	def_bool y if UML && KUNIT
+	select UML_DMA_EMULATION
+	select UML_IOMEM_EMULATION
 
 endmenu