{
char file[MAX_PATH_LENGTH] = "";
int fd;
+ int result;
ENTRY("open(O_TRUNC) should truncate file to 0-length");
snprintf(file, MAX_PATH_LENGTH, "%s/test_t19_file", lustre_path);
return(-1);
}
close(fd);
- check_file_size(file, 0);
+ result = check_file_size(file, 0);
+ if (result != 0)
+ return result;
t_unlink(file);
LEAVE();
}
int fd;
struct stat statbuf;
off_t size;
+ int result;
ENTRY("truncate() should truncate file to proper length");
snprintf(file, MAX_PATH_LENGTH, "%s/test_t19_file", lustre_path);
printf("error truncating file: %s\n", strerror(errno));
return(-1);
}
- check_file_size(file, size);
+ result = check_file_size(file, size);
+ if (result != 0)
+ return result;
t_unlink(file);
t_echo_create(file, "");
return(-1);
}
close(fd);
- check_file_size(file, size);
+ result = check_file_size(file, size);
+ if (result != 0)
+ return result;
t_unlink(file);
}
LEAVE();