lkml.org 
[lkml]   [2023]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v3 18/19] test-dyndbg: tune sub-module behavior
    Date
    lib/test_dynamic_debug.c is used to build 2 modules:
    test_dynamic_debug.ko and test_dynamic_debug_submod.ko

    Define DEBUG only in the main module, not in the submod. Its purpose
    is to insure that prdbgs are enabled by default, so that a modprobe
    without params actually logs something, showing that compile-time
    enablement works. This doesn't need to be repeated in the submodule.

    Rather, the submodule's purpose is to prove that classmaps defined and
    exported from a parent module are propagated to submodules, setting
    their class'd debugs accordingly.

    Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
    ---
    lib/test_dynamic_debug.c | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

    diff --git a/lib/test_dynamic_debug.c b/lib/test_dynamic_debug.c
    index 6b7bd35c3e15..70a1e8955ad0 100644
    --- a/lib/test_dynamic_debug.c
    +++ b/lib/test_dynamic_debug.c
    @@ -10,10 +10,9 @@
    #define pr_fmt(fmt) "test_dd_submod: " fmt
    #else
    #define pr_fmt(fmt) "test_dd: " fmt
    + #define DEBUG /* enable all prdbgs (plain & class'd), to log by default */
    #endif

    -#define DEBUG /* enable all prdbgs (plain & class'd) at compiletime */
    -
    #include <linux/module.h>

    /* run tests by reading or writing sysfs node: do_prints */
    --
    2.39.1
    \
     
     \ /
      Last update: 2023-03-26 23:55    [W:4.100 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site