diff options
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/test/port_SUITE.erl | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/erts/emulator/test/port_SUITE.erl b/erts/emulator/test/port_SUITE.erl index 6d89653623..93f9534138 100644 --- a/erts/emulator/test/port_SUITE.erl +++ b/erts/emulator/test/port_SUITE.erl @@ -2302,7 +2302,8 @@ load_driver(Dir, Driver) -> end. -close_deaf_port(doc) -> ["Send data to port program that does not read it, then close port."]; +close_deaf_port(doc) -> ["Send data to port program that does not read it, then close port." + "Primary targeting Windows to test threaded_handle_closer in sys.c"]; close_deaf_port(suite) -> []; close_deaf_port(Config) when is_list(Config) -> ?line Dog = test_server:timetrap(test_server:seconds(100)), @@ -2312,24 +2313,22 @@ close_deaf_port(Config) when is_list(Config) -> ?line erlang:port_command(Port,"Hello, can you hear me!?!?"), ?line port_close(Port), - close_deaf_port_1(0, DeadPort). + Res = close_deaf_port_1(0, DeadPort), + ?line test_server:timetrap_cancel(Dog), + Res. close_deaf_port_1(1000, _) -> ok; close_deaf_port_1(N, Cmd) -> Timeout = integer_to_list(random:uniform(10*1000)), - try open_port({spawn,Cmd++" "++Timeout},[]) of + ?line try open_port({spawn_executable,Cmd},[{args,[Timeout]}]) of Port -> ?line erlang:port_command(Port,"Hello, can you hear me!?!?"), ?line port_close(Port), close_deaf_port_1(N+1, Cmd) catch - exit:eagain -> + _:eagain -> {comment, "Could not spawn more than " ++ integer_to_list(N) ++ " OS processes."} end. -repeat(0, _) -> ok; -repeat(Cnt, Fun) -> - Fun(), - repeat(Cnt-1, Fun). |