mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 02:38:09 +09:00
unittests:make sftp_dir pass on my laptop
This commit is contained in:
@@ -45,6 +45,8 @@ static void torture_sftp_mkdir(void **state) {
|
|||||||
snprintf(tmpdir, sizeof(tmpdir), "%s/mkdir_test", t->testdir);
|
snprintf(tmpdir, sizeof(tmpdir), "%s/mkdir_test", t->testdir);
|
||||||
|
|
||||||
rc = sftp_mkdir(t->sftp, tmpdir, 0755);
|
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);
|
assert_true(rc == 0);
|
||||||
|
|
||||||
/* check if it really has been created */
|
/* check if it really has been created */
|
||||||
|
|||||||
@@ -250,6 +250,8 @@ struct torture_sftp *torture_sftp_session(ssh_session session) {
|
|||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
/* useful if TESTUSER is not the local user */
|
||||||
|
chmod(template,0777);
|
||||||
t->testdir = strdup(p);
|
t->testdir = strdup(p);
|
||||||
if (t->testdir == NULL) {
|
if (t->testdir == NULL) {
|
||||||
goto failed;
|
goto failed;
|
||||||
|
|||||||
Reference in New Issue
Block a user