mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
#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:
parent
da8073f22d
commit
87b48841bc
5 changed files with 6 additions and 6 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue