Skip to content

Commit 9d3f8a7

Browse files
drm/ttm/tests: depend on UML || COMPILE_TEST
At least the device test requires that no other driver using TTM is loaded. So make those unit tests depend on UML || COMPILE_TEST to prevent people from trying them on bare metal. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Link: https://lore.kernel.org/all/20240219230116.77b8ad68@yea/
1 parent 2f91085 commit 9d3f8a7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: drivers/gpu/drm/Kconfig

+3-2
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,16 @@ config DRM_TTM
199199
config DRM_TTM_KUNIT_TEST
200200
tristate "KUnit tests for TTM" if !KUNIT_ALL_TESTS
201201
default n
202-
depends on DRM && KUNIT && MMU
202+
depends on DRM && KUNIT && MMU && (UML || COMPILE_TEST)
203203
select DRM_TTM
204204
select DRM_EXPORT_FOR_TESTS if m
205205
select DRM_KUNIT_TEST_HELPERS
206206
default KUNIT_ALL_TESTS
207207
help
208208
Enables unit tests for TTM, a GPU memory manager subsystem used
209209
to manage memory buffers. This option is mostly useful for kernel
210-
developers.
210+
developers. It depends on (UML || COMPILE_TEST) since no other driver
211+
which uses TTM can be loaded while running the tests.
211212

212213
If in doubt, say "N".
213214

0 commit comments

Comments
 (0)