aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2016-06-16 14:03:58 +0200
committerRaimo Niskanen <[email protected]>2016-06-17 09:32:35 +0200
commita3626105809abf8be1869f6b0725b6cfa912dedd (patch)
treec0e3393964bb3fc709fcbf9a1b2e7f105ae79b0f /lib/kernel/test
parente0881861bb8d4bf796134f072e67608c6f32b4c6 (diff)
downloadotp-a3626105809abf8be1869f6b0725b6cfa912dedd.tar.gz
otp-a3626105809abf8be1869f6b0725b6cfa912dedd.tar.bz2
otp-a3626105809abf8be1869f6b0725b6cfa912dedd.zip
Update test cases after daily builds
Diffstat (limited to 'lib/kernel/test')
-rw-r--r--lib/kernel/test/gen_udp_SUITE.erl18
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/kernel/test/gen_udp_SUITE.erl b/lib/kernel/test/gen_udp_SUITE.erl
index 9554920d07..ca629f7344 100644
--- a/lib/kernel/test/gen_udp_SUITE.erl
+++ b/lib/kernel/test/gen_udp_SUITE.erl
@@ -594,8 +594,7 @@ local_unbound(_Config) ->
S = ok(gen_udp:open(0, [{ifaddr,SAddr},{active,false}])),
C = ok(gen_udp:open(0, [local,{active,false}])),
SAddr = ok(inet:sockname(S)),
- {local,<<>>} = ok(inet:sockname(C)),
- local_handshake(S, SAddr, C, {unspec,<<>>}),
+ local_handshake(S, SAddr, C, undefined),
ok = gen_udp:close(S),
ok = gen_udp:close(C),
%%
@@ -634,11 +633,9 @@ local_fdopen_unbound(_Config) ->
S = ok(gen_udp:open(0, [{ifaddr,SAddr},{active,false}])),
C0 = ok(gen_udp:open(0, [local,{active,false}])),
SAddr = ok(inet:sockname(S)),
- {local,<<>>} = ok(inet:sockname(C0)),
Fd = ok(prim_inet:getfd(C0)),
C = ok(gen_udp:open(0, [{fd,Fd},local,{active,false}])),
- {local,<<>>} = ok(inet:sockname(C)),
- local_handshake(S, SAddr, C, {unspec,<<>>}),
+ local_handshake(S, SAddr, C, undefined),
ok = gen_udp:close(S),
ok = gen_udp:close(C),
ok = gen_udp:close(C0),
@@ -666,16 +663,17 @@ local_handshake(S, SAddr, C, CAddr) ->
SData = "9876543210",
CData = "0123456789",
ok = gen_udp:send(C, SAddr, 0, CData),
- {CAddr, 0, CData} = ok(gen_tcp:recv(S, 112)),
- case CAddr of
- {unspec,_} ->
+ case ok(gen_tcp:recv(S, 112)) of
+ {{unspec,<<>>}, 0, CData} when CAddr =:= undefined ->
ok;
- _ ->
+ {{local,<<>>}, 0, CData} when CAddr =:= undefined ->
+ ok;
+ {CAddr, 0, CData} when CAddr =/= undefined ->
ok = gen_udp:send(S, CAddr, 0, SData),
{SAddr, 0, SData} = ok(gen_tcp:recv(C, 112)),
ok
- end.
+ end.
%%
%% Utils