This patchset includes new KUnit tests for 7 untested functions from drm_framebuffer.c and improvements to the existent one. The first patch replace the use of dev_private member from drm_device mock on the existent test by embedding it into an outer struct containing a generic pointer. The patches 2 and 4 extends the test of drm_internal_framebuffer_create() by creating a new test case and adding new parameters to the existent case. The patch 3 just replace a strcpy() call to strscpy(). Finally, the remainder of this set contains 7 new test cases, one for each of the follow functions: - drm_framebuffer_check_src_coords() - drm_framebuffer_cleanup() - drm_framebuffer_lookup() - drm_framebuffer_init() - drm_framebuffer_free() - drm_mode_addfb2() - drm_fb_release() Signed-off-by: Carlos Eduardo Gallo Filho <gcarlos@xxxxxxxxxxx> --- v2: - Split strcpy to strscpy change on drm_test_framebuffer_create test into a separate patch [PATCH 03/11]. - Extensively use drm_kunit_helper_alloc_drm_device() for drm_device mock. - Reorder kunit cases alphabetically. - Rename check_src_coords_case. - Remove unnecessary comments. - Add framebuffer size as a parameter on drm_framebuffer_check_src_coords case. - Replace drm_mode_object_add() call to drm_framebuffer_init() on drm_framebuffer_lookup() test. - Let fb1.dev unset instead of set it to wrong_drm to test mismatched drm_device passed as drm_framebuffer_init() argument on drm_framebuffer_init() test. - Clean the framebuffer object on drm_framebuffer_init_test. --- Carlos Eduardo Gallo Filho (11): drm/tests: Stop using deprecated dev_private member on drm_framebuffer tests drm/tests: Add parameters to the drm_test_framebuffer_create test drm/tests: Replace strcpy to strscpy on drm_test_framebuffer_create test drm/tests: Add test case for drm_internal_framebuffer_create() drm/tests: Add test for drm_framebuffer_check_src_coords() drm/tests: Add test for drm_framebuffer_cleanup() drm/tests: Add test for drm_framebuffer_lookup() drm/tests: Add test for drm_framebuffer_init() drm/tests: Add test for drm_framebuffer_free() drm/tests: Add test for drm_mode_addfb2() drm/tests: Add test for drm_fb_release() drivers/gpu/drm/drm_framebuffer.c | 1 + drivers/gpu/drm/tests/drm_framebuffer_test.c | 562 ++++++++++++++++++- 2 files changed, 549 insertions(+), 14 deletions(-) -- 2.41.0