summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorShixiong Ou <oushixiong@kylinos.cn>2026-09-08 13:59:41 +0800
committerPhilipp Stanner <phasta@kernel.org>2026-09-08 14:25:54 +0200
commit28cc4d5a75bb07d0eb2fa178db355b04483f5aca (patch)
treea3fb0ef8fe30ef7fd4a04eb9518dc2364c82555b /scripts
parenta8916759a451918c2a95633390d3428640858087 (diff)
downloadlinux-28cc4d5a75bb07d0eb2fa178db355b04483f5aca.tar.gz
linux-28cc4d5a75bb07d0eb2fa178db355b04483f5aca.zip
drm/sched: Create a fake device for KUnit tests
The DRM scheduler KUnit tests pass NULL for the dev field in drm_sched_init_args, which NULL-pointer dereferences in the drm_sched_job trace event via dev_name() on sched->dev. Give the mock scheduler a device with kunit_device_register(), which is also cleaned up at test exit. A per-function counter keeps the device names unique, since some tests create several mock schedulers. Fixes: 5a99350794fe ("drm/sched: Add scheduler unit testing infrastructure and some basic tests") Cc: stable@vger.kernel.org Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn> Acked-by: Maxime Ripard <mripard@kernel.org> [phasta: removed static variable init to 0 again] Signed-off-by: Philipp Stanner <phasta@kernel.org> Link: https://patch.msgid.link/20260908055941.351486-1-oushixiong1025@163.com
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions