lkml.org 
[lkml]   [2024]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v8 18/35] selftests-dyndbg: exit 127 if no facility
    Date
    Test if /proc/dynamic_debug/control exists, exit 127 otherwise.
    This distinguishes an untestable config from both pass & fail.
    The 127 choice is pretty arbitrary, but imitating bisect.

    That control file's presense guarantees that dynamic-debugging is
    configured (unless /proc is off, unusually), without dealing with the
    <debugfs> mount.

    Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
    ---
    tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh | 5 +++++
    1 file changed, 5 insertions(+)

    diff --git a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh
    index 1be70af26a38..cb77ae142520 100755
    --- a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh
    +++ b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh
    @@ -11,6 +11,11 @@ CYAN="\033[0;36m"
    NC="\033[0;0m"
    error_msg=""

    +[ -e /proc/dynamic_debug/control ] || {
    + echo -e "${RED}: kernel not configured for this test ${NC}"
    + exit 127
    +}
    +
    function vx () {
    echo $1 > /sys/module/dynamic_debug/parameters/verbose
    }
    --
    2.44.0

    \
     
     \ /
      Last update: 2024-05-27 18:08    [W:3.290 / U:1.844 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site