✓ CI.checkpatch: success for drm/xe: Use fault injection infrastructure to find issues at probe time (rev2)

Patchwork patchwork at emeril.freedesktop.org
Fri Sep 20 13:51:48 UTC 2024


== Series Details ==

Series: drm/xe: Use fault injection infrastructure to find issues at probe time (rev2)
URL   : https://patchwork.freedesktop.org/series/138654/
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
30ab6715fc09baee6cc14cb3c89ad8858688d474
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 22f9fcf277ca94a694a29999d5ae7fff67f0406e
Author: Francois Dugast <francois.dugast at intel.com>
Date:   Fri Sep 20 15:18:34 2024 +0200

    drm/xe: Use fault injection infrastructure to find issues at probe time
    
    The kernel fault injection infrastructure is used to test proper error
    handling during probe. In particular, ALLOW_ERROR_INJECTION() is added
    directly to functions which fullfill the injectable functions
    requirements:
    fault-injection.html#requirements-for-the-error-injectable-functions
    
    Otherwise a helper function is added and called in the beginning of the
    function where the fault is to be injected.
    
    The return code of the functions using ALLOW_ERROR_INJECTION() can be
    conditionnally modified at runtime by tuning some debugfs entries. This
    requires CONFIG_FUNCTION_ERROR_INJECTION (among others).
    
    One way to use fault injection at probe time by making each of those
    functions fail one at a time is:
    
        FAILTYPE=fail_function
        DEVICE="0000:00:08.0" # depends on the system
        ERRNO=-12 # -ENOMEM, can depend on the function
    
        echo N > /sys/kernel/debug/$FAILTYPE/task-filter
        echo 100 > /sys/kernel/debug/$FAILTYPE/probability
        echo 0 > /sys/kernel/debug/$FAILTYPE/interval
        echo -1 > /sys/kernel/debug/$FAILTYPE/times
        echo 0 > /sys/kernel/debug/$FAILTYPE/space
        echo 1 > /sys/kernel/debug/$FAILTYPE/verbose
    
        modprobe xe
        echo $DEVICE > /sys/bus/pci/drivers/xe/unbind
    
        grep -oP "^.* \[xe\]" /sys/kernel/debug/$FAILTYPE/injectable | \
        cut -d ' ' -f 1 | while read -r FUNCTION ; do
            echo "Injecting fault in $FUNCTION"
            echo "" > /sys/kernel/debug/$FAILTYPE/inject
            echo $FUNCTION > /sys/kernel/debug/$FAILTYPE/inject
            printf %#x $ERRNO > /sys/kernel/debug/$FAILTYPE/$FUNCTION/retval
            echo $DEVICE > /sys/bus/pci/drivers/xe/bind
        done
    
        rmmod xe
    
    It will also be integrated into IGT for systematic execution by CI.
    
    Signed-off-by: Francois Dugast <francois.dugast at intel.com>
    Cc: Lucas De Marchi <lucas.demarchi at intel.com>
    Cc: Matthew Brost <matthew.brost at intel.com>
    Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
    Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
+ /mt/dim checkpatch 128ccc5f71d7b9d84ce8f0651aa713ae490f4990 drm-intel
22f9fcf277ca drm/xe: Use fault injection infrastructure to find issues at probe time




More information about the Intel-xe mailing list