[PATCH v4 0/9] Increase coverage on drm_framebuffer.c

Carlos Eduardo Gallo Filho gcarlos at disroot.org
Mon Aug 5 23:39:25 UTC 2024


This patchset includes new KUnit tests for 5 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 5 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()

---
v3:
  - Drop drm_mode_addfb2 and drm_fb_release tests (patches 10 and 11 from v2)
---

Carlos Eduardo Gallo Filho (9):
  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()

 drivers/gpu/drm/drm_framebuffer.c            |   2 +
 drivers/gpu/drm/drm_mode_object.c            |   1 +
 drivers/gpu/drm/tests/drm_framebuffer_test.c | 373 ++++++++++++++++++-
 3 files changed, 359 insertions(+), 17 deletions(-)

-- 
2.44.2



More information about the dri-devel mailing list