✓ CI.checkpatch: success for drm/xe: Add driver load error injection (rev5)

Patchwork patchwork at emeril.freedesktop.org
Fri Sep 13 16:54:03 UTC 2024


== Series Details ==

Series: drm/xe: Add driver load error injection (rev5)
URL   : https://patchwork.freedesktop.org/series/137314/
State : success

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
c62d7e164862503a3662a095da1c6c9014248cb2
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit feb8c094543dcc9a681953eb020c099a982631a6
Author: Francois Dugast <francois.dugast at intel.com>
Date:   Fri Sep 13 16:01:39 2024 +0200

    drm/xe: Add driver load error injection
    
    Those new macros inject errors by overriding return codes. They must
    manually be called, preferably at the very beginning of the function
    that will fault, otherwise if not possible by turning this pattern:
    
        err = foo();
        if (err)
            return err;
    
    into:
    
        err = foo();
        err = xe_device_inject_driver_probe_error(xe, err);
        if (err)
            return err;
    
    When CONFIG_DRM_XE_DEBUG is not set, this has no effect.
    
    When CONFIG_DRM_XE_DEBUG is set, the error code at checkpoint X will
    be overridden when the module argument inject_driver_load_error is
    set to value X. By doing so, it is possible to test proper error
    handling and improve robustness for current and future code. A few
    injection points are added in this patch but more need to be added.
    One way to use this error injection at driver probe is:
    
        for i in {1..200}; do
            echo "Run $i"
            modprobe xe inject_driver_probe_error=$i;
            rmmod xe;
        done
    
    In the future this is expected to be replaced by the infrastructure
    provided by fault-inject.h
    
    v2: Fix style and build errors, modparam to 0 after probe, rename to
        xe_device_inject_driver_probe_error, check type when compiled out,
        add _return macro, move some uses to the beginning of the function
    v3: Rebase
    v4: Improve commit message and comments, keep if/return rather than
        change the flow inside the macro (Lucas De Marchi)
    v5: Rebase, add comments, keep existing return points (Lucas De Marchi)
        Add finish wrapper, move to function beginning for all xe functions
        (Michal Wajdeczko) Bolt into i915 error injection (Jani Nikula)
    v6: Fix documentation of __xe_device_inject_driver_probe_error, fix
        checkpatch warning (Rodrigo Vivi)
    
    Signed-off-by: Matthew Brost <matthew.brost at intel.com>
    Signed-off-by: Francois Dugast <francois.dugast at intel.com>
    Cc: Lucas De Marchi <lucas.demarchi at intel.com>
    Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
+ /mt/dim checkpatch df3eecb1fa97d6d35569c2fa39f0da78b9f13328 drm-intel
feb8c094543d drm/xe: Add driver load error injection




More information about the Intel-xe mailing list