aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/io/test/dir_tree_iterator.c1
-rw-r--r--lib/io/test/dir_tree_iterator2.c7
-rw-r--r--lib/io/test/dir_tree_iterator3.c3
3 files changed, 7 insertions, 4 deletions
diff --git a/lib/io/test/dir_tree_iterator.c b/lib/io/test/dir_tree_iterator.c
index a6e7fcb..6c7f1bf 100644
--- a/lib/io/test/dir_tree_iterator.c
+++ b/lib/io/test/dir_tree_iterator.c
@@ -33,6 +33,7 @@ int main(int argc, char **argv)
cfg.def_mtime = 1337;
cfg.def_uid = 42;
cfg.def_gid = 23;
+ cfg.flags = DIR_SCAN_NO_HARDLINKS;
dir = dir_tree_iterator_create(TEST_PATH, &cfg);
TEST_NOT_NULL(dir);
diff --git a/lib/io/test/dir_tree_iterator2.c b/lib/io/test/dir_tree_iterator2.c
index 0ffb86e..9184957 100644
--- a/lib/io/test/dir_tree_iterator2.c
+++ b/lib/io/test/dir_tree_iterator2.c
@@ -31,7 +31,7 @@ int main(int argc, char **argv)
/********** without files **********/
memset(&cfg, 0, sizeof(cfg));
- cfg.flags |= DIR_SCAN_NO_FILE;
+ cfg.flags |= DIR_SCAN_NO_FILE | DIR_SCAN_NO_HARDLINKS;
dir = dir_tree_iterator_create(TEST_PATH, &cfg);
TEST_NOT_NULL(dir);
@@ -69,7 +69,7 @@ int main(int argc, char **argv)
/********** recursive but without dirs **********/
memset(&cfg, 0, sizeof(cfg));
- cfg.flags |= DIR_SCAN_NO_DIR;
+ cfg.flags |= DIR_SCAN_NO_DIR | DIR_SCAN_NO_HARDLINKS;
dir = dir_tree_iterator_create(TEST_PATH, &cfg);
TEST_NOT_NULL(dir);
@@ -123,7 +123,7 @@ int main(int argc, char **argv)
/********** non-recursive **********/
memset(&cfg, 0, sizeof(cfg));
- cfg.flags |= DIR_SCAN_NO_RECURSION;
+ cfg.flags |= DIR_SCAN_NO_RECURSION | DIR_SCAN_NO_HARDLINKS;
dir = dir_tree_iterator_create(TEST_PATH, &cfg);
TEST_NOT_NULL(dir);
@@ -160,6 +160,7 @@ int main(int argc, char **argv)
/********** with prefix inserted **********/
memset(&cfg, 0, sizeof(cfg));
cfg.prefix = "foobar";
+ cfg.flags = DIR_SCAN_NO_HARDLINKS;
dir = dir_tree_iterator_create(TEST_PATH, &cfg);
TEST_NOT_NULL(dir);
diff --git a/lib/io/test/dir_tree_iterator3.c b/lib/io/test/dir_tree_iterator3.c
index 4ac947c..ccb6bdb 100644
--- a/lib/io/test/dir_tree_iterator3.c
+++ b/lib/io/test/dir_tree_iterator3.c
@@ -32,6 +32,7 @@ int main(int argc, char **argv)
/********** match name **********/
memset(&cfg, 0, sizeof(cfg));
cfg.name_pattern = "file_x*";
+ cfg.flags = DIR_SCAN_NO_HARDLINKS;
dir = dir_tree_iterator_create(TEST_PATH, &cfg);
TEST_NOT_NULL(dir);
@@ -68,7 +69,7 @@ int main(int argc, char **argv)
/********** match path **********/
memset(&cfg, 0, sizeof(cfg));
cfg.name_pattern = "dir*/file_*0";
- cfg.flags |= DIR_SCAN_MATCH_FULL_PATH;
+ cfg.flags |= DIR_SCAN_MATCH_FULL_PATH | DIR_SCAN_NO_HARDLINKS;
dir = dir_tree_iterator_create(TEST_PATH, &cfg);
TEST_NOT_NULL(dir);