Thread (7 messages) 7 messages, 3 authors, 2021-12-15

Re: [PATCH -next] lib: TEST_REF_TRACKER should depend on REF_TRACKER instead of selecting it

flat view

From: Eric Dumazet <hidden>
Date: 2021-12-15 09:51:24
Also in: lkml

On Wed, Dec 15, 2021 at 1:36 AM Geert Uytterhoeven
[off-list ref] wrote:
TEST_REF_TRACKER selects REF_TRACKER, thus enabling an optional feature
the user may not want to have enabled.  Fix this by making the test
depend on REF_TRACKER instead.
I do not understand this.

How can I test this infra alone, without any ref_tracker being selected ?

I have in my configs

CONFIG_TEST_REF_TRACKER=m
# CONFIG_NET_DEV_REFCNT_TRACKER is not set
# CONFIG_NET_NS_REFCNT_TRACKER is not set

This should work.

I would not have sent patches built around ref_tracker if I had no
ways of testing the base infrastructure.


quoted hunk ↗ jump to hunk
Fixes: 914a7b5000d08f14 ("lib: add tests for reference tracker")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 lib/Kconfig.debug | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index c77fe36bb3d89685..d5e4afee09d78a1e 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -2114,8 +2114,7 @@ config BACKTRACE_SELF_TEST

 config TEST_REF_TRACKER
        tristate "Self test for reference tracker"
-       depends on DEBUG_KERNEL && STACKTRACE_SUPPORT
-       select REF_TRACKER
+       depends on DEBUG_KERNEL && STACKTRACE_SUPPORT && REF_TRACKER
        help
          This option provides a kernel module performing tests
          using reference tracker infrastructure.
--
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help