aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/add_by_path.c5
-rw-r--r--tests/fstree_from_file.c2
-rw-r--r--tests/gen_inode_table.c4
-rw-r--r--tests/get_path.c2
4 files changed, 8 insertions, 5 deletions
diff --git a/tests/add_by_path.c b/tests/add_by_path.c
index 0023e0a..740e732 100644
--- a/tests/add_by_path.c
+++ b/tests/add_by_path.c
@@ -11,8 +11,11 @@ int main(void)
tree_node_t *a, *b;
struct stat sb;
fstree_t fs;
+ char *opts;
- assert(fstree_init(&fs, 512, 1337, 0755, 21, 42) == 0);
+ opts = strdup("mode=0755,uid=21,gid=42");
+ assert(fstree_init(&fs, 512, opts) == 0);
+ free(opts);
memset(&sb, 0, sizeof(sb));
sb.st_mode = S_IFDIR | 0750;
diff --git a/tests/fstree_from_file.c b/tests/fstree_from_file.c
index f9a9e28..2728397 100644
--- a/tests/fstree_from_file.c
+++ b/tests/fstree_from_file.c
@@ -29,7 +29,7 @@ int main(void)
fp = fmemopen(ptr, strlen(ptr), "r");
assert(fp != NULL);
- assert(fstree_init(&fs, 512, 0, 0755, 0, 0) == 0);
+ assert(fstree_init(&fs, 512, NULL) == 0);
assert(fstree_from_file(&fs, "testfile", fp) == 0);
tree_node_sort_recursive(fs.root);
diff --git a/tests/gen_inode_table.c b/tests/gen_inode_table.c
index 12b3bb5..d2c694c 100644
--- a/tests/gen_inode_table.c
+++ b/tests/gen_inode_table.c
@@ -48,7 +48,7 @@ int main(void)
fstree_t fs;
// inode table for the empty tree
- assert(fstree_init(&fs, 0, 0, 0, 0, 0) == 0);
+ assert(fstree_init(&fs, 0, NULL) == 0);
assert(fstree_gen_inode_table(&fs) == 0);
assert(fs.inode_tbl_size == 3);
assert(fs.root->inode_num == 2);
@@ -58,7 +58,7 @@ int main(void)
fstree_cleanup(&fs);
// tree with 2 levels under root, fan out 3
- assert(fstree_init(&fs, 0, 0, 0, 0, 0) == 0);
+ assert(fstree_init(&fs, 0, NULL) == 0);
a = gen_node(&fs, fs.root, "a");
b = gen_node(&fs, fs.root, "b");
diff --git a/tests/get_path.c b/tests/get_path.c
index 39d3431..5d2027a 100644
--- a/tests/get_path.c
+++ b/tests/get_path.c
@@ -12,7 +12,7 @@ int main(void)
fstree_t fs;
char *str;
- assert(fstree_init(&fs, 512, 1337, 0755, 21, 42) == 0);
+ assert(fstree_init(&fs, 512, NULL) == 0);
memset(&sb, 0, sizeof(sb));
sb.st_mode = S_IFDIR | 0750;