From: Chris Wilson <chris@chris-wilson.co.uk>
To: Antonio Argenziano <antonio.argenziano@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v2] igt/drv_module_reload: Revamp fault-injection
Date: Wed, 06 Jun 2018 21:54:11 +0100 [thread overview]
Message-ID: <152831845120.9058.4345778718580529179@mail.alporthouse.com> (raw)
In-Reply-To: <b0519e8f-fbbd-0ed2-dbb5-8695976e7da7@intel.com>
Quoting Antonio Argenziano (2018-06-06 21:48:22)
>
>
> On 06/06/18 10:42, Chris Wilson wrote:
> > The current method of checking for a failed module load is flawed, as we
> > only report the error on probing it is not being reported back by
> > modprobe. So we have to dig inside the module_parameters while the
> > module is still loaded to discover the error.
> >
> > v2: Expect i915.inject_load_failure to be zero on success
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Michał Winiarski <michal.winiarski@intel.com>
> > Cc: Imre Deak <imre.deak@intel.com>
> > Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
> > ---
> > tests/drv_module_reload.c | 45 ++++++++++++++++++++++++++++++++++-----
> > 1 file changed, 40 insertions(+), 5 deletions(-)
> >
> > diff --git a/tests/drv_module_reload.c b/tests/drv_module_reload.c
> > index 092982960..e18aaea5e 100644
> > --- a/tests/drv_module_reload.c
> > +++ b/tests/drv_module_reload.c
> > @@ -234,6 +234,38 @@ reload(const char *opts_i915)
> > return err;
> > }
> >
>
> > static void
> > gem_sanitycheck(void)
> > {
> > @@ -323,12 +355,15 @@ igt_main
> > igt_assert_eq(reload("disable_display=1"), 0);
> >
> > igt_subtest("basic-reload-inject") {
> > - char buf[64];
> > int i = 0;
> > - do {
> > - snprintf(buf, sizeof(buf),
> > - "inject_load_failure=%d", ++i);
> > - } while (reload(buf));
> > +
> > + igt_i915_driver_unload();
> > +
> > + while (inject_fault("i915", "inject_load_failure", ++i) == 0)
> > + ;
> > +
> > + /* We expect to hit at least one fault! */
> > + igt_assert(i > 1);
>
> I think Michal's patch adds the number of available checkpoints in a
> debugfs, should we trust the driver and assert on: amount of checkpoints
> hit != available checkpoints? Or maybe just spew out a warning.
This loop hits all the fault points you can hit. There is nothing more
the driver nor igt can do. The only assertion we have there is to
basically catch the case where the protocol fails, or there are no fault
points built into the driver.
That is trusting the driver less than expecting it to report the exact
number of reachable fault points.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Antonio Argenziano <antonio.argenziano@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v2] igt/drv_module_reload: Revamp fault-injection
Date: Wed, 06 Jun 2018 21:54:11 +0100 [thread overview]
Message-ID: <152831845120.9058.4345778718580529179@mail.alporthouse.com> (raw)
In-Reply-To: <b0519e8f-fbbd-0ed2-dbb5-8695976e7da7@intel.com>
Quoting Antonio Argenziano (2018-06-06 21:48:22)
>
>
> On 06/06/18 10:42, Chris Wilson wrote:
> > The current method of checking for a failed module load is flawed, as we
> > only report the error on probing it is not being reported back by
> > modprobe. So we have to dig inside the module_parameters while the
> > module is still loaded to discover the error.
> >
> > v2: Expect i915.inject_load_failure to be zero on success
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Michał Winiarski <michal.winiarski@intel.com>
> > Cc: Imre Deak <imre.deak@intel.com>
> > Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
> > ---
> > tests/drv_module_reload.c | 45 ++++++++++++++++++++++++++++++++++-----
> > 1 file changed, 40 insertions(+), 5 deletions(-)
> >
> > diff --git a/tests/drv_module_reload.c b/tests/drv_module_reload.c
> > index 092982960..e18aaea5e 100644
> > --- a/tests/drv_module_reload.c
> > +++ b/tests/drv_module_reload.c
> > @@ -234,6 +234,38 @@ reload(const char *opts_i915)
> > return err;
> > }
> >
>
> > static void
> > gem_sanitycheck(void)
> > {
> > @@ -323,12 +355,15 @@ igt_main
> > igt_assert_eq(reload("disable_display=1"), 0);
> >
> > igt_subtest("basic-reload-inject") {
> > - char buf[64];
> > int i = 0;
> > - do {
> > - snprintf(buf, sizeof(buf),
> > - "inject_load_failure=%d", ++i);
> > - } while (reload(buf));
> > +
> > + igt_i915_driver_unload();
> > +
> > + while (inject_fault("i915", "inject_load_failure", ++i) == 0)
> > + ;
> > +
> > + /* We expect to hit at least one fault! */
> > + igt_assert(i > 1);
>
> I think Michal's patch adds the number of available checkpoints in a
> debugfs, should we trust the driver and assert on: amount of checkpoints
> hit != available checkpoints? Or maybe just spew out a warning.
This loop hits all the fault points you can hit. There is nothing more
the driver nor igt can do. The only assertion we have there is to
basically catch the case where the protocol fails, or there are no fault
points built into the driver.
That is trusting the driver less than expecting it to report the exact
number of reachable fault points.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-06-06 20:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-06 13:09 [PATCH i-g-t] igt/drv_module_reload: Revamp fault-injection Chris Wilson
2018-06-06 14:18 ` Michał Winiarski
2018-06-06 14:30 ` Chris Wilson
2018-06-06 17:42 ` [PATCH i-g-t v2] " Chris Wilson
2018-06-06 17:42 ` [Intel-gfx] " Chris Wilson
2018-06-06 18:00 ` Imre Deak
2018-06-06 18:00 ` [igt-dev] " Imre Deak
2018-06-06 18:04 ` Chris Wilson
2018-06-06 18:04 ` [Intel-gfx] " Chris Wilson
2018-06-06 18:15 ` Imre Deak
2018-06-06 18:15 ` [igt-dev] " Imre Deak
2018-06-06 20:48 ` Antonio Argenziano
2018-06-06 20:48 ` Antonio Argenziano
2018-06-06 20:54 ` Chris Wilson [this message]
2018-06-06 20:54 ` Chris Wilson
2018-06-06 18:36 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2018-06-07 10:49 ` Patchwork
2018-06-07 10:56 ` Chris Wilson
2018-06-07 14:56 ` [igt-dev] ✗ Fi.CI.IGT: " Patchwork
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=152831845120.9058.4345778718580529179@mail.alporthouse.com \
--to=chris@chris-wilson.co.uk \
--cc=antonio.argenziano@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.