Skip to content
Snippets Groups Projects
Commit 6d835462 authored by Walter Poxon's avatar Walter Poxon
Browse files

b=15689

i=johann
i=alexey.lyashkov

fix error building lustre/liblustre/tests for Cray XT3 catamount
parent ecd5b658
No related branches found
No related tags found
No related merge requests found
...@@ -52,7 +52,7 @@ struct timeval start; ...@@ -52,7 +52,7 @@ struct timeval start;
extern char *lustre_path; extern char *lustre_path;
#define ENTRY(str) \ #define ENTER(str) \
do { \ do { \
char buf[100]; \ char buf[100]; \
int len; \ int len; \
...@@ -108,7 +108,7 @@ int t2(char *name) ...@@ -108,7 +108,7 @@ int t2(char *name)
{ {
char path[MAX_PATH_LENGTH] = ""; char path[MAX_PATH_LENGTH] = "";
ENTRY("mkdir/rmdir"); ENTER("mkdir/rmdir");
snprintf(path, MAX_PATH_LENGTH, "%s/test_t2", lustre_path); snprintf(path, MAX_PATH_LENGTH, "%s/test_t2", lustre_path);
t_mkdir(path); t_mkdir(path);
...@@ -120,7 +120,7 @@ int t3(char *name) ...@@ -120,7 +120,7 @@ int t3(char *name)
{ {
char path[MAX_PATH_LENGTH] = ""; char path[MAX_PATH_LENGTH] = "";
ENTRY("regular stat"); ENTER("regular stat");
snprintf(path, MAX_PATH_LENGTH, "%s/test_t3", lustre_path); snprintf(path, MAX_PATH_LENGTH, "%s/test_t3", lustre_path);
t_touch(path); t_touch(path);
...@@ -133,7 +133,7 @@ int t4(char *name) ...@@ -133,7 +133,7 @@ int t4(char *name)
{ {
char path[MAX_PATH_LENGTH] = ""; char path[MAX_PATH_LENGTH] = "";
ENTRY("dir stat"); ENTER("dir stat");
snprintf(path, MAX_PATH_LENGTH, "%s/test_t4", lustre_path); snprintf(path, MAX_PATH_LENGTH, "%s/test_t4", lustre_path);
t_mkdir(path); t_mkdir(path);
...@@ -147,7 +147,7 @@ int t6(char *name) ...@@ -147,7 +147,7 @@ int t6(char *name)
char path[MAX_PATH_LENGTH] = ""; char path[MAX_PATH_LENGTH] = "";
char path2[MAX_PATH_LENGTH] = ""; char path2[MAX_PATH_LENGTH] = "";
ENTRY("symlink"); ENTER("symlink");
snprintf(path, MAX_PATH_LENGTH, "%s/test_t6", lustre_path); snprintf(path, MAX_PATH_LENGTH, "%s/test_t6", lustre_path);
snprintf(path2, MAX_PATH_LENGTH, "%s/test_t6_link", lustre_path); snprintf(path2, MAX_PATH_LENGTH, "%s/test_t6_link", lustre_path);
...@@ -167,7 +167,7 @@ int t6b(char *name) ...@@ -167,7 +167,7 @@ int t6b(char *name)
char *tmp; char *tmp;
int fd; int fd;
ENTRY("symlink + chdir and open"); ENTER("symlink + chdir and open");
snprintf(path, MAX_PATH_LENGTH, "%s/test_t6b", lustre_path); snprintf(path, MAX_PATH_LENGTH, "%s/test_t6b", lustre_path);
snprintf(path2, MAX_PATH_LENGTH, "%s/test_t6b_link", lustre_path); snprintf(path2, MAX_PATH_LENGTH, "%s/test_t6b_link", lustre_path);
...@@ -199,7 +199,7 @@ int t7(char *name) ...@@ -199,7 +199,7 @@ int t7(char *name)
char path[MAX_PATH_LENGTH] = ""; char path[MAX_PATH_LENGTH] = "";
int rc; int rc;
ENTRY("mknod"); ENTER("mknod");
snprintf(path, MAX_PATH_LENGTH, "%s/test_t7", lustre_path); snprintf(path, MAX_PATH_LENGTH, "%s/test_t7", lustre_path);
if (geteuid() != 0) { if (geteuid() != 0) {
...@@ -220,7 +220,7 @@ int t8(char *name) ...@@ -220,7 +220,7 @@ int t8(char *name)
{ {
char path[MAX_PATH_LENGTH] = ""; char path[MAX_PATH_LENGTH] = "";
ENTRY("chmod"); ENTER("chmod");
snprintf(path, MAX_PATH_LENGTH, "%s/test_t8", lustre_path); snprintf(path, MAX_PATH_LENGTH, "%s/test_t8", lustre_path);
/* Check file. */ /* Check file. */
...@@ -243,7 +243,7 @@ int t9(char *name) ...@@ -243,7 +243,7 @@ int t9(char *name)
char path[MAX_PATH_LENGTH] = ""; char path[MAX_PATH_LENGTH] = "";
char path2[MAX_PATH_LENGTH] = ""; char path2[MAX_PATH_LENGTH] = "";
ENTRY("hard link"); ENTER("hard link");
snprintf(path, MAX_PATH_LENGTH, "%s/test_t9", lustre_path); snprintf(path, MAX_PATH_LENGTH, "%s/test_t9", lustre_path);
snprintf(path2, MAX_PATH_LENGTH, "%s/test_t9_link", lustre_path); snprintf(path2, MAX_PATH_LENGTH, "%s/test_t9_link", lustre_path);
...@@ -266,7 +266,7 @@ int t10(char *name) ...@@ -266,7 +266,7 @@ int t10(char *name)
char rename2[MAX_PATH_LENGTH] = ""; char rename2[MAX_PATH_LENGTH] = "";
char rename3[MAX_PATH_LENGTH] = ""; char rename3[MAX_PATH_LENGTH] = "";
ENTRY("rename"); ENTER("rename");
snprintf(dir1, MAX_PATH_LENGTH, "%s/test_t10_dir1", lustre_path); snprintf(dir1, MAX_PATH_LENGTH, "%s/test_t10_dir1", lustre_path);
snprintf(dir2, MAX_PATH_LENGTH, "%s/test_t10_dir2", lustre_path); snprintf(dir2, MAX_PATH_LENGTH, "%s/test_t10_dir2", lustre_path);
snprintf(path1, MAX_PATH_LENGTH, "%s/test_t10_reg1", lustre_path); snprintf(path1, MAX_PATH_LENGTH, "%s/test_t10_reg1", lustre_path);
...@@ -294,7 +294,7 @@ int t11(char *name) ...@@ -294,7 +294,7 @@ int t11(char *name)
char *base=lustre_path; char *base=lustre_path;
char path[MAX_PATH_LENGTH], path2[MAX_PATH_LENGTH]; char path[MAX_PATH_LENGTH], path2[MAX_PATH_LENGTH];
int i, j, level = 5, nreg = 5; int i, j, level = 5, nreg = 5;
ENTRY("deep tree"); ENTER("deep tree");
safe_strncpy(path, base, MAX_PATH_LENGTH); safe_strncpy(path, base, MAX_PATH_LENGTH);
...@@ -330,7 +330,7 @@ int t12(char *name) ...@@ -330,7 +330,7 @@ int t12(char *name)
char dir[MAX_PATH_LENGTH] = ""; char dir[MAX_PATH_LENGTH] = "";
char buf[1024*128]; char buf[1024*128];
int fd; int fd;
ENTRY("empty directory readdir"); ENTER("empty directory readdir");
snprintf(dir, MAX_PATH_LENGTH, "%s/test_t12_dir", lustre_path); snprintf(dir, MAX_PATH_LENGTH, "%s/test_t12_dir", lustre_path);
t_mkdir(dir); t_mkdir(dir);
...@@ -349,7 +349,7 @@ int t13(char *name) ...@@ -349,7 +349,7 @@ int t13(char *name)
const int nfiles = 20; const int nfiles = 20;
char *prefix = "test13_filename_prefix_"; char *prefix = "test13_filename_prefix_";
int fd, i; int fd, i;
ENTRY("multiple entries directory readdir"); ENTER("multiple entries directory readdir");
snprintf(dir, MAX_PATH_LENGTH, "%s/test_t13_dir/", lustre_path); snprintf(dir, MAX_PATH_LENGTH, "%s/test_t13_dir/", lustre_path);
t_mkdir(dir); t_mkdir(dir);
...@@ -380,7 +380,7 @@ int t14(char *name) ...@@ -380,7 +380,7 @@ int t14(char *name)
struct dirent64 *ent; struct dirent64 *ent;
int fd, i, rc, pos, index; int fd, i, rc, pos, index;
loff_t base = 0; loff_t base = 0;
ENTRY(">1 block(4k) directory readdir"); ENTER(">1 block(4k) directory readdir");
snprintf(dir, MAX_PATH_LENGTH, "%s/test_t14_dir/", lustre_path); snprintf(dir, MAX_PATH_LENGTH, "%s/test_t14_dir/", lustre_path);
rc = mkdir(dir, 0755); rc = mkdir(dir, 0755);
...@@ -437,7 +437,7 @@ int t15(char *name) ...@@ -437,7 +437,7 @@ int t15(char *name)
{ {
char file[MAX_PATH_LENGTH] = ""; char file[MAX_PATH_LENGTH] = "";
int fd; int fd;
ENTRY("open-stat-close"); ENTER("open-stat-close");
snprintf(file, MAX_PATH_LENGTH, "%s/test_t15_file", lustre_path); snprintf(file, MAX_PATH_LENGTH, "%s/test_t15_file", lustre_path);
t_touch(file); t_touch(file);
...@@ -451,7 +451,7 @@ int t15(char *name) ...@@ -451,7 +451,7 @@ int t15(char *name)
int t16(char *name) int t16(char *name)
{ {
char file[MAX_PATH_LENGTH] = ""; char file[MAX_PATH_LENGTH] = "";
ENTRY("small-write-read"); ENTER("small-write-read");
snprintf(file, MAX_PATH_LENGTH, "%s/test_t16_file", lustre_path); snprintf(file, MAX_PATH_LENGTH, "%s/test_t16_file", lustre_path);
t_echo_create(file, "aaaaaaaaaaaaaaaaaaaaaa"); t_echo_create(file, "aaaaaaaaaaaaaaaaaaaaaa");
...@@ -464,7 +464,7 @@ int t17(char *name) ...@@ -464,7 +464,7 @@ int t17(char *name)
{ {
char file[MAX_PATH_LENGTH] = ""; char file[MAX_PATH_LENGTH] = "";
int fd; int fd;
ENTRY("open-unlink without close"); ENTER("open-unlink without close");
snprintf(file, MAX_PATH_LENGTH, "%s/test_t17_file", lustre_path); snprintf(file, MAX_PATH_LENGTH, "%s/test_t17_file", lustre_path);
fd = open(file, O_WRONLY | O_CREAT, 0666); fd = open(file, O_WRONLY | O_CREAT, 0666);
...@@ -482,7 +482,7 @@ int t18(char *name) ...@@ -482,7 +482,7 @@ int t18(char *name)
char buf[128]; char buf[128];
int fd, i; int fd, i;
struct stat statbuf[3]; struct stat statbuf[3];
ENTRY("write should change mtime/ctime"); ENTER("write should change mtime/ctime");
snprintf(file, MAX_PATH_LENGTH, "%s/test_t18_file", lustre_path); snprintf(file, MAX_PATH_LENGTH, "%s/test_t18_file", lustre_path);
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
...@@ -521,7 +521,7 @@ int t18b(char *name) ...@@ -521,7 +521,7 @@ int t18b(char *name)
char file[MAX_PATH_LENGTH] = ""; char file[MAX_PATH_LENGTH] = "";
int i; int i;
struct stat statbuf[3]; struct stat statbuf[3];
ENTRY("utime should change mtime/atime/ctime"); ENTER("utime should change mtime/atime/ctime");
snprintf(file, MAX_PATH_LENGTH, "%s/test_t18b_file", lustre_path); snprintf(file, MAX_PATH_LENGTH, "%s/test_t18b_file", lustre_path);
t_touch(file); t_touch(file);
...@@ -569,7 +569,7 @@ int t19(char *name) ...@@ -569,7 +569,7 @@ int t19(char *name)
char file[MAX_PATH_LENGTH] = ""; char file[MAX_PATH_LENGTH] = "";
int fd; int fd;
int result; int result;
ENTRY("open(O_TRUNC) should truncate file to 0-length"); ENTER("open(O_TRUNC) should truncate file to 0-length");
snprintf(file, MAX_PATH_LENGTH, "%s/test_t19_file", lustre_path); snprintf(file, MAX_PATH_LENGTH, "%s/test_t19_file", lustre_path);
t_echo_create(file, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); t_echo_create(file, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
...@@ -594,7 +594,7 @@ int t20(char *name) ...@@ -594,7 +594,7 @@ int t20(char *name)
struct iovec iov[2]; struct iovec iov[2];
char buf[100]; char buf[100];
ssize_t ret; ssize_t ret;
ENTRY("trap app's general bad pointer for file i/o"); ENTER("trap app's general bad pointer for file i/o");
snprintf(file, MAX_PATH_LENGTH, "%s/test_t20_file", lustre_path); snprintf(file, MAX_PATH_LENGTH, "%s/test_t20_file", lustre_path);
fd = open(file, O_RDWR|O_CREAT, (mode_t)0666); fd = open(file, O_RDWR|O_CREAT, (mode_t)0666);
...@@ -676,7 +676,7 @@ int t21(char *name) ...@@ -676,7 +676,7 @@ int t21(char *name)
.l_whence = SEEK_SET, .l_whence = SEEK_SET,
}; };
ENTRY("basic fcntl support"); ENTER("basic fcntl support");
snprintf(file, MAX_PATH_LENGTH, "%s/test_t21_file", lustre_path); snprintf(file, MAX_PATH_LENGTH, "%s/test_t21_file", lustre_path);
fd = open(file, O_RDWR|O_CREAT, (mode_t)0666); fd = open(file, O_RDWR|O_CREAT, (mode_t)0666);
...@@ -711,7 +711,7 @@ int t22(char *name) ...@@ -711,7 +711,7 @@ int t22(char *name)
char *str = "1234567890"; char *str = "1234567890";
char buf[100]; char buf[100];
ssize_t ret; ssize_t ret;
ENTRY("make sure O_APPEND take effect"); ENTER("make sure O_APPEND take effect");
snprintf(file, MAX_PATH_LENGTH, "%s/test_t22_file", lustre_path); snprintf(file, MAX_PATH_LENGTH, "%s/test_t22_file", lustre_path);
fd = open(file, O_RDWR|O_CREAT|O_APPEND, (mode_t)0666); fd = open(file, O_RDWR|O_CREAT|O_APPEND, (mode_t)0666);
...@@ -775,7 +775,7 @@ int t23(char *name) ...@@ -775,7 +775,7 @@ int t23(char *name)
long long ret; long long ret;
long long off; long long off;
ENTRY("handle seek > 2GB"); ENTER("handle seek > 2GB");
snprintf(path, MAX_PATH_LENGTH, "%s/f%s", lustre_path, name); snprintf(path, MAX_PATH_LENGTH, "%s/f%s", lustre_path, name);
fd = open(path, O_WRONLY | O_CREAT | O_LARGEFILE, 0666); fd = open(path, O_WRONLY | O_CREAT | O_LARGEFILE, 0666);
...@@ -965,7 +965,7 @@ int t50(char *name) ...@@ -965,7 +965,7 @@ int t50(char *name)
int np = 1; int np = 1;
loff_t offset = 0; loff_t offset = 0;
ENTRY("4k aligned i/o sanity"); ENTER("4k aligned i/o sanity");
while (np <= _npages) { while (np <= _npages) {
printf("%3d per xfer(total %d)...\t", np, _npages); printf("%3d per xfer(total %d)...\t", np, _npages);
fflush(stdout); fflush(stdout);
...@@ -983,7 +983,7 @@ int t50b(char *name) ...@@ -983,7 +983,7 @@ int t50b(char *name)
int i; int i;
long long offset; long long offset;
ENTRY("4k un-aligned i/o sanity"); ENTER("4k un-aligned i/o sanity");
for (i = 0; i < sizeof(off_array)/sizeof(loff_t); i++) { for (i = 0; i < sizeof(off_array)/sizeof(loff_t); i++) {
offset = off_array[i]; offset = off_array[i];
printf("16 per xfer(total %d), offset %10lld...\t", printf("16 per xfer(total %d), offset %10lld...\t",
...@@ -1010,7 +1010,7 @@ int t51(char *name) ...@@ -1010,7 +1010,7 @@ int t51(char *name)
long long size; long long size;
int result; int result;
ENTRY("truncate() should truncate file to proper length"); ENTER("truncate() should truncate file to proper length");
snprintf(file, MAX_PATH_LENGTH, "%s/test_t51_file", lustre_path); snprintf(file, MAX_PATH_LENGTH, "%s/test_t51_file", lustre_path);
for (size = 0; size < T51_NR * T51_STEP; size += T51_STEP) { for (size = 0; size < T51_NR * T51_STEP; size += T51_STEP) {
...@@ -1059,7 +1059,7 @@ int t52(char *name) ...@@ -1059,7 +1059,7 @@ int t52(char *name)
time_t diff; time_t diff;
int fd, i; int fd, i;
ENTRY("atime should be updated during read"); ENTER("atime should be updated during read");
snprintf(file, MAX_PATH_LENGTH, "%s/test_t52_file", lustre_path); snprintf(file, MAX_PATH_LENGTH, "%s/test_t52_file", lustre_path);
t_echo_create(file, "check atime update during read"); t_echo_create(file, "check atime update during read");
...@@ -1098,7 +1098,7 @@ int t53(char *name) ...@@ -1098,7 +1098,7 @@ int t53(char *name)
struct stat stat_buf; /* struct buffer to hold file info. */ struct stat stat_buf; /* struct buffer to hold file info. */
time_t mtime, atime; time_t mtime, atime;
ENTRY("mtime/atime should be updated by utime() call"); ENTER("mtime/atime should be updated by utime() call");
snprintf(file, MAX_PATH_LENGTH, "%s/test_t53_file", lustre_path); snprintf(file, MAX_PATH_LENGTH, "%s/test_t53_file", lustre_path);
t_echo_create(file, "check mtime/atime update by utime() call"); t_echo_create(file, "check mtime/atime update by utime() call");
...@@ -1135,7 +1135,7 @@ int t54(char *name) ...@@ -1135,7 +1135,7 @@ int t54(char *name)
struct flock lock; struct flock lock;
int fd, err; int fd, err;
ENTRY("fcntl should return 0 when succeed in getting flock"); ENTER("fcntl should return 0 when succeed in getting flock");
snprintf(file, MAX_PATH_LENGTH, "%s/test_t54_file", lustre_path); snprintf(file, MAX_PATH_LENGTH, "%s/test_t54_file", lustre_path);
t_echo_create(file, "fcntl should return 0 when succeed"); t_echo_create(file, "fcntl should return 0 when succeed");
...@@ -1180,7 +1180,7 @@ int t55(char *name) ...@@ -1180,7 +1180,7 @@ int t55(char *name)
struct lov_user_ost_data *lo = NULL; struct lov_user_ost_data *lo = NULL;
int index, fd, buflen, rc; int index, fd, buflen, rc;
ENTRY("setstripe/getstripe"); ENTER("setstripe/getstripe");
snprintf(path, MAX_PATH_LENGTH, "%s/test_t55", lustre_path); snprintf(path, MAX_PATH_LENGTH, "%s/test_t55", lustre_path);
snprintf(file, MAX_PATH_LENGTH, "%s/test_t55/file_t55", lustre_path); snprintf(file, MAX_PATH_LENGTH, "%s/test_t55/file_t55", lustre_path);
...@@ -1343,7 +1343,7 @@ int t56(char *name) ...@@ -1343,7 +1343,7 @@ int t56(char *name)
ssize_t rc = 0; ssize_t rc = 0;
struct dirent dir; struct dirent dir;
ENTRY("getdirentries should fail if nbytes is too small"); ENTER("getdirentries should fail if nbytes is too small");
/* Set count to be very small. The result should be EINVAL */ /* Set count to be very small. The result should be EINVAL */
nbytes = 8; nbytes = 8;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment