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

Lucas De Marchi lucas.demarchi at intel.com
Thu Sep 26 13:06:39 UTC 2024


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
	 */

Lucas De Marchi


More information about the Intel-xe mailing list