Skip to content

Commit 50f9434

Browse files
mmhalkuba-moo
authored andcommitted
vsock/test: Add README blurb about kmemleak usage
Document the suggested use of kmemleak for memory leak detection. Suggested-by: Stefano Garzarella <[email protected]> Reviewed-by: Stefano Garzarella <[email protected]> Signed-off-by: Michal Luczaj <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent ef8bd18 commit 50f9434

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tools/testing/vsock/README

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,21 @@ Invoke test binaries in both directions as follows:
3636
--control-port=1234 \
3737
--peer-cid=3
3838

39+
Some tests are designed to produce kernel memory leaks. Leaks detection,
40+
however, is deferred to Kernel Memory Leak Detector. It is recommended to enable
41+
kmemleak (CONFIG_DEBUG_KMEMLEAK=y) and explicitly trigger a scan after each test
42+
suite run, e.g.
43+
44+
# echo clear > /sys/kernel/debug/kmemleak
45+
# $TEST_BINARY ...
46+
# echo "wait for any grace periods" && sleep 2
47+
# echo scan > /sys/kernel/debug/kmemleak
48+
# echo "wait for kmemleak" && sleep 5
49+
# echo scan > /sys/kernel/debug/kmemleak
50+
# cat /sys/kernel/debug/kmemleak
51+
52+
For more information see Documentation/dev-tools/kmemleak.rst.
53+
3954
vsock_perf utility
4055
-------------------
4156
'vsock_perf' is a simple tool to measure vsock performance. It works in

0 commit comments

Comments
 (0)