diff --git a/src/tests/loader-cleanup-test.c b/src/tests/loader-cleanup-test.c index fbca8870096..982c49acc26 100644 --- a/src/tests/loader-cleanup-test.c +++ b/src/tests/loader-cleanup-test.c @@ -297,7 +297,7 @@ count_temp(char * dirname) { struct dirent *ent; while ((ent=readdir(dir))) { - if (ent->d_type==DT_REG && strncmp(ent->d_name, loader_temp_prefix, 6)==0) { + if ((ent->d_type==DT_REG || ent->d_type==DT_UNKNOWN) && strncmp(ent->d_name, loader_temp_prefix, 6)==0) { n++; if (verbose >= 3) { printf("Temp files\n"); @@ -319,7 +319,7 @@ verify_file(char * dirname, char * filename) { struct dirent *ent; while ((ent=readdir(dir))) { - if (ent->d_type==DT_REG && strcmp(ent->d_name, filename)==0) { + if ((ent->d_type==DT_REG || ent->d_type==DT_UNKNOWN) && strcmp(ent->d_name, filename)==0) { n++; } } diff --git a/src/tests/loader-stress-del.c b/src/tests/loader-stress-del.c index 4919f24a007..c91386cc87f 100644 --- a/src/tests/loader-stress-del.c +++ b/src/tests/loader-stress-del.c @@ -89,7 +89,7 @@ count_temp(char * dirname) { struct dirent *ent; while ((ent=readdir(dir))) { - if (ent->d_type==DT_REG && strncmp(ent->d_name, loader_temp_prefix, 6)==0) { + if ((ent->d_type==DT_REG || ent->d_type==DT_UNKNOWN) && strncmp(ent->d_name, loader_temp_prefix, 6)==0) { n++; if (verbose) { printf("Temp files (%d)\n", n); diff --git a/src/tests/loader-stress-test.c b/src/tests/loader-stress-test.c index 5101c140f2c..f2702d1ec5a 100644 --- a/src/tests/loader-stress-test.c +++ b/src/tests/loader-stress-test.c @@ -98,7 +98,7 @@ count_temp(char * dirname) { struct dirent *ent; while ((ent=readdir(dir))) { - if (ent->d_type==DT_REG && strncmp(ent->d_name, loader_temp_prefix, 6)==0) { + if ((ent->d_type==DT_REG || ent->d_type==DT_UNKNOWN) && strncmp(ent->d_name, loader_temp_prefix, 6)==0) { n++; if (verbose) { printf("Temp files (%d)\n", n); diff --git a/src/tests/recover-loader-test.c b/src/tests/recover-loader-test.c index 11f80861140..8813fea4974 100644 --- a/src/tests/recover-loader-test.c +++ b/src/tests/recover-loader-test.c @@ -116,7 +116,7 @@ verify_file(char const * const dirname, char const * const filename) { struct dirent *ent; while ((ent=readdir(dir))) { - if (ent->d_type==DT_REG && strcmp(ent->d_name, filename)==0) { + if ((ent->d_type==DT_REG || ent->d_type==DT_UNKNOWN) && strcmp(ent->d_name, filename)==0) { n++; } } diff --git a/src/tests/test_logmax.c b/src/tests/test_logmax.c index d0714d75e4b..5c3a04b8b13 100644 --- a/src/tests/test_logmax.c +++ b/src/tests/test_logmax.c @@ -13,7 +13,7 @@ check_logmax (int max) { DIR *dir = opendir(ENVDIR); struct dirent *ent; while ((ent=readdir(dir))) { - if (ent->d_type==DT_REG && strncmp(ent->d_name, "log", 3)==0) { + if ((ent->d_type==DT_REG || ent->d_type==DT_UNKNOWN) && strncmp(ent->d_name, "log", 3)==0) { // It is a "log*" file #define FULL_LEN (sizeof(ENVDIR)+NAME_MAX+1) char full_fname[FULL_LEN];