[PVFS2-CVS] commit by slang in pvfs2/test/correctness/pts:
test-dir-operations.c test-noncontig-pattern.c test-path-lookup.c
test-pvfs-datatype-init.c test-romio-noncontig-pattern2.c
CVS commit program
cvs at parl.clemson.edu
Wed Nov 9 20:27:21 EST 2005
Update of /projects/cvsroot/pvfs2/test/correctness/pts
In directory parlweb:/tmp/cvs-serv439/test/correctness/pts
Modified Files:
test-dir-operations.c test-noncontig-pattern.c
test-path-lookup.c test-pvfs-datatype-init.c
test-romio-noncontig-pattern2.c
Log Message:
* malloc.h is obsolete in freebsd, check for it
* No error.h in freebsd
* linux allows Lu,Lx, and Ld to be interchangeable with llu,llx, and
lld. Other platforms (solaris, bsd) don't. Replaced all the L*
with ll*.
* bsd doesn't have mntent.h. use fstab.h and our own funcs.
* bsd doesn't know about ssize_t. Use size_t instead.
* bsd doesn't have asm errnos. Check for each of those
errno macros and if not defined define to -1
* check for db3/db.h db4/db.h header if db path is specified using
--with-db
* darwin has aio support builtin, doesn't need -lrt
* remove kernel stuff in pvfs2-types.h that sets WORDSIZE. gcc
defines __LP64__ on archs with 64bit longs so we use that instead.
* darwin's open doesn't accept O_LARGEFILE. off_t is an int64 by
default. define O_LARGEFILE if it hasn't been.
* need to run ranlib on darwin after libpvfs2.a gets installed to regenerate
table of contents
Index: test-dir-operations.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/correctness/pts/test-dir-operations.c,v
diff -p -u -r1.19 -r1.20
--- test-dir-operations.c 28 Jul 2004 14:33:00 -0000 1.19
+++ test-dir-operations.c 10 Nov 2005 01:27:20 -0000 1.20
@@ -51,8 +51,8 @@ static int read_dirs(PVFS_object_ref ref
PVFS_util_gen_credentials(&credentials);
- printf("Calling readdir with handle %Ld and fsid %d\n",
- Ld(refn.handle), refn.fs_id);
+ printf("Calling readdir with handle %lld and fsid %d\n",
+ lld(refn.handle), refn.fs_id);
printf("ndirs is %d\n",ndirs);
ret = PVFS_sys_readdir(refn, PVFS_READDIR_START, ndirs,
&credentials, &resp_readdir);
@@ -155,8 +155,8 @@ int test_dir_operations(MPI_Comm * comm,
printf("rank: %d fs_id: %d\n", rank, fs_id );
get_root(fs_id, &root_refn);
- printf("got root handle %Ld in fsid %d\n",
- Ld(root_refn.handle),root_refn.fs_id);
+ printf("got root handle %lld in fsid %d\n",
+ lld(root_refn.handle),root_refn.fs_id);
/* setup a dir in the root directory to do tests in (so the root dir is
* less cluttered)
@@ -172,7 +172,7 @@ int test_dir_operations(MPI_Comm * comm,
}
else
{
- printf("created directory %s (handle is %Ld)\n",name, Ld(out_refn.handle));
+ printf("created directory %s (handle is %lld)\n",name, lld(out_refn.handle));
}
}
MPI_Barrier(*comm);
@@ -186,11 +186,11 @@ int test_dir_operations(MPI_Comm * comm,
}
else
{
- printf("directory %s has handle %Ld\n",name, Ld(out_refn.handle));
+ printf("directory %s has handle %lld\n",name, lld(out_refn.handle));
}
}
- printf("test dir handle is %Ld\n", Ld(out_refn.handle));
+ printf("test dir handle is %lld\n", lld(out_refn.handle));
ret = create_dirs(out_refn, myparams->mode, rank);
if (ret < 0)
{
Index: test-noncontig-pattern.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/correctness/pts/test-noncontig-pattern.c,v
diff -p -u -r1.7 -r1.8
--- test-noncontig-pattern.c 7 Jul 2005 15:35:47 -0000 1.7
+++ test-noncontig-pattern.c 10 Nov 2005 01:27:20 -0000 1.8
@@ -205,8 +205,8 @@ static int test_noncontig(void){
}
/*
- printf("total bytes processed on client side: %Ld\n", (long long)total_bytes_client);
- printf("total bytes processed on server side: %Ld\n", (long long)total_bytes_server);
+ printf("total bytes processed on client side: %lld\n", (long long)total_bytes_client);
+ printf("total bytes processed on server side: %lld\n", (long long)total_bytes_server);
*/
if(total_bytes_client == total_bytes_server)
Index: test-path-lookup.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/correctness/pts/test-path-lookup.c,v
diff -p -u -r1.11 -r1.12
--- test-path-lookup.c 13 Oct 2004 21:03:01 -0000 1.11
+++ test-path-lookup.c 10 Nov 2005 01:27:20 -0000 1.12
@@ -62,8 +62,8 @@ static int build_nested_path(
}
root_refn = lookup_resp.ref;
- fprintf(stderr,"Got Root Handle %Lu on fs %d\n",
- Lu(root_refn.handle), root_refn.fs_id);
+ fprintf(stderr,"Got Root Handle %llu on fs %d\n",
+ llu(root_refn.handle), root_refn.fs_id);
attr.mask = PVFS_ATTR_SYS_ALL_SETABLE;
attr.owner = credentials.uid;
@@ -72,8 +72,8 @@ static int build_nested_path(
attr.atime = attr.ctime = attr.mtime = time(NULL);
/* make the top-level base directory */
- fprintf(stderr," Creating base directory %s under %Lu, %d\n",
- PATH_LOOKUP_BASE_DIR, Lu(root_refn.handle),
+ fprintf(stderr," Creating base directory %s under %llu, %d\n",
+ PATH_LOOKUP_BASE_DIR, llu(root_refn.handle),
root_refn.fs_id);
ret = PVFS_sys_mkdir(PATH_LOOKUP_BASE_DIR, root_refn,
attr, &credentials, &mkdir_resp);
@@ -102,8 +102,8 @@ static int build_nested_path(
parent_refn = mkdir_resp.ref;
GENERATE_FILENAME(cur_filename, 64, format, i, rank, 0);
- fprintf(stderr," Creating directory %s under %Lu, %d\n",
- cur_filename, Lu(parent_refn.handle),
+ fprintf(stderr," Creating directory %s under %llu, %d\n",
+ cur_filename, llu(parent_refn.handle),
parent_refn.fs_id);
ret = PVFS_sys_mkdir(cur_filename, parent_refn, attr,
@@ -114,8 +114,8 @@ static int build_nested_path(
"the directory %s\n", cur_filename);
goto cleanup;
}
- fprintf(stderr, "Got handle %Lu\n",
- Lu(mkdir_resp.ref.handle));
+ fprintf(stderr, "Got handle %llu\n",
+ llu(mkdir_resp.ref.handle));
/* grab refn of newly created directory */
newdir_refns[i] = mkdir_resp.ref;
@@ -145,8 +145,8 @@ static int build_nested_path(
fprintf(stderr,"Looking up path %d [RELATIVE] \t\t... ", i);
#if 0
fprintf(stderr,
- " - Looking up relative path %s under %Lu, %d\n",
- cur_filename, Lu(parent_refn.handle),
+ " - Looking up relative path %s under %llu, %d\n",
+ cur_filename, llu(parent_refn.handle),
parent_refn.fs_id);
#endif
/* first do a relative lookup */
@@ -197,9 +197,9 @@ static int build_nested_path(
{
fprintf(stderr,"! PVFS_sys_ref_lookup and "
"PVFS_sys_lookup returned different results\n"
- "\twhen they SHOULD BE THE SAME (%Lu != %Lu)!\n",
- Lu(lookup_refns[i].handle),
- Lu(lookup_resp.ref.handle));
+ "\twhen they SHOULD BE THE SAME (%llu != %llu)!\n",
+ llu(lookup_refns[i].handle),
+ llu(lookup_resp.ref.handle));
goto cleanup;
}
parent_refn = lookup_resp.ref;
@@ -225,8 +225,8 @@ static int build_nested_path(
parent_refn = ((i == 0) ? base_refn : lookup_refns[i - 1]);
GENERATE_FILENAME(cur_filename, 64, format, i, rank, 0);
fprintf(stderr, "Generating relative symlink %s "
- "in %Lu,%d to point at %s\n", RELATIVE_SYMLINK_NAME,
- Lu(parent_refn.handle),
+ "in %llu,%d to point at %s\n", RELATIVE_SYMLINK_NAME,
+ llu(parent_refn.handle),
parent_refn.fs_id, cur_filename);
ret = PVFS_sys_symlink(
RELATIVE_SYMLINK_NAME, parent_refn, cur_filename,
@@ -236,14 +236,14 @@ static int build_nested_path(
PVFS_perror("Failed to create symlink ", ret);
goto symlink_cleanup;
}
- fprintf(stderr, "Got handle %Lu\n", Lu(symlink_resp.ref.handle));
+ fprintf(stderr, "Got handle %llu\n", llu(symlink_resp.ref.handle));
/* stash the newly created relative symlink references created */
rsymlink_refns[i] = symlink_resp.ref;
fprintf(stderr, "Generating absolute symlink %s "
- "in %Lu,%d to point at %s\n", ABSOLUTE_SYMLINK_NAME,
- Lu(parent_refn.handle),
+ "in %llu,%d to point at %s\n", ABSOLUTE_SYMLINK_NAME,
+ llu(parent_refn.handle),
parent_refn.fs_id, absolute_paths[i]);
ret = PVFS_sys_symlink(
ABSOLUTE_SYMLINK_NAME, parent_refn, absolute_paths[i],
@@ -253,7 +253,7 @@ static int build_nested_path(
PVFS_perror("Failed to create symlink ", ret);
goto symlink_cleanup;
}
- fprintf(stderr, "Got handle %Lu\n", Lu(symlink_resp.ref.handle));
+ fprintf(stderr, "Got handle %llu\n", llu(symlink_resp.ref.handle));
/* stash the newly created absolute symlink references created */
asymlink_refns[i] = symlink_resp.ref;
@@ -290,10 +290,10 @@ static int build_nested_path(
(lookup_resp.ref.fs_id !=
rsymlink_refns[i].fs_id))
{
- fprintf(stderr,"\nSymlink %s resolved to %Lu "
- "but should have resolved to %Lu\n", tmp_buf,
- Lu(lookup_resp.ref.handle),
- Lu(rsymlink_refns[i].handle));
+ fprintf(stderr,"\nSymlink %s resolved to %llu "
+ "but should have resolved to %llu\n", tmp_buf,
+ llu(lookup_resp.ref.handle),
+ llu(rsymlink_refns[i].handle));
goto symlink_cleanup;
}
else
@@ -317,10 +317,10 @@ static int build_nested_path(
(lookup_resp.ref.fs_id !=
lookup_refns[i].fs_id))
{
- fprintf(stderr,"\nSymlink %s resolved to %Lu "
- "but should have resolved to %Lu\n", tmp_buf,
- Lu(lookup_resp.ref.handle),
- Lu(lookup_refns[i].handle));
+ fprintf(stderr,"\nSymlink %s resolved to %llu "
+ "but should have resolved to %llu\n", tmp_buf,
+ llu(lookup_resp.ref.handle),
+ llu(lookup_refns[i].handle));
goto symlink_cleanup;
}
else
@@ -351,10 +351,10 @@ static int build_nested_path(
(lookup_resp.ref.fs_id !=
asymlink_refns[i].fs_id))
{
- fprintf(stderr,"\nSymlink %s resolved to %Lu "
- "but should have resolved to %Lu\n", tmp_buf,
- Lu(lookup_resp.ref.handle),
- Lu(asymlink_refns[i].handle));
+ fprintf(stderr,"\nSymlink %s resolved to %llu "
+ "but should have resolved to %llu\n", tmp_buf,
+ llu(lookup_resp.ref.handle),
+ llu(asymlink_refns[i].handle));
goto symlink_cleanup;
}
else
@@ -378,10 +378,10 @@ static int build_nested_path(
(lookup_resp.ref.fs_id !=
lookup_refns[i].fs_id))
{
- fprintf(stderr,"\nSymlink %s resolved to %Lu "
- "but should have resolved to %Lu\n", tmp_buf,
- Lu(lookup_resp.ref.handle),
- Lu(lookup_refns[i].handle));
+ fprintf(stderr,"\nSymlink %s resolved to %llu "
+ "but should have resolved to %llu\n", tmp_buf,
+ llu(lookup_resp.ref.handle),
+ llu(lookup_refns[i].handle));
goto symlink_cleanup;
}
else
@@ -416,8 +416,8 @@ static int build_nested_path(
break;
}
GENERATE_FILENAME(cur_filename, 64, format, i, rank, 0);
- fprintf(stderr,"Removing path %s under %Lu,%d \t\t... ",
- cur_filename, Lu(parent_refn.handle),
+ fprintf(stderr,"Removing path %s under %llu,%d \t\t... ",
+ cur_filename, llu(parent_refn.handle),
parent_refn.fs_id);
ret = PVFS_sys_remove(cur_filename, parent_refn, &credentials);
fprintf(stderr, "%s\n", ((ret < 0) ? "FAILED" : "DONE"));
@@ -428,8 +428,8 @@ static int build_nested_path(
if (test_symlinks)
{
- fprintf(stderr,"Removing rlink %s under %Lu,%d \t\t... ",
- RELATIVE_SYMLINK_NAME, Lu(parent_refn.handle),
+ fprintf(stderr,"Removing rlink %s under %llu,%d \t\t... ",
+ RELATIVE_SYMLINK_NAME, llu(parent_refn.handle),
parent_refn.fs_id);
ret = PVFS_sys_remove(RELATIVE_SYMLINK_NAME,
parent_refn, &credentials);
@@ -439,8 +439,8 @@ static int build_nested_path(
PVFS_perror("\nPath removal status: ", ret);
}
- fprintf(stderr,"Removing alink %s under %Lu,%d \t\t... ",
- ABSOLUTE_SYMLINK_NAME, Lu(parent_refn.handle),
+ fprintf(stderr,"Removing alink %s under %llu,%d \t\t... ",
+ ABSOLUTE_SYMLINK_NAME, llu(parent_refn.handle),
parent_refn.fs_id);
ret = PVFS_sys_remove(ABSOLUTE_SYMLINK_NAME,
parent_refn, &credentials);
Index: test-pvfs-datatype-init.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/correctness/pts/test-pvfs-datatype-init.c,v
diff -p -u -r1.21 -r1.22
--- test-pvfs-datatype-init.c 20 May 2004 17:27:54 -0000 1.21
+++ test-pvfs-datatype-init.c 10 Nov 2005 01:27:20 -0000 1.22
@@ -93,13 +93,13 @@ int test_pvfs_datatype_init(
break;
}
debug_printf("Created file %s\n",&(filename[1]));
- debug_printf("Got handle %Ld.\n", Ld(resp_cr.ref.handle));
+ debug_printf("Got handle %lld.\n", lld(resp_cr.ref.handle));
num_test_files_ok++;
}
else
{
debug_printf("lookup succeeded; skipping existing file.\n");
- debug_printf("Got handle %Ld.\n", Ld(resp_lk.ref.handle));
+ debug_printf("Got handle %lld.\n", lld(resp_lk.ref.handle));
num_test_files_ok++;
}
}
Index: test-romio-noncontig-pattern2.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/correctness/pts/test-romio-noncontig-pattern2.c,v
diff -p -u -r1.7 -r1.8
--- test-romio-noncontig-pattern2.c 7 Jul 2005 15:35:47 -0000 1.7
+++ test-romio-noncontig-pattern2.c 10 Nov 2005 01:27:20 -0000 1.8
@@ -175,8 +175,8 @@ static int test_romio_noncontig2(void){
}
/*
- printf("total bytes processed on client side: %Ld\n", (long long)total_bytes_client);
- printf("total bytes processed on server side: %Ld\n", (long long)total_bytes_server);
+ printf("total bytes processed on client side: %lld\n", (long long)total_bytes_client);
+ printf("total bytes processed on server side: %lld\n", (long long)total_bytes_server);
*/
if(total_bytes_client == total_bytes_server)
More information about the PVFS2-CVS
mailing list