The following series include improvements and new KUnit tests to some functions on drm_format_helper.c. The first patch improves existing conversion tests to assure that the default pitch is used when NULL is used on the `dst_pitch` argument. Patches 2, 3, 4, and 6 add the new parametrized tests to the following functions: - drm_fb_swab() - drm_fb_clip_offset() - drm_fb_build_fourcc_list() - drm_fb_memcpy() The 5th patch is a change to the conversion_buf_size() helper used on the tests, this change was needed to make the patch 6. a coverage report for the file can be found below: https://grillo-0.github.io/coverage-reports/gsoc-drm-format-test/drivers/gpu/drm/drm_format_helper.c.gcov.html Signed-off-by: Arthur Grillo <arthurgrillo@xxxxxxxxxx> --- v1->v2: https://lore.kernel.org/r/20230721182316.560649-1-arthurgrillo@xxxxxxxxxx - Change patch prefix to "drm/tests" (Maíra Canal) - Simplify the code by changing to an ternary operator on the pitch (Maíra Canal) - Explain how the expected swab colors were obtained (André Almeida) - Fix multi-line comment style (André Almeida) - Remove unnecessary use of drm_kunit_helper_free_device() (Maíra Canal) - Hard-code the expected number of fourcss (Maíra Canal & Andre Almeida) - Fix some sparce warnings (kernel test robot) --- Arthur Grillo (6): drm/tests: Test default pitch fallback drm/tests: Add KUnit tests for drm_fb_swab() drm/tests: Add KUnit tests for drm_fb_clip_offset() drm/tests: Add KUnit tests for drm_fb_build_fourcc_list() drm/tests: Add multi-plane support to conversion_buf_size() drm/tests: Add KUnit tests for drm_fb_memcpy() drivers/gpu/drm/tests/drm_format_helper_test.c | 848 +++++++++++++++++++++++-- 1 file changed, 790 insertions(+), 58 deletions(-) --- base-commit: b31f784ffff96643fa6dec31b182a3466cf4139e change-id: 20230810-gsoc-drm-format-test-v2-1989f08e115b Best regards, -- Arthur Grillo <arthurgrillo@xxxxxxxxxx>