summaryrefslogtreecommitdiffstats
path: root/tools/testing/vsock
diff options
context:
space:
mode:
authorMichal Luczaj <mhal@rbox.co>2024-12-19 10:49:30 +0100
committerJakub Kicinski <kuba@kernel.org>2024-12-23 19:28:00 +0100
commit50f9434463a0be5b972ee442ba6a9704c9afb02a (patch)
tree52869369c94d3f5d416cf994b831018a25073099 /tools/testing/vsock
parentvsock/test: Introduce option to select tests (diff)
downloadlinux-50f9434463a0be5b972ee442ba6a9704c9afb02a.tar.xz
linux-50f9434463a0be5b972ee442ba6a9704c9afb02a.zip
vsock/test: Add README blurb about kmemleak usage
Document the suggested use of kmemleak for memory leak detection. Suggested-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Michal Luczaj <mhal@rbox.co> Link: https://patch.msgid.link/20241219-test-vsock-leaks-v4-3-a416e554d9d7@rbox.co Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/vsock')
-rw-r--r--tools/testing/vsock/README15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/testing/vsock/README b/tools/testing/vsock/README
index 84ee217ba8ee..680ce666ceb5 100644
--- a/tools/testing/vsock/README
+++ b/tools/testing/vsock/README
@@ -36,6 +36,21 @@ Invoke test binaries in both directions as follows:
--control-port=1234 \
--peer-cid=3
+Some tests are designed to produce kernel memory leaks. Leaks detection,
+however, is deferred to Kernel Memory Leak Detector. It is recommended to enable
+kmemleak (CONFIG_DEBUG_KMEMLEAK=y) and explicitly trigger a scan after each test
+suite run, e.g.
+
+ # echo clear > /sys/kernel/debug/kmemleak
+ # $TEST_BINARY ...
+ # echo "wait for any grace periods" && sleep 2
+ # echo scan > /sys/kernel/debug/kmemleak
+ # echo "wait for kmemleak" && sleep 5
+ # echo scan > /sys/kernel/debug/kmemleak
+ # cat /sys/kernel/debug/kmemleak
+
+For more information see Documentation/dev-tools/kmemleak.rst.
+
vsock_perf utility
-------------------
'vsock_perf' is a simple tool to measure vsock performance. It works in