[igt-dev] [PATCH i-g-t] tests/core_auth: Merge getclient subtests
Daniel Vetter
daniel.vetter at ffwll.ch
Wed Jan 23 19:59:23 UTC 2019
On Wed, Jan 23, 2019 at 6:38 PM Emil Velikov <emil.l.velikov at gmail.com> wrote:
>
> On Wed, 23 Jan 2019 at 11:31, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> >
> > Emil has another auth test which could use the check_auth function, so
> > best to merge them all.
> >
> > We need a subtest group and put the tests which need to fully control
> > who's master and how many open drm fd there are first.
> >
> > Cc: Emil Velikov <emil.l.velikov at gmail.com>
>
> Acked-by: Emil Velikov <emil.velikov at collabora.com>
>
> Ack. on the idea. Pointing out some bits that seem off below.
> I would _not_ bother with any of them here, although they may be worth
> addressing at some point.
>
> > + igt_subtest("getclient-master-drop") {
> > + int fd = drm_open_driver(DRIVER_ANY);
> > + int fd2 = drm_open_driver(DRIVER_ANY);
> > +
> > + igt_assert(check_auth(fd2) == true);
> > +
> > + close(fd);
> > +
> > + igt_assert(check_auth(fd2) == true);
> > +
> > + close(fd2);
> Either a comment is missing here, something seems wrong ... not sure.
> - test is called "master-drop", yet we check the authentication being
> "dropped".
> - authentication is always set because we run as root
> - two clients are present, yet we only ever check one of them
> - there is no means to drop authentication for a given client - be
> that userspace or in-kernel API
Took me a while to find this, since the igt commit references the
wrong kernel commit, but this is all about:
commit 3cb01a980461506f9ec4e4e1dc2dab6314236fb7
Author: David Herrmann <dh.herrmann at gmail.com>
Date: Tue Jul 22 17:12:26 2014 +0200
drm: don't de-authenticate clients on master-close
but yeah the testcase is pretty funky, and there's an obvious gap of
opening the device as non-root and double-checking we're not
authenticated - I started typing a patch for adding such a new
subtest, hence my remarks in the other thread.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the igt-dev
mailing list