qemu/tests/qtest/fuzz
Akihiko Odaki bab6a301c5 ui/cocoa: Run qemu_init in the main thread
This work is based on:
https://patchew.org/QEMU/20220317125534.38706-1-philippe.mathieu.daude@gmail.com/

Simplify the initialization dance by running qemu_init() in the main
thread before the Cocoa event loop starts. The secondary thread only
runs only qemu_main_loop() and qemu_cleanup().

This fixes a case where addRemovableDevicesMenuItems() calls
qmp_query_block() while expecting the main thread to still hold
the BQL.

Overriding the code after calling qemu_init() is done by dynamically
replacing a function pointer variable, qemu_main when initializing
ui/cocoa, which unifies the static implementation of main() for
builds with ui/cocoa and ones without ui/cocoa.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <20220819132756.74641-2-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2022-09-23 14:36:33 +02:00
..
fork_fuzz.c fuzz: do not use POSIX shm for coverage bitmap 2020-07-06 07:37:02 +02:00
fork_fuzz.h
fork_fuzz.ld fuzz: Make fork_fuzz.ld compatible with LLVM's LLD 2020-11-10 08:51:30 +01:00
fuzz.c ui/cocoa: Run qemu_init in the main thread 2022-09-23 14:36:33 +02:00
fuzz.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
generic_fuzz_configs.h tests/qtest: Use g_mkdtemp() 2022-08-25 15:16:13 +02:00
generic_fuzz.c tests/qtest: Use g_setenv() 2022-08-25 15:16:13 +02:00
i440fx_fuzz.c tests: move libqtest.h back under qtest/ 2022-05-03 15:16:51 +04:00
meson.build configure, meson: move fuzzing configuration to Meson 2021-10-14 09:50:56 +02:00
qos_fuzz.c tests/qtest: libqos: Rename malloc.h to libqos-malloc.h 2022-08-29 15:28:51 +02:00
qos_fuzz.h Remove leading underscores from QEMU defines 2021-06-21 05:49:01 +02:00
qtest_wrappers.c meson: link emulators without Makefile.target 2020-08-21 06:30:40 -04:00
virtio_blk_fuzz.c tests: move libqtest.h back under qtest/ 2022-05-03 15:16:51 +04:00
virtio_net_fuzz.c Replace fcntl(O_NONBLOCK) with g_unix_set_fd_nonblocking() 2022-05-03 15:47:38 +04:00
virtio_scsi_fuzz.c tests: move libqtest.h back under qtest/ 2022-05-03 15:16:51 +04:00