File 0849-ssh-Add-filename-logging.patch of Package erlang
From f4ecc9db7a1b49f20b2467c2fad5b3c93ccf0349 Mon Sep 17 00:00:00 2001
From: Hans Nilsson <hans@erlang.org>
Date: Tue, 4 Feb 2020 17:38:15 +0100
Subject: [PATCH 1/2] ssh: Add filename logging
---
lib/ssh/test/ssh_sftp_SUITE.erl | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/ssh/test/ssh_sftp_SUITE.erl b/lib/ssh/test/ssh_sftp_SUITE.erl
index b669deb279..2f4751c67a 100644
--- a/lib/ssh/test/ssh_sftp_SUITE.erl
+++ b/lib/ssh/test/ssh_sftp_SUITE.erl
@@ -1079,17 +1079,23 @@ prepare(Config0) ->
PrivDir = proplists:get_value(priv_dir, Config0),
Dir = filename:join(PrivDir, ssh_test_lib:random_chars(10)),
file:make_dir(Dir),
+ ct:log("~p:~p created the directory~nsftp_priv_dir = ~p", [?MODULE,?LINE,Dir]),
Keys = [filename,
testfile,
linktest,
tar_filename],
Config1 = foldl_keydelete(Keys, Config0),
Config2 = lists:foldl(fun({Key,Name}, ConfAcc) ->
- [{Key, filename:join(Dir,Name)} | ConfAcc]
+ [{Key, filename:join(Dir,Name)} | ConfAcc]
end,
Config1,
lists:zip(Keys, [proplists:get_value(K,Config0) || K<-Keys])),
+ catch ct:log("~p:~p Prepared filenames (Key -> Value):~n~ts",
+ [?MODULE,?LINE,
+ [io_lib:format("~p -> ~ts~n", [K,V]) || {K,V} <- Config2,
+ lists:member(K, Keys)]]),
+
DataDir = proplists:get_value(data_dir, Config2),
FilenameSrc = filename:join(DataDir, "sftp.txt"),
FilenameDst = proplists:get_value(filename, Config2),
--
2.16.4