diff options
author | Micael Karlberg <[email protected]> | 2019-07-09 12:38:27 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-07-09 12:38:27 +0200 |
commit | 59034cd9f52d84937a0225efb382dba0ef8e812f (patch) | |
tree | 05c180b3e93f6907aa3425ad46415f0c2208df01 /erts/emulator/test | |
parent | 70c800fc3d899d14cc2ca50e433082b5b2193990 (diff) | |
download | otp-59034cd9f52d84937a0225efb382dba0ef8e812f.tar.gz otp-59034cd9f52d84937a0225efb382dba0ef8e812f.tar.bz2 otp-59034cd9f52d84937a0225efb382dba0ef8e812f.zip |
[esock|test] IPv6 socket address includes optional fields
OTP-15897
Diffstat (limited to 'erts/emulator/test')
-rw-r--r-- | erts/emulator/test/socket_SUITE.erl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/erts/emulator/test/socket_SUITE.erl b/erts/emulator/test/socket_SUITE.erl index 073979d881..bf25f48944 100644 --- a/erts/emulator/test/socket_SUITE.erl +++ b/erts/emulator/test/socket_SUITE.erl @@ -15607,7 +15607,7 @@ traffic_send_and_recv_udp(InitState) -> #{desc => "recv (1)", cmd => fun(#{sock := Sock, recv := Recv, - server_sa := ServerSA} = State) -> + server_sa := #{family := local} = ServerSA} = State) -> case Recv(Sock) of {ok, {ServerSA, Data}} -> ?SEV_IPRINT("recv ~p bytes", [size(Data)]), @@ -15615,6 +15615,17 @@ traffic_send_and_recv_udp(InitState) -> read_byte => size(Data)}}; {error, _} = ERROR -> ERROR + end; + (#{sock := Sock, + recv := Recv, + server_sa := #{addr := Addr, port := Port}} = State) -> + case Recv(Sock) of + {ok, {#{addr := Addr, port := Port}, Data}} -> + ?SEV_IPRINT("recv ~p bytes", [size(Data)]), + {ok, State#{read_pkg => 1, + read_byte => size(Data)}}; + {error, _} = ERROR -> + ERROR end end}, #{desc => "validate (recv 1)", |