Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
7753-kernel-test-gen-udp-Added-the-ip-option-to...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 7753-kernel-test-gen-udp-Added-the-ip-option-to-the-test.patch of Package erlang
From 1bed26dd2ea44f0966ad6878cdf6d953915ccc07 Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Thu, 17 Nov 2022 17:37:00 +0100 Subject: [PATCH 3/5] [kernel|test|gen-udp] Added the 'ip' option to the test The 'ip' option could not be added *after* the add_membership option, so add the 'ip' option to the tested options. OTP-18323 --- lib/kernel/test/gen_udp_SUITE.erl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/kernel/test/gen_udp_SUITE.erl b/lib/kernel/test/gen_udp_SUITE.erl index 80b5a7ec26..f708300663 100644 --- a/lib/kernel/test/gen_udp_SUITE.erl +++ b/lib/kernel/test/gen_udp_SUITE.erl @@ -2790,7 +2790,7 @@ do_simple_sockaddr_send_recv(#{family := _Fam} = SockAddr, _) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Verify that the options [add|drop]_membership do not mess up -%% the "previous" options. +%% the options (including 'ip' which could not be added *after*). otp_18323(Config) when is_list(Config) -> ct:timetrap(?MINS(1)), ?TC_TRY(?FUNCTION_NAME, fun() -> do_otp_18323(Config) end). @@ -2808,14 +2808,17 @@ do_otp_18323_verify(MembershipOpt) -> Port = 4321, RecBuf = 123456, Active = 10, - Opts = [binary, MembershipOpt, {active, Active}], + IP = {1,2,3,4}, + Opts = [binary, MembershipOpt, {ip, IP}, {active, Active}], case inet:udp_options([{port, Port}, {recbuf, RecBuf} | Opts], inet_udp) of - {ok, #udp_opts{port = Port, - opts = SockOpts}} -> + {ok, #udp_opts{ifaddr = IP, + port = Port, + opts = SockOpts}} -> ?P("Processed Socket Options: " + "~n IfAddr: ~p" "~n Port: ~p" - "~n Sock Opts: ~p", [Port, SockOpts]), + "~n Sock Opts: ~p", [IP, Port, SockOpts]), %% Check that the recbuf and mode options are as expected %% The option 'binary' is shorthand for {mode, binary} {value, {recbuf, RecBuf}} = lists:keysearch(recbuf, 1, SockOpts), -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor