[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241218-test-vsock-leaks-v3-0-f1a4dcef9228@rbox.co>
Date: Wed, 18 Dec 2024 15:32:33 +0100
From: Michal Luczaj <mhal@...x.co>
To: Stefano Garzarella <sgarzare@...hat.com>
Cc: netdev@...r.kernel.org, Michal Luczaj <mhal@...x.co>,
Luigi Leonardi <leonardi@...hat.com>
Subject: [PATCH net-next v3 0/7] vsock/test: Tests for memory leaks
Series adds tests for recently fixed memory leaks[1]:
commit d7b0ff5a8667 ("virtio/vsock: Fix accept_queue memory leak")
commit fbf7085b3ad1 ("vsock: Fix sk_error_queue memory leak")
commit 60cf6206a1f5 ("virtio/vsock: Improve MSG_ZEROCOPY error handling")
Patch 1/6 is a non-functional preparatory cleanup.
Patch 2/6 is a test suite extension for picking specific tests.
Patch 3/6 explains the need of kmemleak scans.
Patches 4-5-6 add the tests.
NOTE: Test in patch 6/6 ("vsock/test: Add test for MSG_ZEROCOPY completion
memory leak") may stop working even before this series is merged. See
changes proposed in [2]. The failslab variant would be unaffected.
[1] https://lore.kernel.org/netdev/20241107-vsock-mem-leaks-v2-0-4e21bfcfc818@rbox.co/
[2] https://lore.kernel.org/netdev/CANn89i+oL+qoPmbbGvE_RT3_3OWgeck7cCPcTafeehKrQZ8kyw@mail.gmail.com/
Signed-off-by: Michal Luczaj <mhal@...x.co>
---
Changes in v3:
- Allow for multiple tests selection (Stefano)
- Generalize CONTINUE/DONE control messages (Stefano)
- Collect R-b (Stefano)
- Link to v2: https://lore.kernel.org/r/20241216-test-vsock-leaks-v2-0-55e1405742fc@rbox.co
Changes in v2:
- Introduce a vsock_test option to run a single test
- ZC completion test: rewrite, comment, describe failslab approach (Stefano)
- accept_queue test: rewrite, comment (Stefano)
- Annotate functions and commits about the need of kmemleak (Stefano)
- Add README section about kmemleak (Stefano)
- Collect R-b (Luigi, Stefano)
- Link to v1: https://lore.kernel.org/r/20241206-test-vsock-leaks-v1-0-c31e8c875797@rbox.co
---
Michal Luczaj (7):
vsock/test: Use NSEC_PER_SEC
vsock/test: Introduce option to select tests
vsock/test: Add README blurb about kmemleak usage
vsock/test: Adapt send_byte()/recv_byte() to handle MSG_ZEROCOPY
vsock/test: Add test for accept_queue memory leak
vsock/test: Add test for sk_error_queue memory leak
vsock/test: Add test for MSG_ZEROCOPY completion memory leak
tools/testing/vsock/README | 15 +++
tools/testing/vsock/util.c | 33 ++++-
tools/testing/vsock/util.h | 2 +
tools/testing/vsock/vsock_test.c | 265 ++++++++++++++++++++++++++++++++++++++-
4 files changed, 309 insertions(+), 6 deletions(-)
---
base-commit: 2c2b61d2138f472e50b5531ec0cb4a1485837e21
change-id: 20241203-test-vsock-leaks-38f9559f5636
Best regards,
--
Michal Luczaj <mhal@...x.co>
Powered by blists - more mailing lists