From 4c05bf58dd79e56ccd739fba7fee11c3dc15ba6b Mon Sep 17 00:00:00 2001 From: Paul Guyot Date: Sat, 4 Nov 2023 22:53:31 +0100 Subject: [PATCH] Debug CI --- tests/libs/estdlib/test_tcp_socket.erl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/libs/estdlib/test_tcp_socket.erl b/tests/libs/estdlib/test_tcp_socket.erl index 474ee8339b..62d910c3ee 100644 --- a/tests/libs/estdlib/test_tcp_socket.erl +++ b/tests/libs/estdlib/test_tcp_socket.erl @@ -23,15 +23,20 @@ -export([test/0]). test() -> + erlang:display({?MODULE, ?LINE}), ok = test_echo_server(), + erlang:display({?MODULE, ?LINE}), ok = test_shutdown(), + erlang:display({?MODULE, ?LINE}), ok = test_close_by_another_process(), + erlang:display({?MODULE, ?LINE}), case get_otp_version() of atomvm -> ok = test_abandon_select(); _ -> ok end, + erlang:display({?MODULE, ?LINE}), ok. test_echo_server() -> @@ -54,14 +59,20 @@ test_shutdown() -> Port = 44404, ListenSocket = start_echo_server(Port), + erlang:display({?MODULE, ?LINE}), ok = test_shutdown_of_client_sockets(Port), + erlang:display({?MODULE, ?LINE}), ok = close_listen_socket(ListenSocket). test_shutdown_of_client_sockets(Port) -> + erlang:display({?MODULE, ?LINE}), ok = test_shutdown_of_side(Port, write), + erlang:display({?MODULE, ?LINE}), ok = test_shutdown_of_side(Port, read_write), + erlang:display({?MODULE, ?LINE}), ok = test_shutdown_of_side(Port, read), + erlang:display({?MODULE, ?LINE}), ok. test_shutdown_of_side(Port, Side) -> @@ -276,7 +287,9 @@ test_abandon_select() -> test_close_by_another_process() -> % socket:recv is blocking and the only way to interrupt it is to close % the socket. + erlang:display({?MODULE, ?LINE}), etest:flush_msg_queue(), + erlang:display({?MODULE, ?LINE}), Port = 44404, ListenSocket = start_echo_server(Port), @@ -289,7 +302,9 @@ test_close_by_another_process() -> ok = socket:close(ClientSocket1) end), % recv is blocking + erlang:display({?MODULE, ?LINE}), {error, closed} = socket:recv(ClientSocket1, 0, 5000), + erlang:display({?MODULE, ?LINE}), close_listen_socket(ListenSocket).