• Emil Velikov's avatar
    tests/core_unauth_vs_render: new test for the relaxed DRM_AUTH handling · 90f78ac7
    Emil Velikov authored
    As the inline comment says, this test checks that the kernel allows
    unauthenticated master with render capable, RENDER_ALLOW ioctls.
    The kernel commit has extra details why.
     - drop RUN_AS_ROOT guard
     - call check_auth() on the {,un}authenticated device
     - check the device is PRIME (import) capable
     - check the device has render node
     - tweak expectations based on above three
     - elaborate why we care only about -EACCES
     - fold into existing core_auth.c
     - move igt_assert within the subtest
     - make has_prime_import() an igt_require()
     - check for BADF before and after, as requested. Not strictly needed.
     - swap igt_info+drm_open_driver with comment + __drm_open_driver
    Former calls igt_skip() which is problematic with igt_fork().
    Signed-off-by: default avatarEmil Velikov <emil.velikov@collabora.com>
    Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> (irc)
core_auth.c 8.01 KB