[igt-dev] [PATCH i-g-t] panfrost: Test labeling functionality

Emil Velikov emil.l.velikov at gmail.com
Thu May 28 14:20:31 UTC 2020


Hi Rohan,

On Thu, 28 May 2020 at 14:38, Rohan Garg <rohan.garg at collabora.com> wrote:
>
> Introduce tests to cover the new generic labeling ioctl's
> being reviewed here [1].
>
> Signed-off-by: Rohan Garg <rohan.garg at collabora.com>
>
> [1] https://patchwork.freedesktop.org/series/77267/
>
> Signed-off-by: Rohan Garg <rohan.garg at collabora.com>
> ---
>  include/drm-uapi/drm.h    |  23 ++++++-
>  tests/meson.build         |   1 +
>  tests/panfrost_bo_label.c | 129 ++++++++++++++++++++++++++++++++++++++
>  3 files changed, 152 insertions(+), 1 deletion(-)
>  create mode 100644 tests/panfrost_bo_label.c
>
Listing high-level comments, haven't looked at the test itself:
 - make/name the test generic - I would imagine we can use dumb buffer
on panfrost, vc4 or others
 - catch the missing locking - a) two writers, b) missing read lock
would trigger user-after-free
 - use invalid handles - to highlight the mismatched gem_object_put
(as mentioned off-list)

The last two categories would produce various kernel
warnings/warn/bugs with earlier revisions.
Might be a good idea to run the test against those, to ensure the test
triggers correctly.

-Emil


More information about the igt-dev mailing list