[PATCH v3] drm/xe: Use fault injection infrastructure to find issues at probe time

Jani Nikula jani.nikula at linux.intel.com
Thu Sep 26 13:32:08 UTC 2024


On Thu, 26 Sep 2024, Lucas De Marchi <lucas.demarchi at 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 at 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 at 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?

BR,
Jani.


-- 
Jani Nikula, Intel


More information about the Intel-xe mailing list