File 1415-ssh-fix-cli-testcase-in-Windows.patch of Package erlang

From 9bae43ded78fe0418944a9708f080bc8a179039f Mon Sep 17 00:00:00 2001
From: Jakub Witczak <kuba@erlang.org>
Date: Fri, 3 Oct 2025 16:35:53 +0200
Subject: [PATCH 5/5] ssh: fix cli testcase in Windows

- add FIXME comment for logger events verification in parallel groups
---
 lib/ssh/test/ssh_basic_SUITE.erl | 4 ++++
 lib/ssh/test/ssh_test_cli.erl    | 6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/ssh/test/ssh_basic_SUITE.erl b/lib/ssh/test/ssh_basic_SUITE.erl
index ab7e66ca0b..ad2a778469 100644
--- a/lib/ssh/test/ssh_basic_SUITE.erl
+++ b/lib/ssh/test/ssh_basic_SUITE.erl
@@ -234,6 +234,10 @@ end_per_testcase(TestCase, Config)
 end_per_testcase(TestCase, Config) ->
     process_events(TestCase, Config).
 
+%% FIXME in parallel executions (p_basic group) this setup does not
+%% work log handlers are uniq per testcase, but they all receive same
+%% logger events; so if one testcase fails due to logger events, rest
+%% of group might fail as well
 process_events(TestCase, Config) ->
     {ok, Events} = ssh_test_lib:get_log_events(
                      proplists:get_value(log_handler_ref, Config)),
diff --git a/lib/ssh/test/ssh_test_cli.erl b/lib/ssh/test/ssh_test_cli.erl
index 72902325ea..b9f348068b 100644
--- a/lib/ssh/test/ssh_test_cli.erl
+++ b/lib/ssh/test/ssh_test_cli.erl
@@ -74,7 +74,11 @@ terminate(_Why, _S) ->
     nop.
 
 run_portprog(User, cli, TmpDir) ->
-    Pty_bin = os:find_executable("cat"),
+    Cmd = case os:type() of
+              {win32, _} -> "cmd.exe";
+              _ -> "cat"
+          end,
+    Pty_bin = os:find_executable(Cmd),
     ct:pal("Pty_bin = ~p", [Pty_bin]),
     ssh_test_lib:open_port({spawn_executable, Pty_bin},
 			   [stream,
-- 
2.51.0

openSUSE Build Service is sponsored by