diff options
author | Lukas Larsson <[email protected]> | 2017-10-30 19:41:18 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2017-10-30 19:41:18 +0100 |
commit | d998d08c964804d9facd7b05c8429fcb8fab7f59 (patch) | |
tree | 3a82584781b80219f0b46b02d8d6c06e4a3b1e88 /lib/kernel | |
parent | bdd21517a65aa13393c8e97a89e3c9127f99c273 (diff) | |
parent | 1b00539d6db8e349c6782bcd38ab006420734106 (diff) | |
download | otp-d998d08c964804d9facd7b05c8429fcb8fab7f59.tar.gz otp-d998d08c964804d9facd7b05c8429fcb8fab7f59.tar.bz2 otp-d998d08c964804d9facd7b05c8429fcb8fab7f59.zip |
Merge branch 'lukas/erts/misc_fixes'
* lukas/erts/misc_fixes:
erts: Fix a bunch of compiler warnings
kernel: Fix gen_tcp_misc indentation
erts: Fail port_SUITE:huge_env if error code > 127
erts: Add lcnt prototype for dist locks update
Diffstat (limited to 'lib/kernel')
-rw-r--r-- | lib/kernel/test/gen_tcp_misc_SUITE.erl | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/lib/kernel/test/gen_tcp_misc_SUITE.erl b/lib/kernel/test/gen_tcp_misc_SUITE.erl index 331864b5de..e47023d201 100644 --- a/lib/kernel/test/gen_tcp_misc_SUITE.erl +++ b/lib/kernel/test/gen_tcp_misc_SUITE.erl @@ -1572,52 +1572,56 @@ fill_sendq(Config) when is_list(Config) -> Master = self(), Server = spawn_link(fun () -> - {ok,L} = gen_tcp:listen - (0, [{active,false},binary, - {reuseaddr,true},{packet,0}]), + {ok,L} = gen_tcp:listen(0, [{active,false},binary, + {reuseaddr,true},{packet,0}]), {ok,Port} = inet:port(L), Master ! {self(),client, fill_sendq_client(Port, Master)}, fill_sendq_srv(L, Master) end), io:format("~p Server~n", [Server]), - receive {Server,client,Client} -> - io:format("~p Client~n", [Client]), - receive {Server,reader,Reader} -> - io:format("~p Reader~n", [Reader]), - fill_sendq_loop(Server, Client, Reader) + receive + {Server,client,Client} -> + io:format("~p Client~n", [Client]), + receive + {Server,reader,Reader} -> + io:format("~p Reader~n", [Reader]), + fill_sendq_loop(Server, Client, Reader) end end. fill_sendq_loop(Server, Client, Reader) -> %% Master %% - receive {Server,send} -> + receive + {Server,send} -> fill_sendq_loop(Server, Client, Reader) after 2000 -> %% Send queue full, sender blocked -> close client. io:format("Send timeout, closing Client...~n", []), Client ! {self(),close}, - receive {Server,[{error,closed}]} -> - io:format("Got server closed.~n"), - receive {Reader,[{error,closed}]} -> - io:format - ("Got reader closed.~n"), - ok - after 3000 -> - ct:fail({timeout,{closed,reader}}) - end; - {Reader,[{error,closed}]} -> - io:format("Got reader closed.~n"), - receive {Server,[{error,closed}]} -> - io:format("Got server closed~n"), - ok - after 3000 -> - ct:fail({timeout,{closed,server}}) - end - after 3000 -> - ct:fail({timeout,{closed,[server,reader]}}) - end + receive + {Server,[{error,closed}]} -> + io:format("Got server closed.~n"), + receive + {Reader,[{error,closed}]} -> + io:format("Got reader closed.~n"), + ok + after 3000 -> + ct:fail({timeout,{closed,reader}}) + end; + {Reader,[{error,closed}]} -> + io:format("Got reader closed.~n"), + receive + {Server,[{error,closed}]} -> + io:format("Got server closed~n"), + ok + after 3000 -> + ct:fail({timeout,{closed,server}}) + end + after 3000 -> + ct:fail({timeout,{closed,[server,reader]}}) + end end. fill_sendq_srv(L, Master) -> |