summaryrefslogtreecommitdiff
path: root/tests-clay/core
diff options
context:
space:
mode:
Diffstat (limited to 'tests-clay/core')
-rw-r--r--tests-clay/core/dirent.c6
-rw-r--r--tests-clay/core/filebuf.c6
-rw-r--r--tests-clay/core/path.c4
-rw-r--r--tests-clay/core/rmdir.c14
-rw-r--r--tests-clay/core/vector.c4
5 files changed, 17 insertions, 17 deletions
diff --git a/tests-clay/core/dirent.c b/tests-clay/core/dirent.c
index 73f571595..105e8d8f0 100644
--- a/tests-clay/core/dirent.c
+++ b/tests-clay/core/dirent.c
@@ -20,18 +20,18 @@ static void setup(walk_data *d)
{
name_data *n;
- cl_must_pass(p_mkdir(top_dir, 0755));
+ cl_must_pass(p_mkdir(top_dir, 0777));
cl_must_pass(p_chdir(top_dir));
if (strcmp(d->sub, ".") != 0)
- cl_must_pass(p_mkdir(d->sub, 0755));
+ cl_must_pass(p_mkdir(d->sub, 0777));
strcpy(path_buffer, d->sub);
state_loc = d;
for (n = d->names; n->name; n++) {
- git_file fd = p_creat(n->name, 0600);
+ git_file fd = p_creat(n->name, 0666);
cl_assert(fd >= 0);
p_close(fd);
n->count = 0;
diff --git a/tests-clay/core/filebuf.c b/tests-clay/core/filebuf.c
index e00e20497..e1ecb2798 100644
--- a/tests-clay/core/filebuf.c
+++ b/tests-clay/core/filebuf.c
@@ -27,14 +27,14 @@ void test_core_filebuf__1(void)
int fd;
char test[] = "test";
- fd = p_creat(test, 0644);
+ fd = p_creat(test, 0666);
cl_must_pass(fd);
cl_must_pass(p_write(fd, "libgit2 rocks\n", 14));
cl_must_pass(p_close(fd));
cl_git_pass(git_filebuf_open(&file, test, GIT_FILEBUF_APPEND));
cl_git_pass(git_filebuf_printf(&file, "%s\n", "libgit2 rocks"));
- cl_git_pass(git_filebuf_commit(&file));
+ cl_git_pass(git_filebuf_commit(&file, 0666));
cl_must_pass(p_unlink(test));
}
@@ -51,7 +51,7 @@ void test_core_filebuf__2(void)
cl_git_pass(git_filebuf_open(&file, test, 0));
cl_git_pass(git_filebuf_write(&file, buf, sizeof(buf)));
- cl_git_pass(git_filebuf_commit(&file));
+ cl_git_pass(git_filebuf_commit(&file, 0666));
cl_must_pass(p_unlink(test));
}
diff --git a/tests-clay/core/path.c b/tests-clay/core/path.c
index db8f33d21..c394c7285 100644
--- a/tests-clay/core/path.c
+++ b/tests-clay/core/path.c
@@ -11,7 +11,7 @@ check_dirname(const char *A, const char *B)
cl_assert((dir2 = git_path_dirname(A)) != NULL);
cl_assert(strcmp(dir2, B) == 0);
- free(dir2);
+ git__free(dir2);
}
static void
@@ -24,7 +24,7 @@ check_basename(const char *A, const char *B)
cl_assert((base2 = git_path_basename(A)) != NULL);
cl_assert(strcmp(base2, B) == 0);
- free(base2);
+ git__free(base2);
}
static void
diff --git a/tests-clay/core/rmdir.c b/tests-clay/core/rmdir.c
index aa21c6a3d..20cc8f5f0 100644
--- a/tests-clay/core/rmdir.c
+++ b/tests-clay/core/rmdir.c
@@ -7,22 +7,22 @@ void test_core_rmdir__initialize(void)
{
char path[GIT_PATH_MAX];
- cl_must_pass(p_mkdir(empty_tmp_dir, 0755));
+ cl_must_pass(p_mkdir(empty_tmp_dir, 0777));
git_path_join(path, empty_tmp_dir, "/one");
- cl_must_pass(p_mkdir(path, 0755));
+ cl_must_pass(p_mkdir(path, 0777));
git_path_join(path, empty_tmp_dir, "/one/two_one");
- cl_must_pass(p_mkdir(path, 0755));
+ cl_must_pass(p_mkdir(path, 0777));
git_path_join(path, empty_tmp_dir, "/one/two_two");
- cl_must_pass(p_mkdir(path, 0755));
+ cl_must_pass(p_mkdir(path, 0777));
git_path_join(path, empty_tmp_dir, "/one/two_two/three");
- cl_must_pass(p_mkdir(path, 0755));
+ cl_must_pass(p_mkdir(path, 0777));
git_path_join(path, empty_tmp_dir, "/two");
- cl_must_pass(p_mkdir(path, 0755));
+ cl_must_pass(p_mkdir(path, 0777));
}
/* make sure empty dir can be deleted recusively */
@@ -39,7 +39,7 @@ void test_core_rmdir__fail_to_delete_non_empty_dir(void)
git_path_join(file, empty_tmp_dir, "/two/file.txt");
- fd = p_creat(file, 0755);
+ fd = p_creat(file, 0666);
cl_assert(fd >= 0);
cl_must_pass(p_close(fd));
diff --git a/tests-clay/core/vector.c b/tests-clay/core/vector.c
index 44e6d873d..b8a853c60 100644
--- a/tests-clay/core/vector.c
+++ b/tests-clay/core/vector.c
@@ -59,8 +59,8 @@ void test_core_vector__2(void)
git_vector_free(&x);
- free(ptrs[0]);
- free(ptrs[1]);
+ git__free(ptrs[0]);
+ git__free(ptrs[1]);
}