Skip to content

tests/qtest/migration-test: Fix various leaks

Peter Maydell qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9tests/qtest/migration-test: Fix bootfile cleanup handlingtests/qtest/migration-test.c+11 -71 reply
2/9tests/qtest/migration-test: Don't leak resp in multifd_mapped_ram_fdset_end()tests/qtest/migration-test.c+1 -01 reply
3/9tests/qtest/migration-test: Fix leaks in calc_dirtyrate_ready()tests/qtest/migration-test.c+6 -31 reply
4/9tests/qtest/migration-helpers: Fix migrate_get_socket_address() leaktests/qtest/migration-helpers.c+8 -101 reply
5/9tests/qtest/migration-test: Free QCRyptoTLSTestCertReq objectstests/qtest/migration-test.c tests/unit/crypto-tls-x509-helpers.c tests/unit/crypto-tls-x509-helpers.h+19 -21 reply
6/9tests/unit/crypto-tls-x509-helpers: deinit privkey in test_tls_cleanuptests/unit/crypto-tls-x509-helpers.c+1 -01 reply
7/9tests/qtest/migration-helpers: Don't dup argument to qdict_put_str()tests/qtest/migration-helpers.c+1 -11 reply
8/9tests/qtest/migration-test: Don't strdup in get_dirty_rate()tests/qtest/migration-test.c+2 -21 reply
9/9tests/qtest/migration-test: Don't leak QTestState in test_multifd_tcp_cancel()tests/qtest/migration-test.c+1 -01 reply

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchFabiano Rosas
1/9R-b
2/9R-b
3/9R-b
4/9R-b
5/9R-b
6/9R-b
7/9R-b
8/9R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH for-9.2 0/9] tests/qtest/migration-test: Fix various leaks

This patchset fixes various leaks that show up if you run migration-test under the clang leak-sanitizer. Since they're all test code problems, this is 9.2 material. The one leak that was really in the QEMU code I have sent a separate patch for:
https://patchew.org/QEMU/[email protected]/

You can repro these leaks by building a QEMU configured with
'--cc=clang' '--cxx=clang++' '--enable-debug' '--target-list=x86_64-softmmu' '--enable-sanitizers'
and then running the test like:
(cd build/asan && \
ASAN_OPTIONS="fast_unwind_on_malloc=0" \
QTEST_QEMU_BINARY=./qemu-system-x86_64 ./tests/qtest/migration-test --tap -k )

thanks
-- PMM

Peter Maydell (9):
tests/qtest/migration-test: Fix bootfile cleanup handling tests/qtest/migration-test: Don't leak resp in
multifd_mapped_ram_fdset_end()
tests/qtest/migration-test: Fix leaks in calc_dirtyrate_ready() tests/qtest/migration-helpers: Fix migrate_get_socket_address() leak tests/qtest/migration-test: Free QCRyptoTLSTestCertReq objects tests/unit/crypto-tls-x509-helpers: deinit privkey in test_tls_cleanup tests/qtest/migration-helpers: Don't dup argument to qdict_put_str() tests/qtest/migration-test: Don't strdup in get_dirty_rate() tests/qtest/migration-test: Don't leak QTestState in
test_multifd_tcp_cancel()

 tests/unit/crypto-tls-x509-helpers.h |  6 +++++
 tests/qtest/migration-helpers.c      | 20 +++++++---------
 tests/qtest/migration-test.c         | 36 ++++++++++++++++++----------
 tests/unit/crypto-tls-x509-helpers.c | 13 ++++++++--
 4 files changed, 50 insertions(+), 25 deletions(-)
Signature · 1 line
2.34.1