diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2011-08-24 22:31:26 +0300 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2011-09-02 22:25:26 +0200 |
commit | 43a3becf087465e737e1784171f90291ecbc8af0 (patch) | |
tree | 4c947d06b10657e127f59b00be4dca81761a3ee9 | |
parent | d127d68b9f4531aa4f47aaa95f2b99032adb99c0 (diff) | |
download | libssh-43a3becf087465e737e1784171f90291ecbc8af0.tar.gz libssh-43a3becf087465e737e1784171f90291ecbc8af0.tar.xz libssh-43a3becf087465e737e1784171f90291ecbc8af0.zip |
unittests:make sftp_dir pass on my laptop
(cherry picked from commit 7363b29427023bb2bbcec0bb1783e869015ff664)
-rw-r--r-- | tests/client/torture_sftp_dir.c | 2 | ||||
-rw-r--r-- | tests/torture.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/client/torture_sftp_dir.c b/tests/client/torture_sftp_dir.c index ba671e41..d8ea748b 100644 --- a/tests/client/torture_sftp_dir.c +++ b/tests/client/torture_sftp_dir.c @@ -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 */ diff --git a/tests/torture.c b/tests/torture.c index 1dbae46d..7c5f925d 100644 --- a/tests/torture.c +++ b/tests/torture.c @@ -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; |