Skip to content

drm/panic: Add kunit tests for drm_panic

Jocelyn Falempe dri-devel lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 2 repliesIn review
  2. v33 patches 0 repliesSuperseded
  3. v23 patches 7 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches12 repliesSuperseded

Changes in v4 from the cover letter

* Run QR code test only if QR code panic screen is built.
* Drop the last patch to add a draw_test debugfs.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/panic: Rename draw_panic_static_* to draw_panic_screen_*drivers/gpu/drm/drm_panic.c+9 -91 reply
2/2drm/panic: Add kunit tests for drm_panicMAINTAINERS drivers/gpu/drm/drm_panic.c drivers/gpu/drm/tests/drm_panic_test.c+225 -01 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJavier Martinez CanillasMaxime Ripard
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/2] drm/panic: Add kunit tests for drm_panic

This series adds some kunit tests to drm_panic, and a debugfs interface to easily test the panic screen rendering at different resolutions/pixel format.

The kunit tests draws the panic screens to different framebuffer size and format, and ensure it doesn't crash or draw outside of the buffer. However it doesn't check the resulting image, because it depends on other Kconfig options, like logo, fonts, or panic colors.

v2:
* Use debugfs instead of sending the framebuffer through the kunit logs. (Thomas Zimmermann).
* Add a few checks, and more comments in the kunit tests. (Maxime Ripard).

v3:
* Check the framebuffer content in drm_test_panic_screen_user_page().
* Fix memory leaks, when the test fails (Maxime Ripard).

v4:
* Run QR code test only if QR code panic screen is built.
* Drop the last patch to add a draw_test debugfs.

Jocelyn Falempe (2):
drm/panic: Rename draw_panic_static_* to draw_panic_screen_* drm/panic: Add kunit tests for drm_panic

 MAINTAINERS                            |   1 +
 drivers/gpu/drm/drm_panic.c            |  22 ++-
 drivers/gpu/drm/tests/drm_panic_test.c | 220 +++++++++++++++++++++++++
 3 files changed, 234 insertions(+), 9 deletions(-)
 create mode 100644 drivers/gpu/drm/tests/drm_panic_test.c

base-commit: 20de1b0080b9889094d703927871da8f21fb624e

Signature · 1 line
2.52.0