[PATCH v3 0/6] Increase code coverage on drm_format_helper.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)

v2->v3: https://lore.kernel.org/r/20230811-gsoc-drm-format-test-v2-v2-0-763b17890644@xxxxxxxxxx
- Hard-code the number of native fourcss (Maíra Canal)
- Change to a ternary operator on them memcpy test too (Maíra Canal)
- Remove the memcpy_result and place the expected values with the
  parameters
- s/multi_plane_op/fb_memcpy/ (Maíra Canal)

---
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 | 815 +++++++++++++++++++++++--
 1 file changed, 757 insertions(+), 58 deletions(-)
---
base-commit: b31f784ffff96643fa6dec31b182a3466cf4139e
change-id: 20230810-gsoc-drm-format-test-v2-1989f08e115b

Best regards,
-- 
Arthur Grillo <arthurgrillo@xxxxxxxxxx>




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux