qemu-e2k/tests
Thomas Huth 0f0a9e4e5c tests/qtest/migration-test: Fix unlink error and memory leaks
When running the migration test compiled with Clang from Fedora 37
and sanitizers enabled, there is an error complaining about unlink():

 ../tests/qtest/migration-test.c:1072:12: runtime error: null pointer
  passed as argument 1, which is declared to never be null
 /usr/include/unistd.h:858:48: note: nonnull attribute specified here
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
  ../tests/qtest/migration-test.c:1072:12 in
 (test program exited with status code 1)
 TAP parsing error: Too few tests run (expected 33, got 20)

The data->clientcert and data->clientkey pointers can indeed be unset
in some tests, so we have to check them before calling unlink() with
those.

While we're at it, I also noticed that the code is only freeing
some but not all of the allocated strings in this function, and
indeed, valgrind is also complaining about memory leaks here.
So let's call g_free() on all allocated strings to avoid leaking
memory here.

Message-Id: <20221125083054.117504-1-thuth@redhat.com>
Tested-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2022-12-03 21:56:13 +01:00
..
avocado tests/avocado: use new rootfs for orangepi test 2022-11-23 10:58:48 +01:00
bench
data tests: acpi: x86: update expected DSDT after moving PRQx fields in _SB scope 2022-11-22 05:19:00 -05:00
decode
docker tests/docker: allow user to override check target 2022-11-22 09:49:03 +00:00
fp
guest-debug
image-fuzzer
include
keys
lcitool ci: replace x86_64 macos-11 with aarch64 macos-12 2022-11-17 09:58:11 +01:00
migration
multiboot
perf/block/qcow2
plugin
qapi-schema
qemu-iotests tests/stream-under-throttle: New test 2022-11-14 11:31:52 +01:00
qtest tests/qtest/migration-test: Fix unlink error and memory leaks 2022-12-03 21:56:13 +01:00
rocker
tcg target/i386: fix cmpxchg with 32-bit register destination 2022-11-15 09:34:42 +10:00
tsan
uefi-test-tools
unit pci,pc,virtio: features, tests, fixes, cleanups 2022-11-07 18:43:56 -05:00
vm
vmstate-static-checker-data
check-block.sh
dbus-vmstate-daemon.sh
Makefile.include
meson.build
requirements.txt
test-qht-par.c
vhost-user-bridge.c