Skip to content

Commit 93032ae

Browse files
Marco Paganimripard
authored andcommitted
drm/test: add a test suite for GEM objects backed by shmem
This patch introduces an initial KUnit test suite for GEM objects backed by shmem buffers. Suggested-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Marco Pagani <[email protected]> v5: - using __drm_kunit_helper_alloc_drm_device() to avoid local struct v4: - Add missing MMU dependency for DRM_GEM_SHMEM_HELPER (kernel test robot) v3: - Explicitly cast pointers in the helpers - Removed unused pointer to parent dev in struct fake_dev - Test entries reordering in Kconfig and Makefile sent as a separate patch v2: - Improved description of test cases - Cleaner error handling using KUnit actions - Alphabetical order in Kconfig and Makefile Signed-off-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent f730e7a commit 93032ae

File tree

3 files changed

+386
-1
lines changed

3 files changed

+386
-1
lines changed

drivers/gpu/drm/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,13 @@ config DRM_KUNIT_TEST_HELPERS
7474

7575
config DRM_KUNIT_TEST
7676
tristate "KUnit tests for DRM" if !KUNIT_ALL_TESTS
77-
depends on DRM && KUNIT
77+
depends on DRM && KUNIT && MMU
7878
select DRM_BUDDY
7979
select DRM_DISPLAY_DP_HELPER
8080
select DRM_DISPLAY_HELPER
8181
select DRM_EXEC
8282
select DRM_EXPORT_FOR_TESTS if m
83+
select DRM_GEM_SHMEM_HELPER
8384
select DRM_KMS_HELPER
8485
select DRM_KUNIT_TEST_HELPERS
8586
select DRM_LIB_RANDOM

drivers/gpu/drm/tests/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ obj-$(CONFIG_DRM_KUNIT_TEST) += \
1313
drm_format_helper_test.o \
1414
drm_format_test.o \
1515
drm_framebuffer_test.o \
16+
drm_gem_shmem_test.o \
1617
drm_managed_test.o \
1718
drm_mm_test.o \
1819
drm_modes_test.o \

0 commit comments

Comments
 (0)