From fcb6ee4031e0973e4ae38f3062d39eb0313335e5 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Thu, 27 Apr 2023 15:31:52 +0200 Subject: [PATCH] tests: Log server messages to separate file Signed-off-by: Jakub Jelen Reviewed-by: Norbert Pocs --- tests/server/torture_server_auth_kbdint.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/server/torture_server_auth_kbdint.c b/tests/server/torture_server_auth_kbdint.c index 204ebd5c..ca490edf 100644 --- a/tests/server/torture_server_auth_kbdint.c +++ b/tests/server/torture_server_auth_kbdint.c @@ -523,6 +523,7 @@ static int setup_kbdint_server(void **state) char rsa_hostkey[1024] = {0}; char sshd_path[1024]; + char log_file[1024]; int rc; @@ -550,6 +551,11 @@ static int setup_kbdint_server(void **state) rc = mkdir(sshd_path, 0755); assert_return_code(rc, errno); + snprintf(log_file, + sizeof(log_file), + "%s/sshd/log", + s->socket_dir); + snprintf(rsa_hostkey, sizeof(rsa_hostkey), "%s/sshd/ssh_host_rsa_key", @@ -569,7 +575,9 @@ static int setup_kbdint_server(void **state) ss->host_key = strdup(rsa_hostkey); assert_non_null(rsa_hostkey); + /* not to mix up the client and server messages */ ss->verbosity = torture_libssh_verbosity(); + ss->log_file = strdup(log_file); #ifdef WITH_PCAP ss->with_pcap = 1;