From 30df04a8a50a43f4353e1da18ca64099062d016f Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 17 Sep 2018 14:35:39 +0200 Subject: [PATCH] tests: Do not call sftp_canonicalize_path() Signed-off-by: Andreas Schneider --- tests/client/torture_sftp_benchmark.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/client/torture_sftp_benchmark.c b/tests/client/torture_sftp_benchmark.c index 253d07b9..68969057 100644 --- a/tests/client/torture_sftp_benchmark.c +++ b/tests/client/torture_sftp_benchmark.c @@ -72,7 +72,6 @@ static void torture_sftp_benchmark_write_read(void **state) }; uint8_t buf_16k[MAX_XFER_BUF_SIZE]; char local_path[1024] = {0}; - char *remote_path = NULL; ssize_t bwritten, nread; size_t i; int rc; @@ -81,10 +80,7 @@ static void torture_sftp_benchmark_write_read(void **state) snprintf(local_path, sizeof(local_path), "%s/128M.dat", t->testdir); - remote_path = sftp_canonicalize_path(sftp, local_path); - assert_non_null(remote_path); - - file = sftp_open(sftp, remote_path, O_CREAT|O_WRONLY|O_TRUNC, 0644); + file = sftp_open(sftp, local_path, O_CREAT|O_WRONLY|O_TRUNC, 0644); assert_non_null(file); /* Write 128M */ @@ -100,7 +96,7 @@ static void torture_sftp_benchmark_write_read(void **state) rc = stat(local_path, &sb); assert_int_equal(sb.st_size, 0x8000000); - file = sftp_open(sftp, remote_path, O_RDONLY, 0); + file = sftp_open(sftp, local_path, O_RDONLY, 0); assert_non_null(file); for (;;) { @@ -114,7 +110,6 @@ static void torture_sftp_benchmark_write_read(void **state) rc = sftp_close(file); assert_ssh_return_code(session, rc); - SSH_STRING_FREE_CHAR(remote_path); unlink(local_path); }