diff options
author | Micael Karlberg <[email protected]> | 2019-07-09 13:36:48 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-07-09 13:36:48 +0200 |
commit | e1b4a94d00c45959a8380c680b86c95598ad695f (patch) | |
tree | a73326ed314b529285b80c14ec43099092b5b725 | |
parent | 59034cd9f52d84937a0225efb382dba0ef8e812f (diff) | |
download | otp-e1b4a94d00c45959a8380c680b86c95598ad695f.tar.gz otp-e1b4a94d00c45959a8380c680b86c95598ad695f.tar.bz2 otp-e1b4a94d00c45959a8380c680b86c95598ad695f.zip |
[esock|test] IPv6 socket address includes optional fields
OTP-15897
-rw-r--r-- | erts/emulator/test/socket_SUITE.erl | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/erts/emulator/test/socket_SUITE.erl b/erts/emulator/test/socket_SUITE.erl index bf25f48944..d17455ad9d 100644 --- a/erts/emulator/test/socket_SUITE.erl +++ b/erts/emulator/test/socket_SUITE.erl @@ -15720,7 +15720,7 @@ traffic_send_and_recv_udp(InitState) -> end}, #{desc => "recv (2)", cmd => fun(#{sock := Sock, - server_sa := ServerSA, + server_sa := #{family := local} = ServerSA, recv := Recv, read_pkg := RPkg, read_byte := RByte} = State) -> @@ -15731,6 +15731,19 @@ traffic_send_and_recv_udp(InitState) -> read_byte => RByte + size(Data)}}; {error, _} = ERROR -> ERROR + end; + (#{sock := Sock, + server_sa := #{addr := Addr, port := Port}, + recv := Recv, + read_pkg := RPkg, + read_byte := RByte} = State) -> + case Recv(Sock) of + {ok, {#{addr := Addr, port := Port}, Data}} -> + ?SEV_IPRINT("recv ~p bytes", [size(Data)]), + {ok, State#{read_pkg => RPkg + 1, + read_byte => RByte + size(Data)}}; + {error, _} = ERROR -> + ERROR end end}, #{desc => "validate (recv 2)", |