intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
	Francois Dugast <francois.dugast@intel.com>,
	<intel-xe@lists.freedesktop.org>,
	Matthew Brost <matthew.brost@intel.com>,
	Michal Wajdeczko <michal.wajdeczko@intel.com>
Subject: Re: [PATCH v3] drm/xe: Use fault injection infrastructure to find issues at probe time
Date: Thu, 26 Sep 2024 14:35:51 -0400	[thread overview]
Message-ID: <ZvWph-faCIrEmfF1@intel.com> (raw)
In-Reply-To: <87bk0a1qxz.fsf@intel.com>

On Thu, Sep 26, 2024 at 04:32:08PM +0300, Jani Nikula wrote:
> On Thu, 26 Sep 2024, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> > On Thu, Sep 26, 2024 at 02:57:01PM GMT, Jani Nikula wrote:
> >>On Thu, 26 Sep 2024, Francois Dugast <francois.dugast@intel.com> wrote:
> >>> On Thu, Sep 26, 2024 at 12:43:59PM +0300, Jani Nikula wrote:
> >>>> On Wed, 25 Sep 2024, Francois Dugast <francois.dugast@intel.com> wrote:
> >>>> > +/*
> >>>> > + * The ALLOW_ERROR_INJECTION() macro is added to conditionally skip execution at
> >>>> > + * runtime and use a provided return value, in order to test errors paths in the
> >>>> > + * callers. The requirements for the error injectable functions are not strictly
> >>>> > + * fullfilled but this is acceptable because the caller only propagates the error
> >>>> > + * up the stack without cleanup of resources potentially allocated here.
> >>>> > + */
> >>>>
> >>>> I'm curious on the details of "The requirements for the error injectable
> >>>> functions are not strictly fullfilled". It's repeated many times, but
> >>>> not explained. Maybe I'd like the info spoon fed to me instead of having
> >>>> to figure it out for myself. ;)
> >>>
> >>> Understandable! I will make it more explicit in the next revision. Any
> >>> suggestion to avoid the duplication?
> >>
> >>All I can think of is adding a single, more thorough explanation comment
> >>about the approach to error injection somewhere suitable (*), and then
> >>have short comments referencing that.
> >>
> >>	/* See xxx for details on error injection. */
> >
> > https://docs.kernel.org/fault-injection/fault-injection.html#requirements-for-the-error-injectable-functions
> >
> > so... like this?
> >
> > 	/*
> > 	 * See "Requirements for the Error Injectable Functions" in
> > 	 * Documentation/fault-injection/fault-injection.rst
> > 	 */
> 
> All I wanted to know was what "not strictly fullfilled" means in "The
> requirements for the error injectable functions are not strictly
> fullfilled". What parts are we violating? What's the impact?

Yes, I believe that each of the new inject functions should have
individual comments explaining why exactly that case violates the
overal rule.

> 
> BR,
> Jani.
> 
> 
> -- 
> Jani Nikula, Intel

  reply	other threads:[~2024-09-26 18:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-25 15:55 [PATCH v3] drm/xe: Use fault injection infrastructure to find issues at probe time Francois Dugast
2024-09-26  9:43 ` Jani Nikula
2024-09-26 11:46   ` Francois Dugast
2024-09-26 11:57     ` Jani Nikula
2024-09-26 13:06       ` Lucas De Marchi
2024-09-26 13:32         ` Jani Nikula
2024-09-26 18:35           ` Rodrigo Vivi [this message]
2024-09-26 15:54 ` ✓ CI.Patch_applied: success for drm/xe: Use fault injection infrastructure to find issues at probe time (rev3) Patchwork
2024-09-26 15:55 ` ✓ CI.checkpatch: " Patchwork
2024-09-26 15:55 ` ✗ CI.KUnit: failure " 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=ZvWph-faCIrEmfF1@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=francois.dugast@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.brost@intel.com \
    --cc=michal.wajdeczko@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).