Commit 87b48841 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

#3881 fix all test that use dir->d_type to allow DT_UNKNOWN so that they run on XFS closes[t:3881]

git-svn-id: file:///svn/toku/tokudb@34248 c7de825b-a66e-492c-adef-691d508d4ae1
parent da8073f2
......@@ -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++;
}
}
......
......@@ -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);
......
......@@ -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);
......
......@@ -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++;
}
}
......
......@@ -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];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment