mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
drm/amd/display: Test colorop error paths
[WHAT] Add KUnit tests for the failure paths of amdgpu_dm_build_default_pipeline(): a failed allocation and a failed initialization at each of the eight pipeline steps. [HOW] Add struct amdgpu_dm_colorop_kunit_ops, a KUnit-only indirection table for the colorop allocation and the five DRM colorop constructors. The constructors cannot be made to fail through their arguments, so tests install a fake allocator and spies that delegate to the real constructors and override the return value of one selected call. Non-KUnit builds call the same functions directly. Assisted-by: Copilot:Claude-Opus-5 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
4b6281959e
commit
34da32ffe3
3 changed files with 312 additions and 58 deletions
Loading…
Add table
Add a link
Reference in a new issue