#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
This commit is contained in:
Rich Prohaska 2013-04-16 23:59:48 -04:00 committed by Yoni Fogel
parent da8073f22d
commit 87b48841bc
5 changed files with 6 additions and 6 deletions

View file

@ -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++;
}
}

View file

@ -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);

View file

@ -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);

View file

@ -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++;
}
}

View file

@ -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];