public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Petri Latvala <petri.latvala@intel.com>
To: Emil Velikov <emil.l.velikov@gmail.com>
Cc: IGT development <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t v2] ts/core_setmaster: new test for drop/set master semantics
Date: Mon, 24 Feb 2020 10:49:59 +0200	[thread overview]
Message-ID: <20200224084959.GH25209@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <CACvgo50TohYm7aYw2HMej5w8faXOPVSa5SXk5RDhowz=bJvWqg@mail.gmail.com>

On Fri, Feb 21, 2020 at 01:55:18PM +0000, Emil Velikov wrote:
> Hi Petri,
> 
> Thank you for having a look.
> 
> On Fri, 21 Feb 2020 at 11:58, Petri Latvala <petri.latvala@intel.com> wrote:
> 
> > > +static void check_drop_set(void)
> > > +{
> > > +     int master;
> > > +
> > > +     master = __drm_open_driver(DRIVER_ANY);
> > > +
> > > +     /* Double-check if open has failed */
> > > +     igt_assert_neq(master, -1);
> >
> > Just use drm_open_driver(). For sure you don't want to produce a
> > 'FAIL' when running on a system without GPU drivers. 'SKIP' is correct
> > for that case.
> >
> This sounds very strange. Why would anyone run IGT if they lack _any_
> GPU drivers.

Accidentally, by breaking the driver module loading.

> If I'm running GPU tests and my GPU doesn't show up for any reason,
> I'd expect a hard failure.

Sure, some kind of a notification for that case is desired. However
the correct notification for that is a SKIP result. Granted, for
DRIVER_ANY open call the story is a bit more far-fetched, but consider
this:

If you get a FAIL from this test, you want to be able to say "I got
that because handling master in kernel is broken". If you can't open a
driver, you can't tell that kernel is broken. The only thing you can
tell is: You can't test the feature. SKIP is exactly that: Can't test
this.


> Even if we ignore that, a quick look around shows that there are
> multiple tests that will happily pass -1 to forward.
> If anything, the only way to trigger this is my dropping the chown()
> calls.

Which tests would those be? The only ones I can spot are ones that
want to test "can we still load the driver after doing $badthing".

Notice that drm_open_driver() stops testing if the open fails so it
cannot pass -1 along.


-- 
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2020-02-24  8:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19 14:24 [igt-dev] [PATCH i-g-t v2] ts/core_setmaster: new test for drop/set master semantics Emil Velikov
2020-02-19 15:41 ` [igt-dev] ✗ GitLab.Pipeline: failure for ts/core_setmaster: new test for drop/set master semantics (rev2) Patchwork
2020-02-19 15:59 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2020-02-19 16:20 ` [igt-dev] [PATCH i-g-t v2] ts/core_setmaster: new test for drop/set master semantics Emil Velikov
2020-02-21  9:30 ` [igt-dev] ✓ Fi.CI.IGT: success for ts/core_setmaster: new test for drop/set master semantics (rev2) Patchwork
2020-02-21 11:36   ` Emil Velikov
2020-02-21 11:58 ` [igt-dev] [PATCH i-g-t v2] ts/core_setmaster: new test for drop/set master semantics Petri Latvala
2020-02-21 12:19   ` Petri Latvala
2020-02-21 13:55   ` Emil Velikov
2020-02-24  8:49     ` Petri Latvala [this message]
2020-02-24 11:57       ` Emil Velikov
2020-02-25  9:10         ` Petri Latvala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200224084959.GH25209@platvala-desk.ger.corp.intel.com \
    --to=petri.latvala@intel.com \
    --cc=emil.l.velikov@gmail.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox