diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2019-05-05 13:11:03 -0400 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2019-05-09 14:16:37 -0500 |
commit | 055f272517306e6877a126e414aa60191b483eba (patch) | |
tree | a37dc1d38ad5fd2d76cb67dc32ba12ed445636a6 /test/test_syscalls.c | |
parent | 625ed81b823b927ce7fdb1d34def624ceb2f3553 (diff) | |
download | libfuse-055f272517306e6877a126e414aa60191b483eba.tar.gz |
Added new example filesystem
passthrough_hp puts emphasis and performance and correctness, rather
than simplicity.
Diffstat (limited to 'test/test_syscalls.c')
-rw-r--r-- | test/test_syscalls.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/test_syscalls.c b/test/test_syscalls.c index db4be56..a7e2bc7 100644 --- a/test/test_syscalls.c +++ b/test/test_syscalls.c @@ -67,6 +67,11 @@ static void test_error(const char *func, const char *msg, ...) fprintf(stderr, "\n"); } +static int is_dot_or_dotdot(const char *name) { + return name[0] == '.' && + (name[1] == '\0' || (name[1] == '.' && name[2] == '\0')); +} + static void success(void) { fprintf(stderr, "%s OK\n", testname); @@ -381,10 +386,6 @@ static int check_dir_contents(const char *path, const char **contents) found[i] = 0; cont[i] = contents[i]; } - found[i] = 0; - cont[i++] = "."; - found[i] = 0; - cont[i++] = ".."; cont[i] = NULL; dp = opendir(path); @@ -405,6 +406,8 @@ static int check_dir_contents(const char *path, const char **contents) } break; } + if (is_dot_or_dotdot(de->d_name)) + continue; for (i = 0; cont[i] != NULL; i++) { assert(i < MAX_ENTRIES); if (strcmp(cont[i], de->d_name) == 0) { |