summaryrefslogtreecommitdiff
path: root/Documentation/gpu/drm-internals.rst
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2022-10-10 08:30:23 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2022-10-10 08:30:23 +0300
commit5f8f8574c7f5585b09a9623f0f13462e4eb67b4d (patch)
tree8f1d5e88bf9604a9e39fbcce0e37b3d8cee451bb /Documentation/gpu/drm-internals.rst
parente62563db857f81d75c5726a35bc0180bed6d1540 (diff)
parentfe5b6aaef72a0f7daa06e7960e0bee45c2984e41 (diff)
downloadlinux-5f8f8574c7f5585b09a9623f0f13462e4eb67b4d.tar.xz
Merge branch 'next' into for-linus
Prepare input updates for 6.1 merge window.
Diffstat (limited to 'Documentation/gpu/drm-internals.rst')
-rw-r--r--Documentation/gpu/drm-internals.rst32
1 files changed, 32 insertions, 0 deletions
diff --git a/Documentation/gpu/drm-internals.rst b/Documentation/gpu/drm-internals.rst
index 38afed24a75c..5fd20a306718 100644
--- a/Documentation/gpu/drm-internals.rst
+++ b/Documentation/gpu/drm-internals.rst
@@ -207,6 +207,38 @@ Utilities
:internal:
+Unit testing
+============
+
+KUnit
+-----
+
+KUnit (Kernel unit testing framework) provides a common framework for unit tests
+within the Linux kernel.
+
+This section covers the specifics for the DRM subsystem. For general information
+about KUnit, please refer to Documentation/dev-tools/kunit/start.rst.
+
+How to run the tests?
+~~~~~~~~~~~~~~~~~~~~~
+
+In order to facilitate running the test suite, a configuration file is present
+in ``drivers/gpu/drm/tests/.kunitconfig``. It can be used by ``kunit.py`` as
+follows:
+
+.. code-block:: bash
+
+ $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/gpu/drm/tests \
+ --kconfig_add CONFIG_VIRTIO_UML=y \
+ --kconfig_add CONFIG_UML_PCI_OVER_VIRTIO=y
+
+.. note::
+ The configuration included in ``.kunitconfig`` should be as generic as
+ possible.
+ ``CONFIG_VIRTIO_UML`` and ``CONFIG_UML_PCI_OVER_VIRTIO`` are not
+ included in it because they are only required for User Mode Linux.
+
+
Legacy Support Code
===================