1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-05 20:55:46 +03:00

unittests:make sftp_dir pass on my laptop

(cherry picked from commit 7363b29427)
This commit is contained in:
Aris Adamantiadis
2011-08-24 22:31:26 +03:00
committed by Andreas Schneider
parent d127d68b9f
commit 43a3becf08
2 changed files with 4 additions and 0 deletions

View File

@@ -41,6 +41,8 @@ static void torture_sftp_mkdir(void **state) {
snprintf(tmpdir, sizeof(tmpdir), "%s/mkdir_test", t->testdir);
rc = sftp_mkdir(t->sftp, tmpdir, 0755);
if(rc != SSH_OK)
fprintf(stderr,"error:%s\n",ssh_get_error(t->sftp->session));
assert_true(rc == 0);
/* check if it really has been created */

View File

@@ -248,6 +248,8 @@ struct torture_sftp *torture_sftp_session(ssh_session session) {
if (p == NULL) {
goto failed;
}
/* useful if TESTUSER is not the local user */
chmod(template,0777);
t->testdir = strdup(p);
if (t->testdir == NULL) {
goto failed;