diff mbox series

char: the test-char.c are stuck randomly on win32 at function char_socket_client_test

Message ID 20200909061520.1324-1-luoyonggang@gmail.com
State New
Headers show
Series char: the test-char.c are stuck randomly on win32 at function char_socket_client_test | expand

Commit Message

罗勇刚(Yonggang Luo) Sept. 9, 2020, 6:15 a.m. UTC
The line I modified is the place that entering and line exit.
And when step into the function main_loop_wait(false);
the stack-trace are like this:

NtWaitForMultipleObjects (@NtWaitForMultipleObjects:8)
WaitForMultipleObjectsEx (@WaitForMultipleObjectsEx:59)
g_pattern_match_simple (@g_pattern_match_simple:221)
g_pattern_match_simple (@g_pattern_match_simple:336)
g_poll (@g_poll:207)
qemu_poll_ns (c:\work\xemu\qemu\util\qemu-timer.c:350)
os_host_main_loop_wait (c:\work\xemu\qemu\util\main-loop.c:452)
main_loop_wait (c:\work\xemu\qemu\util\main-loop.c:520)
char_socket_server_test (c:\work\xemu\qemu\tests\test-char.c:862)
g_test_summary (@g_test_summary:353)
g_test_summary (@g_test_summary:247)
g_test_summary (@g_test_summary:247)
g_test_summary (@g_test_summary:247)
g_test_summary (@g_test_summary:247)
g_test_run_suite (@g_test_run_suite:54)
g_test_run (@g_test_run:9)
main (c:\work\xemu\qemu\tests\test-char.c:1563)
__tmainCRTStartup (@__tmainCRTStartup:142)
mainCRTStartup (@1400014f6..140001539:3)
BaseThreadInitThunk (@BaseThreadInitThunk:9)

I submit this patch is looking for reviewer to help me fixes this randomly issue

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 tests/test-char.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/tests/test-char.c b/tests/test-char.c
index 80e5bac61a..207004f38c 100644
--- a/tests/test-char.c
+++ b/tests/test-char.c
@@ -1065,6 +1065,7 @@  static void char_socket_client_test(gconstpointer opaque)
 
     /* Wait for the server to go away */
     while (data.event == -1) {
+        /* This is the place getting stuck */
         main_loop_wait(false);
     }
     g_assert(data.event == CHR_EVENT_CLOSED);