Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:26
erlang
3108-kernel-test-Rest-data-size-calculation.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 3108-kernel-test-Rest-data-size-calculation.patch of Package erlang
From 3fc7e1ed15803465e7a7cfd07b95d9db30f9599f Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Wed, 3 Apr 2024 16:49:49 +0200 Subject: [PATCH 08/11] [kernel|test] Rest data size calculation OTP-18845 --- lib/kernel/test/gen_tcp_misc_SUITE.erl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/kernel/test/gen_tcp_misc_SUITE.erl b/lib/kernel/test/gen_tcp_misc_SUITE.erl index 2c7e2bb804..3f98e7692a 100644 --- a/lib/kernel/test/gen_tcp_misc_SUITE.erl +++ b/lib/kernel/test/gen_tcp_misc_SUITE.erl @@ -6631,7 +6631,7 @@ mad_sender(S, N) -> "send failed: timeout with ~w bytes of rest data" "~n Number of sends: ~w" "~n Elapsed (send) time: ~w msec", - [byte_size(RestData), + [rest_data_size(RestData), N2, erlang:convert_time_unit(get(elapsed), native, millisecond)]), ERROR2; @@ -6899,7 +6899,7 @@ timeout_sink_loop(Action, To, N) -> "~n Result: timeout with ~w bytes of rest data", [N2, erlang:convert_time_unit(get(elapsed), native, millisecond), - byte_size(RestData)]), + rest_data_size(RestData)]), {{error, timeout}, N2}; Other -> ?P("[sink-loop] action result: " @@ -6913,6 +6913,12 @@ timeout_sink_loop(Action, To, N) -> end. +rest_data_size(Bin) when is_binary(Bin) -> + byte_size(Bin); +rest_data_size([Bin|IOVec]) when is_binary(Bin) -> + byte_size(Bin) + rest_data_size(IOVec). + + %% ========================================================================= send_timeout_resume(Config) when is_list(Config) -> @@ -7593,7 +7599,7 @@ otp_7816_send_data(Ctrl, Socket, Data, Loops) -> ?P("[client] packet to 'raw'..."), ok = inet:setopts(Socket, [{packet, raw}, {send_timeout, 1000}]), ?P("[client] send ~w bytes of rest data...", - [byte_size(RestData)]), + [rest_data_size(RestData)]), ok = gen_tcp:send(Socket, RestData), ?P("[client] packet (back) to '4'..."), ok = inet:setopts(Socket, [{packet, 4}, {send_timeout, 10}]), -- 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