qemu-patch-raspberry4/tests/qtest
Chen Qun 9ab4fb21f5 tests/migration: fix memleak in wait_command/wait_command_fd
Properly free each command resp to avoid memory leak.
ASAN shows memory leak stack:

Indirect leak of 2352520 byte(s) in 571 object(s) allocated from:
    #0 0x7f6ca3308d4e in __interceptor_calloc (/lib64/libasan.so.5+0x112d4e)
    #1 0x7f6ca3127a50 in g_malloc0 (/lib64/libglib-2.0.so.0+0x55a50)
    #2 0x557bf3c71d2b in qdict_new ../qobject/qdict.c:29
    #3 0x557bf3c9caba in parse_object ../qobject/json-parser.c:318
    #4 0x557bf3c9ce75 in json_parser_parse ../qobject/json-parser.c:580
    #5 0x557bf3c8c8cf in json_message_process_token ../qobject/json-streamer.c:92
    #6 0x557bf3c9ea59 in json_lexer_feed_char ../qobject/json-lexer.c:313
    #7 0x557bf3c9eeb5 in json_lexer_feed ../qobject/json-lexer.c:350
    #8 0x557bf3c4793a in qmp_fd_receive ../tests/qtest/libqtest.c:608
    #9 0x557bf3c47b58 in qtest_qmp_receive ../tests/qtest/libqtest.c:618
    #10 0x557bf3c44245 in wait_command ../tests/qtest/migration-helpers.c:59
    #11 0x557bf3c445cb in migrate_query_status ../tests/qtest/migration-helpers.c:108
    #12 0x557bf3c44642 in check_migration_status ../tests/qtest/migration-helpers.c:124
    #13 0x557bf3c447e7 in wait_for_migration_status ../tests/qtest/migration-helpers.c:148
    #14 0x557bf3c43b8f in test_migrate_auto_converge ../tests/qtest/migration-test.c:1243
    ......

Fix: 5e34005571

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Message-Id: <20201023061218.2080844-2-kuhn.chenqun@huawei.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-10-24 07:23:19 +02:00
..
fuzz fuzz: Disable QEMU's SIG{INT,HUP,TERM} handlers 2020-10-17 10:45:53 -04:00
libqos tests/9pfs: add virtio_9p_test_path() 2020-10-19 14:25:40 +02:00
ac97-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
acpi-utils.c
acpi-utils.h meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
ahci-test.c qtest: switch users back to qtest_qmp_receive 2020-10-12 11:50:49 -04:00
arm-cpu-features.c hw/arm/virt: Implement kvm-steal-time 2020-10-08 15:24:32 +01:00
bios-tables-test-allowed-diff.h tests/acpi: update expected data files 2020-10-21 11:36:19 +02:00
bios-tables-test.c tests/acpi: add microvm rtc test 2020-10-21 11:36:19 +02:00
boot-order-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
boot-sector.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
boot-sector.h meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
boot-serial-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
cdrom-test.c tests/qtest/cdrom: Add more s390x-related boot tests 2020-10-06 20:14:48 +02:00
cpu-plug-test.c cphp: remove deprecated cpu-add command(s) 2020-09-29 02:14:30 -04:00
dbus-vmstate-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
dbus-vmstate1.xml
device-introspect-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
device-plug-test.c device-plug-test: use qtest_qmp to send the device_del command 2020-10-12 11:50:49 -04:00
display-vga-test.c
drive_del-test.c qemu-iotests, qtest: rewrite test 067 as a qtest 2020-10-12 11:50:50 -04:00
ds1338-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
e1000-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
e1000e-test.c tests/qtest: Fix LGPL information in the file headers 2020-06-15 18:26:46 +02:00
eepro100-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
endianness-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
es1370-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
fdc-test.c
fuzz-test.c qtest: add fuzz test case 2020-10-13 08:08:55 +02:00
fw_cfg-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
hd-geo-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
hexloader-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
i440fx-test.c
i82801b11-test.c
ide-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
intel-hda-test.c
ioh3420-test.c
ipmi-bt-test.c
ipmi-kcs-test.c tests/qtest/ipmi-kcs: Fix assert side-effect 2020-09-03 12:47:33 +02:00
ipoctal232-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
ivshmem-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
libqtest-single.h meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
libqtest.c qtest: switch users back to qtest_qmp_receive 2020-10-12 11:50:49 -04:00
m25p80-test.c
m48t59-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
machine-none-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
megasas-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
meson.build tests/qtest: Add npcm7xx timer test 2020-10-20 16:12:00 +01:00
microbit-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
migration-helpers.c tests/migration: fix memleak in wait_command/wait_command_fd 2020-10-24 07:23:19 +02:00
migration-helpers.h meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
migration-test.c tests/migration: Allow longer timeouts 2020-10-13 08:08:55 +02:00
modules-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
ne2000-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
npcm7xx_timer-test.c tests/qtest: Add npcm7xx timer test 2020-10-20 16:12:00 +01:00
numa-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
nvme-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
pca9552-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
pci-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
pcnet-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
pflash-cfi02-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
pnv-xscom-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
prom-env-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
pvpanic-test.c qtest: switch users back to qtest_qmp_receive 2020-10-12 11:50:49 -04:00
pxe-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
q35-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
qmp-cmd-test.c tests/qtest/qmp-cmd-test: Use inclusive language 2020-09-16 08:41:06 +02:00
qmp-test.c qtest: rename qtest_qmp_receive to qtest_qmp_receive_dict 2020-10-12 11:50:24 -04:00
qom-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
qos-test.c tests/qtest: Fix LGPL information in the file headers 2020-06-15 18:26:46 +02:00
rtas-test.c meson: link emulators without Makefile.target 2020-08-21 06:30:40 -04:00
rtc-test.c tests/qtest: Replace magic value by NANOSECONDS_PER_SECOND definition 2020-10-13 08:08:55 +02:00
rtl8139-test.c
sdhci-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
spapr-phb-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
tco-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
test-arm-mptimer.c
test-filter-mirror.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
test-filter-redirector.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
test-hmp.c cphp: remove deprecated cpu-add command(s) 2020-09-29 02:14:30 -04:00
test-netfilter.c
test-x86-cpuid-compat.c i386: Mask SVM features if nested SVM is disabled 2020-06-26 09:39:40 -04:00
tmp105-test.c
tpm-crb-swtpm-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
tpm-crb-test.c test: tpm-tis: Get prepared to share tests between ISA and sysbus devices 2020-03-05 12:18:39 -05:00
tpm-emu.c tpm: Move backend code under the 'backends/' directory 2020-06-19 07:25:55 -04:00
tpm-emu.h test/tpm-emu: include sockets and channel headers in tpm-emu header 2020-06-09 14:18:04 -04:00
tpm-tests.c tests/qtest/tpm: Declare input buffers const and static 2020-09-03 12:47:33 +02:00
tpm-tests.h test: tpm: pass optional machine options to swtpm test functions 2020-03-05 12:18:33 -05:00
tpm-tis-device-swtpm-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
tpm-tis-device-test.c test: tpm-tis: Add Sysbus TPM-TIS device test 2020-03-05 12:18:47 -05:00
tpm-tis-swtpm-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
tpm-tis-test.c test: tpm-tis: Get prepared to share tests between ISA and sysbus devices 2020-03-05 12:18:39 -05:00
tpm-tis-util.c test: tpm-tis: Get prepared to share tests between ISA and sysbus devices 2020-03-05 12:18:39 -05:00
tpm-tis-util.h test: tpm-tis: Get prepared to share tests between ISA and sysbus devices 2020-03-05 12:18:39 -05:00
tpm-util.c qtest: switch users back to qtest_qmp_receive 2020-10-12 11:50:49 -04:00
tpm-util.h test: tpm-tis: Get prepared to share tests between ISA and sysbus devices 2020-03-05 12:18:39 -05:00
tulip-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
usb-hcd-ehci-test.c libqos: usb-hcd-ehci: use 32-bit write for config register 2020-06-26 06:45:29 -04:00
usb-hcd-ohci-test.c
usb-hcd-uhci-test.c
usb-hcd-xhci-test.c
vhost-user-test.c tests/qtest/vhost-user-test: prepare the tests for adding new dev class 2020-09-29 02:14:29 -04:00
virtio-9p-test.c tests/9pfs: add local Tmkdir test 2020-10-19 14:25:40 +02:00
virtio-blk-test.c
virtio-ccw-test.c
virtio-net-test.c
virtio-rng-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
virtio-scsi-test.c
virtio-serial-test.c
virtio-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
vmgenid-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
vmxnet3-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00
wdt_ib700-test.c meson: convert tests/qtest to meson 2020-08-21 06:30:20 -04:00