Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
0497-kernel-test-Add-preliminary-IPv6-test-case...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0497-kernel-test-Add-preliminary-IPv6-test-case.patch of Package erlang
From 189aa8c6c7dbc8a9d765bdd1667c519e0fb601c7 Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Mon, 12 Sep 2022 22:32:16 +0200 Subject: [PATCH 3/4] [kernel|test] Add preliminary IPv6 test case OTP-18240 --- lib/kernel/test/socket_SUITE.erl | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/lib/kernel/test/socket_SUITE.erl b/lib/kernel/test/socket_SUITE.erl index 15c9206d8e..9a12d1f114 100644 --- a/lib/kernel/test/socket_SUITE.erl +++ b/lib/kernel/test/socket_SUITE.erl @@ -674,7 +674,8 @@ otp16359_maccept_tcp4/1, otp16359_maccept_tcp6/1, otp16359_maccept_tcpL/1, - otp18240_accept_mon_leak_tcp4/1 + otp18240_accept_mon_leak_tcp4/1, + otp18240_accept_mon_leak_tcp6/1 ]). @@ -857,7 +858,8 @@ groups() -> %% Ticket groups {tickets, [], tickets_cases()}, - {otp16359, [], otp16359_cases()} + {otp16359, [], otp16359_cases()}, + {otp18240, [], otp18240_cases()} ]. api_cases() -> @@ -2035,7 +2037,7 @@ ttest_ssockt_csockt_cases() -> tickets_cases() -> [ {group, otp16359}, - otp18240_accept_mon_leak_tcp4 + {group, otp18240} ]. otp16359_cases() -> @@ -2046,6 +2048,13 @@ otp16359_cases() -> ]. +otp18240_cases() -> + [ + otp18240_accept_mon_leak_tcp4, + otp18240_accept_mon_leak_tcp6 + ]. + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% init_per_suite(Config) -> @@ -47729,6 +47738,21 @@ otp18240_accept_mon_leak_tcp4(Config) when is_list(Config) -> end). +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% This test case is to verify that we do not leak monitors. +otp18240_accept_mon_leak_tcp6(Config) when is_list(Config) -> + ?TT(?SECS(10)), + tc_try(?FUNCTION_NAME, + fun() -> has_support_ipv6() end, + fun() -> + InitState = #{domain => inet6, + protocol => tcp, + num_socks => 10}, + ok = otp18240_accept_tcp(InitState) + end). + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% otp18240_accept_tcp(#{domain := Domain, @@ -47762,7 +47786,7 @@ otp18240_acceptor(Parent, Domain, Proto, NumSocks) -> MonitoredBy0 = monitored_by(), {ok, LSock} = socket:open(Domain, stream, Proto, #{use_registry => false}), - ok = socket:bind(LSock, #{family => inet, port => 0, addr => any}), + ok = socket:bind(LSock, #{family => Domain, port => 0, addr => any}), ok = socket:listen(LSock), MonitoredBy1 = monitored_by(), [LSockMon] = MonitoredBy1 -- MonitoredBy0, -- 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