File 3024-kernel-test-Tweaked-bidirection-traffic-case.patch of Package erlang

From 52a49f7c036236e23f58b53ad33c595ba00874db Mon Sep 17 00:00:00 2001
From: Micael Karlberg <bmk@erlang.org>
Date: Thu, 14 Dec 2023 09:19:56 +0100
Subject: [PATCH 4/6] [kernel|test] Tweaked bidirection traffic case

Attempting to tweak the bidirection traffic test case,
by throwing the error instead of returning it This should
allow the framework to check for system event.
---
 lib/kernel/test/gen_tcp_misc_SUITE.erl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/kernel/test/gen_tcp_misc_SUITE.erl b/lib/kernel/test/gen_tcp_misc_SUITE.erl
index 3c0213317a..84bf411e4f 100644
--- a/lib/kernel/test/gen_tcp_misc_SUITE.erl
+++ b/lib/kernel/test/gen_tcp_misc_SUITE.erl
@@ -6751,7 +6751,7 @@ setup_closed_ao(Config, Addr) ->
         end,
     ?P("[setup] get (\"proper\")local address"),
     {ok, Addr} = ?LIB:which_local_addr(inet),
-    Host = get_hostname(node()),
+    %% Host = get_hostname(node()),
     ?P("[setup] create listen socket (with ~p)", [Addr]),
     L = case ?LISTEN(Config, 0, [{ip, Addr}, {active,false},{packet,2}]) of
             {ok, LSock} ->
@@ -8540,10 +8540,10 @@ do_bidirectional_traffic(Config, #{lsock       := LSock,
         receive
             {timeout, Socket, Total} ->
                 ?P("case -> timeout msg for ~p: received ~w", [Socket, Total]),
-                {fail, {timeout, Socket, Total}};
+                throw({fail, {timeout, Socket, Total}});
 	    {error, Socket, Reason} ->
                 ?P("case -> error msg for ~p: ~p", [Socket, Reason]),
-                {fail, {error, Socket, Reason}}
+                throw({fail, {error, Socket, Reason}})
         after 30000 ->
                 %% if it does not fail in 30 seconds, it most likely works
                 ?P("case -> timeout => success"),
-- 
2.35.3

openSUSE Build Service is sponsored by