tests/core_get_client_auth: new subtests for always authenticated

This exercise the bug fixed in

commit 1020dc6990168a5081ffad620c440e220f05b460
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Oct 29 08:55:57 2013 +0000

    drm: Do not drop root privileges for a fancier younger process

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter
2013-12-05 13:41:51 +01:00
parent 365f4812b1
commit 33ef528490
2 changed files with 22 additions and 10 deletions
+21 -9
View File
@@ -73,16 +73,28 @@ static bool check_auth(int fd)
return is_authenticated;
}
int main(int argc, char **argv)
igt_main
{
int fd;
bool auth;
fd = drm_open_any();
/* root (which we run igt as) should always be authenticated */
auth = check_auth(fd);
igt_assert(auth);
igt_subtest("simple") {
int fd = drm_open_any();
return 0;
igt_assert(check_auth(fd) == true);
close(fd);
}
igt_subtest("master-drop") {
int fd = drm_open_any();
int fd2 = drm_open_any();
igt_assert(check_auth(fd2) == true);
close(fd);
igt_assert(check_auth(fd2) == true);
close(fd2);
}
}