Skip to content

Commit

Permalink
Squash to "DO-NOT-MERGE: mptcp: improve code coverage for CI"
Browse files Browse the repository at this point in the history
And in "DO-NOT-MERGE: mptcp: improve code coverage for CI (net)".

This is similar to commit bc75dcc ("net: rds: add option for GCOV
profiling"), but I don't think we need to upstream that. Or not for the
moment as the selftests don't depend on GCOV support.

If we do, we will also need to update Documentation/dev-tools/gcov.rst.

Link: https://lore.kernel.org/r/20240924-mptcp-gcov-v1-1-b259d5dc5fa6@kernel.org
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
  • Loading branch information
matttbe committed Sep 24, 2024
1 parent 2db7e9e commit 07234ab
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions net/mptcp/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,13 @@ config MPTCP_KUNIT_TEST

If unsure, say N.

config GCOV_PROFILE_MPTCP
bool "Enable GCOV profiling on MPTCP"
depends on GCOV_KERNEL
help
Enable GCOV profiling on MPTCP for checking which functions/lines
are executed.

If unsure, say N.

endif
5 changes: 5 additions & 0 deletions net/mptcp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ mptcp_token_test-objs := token_test.o
obj-$(CONFIG_MPTCP_KUNIT_TEST) += mptcp_crypto_test.o mptcp_token_test.o

obj-$(CONFIG_BPF_SYSCALL) += bpf.o

# for GCOV coverage profiling
ifdef CONFIG_GCOV_PROFILE_MPTCP
GCOV_PROFILE := y
endif

0 comments on commit 07234ab

Please sign in to comment.