[RFC 10/10] drm: test: Simplify testing on UML with kunit.py
Michał Winiarski
michal.winiarski at intel.com
Mon Jan 17 23:22:59 UTC 2022
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 at intel.com>
---
drivers/gpu/drm/.kunitconfig | 3 +++
drivers/video/Kconfig | 4 ++++
2 files changed, 7 insertions(+)
create mode 100644 drivers/gpu/drm/.kunitconfig
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
--
2.34.1
More information about the dri-devel
mailing list