Index: /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/aio_test_append.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/aio_test_append.c	(revision 5830)
+++ /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/aio_test_append.c	(revision 5830)
@@ -0,0 +1,198 @@
+/*
+ * Adapted this test program from 
+ * http://developer.osdl.org/daniel/AIO/TESTS/aiodio_append.c
+ * Needs libaio-devel RPM installed.
+ * and compile as 
+ *
+ */
+
+#define _GNU_SOURCE
+
+#include "pvfs2-test-config.h"
+#include <sys/types.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/wait.h>
+
+#ifdef HAVE_LIBAIO_H
+#include <libaio.h>
+#endif
+
+#define NUM_CHILDREN 8
+
+
+static int check_zero(char *buf, int size)
+{
+	int *iptr;
+
+	iptr = (int *)buf;
+
+	while (size > 0) {
+		if (*iptr++ != 0) {
+			fprintf(stderr, "non zero buffer at buf[%d]\n",
+				(int)(((char *)iptr) - buf));
+			return 1;
+		}
+		size -= 4;
+	}
+	return 0;	/* all zeros */
+}
+
+static int read_eof(char *filename)
+{
+	int fd;
+	int i;
+	int r;
+	char buf[4096];
+
+	while ((fd = open(filename, O_RDONLY)) < 0) {
+		sleep(1);	/* wait for file to be created */
+	}
+
+	for (i = 0 ; i < 1000000; i++) {
+		off_t offset;
+		int bufoff;
+
+		offset = lseek(fd, SEEK_END, 0);
+		r = read(fd, buf, 4096);
+		if (r > 0) {
+			if ((bufoff = check_zero(buf, 4096))) {
+				fprintf(stderr, "non-zero read at offset %ld\n",
+					(long)(offset + bufoff));
+				exit(1);
+			}
+		}
+	}
+	return 0;
+}
+
+#define NUM_AIO 16
+#define AIO_SIZE 64*1024
+
+/*
+ * append to the end of a file using AIO DIRECT.
+ */
+static void aiodio_append(char *filename)
+{
+	int fd;
+	void *bufptr;
+	int i;
+	int w;
+	struct iocb iocb_array[NUM_AIO];
+	struct iocb *iocbs[NUM_AIO];
+	off_t offset = 0;
+	io_context_t myctx;
+	struct io_event event;
+
+	fd = open(filename, O_WRONLY|O_CREAT, 0666);
+	if (fd < 0) {
+		perror("cannot create file");
+		return;
+	}
+
+	memset(&myctx, 0, sizeof(myctx));
+	io_queue_init(NUM_AIO, &myctx);
+
+	for (i = 0; i < NUM_AIO; i++ ) {
+		if (posix_memalign(&bufptr, 4096, AIO_SIZE)) {
+			perror("cannot malloc aligned memory");
+			return;
+		}
+		memset(bufptr, 0, AIO_SIZE);
+		io_prep_pwrite(&iocb_array[i], fd, bufptr, AIO_SIZE, offset);
+		iocbs[i] = &iocb_array[i];
+		offset += AIO_SIZE;
+	}
+
+	/*
+	 * Start the 1st NUM_AIO requests
+	 */
+	if ((w = io_submit(myctx, NUM_AIO, iocbs)) < 0) {
+		fprintf(stderr, "io_submit write returned %d\n", w);
+	}
+
+	/*
+	 * As AIO requests finish, keep issuing more AIOs.
+	 */
+	for (; i < 1000; i++) {
+		int n;
+		struct iocb *iocbp;
+
+		n = io_getevents(myctx, 1, 1, &event, 0);
+		iocbp = event.obj;
+
+		io_prep_pwrite(iocbp, fd, iocbp->u.c.buf, AIO_SIZE, offset);
+		offset += AIO_SIZE;
+		if ((w = io_submit(myctx, 1, &iocbp)) < 0) {
+			fprintf(stderr, "write %d returned %d\n", i, w);
+		}
+	}
+}
+
+int main(int argc, char **argv)
+{
+	int pid[NUM_CHILDREN];
+	int num_children = 1;
+	int i, error_exit = 0, c;
+	char *filename = "a";
+
+	while ((c = getopt(argc, argv, "f:"))!= EOF)
+	{
+		switch (c)
+		{
+			case 'f': filename = optarg; break;
+			default: exit(1);
+		}
+	}
+	for (i = 0; i < num_children; i++) {
+		if ((pid[i] = fork()) == 0) {
+			/* child */
+			return read_eof(filename);
+		} else if (pid[i] < 0) {
+			/* error */
+			perror("fork error");
+			break;
+		} else {
+			/* Parent */
+			continue;
+		}
+	}
+
+	/*
+	 * Parent appends to end of file using direct i/o
+	 */
+
+	aiodio_append(filename);
+
+	for (i = 0; i < num_children; i++) {
+		kill(pid[i], SIGTERM);
+	}
+	error_exit = 0;
+	for (i = 0; i < num_children; i++)
+	{
+		int status;
+		pid_t p;
+
+		p = waitpid(pid[i], &status, 0);
+		if (p < 0)
+			perror("waitpid:");
+		else {
+			if (WIFEXITED(status) && WEXITSTATUS(status) == 1) {
+				error_exit = 1;
+			}
+		}
+	}
+	if (error_exit)
+	{
+		fprintf(stderr, "AIO Append Test Failed!\n");
+		return 1;
+	}
+	else 
+	{
+		fprintf(stderr, "AIO Append Test Passed!\n");
+		return 0;
+	}
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/module.mk.in
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/module.mk.in	(revision 6207)
+++ /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/module.mk.in	(revision 6207)
@@ -0,0 +1,19 @@
+DIR := kernel/linux-2.6
+
+ifeq ($(LIBAIO_EXISTS),1)
+
+TESTSRC += \
+	$(DIR)/aio_test_append.c \
+	$(DIR)/aio_test_correctness.c \
+	$(DIR)/aio_test_sparse.c \
+	$(DIR)/file_fsync.c \
+	$(DIR)/file_open.c \
+	$(DIR)/file_read.c \
+	$(DIR)/file_write.c \
+	$(DIR)/io-hole-test.c \
+	$(DIR)/threaded_write.c
+
+MODLDFLAGS_$(DIR) := -laio
+
+endif
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/file_open.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/file_open.c	(revision 5775)
+++ /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/file_open.c	(revision 5775)
@@ -0,0 +1,179 @@
+/*
+  this test is for trying to open a file in various modes to see what
+  error codes we get.  the ordering of the opens, removes, and the
+  expected errno values can change this test drastically, so make sure
+  you check those if you modify this and the test is failing in an
+  unexpected way
+
+  compile with:
+  gcc -D_LARGEFILE64_SOURCE file_open.c -o file_open
+  or for no largefile support tests, gcc file_open.c -o file_open
+
+  run like:
+  ./file_open /mnt/pvfs2/testfile
+
+  for comparison, try running it on another file system such as
+  ext2/ext3
+*/
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+
+typedef struct
+{
+    int flags;
+    int mode;
+    char flag_description[64];
+    int remove_file_indicator;
+    int expected_errno;
+} open_info_t;
+
+#define REMOVE_FILE_INDICATOR { 0, 0, "", 1, ENOENT }
+
+static open_info_t oinfo[] =
+{
+    REMOVE_FILE_INDICATOR,
+
+#ifdef _LARGEFILE64_SOURCE
+    { (O_RDONLY | O_LARGEFILE), 0666,
+      "O_RDONLY | O_LARGEFILE", 0, ENOENT },
+#endif
+    { (O_RDONLY | O_APPEND), 0666,
+      "O_RDONLY | O_APPEND", 0, ENOENT },
+
+    { (O_RDONLY | O_TRUNC), 0666,
+      "O_RDONLY | O_TRUNC", 0, ENOENT },
+
+    { (O_CREAT | O_WRONLY), 0666,
+      "O_CREAT | O_WRONLY", 0, 0 },
+#ifdef _LARGEFILE64_SOURCE
+    { (O_RDONLY | O_LARGEFILE), 0666,
+      "O_RDONLY | O_LARGEFILE", 0, 0 },
+#endif
+    REMOVE_FILE_INDICATOR,
+
+    { (O_CREAT | O_RDONLY), 0666,
+      "O_CREAT | O_RDONLY", 0, 0 },
+
+    REMOVE_FILE_INDICATOR,
+#ifdef _LARGEFILE64_SOURCE
+    { (O_CREAT | O_RDONLY | O_LARGEFILE), 0666,
+      "O_CREAT | O_RDONLY", 0, 0 },
+#endif
+    REMOVE_FILE_INDICATOR,
+
+    { (O_SYNC | O_RDONLY), 0666,
+      "O_SYNC | O_RDONLY", 0, ENOENT },
+
+    { (O_RDONLY | O_APPEND), 0666,
+      "O_RDONLY | O_APPEND", 0, ENOENT },
+
+    { (O_RDONLY | O_TRUNC), 0666,
+      "O_RDONLY | O_TRUNC", 0, ENOENT },
+
+    { (O_CREAT | O_RDONLY | O_TRUNC), 0666,
+      "O_CREAT | O_RDONLY | O_TRUNC", 0, 0 },
+
+    { (O_SYNC | O_RDONLY), 0666,
+      "O_SYNC | O_RDONLY", 0, 0 },
+
+    { (O_RDONLY | O_APPEND), 0666,
+      "O_RDONLY | O_APPEND", 0, 0 },
+
+    { (O_RDONLY | O_TRUNC), 0666,
+      "O_RDONLY | O_TRUNC", 0, 0 },
+
+    { (O_CREAT | O_RDWR), 0666,
+      "O_CREAT | O_RDWR", 0, 0 },
+
+    { (O_CREAT | O_WRONLY | O_TRUNC), 0666,
+      "O_CREAT | O_WRONLY | O_TRUNC", 0, 0 },
+
+    REMOVE_FILE_INDICATOR,
+
+    { (O_CREAT | O_WRONLY | O_EXCL), 0666,
+      "O_CREAT | O_WRONLY | O_EXCL", 0, 0 },
+
+    REMOVE_FILE_INDICATOR,
+
+    { (O_CREAT | O_WRONLY | O_TRUNC), 0666,
+      "O_CREAT | O_WRONLY | O_TRUNC", 0, 0 },
+
+    { (O_CREAT | O_WRONLY | O_EXCL), 0666,
+      "O_CREAT | O_WRONLY | O_EXCL", 0, EEXIST },
+
+    { (O_CREAT | O_WRONLY), 0666,
+      "O_CREAT | O_WRONLY", 0, 0 },
+
+    REMOVE_FILE_INDICATOR
+};
+#define NUM_OPEN_TESTS (sizeof(oinfo) / sizeof(open_info_t))
+
+
+int main(int argc, char **argv)	
+{
+    int fd = -1, i = 0;
+
+    if (argc != 2)
+    {
+        fprintf(stderr, "usage: %s <filename>\n", argv[0]);
+        return -1;
+    }
+
+    printf("Using testfile %s\n", argv[1]);
+
+    for(i = 0; i < NUM_OPEN_TESTS; i++)
+    {
+        if (oinfo[i].remove_file_indicator)
+        {
+            printf("[%d] removing test file %s ... ", i, argv[1]);
+            if (unlink(argv[1]))
+            {
+                if (errno != oinfo[i].expected_errno)
+                {
+                    printf("FAILED\n");
+                    fprintf(stderr, "[%d] *** unlink failure: %s\n", i,
+                            strerror(errno));
+                    continue;
+                }
+            }
+            printf("OK\n");
+            continue;
+        }
+
+        printf("[%d] opening file with flags (%s) ... ", i,
+               oinfo[i].flag_description);
+
+        fd = open(argv[1], oinfo[i].flags, oinfo[i].mode);
+        if (fd < 0)
+        {
+            if (errno != oinfo[i].expected_errno)
+            {
+                printf("FAILED\n");
+                fprintf(stderr, "[%d] *** open failure: %s\n", i,
+                        strerror(errno));
+            }
+            else
+            {
+                printf("OK\n  failed with expected errno: %s\n",
+                       strerror(errno));
+            }
+        }
+        else
+        {
+            printf("OK\n");
+
+            if (close(fd))
+            {
+                fprintf(stderr, "[%d] *** close failure: %s\n", i,
+                        strerror(errno));
+            }
+        }
+    }
+    return 0;
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/aio_test_correctness.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/aio_test_correctness.c	(revision 5775)
+++ /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/aio_test_correctness.c	(revision 5775)
@@ -0,0 +1,170 @@
+#if 0
+/* Magic self-executing C source code.  Run "sh aio_test_correctness.c"
+*  set -ex
+*  gcc -g -Wall -O2 $0 -o aio_test_correctness
+*  exit 0
+*/
+#endif
+
+/* Adapted from 
+ * http://developer.osdl.org/daniel/AIO/TESTS/aiodio_append.c
+ */
+
+#define _GNU_SOURCE
+#include "pvfs2-test-config.h"
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <libaio.h>
+
+#define NUM_CHILDREN 8
+
+
+
+#define NUM_AIO 18
+#define AIO_SIZE 64*1024
+
+/*
+ * write to the different portions of a file using AIO.
+ */
+static void aiodio_write(char *filename, void **all_bufs)
+{
+	int fd;
+	void *bufptr;
+	int i;
+	int w;
+	struct iocb iocb_array[NUM_AIO];
+	struct iocb *iocbs[NUM_AIO];
+	off_t offset = 0;
+	io_context_t myctx;
+	struct io_event event;
+
+	fd = open(filename, O_WRONLY|O_CREAT, 0666);
+	if (fd < 0) {
+		perror("cannot create file");
+		return;
+	}
+
+	memset(&myctx, 0, sizeof(myctx));
+	io_queue_init(NUM_AIO, &myctx);
+
+	for (i = 0; i < NUM_AIO; i++ ) {
+		if (posix_memalign(&bufptr, 4096, AIO_SIZE)) {
+			perror("cannot malloc aligned memory");
+			return;
+		}
+		all_bufs[i] = bufptr;
+		memset(bufptr, rand() % 256, AIO_SIZE);
+		io_prep_pwrite(&iocb_array[i], fd, bufptr, AIO_SIZE, offset);
+		iocbs[i] = &iocb_array[i];
+		offset += AIO_SIZE;
+	}
+
+	/*
+	 * Start the NUM_AIO requests
+	 */
+	if ((w = io_submit(myctx, NUM_AIO, iocbs)) < 0) {
+		fprintf(stderr, "io_submit write returned %d\n", w);
+	}
+	/* Wait for them to finish */
+	for (i = 0; i < NUM_AIO; i++)
+	{
+		int n;
+		n = io_getevents(myctx, 1, 1, &event, 0);
+	}
+	close(fd);
+	return;
+}
+
+/*
+ * read from different parts of the file using AIO.
+ */
+static void aiodio_read(char *filename, void **all_bufs)
+{
+	int fd;
+	void *bufptr;
+	int i;
+	int w;
+	struct iocb iocb_array[NUM_AIO];
+	struct iocb *iocbs[NUM_AIO];
+	off_t offset = 0;
+	io_context_t myctx;
+	struct io_event event;
+
+	fd = open(filename, O_RDONLY);
+	if (fd < 0) {
+		perror("cannot open file for reading!");
+		return;
+	}
+
+	memset(&myctx, 0, sizeof(myctx));
+	io_queue_init(NUM_AIO, &myctx);
+
+	for (i = 0; i < NUM_AIO; i++ ) {
+		if (posix_memalign(&bufptr, 4096, AIO_SIZE)) {
+			perror("cannot malloc aligned memory");
+			return;
+		}
+		all_bufs[i] = bufptr;
+		memset(bufptr, 0, AIO_SIZE);
+		io_prep_pread(&iocb_array[i], fd, bufptr, AIO_SIZE, offset);
+		iocbs[i] = &iocb_array[i];
+		offset += AIO_SIZE;
+	}
+
+	/*
+	 * Start the NUM_AIO requests
+	 */
+	if ((w = io_submit(myctx, NUM_AIO, iocbs)) < 0) {
+		fprintf(stderr, "io_submit read returned %d\n", w);
+	}
+
+	/* Wait for them to finish */
+	for (i = 0; i < NUM_AIO; i++)
+	{
+		int n;
+		n = io_getevents(myctx, 1, 1, &event, 0);
+	}
+	close(fd);
+	return;
+}
+
+int main(int argc, char **argv)
+{
+	int c, i;
+	char *filename = "a";
+	void *rbuf[NUM_AIO] = {NULL, };
+	void *wbuf[NUM_AIO] = {NULL, };
+
+	while ((c = getopt(argc, argv, "f:"))!= EOF)
+	{
+		switch (c)
+		{
+			case 'f': filename = optarg; break;
+			default: exit(1);
+		}
+	}
+	aiodio_write(filename, wbuf);
+	aiodio_read(filename, rbuf);
+	c = 0;
+	for (i = 0; i < NUM_AIO; i++)
+	{
+		if (memcmp(rbuf[i], wbuf[i], AIO_SIZE)) {
+			printf("Buffer %d did not match\n", i);
+			c = 1;
+		}
+	}
+	if (c == 0) {
+		printf("AIO Correctness Test Passed!\n");
+		return 0;
+	}
+	else  {
+		printf("AIO Correctness Test Failed!\n");
+		return 1;
+	}
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/file_fsync.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/file_fsync.c	(revision 5775)
+++ /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/file_fsync.c	(revision 5775)
@@ -0,0 +1,51 @@
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+
+int main(int argc, char **argv)	
+{
+    int ret = -1, fd = -1;
+    int buf_size = 2*1024*1024;
+    char* buffer = NULL;
+
+    if (argc != 2)
+    {
+        fprintf(stderr, "usage: %s <filename>\n", argv[0]);
+        return(-1);
+    }
+
+    buffer = (char *)malloc(buf_size);
+    if (!buffer)
+    {
+        perror("malloc");
+        return(-1);
+    }
+
+    printf("Using testfile %s\n", argv[1]);
+    fd = open(argv[1], (O_CREAT | O_WRONLY), 0666);
+    if (fd < 0)
+    {
+        perror("open");
+        return(-1);
+    }
+
+    memset(buffer, 'Z', buf_size);
+
+    ret = write(fd, buffer, buf_size);
+    if (ret < 0)
+    {
+        fprintf(stderr, "errno is %x\n", errno);
+        perror("write");
+        return(-1);
+    }
+
+    fsync(fd);
+    close(fd);
+
+    return 0;
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/aio_test_sparse.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/aio_test_sparse.c	(revision 5830)
+++ /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/aio_test_sparse.c	(revision 5830)
@@ -0,0 +1,413 @@
+#if 0
+/* Magic self-executing C source code.  Run "sh aio_test_sparse.c"
+*  set -ex
+*  gcc -g -Wall -O2 $0 -o aio_test_sparse
+*  exit 0
+*/
+#endif
+
+/* Adapted from 
+ * http://developer.osdl.org/daniel/AIO/TESTS/aiodio_sparse.c
+ */
+
+
+#define _GNU_SOURCE
+#include "pvfs2-test-config.h"
+#include <stdlib.h>
+#include <sys/types.h>
+#include <errno.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <sys/wait.h>
+
+#include <libaio.h>
+
+#define NUM_CHILDREN 1000
+
+int debug;
+
+/*
+ * aio_test_sparse - issue async writes to holes is a file while
+ *	concurrently reading the file and checking that the read never reads
+ *	uninitailized data.
+ */
+
+static char *check_zero(char *buf, int size)
+{
+	char *p;
+
+	p = buf;
+
+	while (size > 0) {
+		if (*buf != 0) {
+			fprintf(stderr, "non zero buffer at buf[%d] => 0x%02x,%02x,%02x,%02x\n",
+				(int)(buf - p), (unsigned int)buf[0],
+				size > 1 ? (unsigned int)buf[1] : 0,
+				size > 2 ? (unsigned int)buf[2] : 0,
+				size > 3 ? (unsigned int)buf[3] : 0);
+			if (debug)
+				fprintf(stderr, "buf %p, p %p\n", buf, p);
+			return buf;
+		}
+		buf++;
+		size--;
+	}
+	return 0;	/* all zeros */
+}
+
+static int read_sparse(char *filename, int filesize)
+{
+	int fd;
+	int i;
+	int j;
+	int r;
+	char buf[4096];
+
+	while ((fd = open(filename, O_RDONLY)) < 0) {
+		sleep(1);	/* wait for file to be created */
+	}
+
+	for (i = 0 ; i < 100000000; i++) {
+		off_t offset = 0;
+		char *badbuf;
+
+		if (debug > 1 && (i % 10) == 0) {
+			fprintf(stderr, "child %d, read loop count %d\n", 
+				getpid(), i);
+		}
+		lseek(fd, SEEK_SET, 0);
+		for (j = 0; j < filesize+1; j += sizeof(buf)) {
+			r = read(fd, buf, sizeof(buf));
+			if (r > 0) {
+				if ((badbuf = check_zero(buf, sizeof(buf)))) {
+					fprintf(stderr, "non-zero read at offset %d\n",
+						(int)(offset + badbuf - buf));
+					kill(getppid(), SIGTERM);
+					exit(10);
+				}
+			}
+			offset += r;
+		}
+	}
+	return 0;
+}
+
+volatile int got_signal;
+
+static void sig_term_func(int i, siginfo_t *si, void *p)
+{
+	if (debug)
+		fprintf(stderr, "sig(%d, %p, %p)\n", i, si, p);
+	got_signal++;
+}
+
+/*
+ * do async writes to a sparse file
+ */
+static void aio_sparse(char *filename, int align, int writesize, int filesize, int num_aio)
+{
+	int fd;
+	int i;
+	int w;
+	static struct sigaction s;
+	struct iocb **iocbs;
+	off_t offset;
+	io_context_t myctx;
+	struct io_event event;
+	int aio_inflight;
+
+	s.sa_sigaction = sig_term_func;
+	s.sa_flags = SA_SIGINFO;
+	sigaction(SIGTERM, &s, 0);
+
+	if ((num_aio * writesize) > filesize) {
+		num_aio = filesize / writesize;
+	}
+	memset(&myctx, 0, sizeof(myctx));
+	io_queue_init(num_aio, &myctx);
+
+	iocbs = (struct iocb **)malloc(sizeof(struct iocb *) * num_aio);
+	for (i = 0; i < num_aio; i++) {
+		if ((iocbs[i] = (struct iocb *)malloc(sizeof(struct iocb))) == 0) {
+			perror("cannot malloc iocb");
+			return;
+		}
+	}
+
+	fd = open(filename, O_WRONLY|O_CREAT, 0666);
+
+	if (fd < 0) {
+		perror("cannot create file");
+		return;
+	}
+
+	ftruncate(fd, filesize);
+
+	/*
+	 * allocate the iocbs array and iocbs with buffers
+	 */
+	offset = 0;
+	for (i = 0; i < num_aio; i++) {
+		void *bufptr;
+
+		if (posix_memalign(&bufptr, align, writesize)) {
+			perror("cannot malloc aligned memory");
+			close(fd);
+			unlink(filename);
+			return;
+		}
+		memset(bufptr, 0, writesize);
+		io_prep_pwrite(iocbs[i], fd, bufptr, writesize, offset);
+		offset += writesize;
+	}
+
+	/*
+	 * start the 1st num_aio write requests
+	 */
+	if ((w = io_submit(myctx, num_aio, iocbs)) < 0) {
+		perror("io_submit failed");
+		close(fd);
+		unlink(filename);
+		return;
+	}
+	if (debug) 
+		fprintf(stderr, "io_submit() return %d\n", w);
+
+	/*
+	 * As AIO requests finish, keep issuing more AIO until done.
+	 */
+	aio_inflight = num_aio;
+	if (debug)
+		fprintf(stderr, "aio_test_sparse: %d i/o in flight\n", aio_inflight);
+	while (offset < filesize)  {
+		int n;
+		struct iocb *iocbp;
+
+		if (debug)
+			fprintf(stderr, "aio_test_sparse: offset %ld filesize %d inflight %d\n",
+				(long) offset, filesize, aio_inflight);
+
+		if ((n = io_getevents(myctx, 1, 1, &event, 0)) != 1) {
+			if (-n != EINTR)
+				fprintf(stderr, "io_getevents() returned %d\n", n);
+			break;
+		}
+		if (debug)
+			fprintf(stderr, "aio_test_sparse: io_getevent() returned %d\n", n);
+		aio_inflight--;
+		if (got_signal)
+			break;		/* told to stop */
+		/*
+		 * check if write succeeded.
+		 */
+		iocbp = event.obj;
+		if (event.res2 != 0 || event.res != iocbp->u.c.nbytes) {
+			fprintf(stderr,
+				"AIO write offset %lld expected %ld got %ld\n",
+				iocbp->u.c.offset, iocbp->u.c.nbytes,
+				event.res);
+			break;
+		}
+		if (debug)
+			fprintf(stderr, "aio_test_sparse: io_getevent() res %ld res2 %ld\n",
+				event.res, event.res2);
+		
+		/* start next write */
+		io_prep_pwrite(iocbp, fd, iocbp->u.c.buf, writesize, offset);
+		offset += writesize;
+		if ((w = io_submit(myctx, 1, &iocbp)) < 0) {
+			fprintf(stderr, "io_submit failed at offset %ld\n",
+				(long) offset);
+			perror("");
+			break;
+		}
+		if (debug) 
+			fprintf(stderr, "io_submit() return %d\n", w);
+		aio_inflight++;
+	}
+
+	/*
+	 * wait for AIO requests in flight.
+	 */
+	while (aio_inflight > 0) {
+		int n;
+		struct iocb *iocbp;
+
+		if ((n = io_getevents(myctx, 1, 1, &event, 0)) != 1) {
+			perror("io_getevents failed");
+			break;
+		}
+		aio_inflight--;
+		/*
+		 * check if write succeeded.
+		 */
+		iocbp = event.obj;
+		if (event.res2 != 0 || event.res != iocbp->u.c.nbytes) {
+			fprintf(stderr,
+				"AIO write offset %lld expected %ld got %ld\n",
+				iocbp->u.c.offset, iocbp->u.c.nbytes,
+				event.res);
+		}
+	}
+	if (debug)
+		fprintf(stderr, "AIO DIO write done unlinking file\n");
+	close(fd);
+	unlink(filename);
+}
+
+
+static int usage(void)
+{
+	fprintf(stderr, "usage: aio_test_sparse [-n children] [-s filesize]"
+		" [-w writesize] [-r readsize] [-f fname] \n");
+	exit(1);
+}
+
+/*
+ * Scale value by kilo, mega, or giga.
+ */
+static long long scale_by_kmg(long long value, char scale)
+{
+	switch (scale) {
+	case 'g':
+	case 'G':
+		value *= 1024;
+	case 'm':
+	case 'M':
+		value *= 1024;
+	case 'k':
+	case 'K':
+		value *= 1024;
+		break;
+	case '\0':
+		break;
+	default:
+		usage();
+		break;
+	}
+	return value;
+}
+
+/*
+ *	usage:
+ * aio_test_sparse [-r readsize] [-w writesize] [-n chilren] [-a align] [-i num_aio] [-f filename]
+ */
+
+int main(int argc, char **argv)
+{
+	int pid[NUM_CHILDREN];
+	int num_children = 1;
+	int i;
+	char *filename = "file";
+	long alignment = 512;
+	int readsize = 65536;
+	int writesize = 65536;
+	int filesize = 100*1024*1024;
+	int num_aio = 16;
+	int children_errors = 0;
+	int c;
+	extern char *optarg;
+	extern int optind, optopt, opterr;
+
+	while ((c = getopt(argc, argv, "df:r:w:n:a:s:i:")) != -1) {
+		char *endp;
+		switch (c) {
+		case 'f':
+			filename = optarg;
+			break;
+		case 'd':
+			debug++;
+			break;
+		case 'i':
+			num_aio = atoi(optarg);
+			break;
+		case 'a':
+			alignment = strtol(optarg, &endp, 0);
+			alignment = (int)scale_by_kmg((long long)alignment,
+                                                        *endp);
+			break;
+		case 'r':
+			readsize = strtol(optarg, &endp, 0);
+			readsize = (int)scale_by_kmg((long long)readsize, *endp);
+			break;
+		case 'w':
+			writesize = strtol(optarg, &endp, 0);
+			writesize = (int)scale_by_kmg((long long)writesize, *endp);
+			break;
+		case 's':
+			filesize = strtol(optarg, &endp, 0);
+			filesize = (int)scale_by_kmg((long long)filesize, *endp);
+			break;
+		case 'n':
+			num_children = atoi(optarg);
+			if (num_children > NUM_CHILDREN) {
+				fprintf(stderr,
+					"number of children limited to %d\n",
+					NUM_CHILDREN);
+				num_children = NUM_CHILDREN;
+			}
+			break;
+		case '?':
+			usage();
+			break;
+		}
+	}
+
+	for (i = 0; i < num_children; i++) {
+		if ((pid[i] = fork()) == 0) {
+			/* child */
+			return read_sparse(filename, filesize);
+		} else if (pid[i] < 0) {
+			/* error */
+			perror("fork error");
+			break;
+		} else {
+			/* Parent */
+			continue;
+		}
+	}
+
+	/*
+	 * Parent write to a hole in a file using async i/o
+	 */
+
+	aio_sparse(filename, alignment, writesize, filesize, num_aio);
+
+	if (debug)
+		fprintf(stderr, "aio_sparse done writing, kill children\n");
+
+	for (i = 0; i < num_children; i++) {
+		kill(pid[i], SIGTERM);
+	}
+
+	for (i = 0; i < num_children; i++) {
+		int status;
+		pid_t p;
+
+		p = waitpid(pid[i], &status, 0);
+		if (p < 0) {
+			perror("waitpid");
+		} else {
+			if (WIFEXITED(status) && WEXITSTATUS(status) == 10) {
+				children_errors++;
+				if (debug) {
+					fprintf(stderr, "child %d bad exit\n", p);
+				}
+			}
+		}
+	}
+	if (debug)
+		fprintf(stderr, "aio_sparse %d children had errors\n",
+			children_errors);
+	if (children_errors) {
+		fprintf(stderr, "AIO Sparse Test failed!\n");
+		return 1;
+	}
+	else {
+		fprintf(stderr, "AIO Sparse Test passed!\n");
+		return 0;
+	}
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/pvfs2tab
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/pvfs2tab	(revision 2594)
+++ /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/pvfs2tab	(revision 2594)
@@ -0,0 +1,1 @@
+tcp://localhost:3334/pvfs2-fs /mnt/pvfs pvfs2 encoding=le_bfield 0 0 
Index: /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/file_write.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/file_write.c	(revision 5775)
+++ /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/file_write.c	(revision 5775)
@@ -0,0 +1,59 @@
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#define NUM_WRITES 50
+
+int main(int argc, char **argv)	
+{
+    int ret = -1, fd = -1, i = 0;
+    int buf_size = 2*1024*1024;
+    char* buffer = NULL;
+
+    if (argc != 2)
+    {
+        fprintf(stderr, "usage: %s <filename>\n", argv[0]);
+        return(-1);
+    }
+
+    buffer = (char *)malloc(buf_size);
+    if (!buffer)
+    {
+        perror("malloc");
+        return(-1);
+    }
+
+    printf("Using testfile %s\n", argv[1]);
+    fd = open(argv[1], (O_CREAT | O_WRONLY), 0666);
+    if (fd < 0)
+    {
+        perror("open");
+        return(-1);
+    }
+
+    while(1)
+    {
+        memset(buffer, (char)i, buf_size);
+
+        ret = write(fd, buffer, buf_size);
+        if (ret < 0)
+        {
+            fprintf(stderr, "errno is %x\n", errno);
+            perror("write");
+            return(-1);
+        }
+
+        if (i++ > NUM_WRITES)
+        {
+            break;
+        }
+    }
+
+    close(fd);
+    return(0);
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/io-hole-test.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/io-hole-test.c	(revision 5775)
+++ /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/io-hole-test.c	(revision 5775)
@@ -0,0 +1,78 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <string.h>
+
+#define MAX_BUF_LEN 5
+
+
+int main(int argc, char **argv)
+{
+    int fd = -1;
+    char buf[MAX_BUF_LEN] = {0};
+    ssize_t n_written = 0, n_read = 0;
+    off_t pos = 0;
+
+    if (argc != 2)
+    {
+        fprintf(stderr, "Usage: %s <output filename>\n", argv[0]);
+        return 1;
+    }
+
+    memset(buf, 'A', MAX_BUF_LEN);
+
+    fd = open(argv[1], (O_RDWR|O_CREAT|O_TRUNC), 0666);
+    if (fd == -1)
+    {
+        fprintf(stderr, "Failed to open file %s\n", argv[1]);
+        return 1;
+    }
+
+    n_written = write(fd, buf, MAX_BUF_LEN);
+    if (n_written != MAX_BUF_LEN)
+    {
+        fprintf(stderr, "Failed to write first buffer\n");
+        return 1;
+    }
+    fprintf(stderr, "Wrote %d bytes\n", MAX_BUF_LEN);
+
+    pos = lseek(fd, 100000, SEEK_CUR);
+    if (pos == (off_t)-1)
+    {
+        fprintf(stderr, "Failed to seek\n");
+        return 1;
+    }
+    fprintf(stderr, "lseek() returned %ld\n", (long) pos);
+
+    n_written = write(fd, buf, MAX_BUF_LEN);
+    if (n_written != MAX_BUF_LEN)
+    {
+        fprintf(stderr, "Failed to write first buffer\n");
+        return 1;
+    }
+    fprintf(stderr, "Wrote %d bytes\n", MAX_BUF_LEN);
+
+    pos = lseek(fd, 10, SEEK_SET);
+    if (pos == (off_t)-1)
+    {
+        fprintf(stderr, "Failed to seek\n");
+        return 1;
+    }
+    fprintf(stderr, "lseek() returned %ld\n", (long) pos);
+
+    n_read = read(fd, buf, MAX_BUF_LEN);
+    if (n_read != MAX_BUF_LEN)
+    {
+        fprintf(stderr, "Failed to read %d bytes at offset %d\n",
+                (int)MAX_BUF_LEN, (int)pos);
+        return 1;
+    }
+    fprintf(stderr, "Read %d bytes\n", MAX_BUF_LEN);
+
+    close(fd);
+    return 0;
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/file_read.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/file_read.c	(revision 1396)
+++ /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/file_read.c	(revision 1396)
@@ -0,0 +1,49 @@
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+int main(int argc, char **argv)	
+{
+	int ret = -1;
+	int fd = -1;
+	int buf_size = 8*1024*1024;
+	char* buffer = NULL;
+	off_t pos = 0;
+
+	if(argc != 2)
+	{
+		fprintf(stderr, "usage: %s <filename>\n", argv[0]);
+		return(-1);
+	}
+
+	buffer = (char*)malloc(buf_size);
+	if(!buffer)
+	{
+		perror("malloc");
+		return(-1);
+	}
+
+	fd = open(argv[1], O_RDONLY);
+	if(fd < 0)
+	{
+		perror("open");
+		return(-1);
+	}
+
+	ret = read(fd, buffer, buf_size);
+	if(ret < 0)
+	{
+		perror("read");
+		return(-1);
+	};
+
+	pos = lseek(fd, 0, SEEK_CUR);
+	printf("lseek returned: %d\n", (int)pos);
+
+	close(fd);
+
+	return(0);
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/pvfs2-shell-test.sh
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/pvfs2-shell-test.sh	(revision 5261)
+++ /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/pvfs2-shell-test.sh	(revision 5261)
@@ -0,0 +1,1211 @@
+#!/bin/bash
+#
+# A PVFS2 test script only useful for running
+# on a mounted GNU/Linux pvfs2 volume
+#
+# This script focuses on making sure that basic shell
+# programs work correctly on top of pvfs2.
+#
+# run this test like this:
+#
+# sh pvfs2-shell-test.sh /pvfs/mntpoint
+#
+
+#####################################
+# runtime options
+#####################################
+
+# Fully comment out to disable categories of tests
+# DO NOT just set the value to be 0
+#
+ENABLE_DIRECTORY_TESTS=1
+ENABLE_IO_TESTS=1
+ENABLE_EXECUTE_TESTS=1
+ENABLE_COMPILE_TESTS=1
+ENABLE_PERMISSION_TESTS=1
+ENABLE_SYMLINK_TESTS=1
+ENABLE_RENAME_TESTS=1
+
+#####################################
+# test constants here
+#####################################
+
+TEST_PERMISSIONS="0777 0767 0666 0644 0600 0500 0400 0000 0755"
+
+#####################################
+# misc functions here
+#####################################
+
+timestamp()
+{
+    WORDS=$1
+    CMD=$2
+    OUTPUT=$3
+
+    DATE=`date`
+    echo "$DATE: $WORDS"
+
+    if ! test "x$OUTPUT" = "x"; then
+        echo "Piping command output to /dev/null"
+        $CMD > /dev/null
+    else
+        $CMD
+    fi
+
+    if test $? -ne 0 ; then
+        return 1
+    fi
+
+    DATE=`date`
+    echo "$DATE: Finished"
+    return 0
+}
+
+error_exit()
+{
+    echo "Aborting test due to detected error"
+    exit 1
+}
+
+setup_testdir()
+{
+    DIR=$1
+
+    echo "Removing directory $DIR (if it exists)"
+    rm -rf $DIR
+
+    echo "Creating directory $DIR"
+    mkdir  $DIR
+}
+
+remove_testdir()
+{
+    DIR=$1
+
+    echo "Removing directory $DIR"
+    rm -rf $DIR
+}
+
+generate_hello_world_code()
+{
+    OUTFILE=$1
+
+    rm -f $OUTFILE
+
+    DATE=`date`
+    echo "$DATE: Generating Hello World source code"
+
+    echo "#include <stdio.h>" >> $OUTFILE
+    echo "int main(int argc, char **argv) {" >> $OUTFILE
+    echo "printf(\"Hello, World!\n\");" >> $OUTFILE
+    echo "return 0; }" >> $OUTFILE
+
+    DATE=`date`
+    echo "$DATE: Hello World source code written"
+}
+
+generate_mmap_read_code()
+{
+    OUTFILE=$1
+
+    rm -f $OUTFILE
+
+    DATE=`date`
+    echo "$DATE: Generating mmap.c source code (an mmap read test)"
+
+    cat >> $OUTFILE <<EOF
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <string.h>
+int main(int argc, char **argv) {
+    int ret = -1, fd = -1; void *start = NULL;
+    struct stat statbuf; char *ptr = NULL, *end = NULL;
+    memset(&statbuf, 0, sizeof(statbuf));
+    if (stat(argv[1],&statbuf) == 0) {
+        if ((fd = open(argv[1], O_RDONLY)) != -1) {
+            start = mmap(NULL, statbuf.st_size, PROT_READ,
+                         MAP_PRIVATE, fd, 0);
+            if (start != MAP_FAILED) {
+                fprintf(stderr,"MMAP Read content length is %d "
+                        "\n\n", (int)statbuf.st_size);
+                end = (char *)(start + statbuf.st_size);
+                for(ptr = (char *)start; ptr != end; ptr++)
+                    if (ptr)
+                        printf("%x ",*ptr);
+                printf("\n");
+                ret = munmap(start, statbuf.st_size);
+            }
+            close(fd);
+        }
+    }
+    return ret;
+}
+EOF
+
+    DATE=`date`
+    echo "$DATE: MMAP Read source code written"
+}
+
+stat_file()
+{
+    WORDS=$1
+    FILE=$2
+
+    DATE=`date`
+    echo "$DATE: $WORDS"
+
+    echo "***********************************"
+    stat $FILE
+    RET=$?
+    echo "***********************************"
+
+    DATE=`date`
+    echo "$DATE: Finished"
+    return $RET
+}
+
+check_entry_permissions()
+{
+    ENTRY=$1
+    PERM=$2
+
+#    echo "  - Verifying that entry permission is now $PERM"
+    OUTPUT=`stat $ENTRY | head -n 4 | tail -n 1 | awk '{print \$2}' | grep $PERM`
+
+    if test "x$OUTPUT" = "x"; then
+        echo "Permission check: FAILED.  Test Aborting."
+        return 1
+    else
+        echo "Permission check: OK $OUTPUT"
+    fi
+    return 0
+}
+
+#####################################
+# simple directory test functions
+#####################################
+
+# create a dir
+# create 100 files in that dir
+# rm -rf the dir
+directory_test1()
+{
+    echo ""
+    echo "******************************************"
+    echo "* RUNNING DIRECTORY TEST 1"
+    echo "******************************************"
+
+    setup_testdir $PVFS2_TESTDIR
+
+    DATE=`date`
+    echo "$DATE: Creating 100 new files"
+    for f in `seq 1 100`; do
+        CUR_FILE=$PVFS2_TESTDIR/testfile0$f
+
+        touch $CUR_FILE
+
+        if test $? -ne 0 ; then
+            echo ""
+            echo "******************************************"
+            echo "* FAILED DIRECTORY TEST 1"
+            echo "******************************************"
+            return 1
+        fi
+    done
+    DATE=`date`
+    echo "$DATE: Finished"
+
+    remove_testdir $PVFS2_TESTDIR
+
+    echo ""
+    echo "******************************************"
+    echo "* PASSED DIRECTORY TEST 1"
+    echo "******************************************"
+    return 0
+}
+
+# create a dir
+# create 256 files in that dir
+# create 256 directories in that dir
+# create 256 symlinks in the 256 directories to those files in that dir
+# do a find on that dir > /dev/null
+# do a recursive ls -al on that dir > /dev/null
+# rm -rf the dir
+directory_test2()
+{
+    echo ""
+    echo "******************************************"
+    echo "* RUNNING DIRECTORY TEST 2"
+    echo "******************************************"
+
+    setup_testdir $PVFS2_TESTDIR
+
+    DATE=`date`
+    echo "$DATE: Creating 256 new files"
+    for f in `seq 1 100`; do
+        CUR_FILE=$PVFS2_TESTDIR/testfile1$f
+
+        touch $CUR_FILE
+
+        if test $? -ne 0 ; then
+            echo ""
+            echo "******************************************"
+            echo "* FAILED DIRECTORY TEST 2 [stage 1]"
+            echo "******************************************"
+            return 1
+        fi
+    done
+    DATE=`date`
+    echo "$DATE: Finished"
+
+    DATE=`date`
+    echo "$DATE: Creating 256 new directories"
+    for f in `seq 1 100`; do
+        CUR_DIR=$PVFS2_TESTDIR/testdir1$f
+
+        mkdir $CUR_DIR
+
+        if test $? -ne 0 ; then
+            echo ""
+            echo "******************************************"
+            echo "* FAILED DIRECTORY TEST 2 [stage 2]"
+            echo "******************************************"
+            return 1
+        fi
+    done
+    DATE=`date`
+    echo "$DATE: Finished"
+
+    DATE=`date`
+    echo "$DATE: Creating 256 new symlinks"
+    for f in `seq 1 100`; do
+        CUR_FILE=$PVFS2_TESTDIR/testfile1$f
+        CUR_DIR=$PVFS2_TESTDIR/testdir1$f
+        CUR_LINK=$CUR_DIR/testsymlink1$f
+
+        ln -s $CUR_FILE $CUR_LINK
+
+        if test $? -ne 0 ; then
+            echo ""
+            echo "******************************************"
+            echo "* FAILED DIRECTORY TEST 2 [stage 3]"
+            echo "******************************************"
+            return 1
+        fi
+    done
+    DATE=`date`
+    echo "$DATE: Finished"
+
+    CMD="find $PVFS2_TESTDIR"
+    timestamp "Running Find $PVFS2_TESTDIR" "$CMD" /dev/null
+
+    CMD="ls -alR $PVFS2_TESTDIR"
+    timestamp "Running ls -alR $PVFS2_TESTDIR" "$CMD" /dev/null
+
+    remove_testdir $PVFS2_TESTDIR
+
+    echo ""
+    echo "******************************************"
+    echo "* PASSED DIRECTORY TEST 2"
+    echo "******************************************"
+    return 0
+}
+
+# create 100 nested subdirectories
+# ls -alR the top-level dir
+# rm -rf the dir
+directory_test3()
+{
+    echo ""
+    echo "******************************************"
+    echo "* RUNNING DIRECTORY TEST 3"
+    echo "******************************************"
+
+    setup_testdir $PVFS2_TESTDIR
+
+    old_dir=`pwd`
+    cd $PVFS2_TESTDIR
+    mkdir $PVFS2_TESTDIR/100
+
+    DATE=`date`
+    echo "$DATE: Creating 100 nested subdirectories"
+
+    # no error checking inside the loop as we're playing
+    # a shell trick in there to get the nesting right
+    echo "100" ;
+    for f in `seq 1 100`; do
+        mkdir $_/$f
+    done
+
+    # now make sure all dirs exist
+    NUMDIRS=`find . | grep -c .`
+    if test $NUMDIRS -ne 102 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED DIRECTORY TEST 3 [stage 1]"
+        echo "******************************************"
+        return 1
+    fi
+
+    DATE=`date`
+    echo "$DATE: Finished"
+
+    CMD="ls -alR $PVFS2_TESTDIR/100"
+    timestamp "Running ls -alR $PVFS2_TESTDIR/100" "$CMD" /dev/null
+
+    cd $old_dir
+
+    remove_testdir $PVFS2_TESTDIR
+
+    echo ""
+    echo "******************************************"
+    echo "* PASSED DIRECTORY TEST 3"
+    echo "******************************************"
+    return 0
+}
+
+# create 50 nested subdirectories
+# touch 1 file in each of the directories
+# ls -alR the top-level dir
+# rm -rf the dir
+directory_test4()
+{
+    echo ""
+    echo "******************************************"
+    echo "* RUNNING DIRECTORY TEST 4"
+    echo "******************************************"
+
+    setup_testdir $PVFS2_TESTDIR
+
+    old_dir=`pwd`
+    cd $PVFS2_TESTDIR
+    mkdir $PVFS2_TESTDIR/100
+
+    DATE=`date`
+    echo "$DATE: Creating 50 nested subdirectories"
+
+    # no error checking inside the loop as we're playing
+    # a shell trick in there to get the nesting right
+    echo "100" ;
+    for f in `seq 1 50`; do
+        mkdir $_/$f
+    done
+
+    # now make sure all dirs exist
+    NUMDIRS=`find . | grep -c .`
+    if test $NUMDIRS -ne 52 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED DIRECTORY TEST 4 [stage 1]"
+        echo "******************************************"
+        return 1
+    fi
+
+    DATE=`date`
+    echo "$DATE: Creating files in all nested subdirectories"
+    for f in `find .`; do
+        touch $f/TESTFILE
+
+        if test $? -ne 0 ; then
+            echo ""
+            echo "******************************************"
+            echo "* FAILED DIRECTORY TEST 4 [stage 2]"
+            echo "******************************************"
+            return 1
+        fi
+    done
+
+    DATE=`date`
+    echo "$DATE: Finished"
+
+    CMD="ls -alR $PVFS2_TESTDIR/100"
+    timestamp "Running ls -alR $PVFS2_TESTDIR/100" "$CMD" /dev/null
+
+    cd $old_dir
+
+    remove_testdir $PVFS2_TESTDIR
+
+    echo ""
+    echo "******************************************"
+    echo "* PASSED DIRECTORY TEST 4"
+    echo "******************************************"
+    return 0
+}
+
+# create 256 nested subdirectories
+# ls -alR the top-level dir
+# rm -rf the dir
+directory_test5()
+{
+    echo ""
+    echo "******************************************"
+    echo "* RUNNING DIRECTORY TEST 5"
+    echo "******************************************"
+
+    setup_testdir $PVFS2_TESTDIR
+
+    old_dir=`pwd`
+    cd $PVFS2_TESTDIR
+    mkdir $PVFS2_TESTDIR/256
+
+    DATE=`date`
+    echo "$DATE: Creating 256 nested subdirectories"
+
+    # no error checking inside the loop as we're playing
+    # a shell trick in there to get the nesting right
+    echo "256" ;
+    for f in `seq 1 256`; do
+        mkdir $_/testdir.$f
+    done
+
+    # now make sure all dirs exist
+    NUMDIRS=`find . | grep -c .`
+    if test $NUMDIRS -ne 258 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED DIRECTORY TEST 5 [stage 1]"
+        echo "******************************************"
+        return 1
+    fi
+
+    DATE=`date`
+    echo "$DATE: Finished"
+
+    CMD="ls -alR $PVFS2_TESTDIR/256"
+    timestamp "Running ls -alR $PVFS2_TESTDIR/256" "$CMD" /dev/null
+
+    cd $old_dir
+
+    remove_testdir $PVFS2_TESTDIR
+
+    echo ""
+    echo "******************************************"
+    echo "* PASSED DIRECTORY TEST 5"
+    echo "******************************************"
+    return 0
+}
+
+#####################################
+# simple permission test functions
+#####################################
+
+# create a dir
+# create a file in that dir
+# change permissions of that file to each of TEST_PERMISSIONS[] and verify
+# rm -rf the dir
+permission_test1()
+{
+    echo ""
+    echo "******************************************"
+    echo "* RUNNING PERMISSION TEST 1"
+    echo "******************************************"
+
+    setup_testdir $PVFS2_TESTDIR
+
+    TESTFILE=$PVFS2_TESTDIR/perm-testfile
+
+    echo "Creating test file $TESTFILE"
+    touch $TESTFILE
+
+    if ! test -f $TESTFILE; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED PERMISSION TEST 1 [stage 1]"
+        echo "******************************************"
+        return 1
+    fi
+
+    DATE=`date`
+    echo "$DATE: Modifying permissions of test file"
+    for f in $TEST_PERMISSIONS; do
+        echo "Changing permission of test file to $f"
+        chmod $f $TESTFILE
+        check_entry_permissions $TESTFILE $f
+        if test $? -ne 0 ; then
+            echo ""
+            echo "******************************************"
+            echo "* FAILED PERMISSION TEST 1 [stage 2]"
+            echo "******************************************"
+            return 1;
+        fi
+    done
+    DATE=`date`
+    echo "$DATE: Finished"
+
+    echo "Removing testfile"
+    rm -f $TESTFILE
+
+    remove_testdir $PVFS2_TESTDIR
+
+    echo ""
+    echo "******************************************"
+    echo "* PASSED PERMISSION TEST 1"
+    echo "******************************************"
+    return 0
+}
+
+# create a dir
+# create a dir in that dir
+# change permissions of that dir to each of TEST_PERMISSIONS[] and verify
+# rm -rf the dir(s)
+permission_test2()
+{
+    echo ""
+    echo "******************************************"
+    echo "* RUNNING PERMISSION TEST 2"
+    echo "******************************************"
+
+    setup_testdir $PVFS2_TESTDIR
+
+    TESTDIR=$PVFS2_TESTDIR/perm-testdir
+
+    echo "Removing test dir $TESTDIR (if exists)"
+    rm -rf $TESTDIR
+
+    echo "Creating test dir $TESTDIR"
+    mkdir $TESTDIR
+
+    if ! test -d $TESTDIR; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED PERMISSION TEST 2 [stage 1]"
+        echo "******************************************"
+        return 1
+    fi
+
+    DATE=`date`
+    echo "$DATE: Modifying permissions of test dir"
+    for f in $TEST_PERMISSIONS; do
+        echo "Changing permission of test dir to $f"
+        chmod $f $TESTDIR
+        check_entry_permissions $TESTDIR $f
+        if test $? -ne 0 ; then
+            echo ""
+            echo "******************************************"
+            echo "* FAILED PERMISSION TEST 2 [stage 2]"
+            echo "******************************************"
+            return 1;
+        fi
+    done
+    DATE=`date`
+    echo "$DATE: Finished"
+
+    echo "Removing testdir"
+    rm -rf $TESTDIR
+
+
+    remove_testdir $PVFS2_TESTDIR
+
+    echo ""
+    echo "******************************************"
+    echo "* PASSED PERMISSION TEST 2"
+    echo "******************************************"
+    return 0
+}
+
+#####################################
+# simple i/o test functions
+#####################################
+
+# generate a 32MB file full of zeroed data (using dd)
+# cp this file
+# remove the files
+io_test1()
+{
+    echo ""
+    echo "******************************************"
+    echo "* RUNNING I/O TEST 1"
+    echo "******************************************"
+
+    if ! test -c /dev/zero; then
+        echo "Skipping test because /dev/zero does not "
+        echo " exist or is not a character file!"
+        return 1
+    fi
+
+    setup_testdir $PVFS2_TESTDIR
+
+    OUTFILE1="$PVFS2_TESTDIR/zero_data_file1"
+    OUTFILE2="$PVFS2_TESTDIR/zero_data_file2"
+
+    echo "Removing temporary datafiles (if they exist)"
+    rm -rf $OUTFILE1 $OUTFILE2
+
+    CMD="dd if=/dev/zero of=$OUTFILE1 bs=4194304 count=8"
+    timestamp "Generating zeroed 32MB file in 8 4MB blocks" "$CMD"
+    if test $? -ne 0 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED I/O TEST 1 [stage 1]"
+        echo "******************************************"
+        return 1
+    fi
+
+    CMD="cp $OUTFILE1 $OUTFILE2"
+    timestamp "Copying data file" "$CMD"
+    if test $? -ne 0 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED I/O TEST 1 [stage 2]"
+        echo "******************************************"
+        return 1
+    fi
+
+    CMD="rm -rf $OUTFILE1 $OUTFILE2"
+    timestamp "Removing temporary datafiles" "$CMD"
+    if test $? -ne 0 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED I/O TEST 1 [stage 3]"
+        echo "******************************************"
+        return 1
+    fi
+
+    remove_testdir $PVFS2_TESTDIR
+
+    echo ""
+    echo "******************************************"
+    echo "* PASSED I/O TEST 1"
+    echo "******************************************"
+    return 0
+}
+
+# generate a 32MB file full of random data (using dd)
+# cp this file
+# remove the files
+io_test2()
+{
+    echo ""
+    echo "******************************************"
+    echo "* RUNNING I/O TEST 2"
+    echo "******************************************"
+
+    if ! test -c /dev/urandom; then
+        echo "Skipping test because /dev/urandom does not "
+        echo " exist or is not a character file!"
+        return 1
+    fi
+
+    setup_testdir $PVFS2_TESTDIR
+
+    OUTFILE1="$PVFS2_TESTDIR/random_data_file1"
+    OUTFILE2="$PVFS2_TESTDIR/random_data_file2"
+
+    echo "Removing temporary datafiles (if they exist)"
+    rm -rf $OUTFILE1 $OUTFILE2
+
+    CMD="dd if=/dev/urandom of=$OUTFILE1 bs=4194304 count=8"
+    timestamp "Generating random 32MB file in 8 4MB blocks" "$CMD"
+    if test $? -ne 0 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED I/O TEST 2 [stage 1]"
+        echo "******************************************"
+        return 1
+    fi
+
+    CMD="cp $OUTFILE1 $OUTFILE2"
+    timestamp "Copying data file" "$CMD"
+    if test $? -ne 0 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED I/O TEST 2 [stage 2]"
+        echo "******************************************"
+        return 1
+    fi
+
+    CMD="rm -rf $OUTFILE1 $OUTFILE2"
+    timestamp "Removing temporary datafiles" "$CMD"
+    if test $? -ne 0 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED I/O TEST 2 [stage 3]"
+        echo "******************************************"
+        return 1
+    fi
+
+    remove_testdir $PVFS2_TESTDIR
+
+    echo ""
+    echo "******************************************"
+    echo "* PASSED I/O TEST 2"
+    echo "******************************************"
+    return 0
+}
+
+#####################################
+# simple execute test functions
+#####################################
+
+# execute a file on pvfs2 multiple times in parallel
+#
+#   the idea is that one will finish before the other
+#   causing the page cache to be flushed in pvfs2.
+#   this forces the second one still running to re-read
+#   the missing pages, but is an interesting case to test for.
+#   this also could be seen using make -j3 on a pvfs2 volume.
+execute_test1()
+{
+    echo ""
+    echo "******************************************"
+    echo "* RUNNING EXECUTE TEST 1"
+    echo "******************************************"
+
+    setup_testdir $PVFS2_TESTDIR
+
+    PVFS2_LS="$PVFS2_TESTDIR/ls -al $PVFS2_TESTDIR"
+
+    LS=`which ls`
+    if ! test -x $LS; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED EXECUTE TEST 1 [stage 1]"
+        echo "******************************************"
+        return 1
+    fi
+
+    # make sure ls will be running from the pvfs2 volume
+    cp $LS $PVFS2_TESTDIR/ls
+    if test $? -ne 0 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED EXECUTE TEST 1 [stage 2]"
+        echo "******************************************"
+        return 1
+    fi
+
+    # populate the working dir to run the LS command on
+    touch $PVFS2_TESTDIR/a $PVFS2_TESTDIR/b $PVFS2_TESTDIR/c
+    touch $PVFS2_TESTDIR/1 $PVFS2_TESTDIR/2 $PVFS2_TESTDIR/3
+    touch $PVFS2_TESTDIR/d $PVFS2_TESTDIR/e $PVFS2_TESTDIR/f
+    touch $PVFS2_TESTDIR/4 $PVFS2_TESTDIR/5 $PVFS2_TESTDIR/6
+
+#    CMD="eval $PVFS2_LS & $PVFS2_LS & $PVFS2_LS & $PVFS2_LS & $PVFS2_LS"
+    CMD="eval $PVFS2_LS & $PVFS2_LS"
+    timestamp "Running 'ls' multiple times at once" "$CMD" /dev/null
+    if test $? -ne 0 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED EXECUTE TEST 1 [stage 3]"
+        echo "******************************************"
+        return 1
+    fi
+
+    # attempt to be sure the commands have returned before we
+    # continue.  if we don't sleep here, it looks like a serious error
+    # occured because we are listing a directory that we've removed
+    # (below) before the command completes.  the error looks
+    # particularly nasty because the binary the kernel is trying to
+    # re-fetch has also disappeared in that case
+
+    echo "Waiting for 'ls' commands to complete"
+    wait
+
+    remove_testdir $PVFS2_TESTDIR
+
+    echo ""
+    echo "******************************************"
+    echo "* PASSED EXECUTE TEST 1"
+    echo "******************************************"
+    return 0
+}
+
+#####################################
+# simple compilation test functions
+#####################################
+
+# generate a hello world c program
+# run gcc on the file
+# make sure the file exists and is executable
+# execute the program to make sure the output is good
+# remove the source and binary files
+compile_test1()
+{
+    echo ""
+    echo "******************************************"
+    echo "* RUNNING COMPILE TEST 1"
+    echo "******************************************"
+
+    setup_testdir $PVFS2_TESTDIR
+
+    HELLO_WORLD_SOURCE="$PVFS2_TESTDIR/__hello_world.c"
+    HELLO_WORLD_BINARY="$PVFS2_TESTDIR/__hello_world"
+
+    echo "Removing temporary files (if they exist)"
+    rm -rf $HELLO_WORLD_SOURCE $HELLO_WORLD_BINARY
+
+    generate_hello_world_code $HELLO_WORLD_SOURCE
+
+    stat_file "Doing stat on generated source code" $HELLO_WORLD_SOURCE
+
+    DATE=`date`
+    echo "$DATE: Compiling source code"
+
+    OUTPUT=`gcc $HELLO_WORLD_SOURCE -o $HELLO_WORLD_BINARY`
+    if ! test "x$OUTPUT" = "x"; then
+        echo "Clean Compilation Failed"
+        echo $OUTPUT
+        echo ""
+        echo "******************************************"
+        echo "* FAILED COMPILE TEST 1 [stage 1]"
+        echo "******************************************"
+        return 1
+    fi
+
+    if ! test -x "$HELLO_WORLD_BINARY"; then
+        echo "Binary file not created!"
+        echo $OUTPUT
+        return 1
+    fi
+
+    DATE=`date`
+    echo "$DATE: Compilation finished"
+
+    stat_file "Doing stat on generated binary" $HELLO_WORLD_BINARY
+    if test $? -ne 0 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED COMPILE TEST 1 [stage 2]"
+        echo "******************************************"
+        return 1
+    fi
+
+    CMD="$HELLO_WORLD_BINARY"
+    timestamp "Executing Hello World Program" $CMD
+    if test $? -ne 0 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED COMPILE TEST 1 [stage 3]"
+        echo "******************************************"
+        return 1
+    fi
+
+    remove_testdir $PVFS2_TESTDIR
+
+    echo ""
+    echo "******************************************"
+    echo "* PASSED COMPILE TEST 1"
+    echo "******************************************"
+    return 0
+}
+
+# generate an mmap read c program
+# run gcc on the file
+# make sure the file exists and is executable
+# generate a 4MB test binary file to mmap read
+# execute the program on the test file to make sure the output is good
+# remove the source, test, and binary files by removing the test dir
+compile_test2()
+{
+    echo ""
+    echo "******************************************"
+    echo "* RUNNING COMPILE TEST 2"
+    echo "******************************************"
+
+    setup_testdir $PVFS2_TESTDIR
+
+    MMAP_READ_SOURCE="$PVFS2_TESTDIR/__mmap_read.c"
+    MMAP_READ_BINARY="$PVFS2_TESTDIR/__mmap_read"
+    MMAP_READ_BINARY_DATA="$PVFS2_TESTDIR/__mmap_read_data"
+
+    echo "Removing temporary files (if they exist)"
+    rm -rf $MMAP_READ_SOURCE $MMAP_READ_BINARY $MMAP_READ_BINARY_DATA
+
+    generate_mmap_read_code $MMAP_READ_SOURCE
+
+    stat_file "Doing stat on generated source code" $MMAP_READ_SOURCE
+    if test $? -ne 0 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED COMPILE TEST 2 [stage 1]"
+        echo "******************************************"
+        return 1
+    fi
+
+    DATE=`date`
+    echo "$DATE: Compiling source code"
+
+    OUTPUT=`gcc $MMAP_READ_SOURCE -o $MMAP_READ_BINARY`
+    if ! test "x$OUTPUT" = "x"; then
+        echo "Clean Compilation Failed"
+        echo $OUTPUT
+        echo ""
+        echo "******************************************"
+        echo "* FAILED COMPILE TEST 2 [stage 2]"
+        echo "******************************************"
+        return 1
+    fi
+
+    if ! test -x "$MMAP_READ_BINARY"; then
+        echo "Binary file not created!"
+        echo $OUTPUT
+        echo ""
+        echo "******************************************"
+        echo "* FAILED COMPILE TEST 2 [stage 3]"
+        echo "******************************************"
+        return 1
+    fi
+
+    DATE=`date`
+    echo "$DATE: Compilation finished"
+
+    stat_file "Doing stat on generated binary" $MMAP_READ_BINARY
+    if test $? -ne 0 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED COMPILE TEST 2 [stage 4]"
+        echo "******************************************"
+        return 1
+    fi
+
+    if ! test -c /dev/urandom; then
+        echo "Skipping test because /dev/urandom does not "
+        echo " exist or is not a character file!"
+        return 1
+    fi
+
+    CMD="dd if=/dev/urandom of=$MMAP_READ_BINARY_DATA bs=4194304 count=1"
+    timestamp "Generating random 4MB file in 1 4MB block" "$CMD"
+    if test $? -ne 0 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED COMPILE TEST 2 [stage 5]"
+        echo "******************************************"
+        return 1
+    fi
+
+    CMD="$MMAP_READ_BINARY $MMAP_READ_BINARY_DATA"
+    timestamp "Executing MMAP Read Program on random data file" "$CMD" /dev/null
+    if test $? -ne 0 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED COMPILE TEST 2 [stage 6]"
+        echo "******************************************"
+        return 1
+    fi
+
+    remove_testdir $PVFS2_TESTDIR
+
+    echo ""
+    echo "******************************************"
+    echo "* PASSED COMPILE TEST 2"
+    echo "******************************************"
+    return 0
+}
+
+#####################################
+# simple symlink test functions
+#####################################
+
+symlink_test1()
+{
+    echo ""
+    echo "******************************************"
+    echo "* RUNNING SYMLINK TEST 1"
+    echo "******************************************"
+
+    setup_testdir $PVFS2_TESTDIR
+
+    # create a test directory tree
+    mkdir $PVFS2_TESTDIR/a
+    mkdir $PVFS2_TESTDIR/a/b
+    mkdir $PVFS2_TESTDIR/a/b/c
+    if test $? -ne 0 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED SYMLINK TEST 1 [stage 1]"
+        echo "******************************************"
+        return 1
+    fi
+
+    # setup a test link environment
+    ln -s $PVFS2_TESTDIR/a/b $PVFS2_TESTDIR/a/b-link1
+    ln -s b $PVFS2_TESTDIR/a/b-link2
+    ln -s $PVFS2_TESTDIR/a/b/c $PVFS2_TESTDIR/c
+    ln -s $PVFS2_TESTDIR/deadlink1 $PVFS2_TESTDIR/deadlink1
+    ln -s deadlink2 $PVFS2_TESTDIR/deadlink2
+
+    # run checks to be sure our links resolve properly
+    RET=`ls $PVFS2_TESTDIR/a/b $PVFS2_TESTDIR/a/b-link1 $PVFS2_TESTDIR/a/b-link2 | grep -c c`
+    if test $? -ne 0 || test $RET -ne 3 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED SYMLINK TEST 1 [stage 2]"
+        echo "******************************************"
+    fi
+
+    RET=`cat $PVFS2_TESTDIR/deadlink1 2>&1 | grep "Too many levels"`
+    if test $? -ne 0 && test "x$RET" != "x" ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED SYMLINK TEST 1 [stage 3]"
+        echo "******************************************"
+    fi
+
+    remove_testdir $PVFS2_TESTDIR
+
+    echo ""
+    echo "******************************************"
+    echo "* PASSED SYMLINK TEST 1"
+    echo "******************************************"
+    return 0
+}
+
+#####################################
+# simple rename test functions
+#####################################
+
+rename_test1()
+{
+    echo ""
+    echo "******************************************"
+    echo "* RUNNING RENAME TEST 1"
+    echo "******************************************"
+
+    setup_testdir $PVFS2_TESTDIR
+
+    # create a test directory tree
+    mkdir $PVFS2_TESTDIR/a
+    mkdir $PVFS2_TESTDIR/a/b
+    mkdir $PVFS2_TESTDIR/a/b/c
+    if test $? -ne 0 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED RENAME TEST 1 [stage 1]"
+        echo "******************************************"
+        return 1
+    fi
+
+    # create some test files
+    touch $PVFS2_TESTDIR/a/file1
+    touch $PVFS2_TESTDIR/a/b/file2
+    touch $PVFS2_TESTDIR/a/b/c/file3
+    if test $? -ne 0 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED RENAME TEST 1 [stage 2]"
+        echo "******************************************"
+        return 1
+    fi
+
+    # dump original tree
+    #ls -alR $PVFS2_TESTDIR
+
+    # do some simple renames and make sure they pass
+    mv $PVFS2_TESTDIR/a/file1 $PVFS2_TESTDIR/a/b/renamed-file1
+    mv $PVFS2_TESTDIR/a/b/file2 $PVFS2_TESTDIR/a/renamed-file2
+    mv $PVFS2_TESTDIR/a/b/c $PVFS2_TESTDIR/a/b/c-renamed-dir
+    if test $? -ne 0 ; then
+        echo ""
+        echo "******************************************"
+        echo "* FAILED RENAME TEST 1 [stage 3]"
+        echo "******************************************"
+    fi
+
+    # dump modified tree
+    #ls -alR $PVFS2_TESTDIR
+
+    remove_testdir $PVFS2_TESTDIR
+
+    echo ""
+    echo "******************************************"
+    echo "* PASSED RENAME TEST 1"
+    echo "******************************************"
+    return 0
+}
+
+#####################################
+# script entry point
+#####################################
+
+ORIG_DIR=`pwd`
+
+if test "x$1" = "x"; then
+    echo "Usage: pvfs2-shell-test.sh </pvfs/mnt/point>"
+    exit 0
+else
+    PVFS2_MNT=$1
+fi
+
+echo "Using PVFS2 Mount Point: $PVFS2_MNT"
+
+PVFS2_TESTDIR=$PVFS2_MNT/__testdir
+
+cd $PVFS2_MNT
+
+if test "x$ORIG_DIR" = "x`pwd`"; then
+    echo "Cannot change directory to $PVFS_MNT"
+    error_exit;
+fi
+
+
+#####################################
+# start running tests here
+#####################################
+
+if ! test -z "$ENABLE_DIRECTORY_TESTS"; then
+
+    directory_test1
+
+    directory_test2
+
+    directory_test3
+
+    directory_test4
+
+    directory_test5
+
+fi
+
+if ! test -z "$ENABLE_IO_TESTS"; then
+
+    io_test1
+
+    io_test2
+
+fi
+
+if ! test -z "$ENABLE_EXECUTE_TESTS"; then
+
+    execute_test1
+
+fi
+
+if ! test -z "$ENABLE_COMPILE_TESTS"; then
+
+    compile_test1
+
+    compile_test2
+
+fi
+
+if ! test -z "$ENABLE_PERMISSION_TESTS"; then
+
+    permission_test1
+
+    permission_test2
+
+fi
+
+if ! test -z "$ENABLE_SYMLINK_TESTS"; then
+
+    symlink_test1
+
+fi
+
+if ! test -z "$ENABLE_RENAME_TESTS"; then
+
+    rename_test1
+
+fi
+
+# if the script hasn't aborted at this point, we've passed everything
+echo ""
+echo "****************************************************"
+echo "* pvfs2-shell-test.sh completed all configured tests"
+echo "****************************************************"
Index: /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/threaded_write.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/threaded_write.c	(revision 5775)
+++ /tags/B2O-Blue-Sync-Temp-End/test/kernel/linux-2.6/threaded_write.c	(revision 5775)
@@ -0,0 +1,125 @@
+/*
+  this test is not for generating a consistent file -- it just tries
+  to do a lot of I/O on the same file
+
+  compile with:
+  gcc threaded_write.c -lpthread -o threaded_write
+
+  run like:
+  ./threaded_write /mnt/pvfs2/testfile 40
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <pthread.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/uio.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#define MAX_NUM_THREADS                  64
+#define DATA_SIZE_PER_THREAD  (1024*1024*8)
+
+typedef struct
+{
+    int fd;
+    int size;
+    int error_code;
+    int index;
+} threaded_write_info_t;
+
+static void *write_file(void *ptr)
+{
+    char *buf = NULL;
+    threaded_write_info_t *info = (threaded_write_info_t *)ptr;
+    struct iovec iov[2];
+
+    sleep(2);
+
+    if (info)
+    {
+        buf = (char *)malloc(info->size);
+        if (buf)
+        {
+            memset(buf, (char)info->index, info->size);
+            memset(&iov, 0, sizeof(struct iovec));
+
+            iov[0].iov_base = buf;
+            iov[0].iov_len = (info->size / 2);
+
+            iov[1].iov_base = buf + iov[0].iov_len;
+            iov[1].iov_len = (info->size / 2);
+
+            fprintf(stderr, "thread %d writing data (%d bytes))\n",
+                    info->index, info->size);
+
+            if (writev(info->fd, iov, 2) == -1)
+            {
+                /* at least *try* to capture the errno */
+                info->error_code = errno;
+            }
+            free(buf);
+        }
+        fprintf(stderr, "thread %d returning\n", info->index);
+    }
+    return NULL;
+}
+
+int main(int argc, char **argv)
+{
+    int fd = 0, i = 0, num_threads = 0;
+    pthread_t threads[MAX_NUM_THREADS];
+    threaded_write_info_t info[MAX_NUM_THREADS];
+
+    if (argc != 3)
+    {
+        fprintf(stderr, "Usage: %s <out_file> <num_threads>\n", argv[0]);
+        return 1;
+    }
+
+    num_threads = atoi(argv[2]);
+    if ((num_threads < 1) || (num_threads > MAX_NUM_THREADS))
+    {
+        fprintf(stderr, "num_threads should be between 1 and %d\n",
+                MAX_NUM_THREADS);
+        return 1;
+    }
+
+    fd = open(argv[1], O_WRONLY|O_CREAT|O_TRUNC, 0666);
+    if (fd == -1)
+    {
+        fprintf(stderr, "Failed to open file %s for writing: %s\n", argv[1],
+		strerror(errno));
+        return 1;
+    }
+
+    for(i = 0; i < num_threads; i++)
+    {
+        memset(&info[i], 0, sizeof(threaded_write_info_t));
+
+        info[i].fd = fd;
+        info[i].size = DATA_SIZE_PER_THREAD;
+        info[i].index = i;
+
+        if (pthread_create(&threads[i], NULL, write_file, (void *)&info[i]))
+        {
+            fprintf(stderr, "Failed to spawn thread %d\n", i);
+            break;
+        }
+    }
+
+    for(i = 0; i < num_threads; i++)
+    {
+        pthread_join(threads[i], NULL);
+        if (info[i].error_code)
+        {
+            fprintf(stderr, "Thread %d failed to write (%x)\n", i,
+                    info[i].error_code);
+        }
+    }
+
+    close(fd);
+    return 0;
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/configure
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/configure	(revision 8317)
+++ /tags/B2O-Blue-Sync-Temp-End/test/configure	(revision 8317)
@@ -0,0 +1,8483 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.61.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+  if (eval ":") 2>/dev/null; then
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+
+  if test $as_have_required = yes && 	 (eval ":
+(as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=\$LINENO
+  as_lineno_2=\$LINENO
+  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+  :
+else
+  as_candidate_shells=
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  case $as_dir in
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	   done;;
+       esac
+done
+IFS=$as_save_IFS
+
+
+      for as_shell in $as_candidate_shells $SHELL; do
+	 # Try only shells that exist, to save several forks.
+	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		{ ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+  CONFIG_SHELL=$as_shell
+	       as_have_required=yes
+	       if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+  (exit $1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+  break
+fi
+
+fi
+
+      done
+
+      if test "x$CONFIG_SHELL" != x; then
+  for as_var in BASH_ENV ENV
+        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+        done
+        export CONFIG_SHELL
+        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+    if test $as_have_required = no; then
+  echo This script requires a shell more modern than all the
+      echo shells that I found on your system.  Please install a
+      echo modern shell, or manually run the script under such a
+      echo shell if you do have one.
+      { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+  echo No shell found that supports shell functions.
+  echo Please tell autoconf@gnu.org about your system,
+  echo including any error possibly output before this
+  echo message
+}
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+    as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+        test -d "$1/.";
+      else
+	case $1 in
+        -*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="correctness/pts/pts.h"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+BUILD_ABSOLUTE_TOP
+SRC_RELATIVE_TOP
+SRC_ABSOLUTE_TOP
+QUIET_COMPILE
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+CC
+CFLAGS
+LDFLAGS
+CPPFLAGS
+ac_ct_CC
+EXEEXT
+OBJEXT
+CPP
+HAVE_PERL
+HAVE_FIND
+HAVE_BISON
+HAVE_FLEX
+GREP
+EGREP
+INTELC
+GNUC
+PVFS2_SRC_RELATIVE_TOP
+PVFS2_BUILD_RELATIVE_TOP
+SERVERLIBS
+PVFS2_TOP_PREFIX
+MPICC
+BUILD_MPI
+MPI_INTELC
+MPI_GNUC
+DB_CFLAGS
+DB_LIB
+LIBOBJS
+LTLIBOBJS'
+ac_subst_files=''
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *)	ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    eval enable_$ac_feature=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    eval enable_$ac_feature=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    eval with_$ac_package=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    eval with_$ac_package=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute directory names.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  { echo "$as_me: error: Working directory cannot be determined" >&2
+   { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  { echo "$as_me: error: pwd does not report name of working directory" >&2
+   { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$0" ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+   { (exit 1); exit 1; }; }
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+			  [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+			  [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR          info documentation [DATAROOTDIR/info]
+  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR           man documentation [DATAROOTDIR/man]
+  --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
+  --htmldir=DIR          html documentation [DOCDIR]
+  --dvidir=DIR           dvi documentation [DOCDIR]
+  --pdfdir=DIR           pdf documentation [DOCDIR]
+  --psdir=DIR            ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-verbose-build  Enables full output during build process
+  --disable-thread-safety Disables thread safety in the client library
+  --enable-strict         Turn on strict debugging with gcc
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-efence=<path>    Use electric fence for malloc debugging.
+  --with-zlib=<path>      Use zlib for checksums.
+  --with-mpi=<dir>        Location of the MPI installation
+  --with-pvfs2-src=<dir>  Location of the PVFS2 src directory
+  --with-pvfs2-build=<dir> Location of the PVFS2 build dir (if different from src dir)
+  --with-db=<dir>         Location of installed DB package (default=/usr)
+  --with-openssl=<dir>  Location of installed openssl package (default=/usr)
+		 	 --without-openssl     Don't build with openssl.
+
+  --with-libaio=<dir>  Location of installed libaio package (default=/usr)
+		 	 --without-libaio     Don't build with libaio.
+
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" || continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.61
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.61.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args '$ac_arg'"
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+  set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+  set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+  set x "$ac_default_prefix/share/config.site" \
+	"$ac_default_prefix/etc/config.site"
+fi
+shift
+for ac_site_file
+do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_config_headers="$ac_config_headers pvfs2-test-config.h"
+
+ac_aux_dir=
+for ac_dir in maint "$srcdir"/maint; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in maint \"$srcdir\"/maint" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in maint \"$srcdir\"/maint" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+
+USR_CFLAGS=$CFLAGS
+if test "x$USR_CFLAGS" = "x"; then
+	USR_CFLAGS_SET=no
+fi
+
+BUILD_ABSOLUTE_TOP=`pwd`
+SRC_RELATIVE_TOP=$srcdir
+SRC_ABSOLUTE_TOP=`cd $srcdir ; pwd`
+
+
+
+
+
+# Check whether --enable-verbose-build was given.
+if test "${enable_verbose_build+set}" = set; then
+  enableval=$enable_verbose_build; QUIET_COMPILE=0
+else
+  QUIET_COMPILE=1
+fi
+
+
+
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	    break 3
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+done
+IFS=$as_save_IFS
+
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+#
+# List of possible output files, starting from the most likely.
+# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
+# only as a last resort.  b.out is created by i960 compilers.
+ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
+#
+# The IRIX 6 linker writes into existing files which may not be
+# executable, retaining their permissions.  Remove them first so a
+# subsequent execution test works.
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
+	break;;
+    * )
+	break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+
+{ echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6; }
+if test -z "$ac_file"; then
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6; }
+
+{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	CFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_c89=$ac_arg
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6; } ;;
+  xno)
+    { echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ echo "$as_me:$LINENO: checking whether cc is gcc" >&5
+echo $ECHO_N "checking whether cc is gcc... $ECHO_C" >&6; }
+if test "x$GCC" = "x"; then
+	{ { echo "$as_me:$LINENO: error: pvfs2 currently requires gcc as the compiler" >&5
+echo "$as_me: error: pvfs2 currently requires gcc as the compiler" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+CFLAGS=$USR_CFLAGS
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+{ echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_HAVE_PERL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$HAVE_PERL"; then
+  ac_cv_prog_HAVE_PERL="$HAVE_PERL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_HAVE_PERL="yes"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_prog_HAVE_PERL" && ac_cv_prog_HAVE_PERL="no"
+fi
+fi
+HAVE_PERL=$ac_cv_prog_HAVE_PERL
+if test -n "$HAVE_PERL"; then
+  { echo "$as_me:$LINENO: result: $HAVE_PERL" >&5
+echo "${ECHO_T}$HAVE_PERL" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "find", so it can be a program name with args.
+set dummy find; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_HAVE_FIND+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$HAVE_FIND"; then
+  ac_cv_prog_HAVE_FIND="$HAVE_FIND" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_HAVE_FIND="yes"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_prog_HAVE_FIND" && ac_cv_prog_HAVE_FIND="no"
+fi
+fi
+HAVE_FIND=$ac_cv_prog_HAVE_FIND
+if test -n "$HAVE_FIND"; then
+  { echo "$as_me:$LINENO: result: $HAVE_FIND" >&5
+echo "${ECHO_T}$HAVE_FIND" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "bison", so it can be a program name with args.
+set dummy bison; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_HAVE_BISON+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$HAVE_BISON"; then
+  ac_cv_prog_HAVE_BISON="$HAVE_BISON" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_HAVE_BISON="yes"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_prog_HAVE_BISON" && ac_cv_prog_HAVE_BISON="no"
+fi
+fi
+HAVE_BISON=$ac_cv_prog_HAVE_BISON
+if test -n "$HAVE_BISON"; then
+  { echo "$as_me:$LINENO: result: $HAVE_BISON" >&5
+echo "${ECHO_T}$HAVE_BISON" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "flex", so it can be a program name with args.
+set dummy flex; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_HAVE_FLEX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$HAVE_FLEX"; then
+  ac_cv_prog_HAVE_FLEX="$HAVE_FLEX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_HAVE_FLEX="yes"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_prog_HAVE_FLEX" && ac_cv_prog_HAVE_FLEX="no"
+fi
+fi
+HAVE_FLEX=$ac_cv_prog_HAVE_FLEX
+if test -n "$HAVE_FLEX"; then
+  { echo "$as_me:$LINENO: result: $HAVE_FLEX" >&5
+echo "${ECHO_T}$HAVE_FLEX" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # Extract the first word of "grep ggrep" to use in msg output
+if test -z "$GREP"; then
+set dummy grep ggrep; ac_prog_name=$2
+if test "${ac_cv_path_GREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_path_GREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in grep ggrep; do
+  for ac_exec_ext in '' $ac_executable_extensions; do
+    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+    # Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+    $ac_path_GREP_found && break 3
+  done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+GREP="$ac_cv_path_GREP"
+if test -z "$GREP"; then
+  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     # Extract the first word of "egrep" to use in msg output
+if test -z "$EGREP"; then
+set dummy egrep; ac_prog_name=$2
+if test "${ac_cv_path_EGREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_path_EGREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in egrep; do
+  for ac_exec_ext in '' $ac_executable_extensions; do
+    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+    # Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+    $ac_path_EGREP_found && break 3
+  done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+EGREP="$ac_cv_path_EGREP"
+if test -z "$EGREP"; then
+  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+
+   fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_header_stdc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_header in openssl/evp.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in openssl/crypto.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in zlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+INTELC=
+GNUC=
+{ echo "$as_me:$LINENO: checking whether cc is an Intel compiler" >&5
+echo $ECHO_N "checking whether cc is an Intel compiler... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifndef __ICC
+       choke me
+#endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    INTELC=1
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+if test x$INTELC = x ; then
+    if test x$GCC = xyes ; then
+	GNUC=1
+    fi
+fi
+
+
+
+
+# Check whether --with-efence was given.
+if test "${with_efence+set}" = set; then
+  withval=$with_efence; if test x$withval != xyes ; then
+		LDFLAGS="${LDFLAGS} -L$withval"
+	fi
+
+{ echo "$as_me:$LINENO: checking for malloc in -lefence" >&5
+echo $ECHO_N "checking for malloc in -lefence... $ECHO_C" >&6; }
+if test "${ac_cv_lib_efence_malloc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lefence  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char malloc ();
+int
+main ()
+{
+return malloc ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_efence_malloc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_efence_malloc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_efence_malloc" >&5
+echo "${ECHO_T}$ac_cv_lib_efence_malloc" >&6; }
+if test $ac_cv_lib_efence_malloc = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBEFENCE 1
+_ACEOF
+
+  LIBS="-lefence $LIBS"
+
+fi
+
+
+fi
+
+
+
+# Check whether --with-zlib was given.
+if test "${with_zlib+set}" = set; then
+  withval=$with_zlib; if test x$withval != xyes ; then
+                LDFLAGS="${LDFLAGS} -L$withval"
+        fi
+
+fi
+
+{ echo "$as_me:$LINENO: checking for adler32 in -lz" >&5
+echo $ECHO_N "checking for adler32 in -lz... $ECHO_C" >&6; }
+if test "${ac_cv_lib_z_adler32+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char adler32 ();
+int
+main ()
+{
+return adler32 ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_z_adler32=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_z_adler32=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_adler32" >&5
+echo "${ECHO_T}$ac_cv_lib_z_adler32" >&6; }
+if test $ac_cv_lib_z_adler32 = yes; then
+
+        LIBS="${LIBS} -lz"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+
+fi
+
+
+
+# Check whether --with-mpi was given.
+if test "${with_mpi+set}" = set; then
+  withval=$with_mpi; if test x$withval = xyes; then
+	{ { echo "$as_me:$LINENO: error: --with-mpi must be given a pathname" >&5
+echo "$as_me: error: --with-mpi must be given a pathname" >&2;}
+   { (exit 1); exit 1; }; }
+    else
+	MPICC="${withval}/bin/mpicc"
+	CFLAGS="${CFLAGS} -I${withval}/include"
+	LDFLAGS="${LDFLAGS} -L${withval}/lib"
+	BUILD_MPI="1"
+    fi
+
+fi
+
+
+# Check whether --enable-thread-safety was given.
+if test "${enable_thread_safety+set}" = set; then
+  enableval=$enable_thread_safety; if test "x$enableval" = "xno" ; then
+    CFLAGS="$CFLAGS -D__GEN_NULL_LOCKING__"
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+else
+     CFLAGS="$CFLAGS -D__GEN_POSIX_LOCKING__"
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+fi
+
+
+PVFS2_SRC_RELATIVE_TOP="${srcdir}/.."
+PVFS2_BUILD_RELATIVE_TOP=".."
+
+
+# Check whether --with-pvfs2-src was given.
+if test "${with_pvfs2_src+set}" = set; then
+  withval=$with_pvfs2_src; if test x$withval = xyes; then
+	{ { echo "$as_me:$LINENO: error: --with-pvfs2-src must be given a pathname" >&5
+echo "$as_me: error: --with-pvfs2-src must be given a pathname" >&2;}
+   { (exit 1); exit 1; }; }
+    else
+	PVFS2_SRC_RELATIVE_TOP="${withval}"
+	PVFS2_BUILD_RELATIVE_TOP="${withval}"
+    fi
+
+fi
+
+
+
+# Check whether --with-pvfs2-build was given.
+if test "${with_pvfs2_build+set}" = set; then
+  withval=$with_pvfs2_build; if test x$withval = xyes; then
+	{ { echo "$as_me:$LINENO: error: --with-pvfs2-build must be given a pathname" >&5
+echo "$as_me: error: --with-pvfs2-build must be given a pathname" >&2;}
+   { (exit 1); exit 1; }; }
+    else
+	PVFS2_BUILD_RELATIVE_TOP="${withval}"
+    fi
+
+fi
+
+
+
+
+# Check whether --enable-strict was given.
+if test "${enable_strict+set}" = set; then
+  enableval=$enable_strict;
+if test "x$USR_CFLAGS_SET" = "xno"; then
+    CFLAGS="$CFLAGS -g -Wall -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wpointer-arith -Wbad-function-cast"
+fi
+
+else
+
+if test "x$USR_CFLAGS_SET" = "xno"; then
+    CFLAGS="$CFLAGS -O2"
+fi
+
+fi
+
+
+LDFLAGS="${LDFLAGS} -L${PVFS2_BUILD_RELATIVE_TOP}/lib"
+CFLAGS="${CFLAGS} -I${PVFS2_SRC_RELATIVE_TOP} -I${PVFS2_SRC_RELATIVE_TOP}/include -I${PVFS2_BUILD_RELATIVE_TOP}"
+CPPFLAGS="${CFLAGS} -I${PVFS2_SRC_RELATIVE_TOP} -I${PVFS2_SRC_RELATIVE_TOP}/include -I${PVFS2_BUILD_RELATIVE_TOP}"
+
+if test "${ac_cv_header_pvfs2_config_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for pvfs2-config.h" >&5
+echo $ECHO_N "checking for pvfs2-config.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_pvfs2_config_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_pvfs2_config_h" >&5
+echo "${ECHO_T}$ac_cv_header_pvfs2_config_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking pvfs2-config.h usability" >&5
+echo $ECHO_N "checking pvfs2-config.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <pvfs2-config.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking pvfs2-config.h presence" >&5
+echo $ECHO_N "checking pvfs2-config.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <pvfs2-config.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: pvfs2-config.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: pvfs2-config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: pvfs2-config.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: pvfs2-config.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: pvfs2-config.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: pvfs2-config.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: pvfs2-config.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: pvfs2-config.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: pvfs2-config.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: pvfs2-config.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: pvfs2-config.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: pvfs2-config.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: pvfs2-config.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: pvfs2-config.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: pvfs2-config.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: pvfs2-config.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for pvfs2-config.h" >&5
+echo $ECHO_N "checking for pvfs2-config.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_pvfs2_config_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_pvfs2_config_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_pvfs2_config_h" >&5
+echo "${ECHO_T}$ac_cv_header_pvfs2_config_h" >&6; }
+
+fi
+if test $ac_cv_header_pvfs2_config_h = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: \"could not find pvfs2-config.h... must specify path to PVFS2 src with --with-pvfs2-src\"" >&5
+echo "$as_me: error: \"could not find pvfs2-config.h... must specify path to PVFS2 src with --with-pvfs2-src\"" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+
+
+LIBS="${LIBS} `/bin/sh ${PVFS2_BUILD_RELATIVE_TOP}/src/apps/admin/pvfs2-config --libs`"
+SERVERLIBS=`/bin/sh ${PVFS2_BUILD_RELATIVE_TOP}/src/apps/admin/pvfs2-config --serverlibs`
+PVFS2_TOP_PREFIX=`/bin/sh ${PVFS2_BUILD_RELATIVE_TOP}/src/apps/admin/pvfs2-config --prefix`
+
+
+
+
+{ echo "$as_me:$LINENO: checking for PVFS_sys_create in -lpvfs2" >&5
+echo $ECHO_N "checking for PVFS_sys_create in -lpvfs2... $ECHO_C" >&6; }
+if test "${ac_cv_lib_pvfs2_PVFS_sys_create+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpvfs2  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char PVFS_sys_create ();
+int
+main ()
+{
+return PVFS_sys_create ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_pvfs2_PVFS_sys_create=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_pvfs2_PVFS_sys_create=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_pvfs2_PVFS_sys_create" >&5
+echo "${ECHO_T}$ac_cv_lib_pvfs2_PVFS_sys_create" >&6; }
+if test $ac_cv_lib_pvfs2_PVFS_sys_create = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPVFS2 1
+_ACEOF
+
+  LIBS="-lpvfs2 $LIBS"
+
+else
+  { { echo "$as_me:$LINENO: error: \"could not find libpvfs2... must specify path to PVFS2 installation or build tree with --with-pvfs2-build\"" >&5
+echo "$as_me: error: \"could not find libpvfs2... must specify path to PVFS2 installation or build tree with --with-pvfs2-build\"" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+
+MPI_INTELC=
+MPI_GNUC=
+if test x$BUILD_MPI = x1; then
+    { echo "$as_me:$LINENO: checking whether the mpicc compiler works" >&5
+echo $ECHO_N "checking whether the mpicc compiler works... $ECHO_C" >&6; }
+    saveCC="$CC"
+    CC="$MPICC"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <mpi.h>
+int
+main ()
+{
+int ret = MPI_Init(0, (void*)0)
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+	{ { echo "$as_me:$LINENO: error: $CC doesn't appear to be a valid MPI compiler" >&5
+echo "$as_me: error: $CC doesn't appear to be a valid MPI compiler" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+            { echo "$as_me:$LINENO: checking whether mpicc is an Intel compiler" >&5
+echo $ECHO_N "checking whether mpicc is an Intel compiler... $ECHO_C" >&6; }
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+    #ifndef __ICC
+	   choke me
+    #endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	MPI_INTELC=1
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    if test x$MPI_INTELC = x; then
+	{ echo "$as_me:$LINENO: checking whether mpicc is a GNU compiler" >&5
+echo $ECHO_N "checking whether mpicc is a GNU compiler... $ECHO_C" >&6; }
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+	#ifndef __GNUC__
+	       choke me
+	#endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	    MPI_GNUC=1
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    CC="$saveCC"
+
+
+fi
+
+
+
+
+# Check whether --with-db was given.
+if test "${with_db+set}" = set; then
+  withval=$with_db;
+    dbpath=${withval}
+
+    DB_LDFLAGS=
+                        { echo "$as_me:$LINENO: checking for db library" >&5
+echo $ECHO_N "checking for db library... $ECHO_C" >&6; }
+    oldlibs=$LIBS
+    lib=notfound
+
+    if test "x$dbpath" != "x" ; then
+	oldcflags=$CFLAGS
+	for dbheader in db4 db3 notfound; do
+		cat >conftest.$ac_ext <<_ACEOF
+#include "$dbpath/include/$dbheader/db.h"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  DB_CFLAGS="-I$dbpath/include/$dbheader/"
+			 break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+	done
+
+	if test "x$dbheader" = "xnotfound"; then
+		cat >conftest.$ac_ext <<_ACEOF
+#include "$dbpath/include/db.h"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  DB_CFLAGS="-I$dbpath/include/"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ { echo "$as_me:$LINENO: error: Invalid libdb path specified. No db.h found.
+See \`config.log' for more details." >&5
+echo "$as_me: error: Invalid libdb path specified. No db.h found.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+	fi
+
+        DB_LDFLAGS="-L${dbpath}/lib"
+	LDFLAGS="$DB_LDFLAGS ${LDFLAGS}"
+
+	LIBS="${oldlibs} -ldb -lpthread"
+	DB_LIB="-ldb"
+	CFLAGS="$DB_CFLAGS $oldcflags"
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <db.h>
+int
+main ()
+{
+DB *dbp; db_create(&dbp, NULL, 0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  lib=db
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+	CFLAGS=$oldcflags
+
+    else
+        for lib in db4  db3  db  notfound; do
+           LIBS="${oldlibs} -l$lib -lpthread"
+           DB_LIB="-l$lib"
+           cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <db.h>
+int
+main ()
+{
+DB *dbp; db_create(&dbp, NULL, 0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+        done
+    fi
+
+        LIBS=$oldlibs
+    if test "x$lib" = "xnotfound" ; then
+           { { echo "$as_me:$LINENO: error: could not find DB libraries" >&5
+echo "$as_me: error: could not find DB libraries" >&2;}
+   { (exit 1); exit 1; }; }
+    else
+           { echo "$as_me:$LINENO: result: $lib" >&5
+echo "${ECHO_T}$lib" >&6; }
+    fi
+
+
+
+
+                { echo "$as_me:$LINENO: checking for dbenv parameter to DB error callback function" >&5
+echo $ECHO_N "checking for dbenv parameter to DB error callback function... $ECHO_C" >&6; }
+    oldcflags=$CFLAGS
+    CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+    #include <db.h>
+
+    void error_callback_fn(const DB_ENV *dbenv,
+                           const char *prefix,
+                           const char *message)
+    {
+        return;
+    }
+
+int
+main ()
+{
+
+    DB *db;
+
+    db->set_errcall(db, error_callback_fn);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DBENV_PARAMETER_TO_DB_ERROR_CALLBACK 1
+_ACEOF
+
+    have_dbenv_parameter_to_db_error_callback=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    have_dbenv_parameter_to_db_error_callback=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+    if test "x$have_dbenv_parameter_to_db_error_callback" = "xyes" ; then
+                                { echo "$as_me:$LINENO: checking if third parameter to error callback function is const" >&5
+echo $ECHO_N "checking if third parameter to error callback function is const... $ECHO_C" >&6; }
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+        #include <db.h>
+
+        void error_callback_fn(const DB_ENV *dbenv,
+                               const char *prefix,
+                               char *message)
+        {
+            return;
+        }
+
+int
+main ()
+{
+
+        DB *db;
+
+        db->set_errcall(db, error_callback_fn);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CONST_THIRD_PARAMETER_TO_DB_ERROR_CALLBACK 1
+_ACEOF
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+
+    CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror"
+                            { echo "$as_me:$LINENO: checking for DB stat with malloc function ptr" >&5
+echo $ECHO_N "checking for DB stat with malloc function ptr... $ECHO_C" >&6; }
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+      #include <db.h>
+      #include <stdlib.h>
+
+int
+main ()
+{
+
+      int ret = 0;
+      DB *db = db;
+      int dummy = 0;
+      u_int32_t flags = 0;
+
+      ret = db->stat(db, &dummy, malloc, flags);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_UNKNOWN_PARAMETER_TO_DB_STAT 1
+_ACEOF
+
+    have_db_stat_malloc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    have_db_stat_malloc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+        if test "x$have_db_stat_malloc" = "xno" ; then
+
+       { echo "$as_me:$LINENO: checking for txnid parameter to DB stat function" >&5
+echo $ECHO_N "checking for txnid parameter to DB stat function... $ECHO_C" >&6; }
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+       #include <db.h>
+
+int
+main ()
+{
+
+       int ret = 0;
+       DB *db = db;
+       DB_TXN *txnid = txnid;
+       u_int32_t flags = 0;
+
+        ret = db->stat(db, txnid, NULL, flags);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TXNID_PARAMETER_TO_DB_STAT 1
+_ACEOF
+
+        have_txnid_param_to_stat=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+        have_txnid_param_to_stat=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+    fi
+
+        { echo "$as_me:$LINENO: checking for txnid parameter to DB open function" >&5
+echo $ECHO_N "checking for txnid parameter to DB open function... $ECHO_C" >&6; }
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+    #include <db.h>
+
+int
+main ()
+{
+
+    int ret = 0;
+    DB *db = NULL;
+    DB_TXN *txnid = NULL;
+    char *file = NULL;
+    char *database = NULL;
+    DBTYPE type = 0;
+    u_int32_t flags = 0;
+    int mode = 0;
+
+    ret = db->open(db, txnid, file, database, type, flags, mode);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TXNID_PARAMETER_TO_DB_OPEN 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+        { echo "$as_me:$LINENO: checking for DB_DIRTY_READ flag" >&5
+echo $ECHO_N "checking for DB_DIRTY_READ flag... $ECHO_C" >&6; }
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+    #include <db.h>
+
+int
+main ()
+{
+
+    u_int32_t flags = DB_DIRTY_READ;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DB_DIRTY_READ 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+        { echo "$as_me:$LINENO: checking for DB_BUFFER_SMALL error" >&5
+echo $ECHO_N "checking for DB_BUFFER_SMALL error... $ECHO_C" >&6; }
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+    #include <db.h>
+
+int
+main ()
+{
+
+    int res = DB_BUFFER_SMALL;
+    res++;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DB_BUFFER_SMALL 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+        { echo "$as_me:$LINENO: checking for berkeley db get_pagesize function" >&5
+echo $ECHO_N "checking for berkeley db get_pagesize function... $ECHO_C" >&6; }
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+    #include <db.h>
+
+int
+main ()
+{
+
+    int ret = 0;
+    DB *db = NULL;
+    int pagesize;
+
+    ret = db->get_pagesize(db, &pagesize);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DB_GET_PAGESIZE 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+    CFLAGS="$oldcflags"
+
+else
+
+    dbpath=""
+
+    DB_LDFLAGS=
+                        { echo "$as_me:$LINENO: checking for db library" >&5
+echo $ECHO_N "checking for db library... $ECHO_C" >&6; }
+    oldlibs=$LIBS
+    lib=notfound
+
+    if test "x$dbpath" != "x" ; then
+	oldcflags=$CFLAGS
+	for dbheader in db4 db3 notfound; do
+		cat >conftest.$ac_ext <<_ACEOF
+#include "$dbpath/include/$dbheader/db.h"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  DB_CFLAGS="-I$dbpath/include/$dbheader/"
+			 break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+	done
+
+	if test "x$dbheader" = "xnotfound"; then
+		cat >conftest.$ac_ext <<_ACEOF
+#include "$dbpath/include/db.h"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  DB_CFLAGS="-I$dbpath/include/"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ { echo "$as_me:$LINENO: error: Invalid libdb path specified. No db.h found.
+See \`config.log' for more details." >&5
+echo "$as_me: error: Invalid libdb path specified. No db.h found.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+	fi
+
+        DB_LDFLAGS="-L${dbpath}/lib"
+	LDFLAGS="$DB_LDFLAGS ${LDFLAGS}"
+
+	LIBS="${oldlibs} -ldb -lpthread"
+	DB_LIB="-ldb"
+	CFLAGS="$DB_CFLAGS $oldcflags"
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <db.h>
+int
+main ()
+{
+DB *dbp; db_create(&dbp, NULL, 0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  lib=db
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+	CFLAGS=$oldcflags
+
+    else
+        for lib in db4  db3  db  notfound; do
+           LIBS="${oldlibs} -l$lib -lpthread"
+           DB_LIB="-l$lib"
+           cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <db.h>
+int
+main ()
+{
+DB *dbp; db_create(&dbp, NULL, 0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+        done
+    fi
+
+        LIBS=$oldlibs
+    if test "x$lib" = "xnotfound" ; then
+           { { echo "$as_me:$LINENO: error: could not find DB libraries" >&5
+echo "$as_me: error: could not find DB libraries" >&2;}
+   { (exit 1); exit 1; }; }
+    else
+           { echo "$as_me:$LINENO: result: $lib" >&5
+echo "${ECHO_T}$lib" >&6; }
+    fi
+
+
+
+
+                { echo "$as_me:$LINENO: checking for dbenv parameter to DB error callback function" >&5
+echo $ECHO_N "checking for dbenv parameter to DB error callback function... $ECHO_C" >&6; }
+    oldcflags=$CFLAGS
+    CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+    #include <db.h>
+
+    void error_callback_fn(const DB_ENV *dbenv,
+                           const char *prefix,
+                           const char *message)
+    {
+        return;
+    }
+
+int
+main ()
+{
+
+    DB *db;
+
+    db->set_errcall(db, error_callback_fn);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DBENV_PARAMETER_TO_DB_ERROR_CALLBACK 1
+_ACEOF
+
+    have_dbenv_parameter_to_db_error_callback=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    have_dbenv_parameter_to_db_error_callback=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+    if test "x$have_dbenv_parameter_to_db_error_callback" = "xyes" ; then
+                                { echo "$as_me:$LINENO: checking if third parameter to error callback function is const" >&5
+echo $ECHO_N "checking if third parameter to error callback function is const... $ECHO_C" >&6; }
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+        #include <db.h>
+
+        void error_callback_fn(const DB_ENV *dbenv,
+                               const char *prefix,
+                               char *message)
+        {
+            return;
+        }
+
+int
+main ()
+{
+
+        DB *db;
+
+        db->set_errcall(db, error_callback_fn);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CONST_THIRD_PARAMETER_TO_DB_ERROR_CALLBACK 1
+_ACEOF
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+
+    CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror"
+                            { echo "$as_me:$LINENO: checking for DB stat with malloc function ptr" >&5
+echo $ECHO_N "checking for DB stat with malloc function ptr... $ECHO_C" >&6; }
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+      #include <db.h>
+      #include <stdlib.h>
+
+int
+main ()
+{
+
+      int ret = 0;
+      DB *db = db;
+      int dummy = 0;
+      u_int32_t flags = 0;
+
+      ret = db->stat(db, &dummy, malloc, flags);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_UNKNOWN_PARAMETER_TO_DB_STAT 1
+_ACEOF
+
+    have_db_stat_malloc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    have_db_stat_malloc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+        if test "x$have_db_stat_malloc" = "xno" ; then
+
+       { echo "$as_me:$LINENO: checking for txnid parameter to DB stat function" >&5
+echo $ECHO_N "checking for txnid parameter to DB stat function... $ECHO_C" >&6; }
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+       #include <db.h>
+
+int
+main ()
+{
+
+       int ret = 0;
+       DB *db = db;
+       DB_TXN *txnid = txnid;
+       u_int32_t flags = 0;
+
+        ret = db->stat(db, txnid, NULL, flags);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TXNID_PARAMETER_TO_DB_STAT 1
+_ACEOF
+
+        have_txnid_param_to_stat=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+        have_txnid_param_to_stat=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+    fi
+
+        { echo "$as_me:$LINENO: checking for txnid parameter to DB open function" >&5
+echo $ECHO_N "checking for txnid parameter to DB open function... $ECHO_C" >&6; }
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+    #include <db.h>
+
+int
+main ()
+{
+
+    int ret = 0;
+    DB *db = NULL;
+    DB_TXN *txnid = NULL;
+    char *file = NULL;
+    char *database = NULL;
+    DBTYPE type = 0;
+    u_int32_t flags = 0;
+    int mode = 0;
+
+    ret = db->open(db, txnid, file, database, type, flags, mode);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TXNID_PARAMETER_TO_DB_OPEN 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+        { echo "$as_me:$LINENO: checking for DB_DIRTY_READ flag" >&5
+echo $ECHO_N "checking for DB_DIRTY_READ flag... $ECHO_C" >&6; }
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+    #include <db.h>
+
+int
+main ()
+{
+
+    u_int32_t flags = DB_DIRTY_READ;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DB_DIRTY_READ 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+        { echo "$as_me:$LINENO: checking for DB_BUFFER_SMALL error" >&5
+echo $ECHO_N "checking for DB_BUFFER_SMALL error... $ECHO_C" >&6; }
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+    #include <db.h>
+
+int
+main ()
+{
+
+    int res = DB_BUFFER_SMALL;
+    res++;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DB_BUFFER_SMALL 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+        { echo "$as_me:$LINENO: checking for berkeley db get_pagesize function" >&5
+echo $ECHO_N "checking for berkeley db get_pagesize function... $ECHO_C" >&6; }
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+    #include <db.h>
+
+int
+main ()
+{
+
+    int ret = 0;
+    DB *db = NULL;
+    int pagesize;
+
+    ret = db->get_pagesize(db, &pagesize);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DB_GET_PAGESIZE 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+    CFLAGS="$oldcflags"
+
+fi
+
+
+
+# Check whether --with-openssl was given.
+if test "${with_openssl+set}" = set; then
+  withval=$with_openssl;
+    opensslpath=${withval}
+
+    if test "x${withval}" != "xno"; then
+
+        { echo "$as_me:$LINENO: checking for openssl library" >&5
+echo $ECHO_N "checking for openssl library... $ECHO_C" >&6; }
+
+        if test "x${opensslpath}" != "x"; then
+            CFLAGS="${CFLAGS} -I${opensslpath}/include"
+            LDFLAGS="$LDFLAGS -L${opensslpath}/lib64 -L${opensslpath}/lib"
+            SERVER_LDFLAGS="$SERVER_LDFLAGS -L${opensslpath}/lib64 -L${opensslpath}/lib"
+        fi
+        LIBS="$LIBS -lcrypto -lssl"
+
+        cat >conftest.$ac_ext <<_ACEOF
+#include "openssl/bio.h"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ { echo "$as_me:$LINENO: error: Invalid openssl path specified.  No openssl/bio.h found." >&5
+echo "$as_me: error: Invalid openssl path specified.  No openssl/bio.h found." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include "openssl/bio.h"
+int
+main ()
+{
+BIO * b;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ { echo "$as_me:$LINENO: error: could not find openssl libs" >&5
+echo "$as_me: error: could not find openssl libs" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+
+cat >>confdefs.h <<\_ACEOF
+#define WITH_OPENSSL 1
+_ACEOF
+
+
+
+for ac_header in openssl/evp.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in openssl/crypto.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+    fi
+
+else
+
+    { echo "$as_me:$LINENO: checking for openssl library" >&5
+echo $ECHO_N "checking for openssl library... $ECHO_C" >&6; }
+    TMPLIBS=${LIBS}
+    LIBS="$LIBS -lcrypto -lssl"
+
+    cat >conftest.$ac_ext <<_ACEOF
+#include "openssl/bio.h"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: WARNING: No openssl headers found." >&5
+echo "$as_me: WARNING: No openssl headers found." >&2;}
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include "openssl/bio.h"
+int
+main ()
+{
+BIO * b;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define WITH_OPENSSL 1
+_ACEOF
+
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+      	{ echo "$as_me:$LINENO: WARNING: No openssl headers found." >&5
+echo "$as_me: WARNING: No openssl headers found." >&2;}
+	LIBS=${TMPLIBS}
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+
+for ac_header in openssl/evp.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in openssl/crypto.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+fi
+
+
+
+# Check whether --with-libaio was given.
+if test "${with_libaio+set}" = set; then
+  withval=$with_libaio;
+    libaiopath=${withval}
+
+    if test "x${withval}" != "xno"; then
+
+        { echo "$as_me:$LINENO: checking for libaio library" >&5
+echo $ECHO_N "checking for libaio library... $ECHO_C" >&6; }
+
+        if test "x${libaiopath}" != "x"; then
+            CFLAGS="${CFLAGS} -I${libaiopath}/include"
+            LDFLAGS="$LDFLAGS -L${libaiopath}/lib64 -L${libaiopath}/lib"
+            SERVER_LDFLAGS="$SERVER_LDFLAGS -L${libaiopath}/lib64 -L${libaiopath}/lib"
+        fi
+        LIBS="$LIBS -laio"
+
+        cat >conftest.$ac_ext <<_ACEOF
+#include "libaio.h"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ { echo "$as_me:$LINENO: error: Invalid libaio path specified.  No libaio.h found." >&5
+echo "$as_me: error: Invalid libaio path specified.  No libaio.h found." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include "libaio.h"
+int
+main ()
+{
+io_context_t * b;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ { echo "$as_me:$LINENO: error: could not find libaio libs" >&5
+echo "$as_me: error: could not find libaio libs" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+
+cat >>confdefs.h <<\_ACEOF
+#define WITH_AIO 1
+_ACEOF
+
+
+
+for ac_header in libaio.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+    fi
+
+else
+
+    { echo "$as_me:$LINENO: checking for libaio library" >&5
+echo $ECHO_N "checking for libaio library... $ECHO_C" >&6; }
+    TMPLIBS=${LIBS}
+    LIBS="$LIBS -laio"
+
+    cat >conftest.$ac_ext <<_ACEOF
+#include "libaio.h"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: WARNING: No libaio headers found." >&5
+echo "$as_me: WARNING: No libaio headers found." >&2;}
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include "libaio.h"
+int
+main ()
+{
+io_context_t * b;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define WITH_AIO 1
+_ACEOF
+
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+      	{ echo "$as_me:$LINENO: WARNING: No libaio headers found." >&5
+echo "$as_me: WARNING: No libaio headers found." >&2;}
+	LIBS=${TMPLIBS}
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+
+for ac_header in libaio.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+fi
+
+
+for d in common io client correctness/pts kernel ; do
+	install -d $d;
+done
+
+ac_config_files="$ac_config_files Makefile io/trove/module.mk io/buffer/module.mk common/quicklist/module.mk common/id-generator/module.mk common/gossip/module.mk common/gen-locks/module.mk common/misc/module.mk io/bmi/module.mk io/description/module.mk io/flow/module.mk io/job/module.mk io/dev/module.mk client/sysint/module.mk client/mpi-io/module.mk client/vfs/module.mk proto/module.mk server/module.mk server/request-scheduler/module.mk correctness/pts/module.mk correctness/module.mk common/pav/configfile.sample kernel/linux-2.6/module.mk maint/mpi-depend.sh shared/module.mk perfbase/benchmarks/module.mk posix/module.mk"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+    as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+        test -d "$1/.";
+      else
+	case $1 in
+        -*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.61.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+		   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Report bugs to <bug-autoconf@gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.61,
+  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2006 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    echo "$ac_cs_version"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    { echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  CONFIG_SHELL=$SHELL
+  export CONFIG_SHELL
+  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "pvfs2-test-config.h") CONFIG_HEADERS="$CONFIG_HEADERS pvfs2-test-config.h" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "io/trove/module.mk") CONFIG_FILES="$CONFIG_FILES io/trove/module.mk" ;;
+    "io/buffer/module.mk") CONFIG_FILES="$CONFIG_FILES io/buffer/module.mk" ;;
+    "common/quicklist/module.mk") CONFIG_FILES="$CONFIG_FILES common/quicklist/module.mk" ;;
+    "common/id-generator/module.mk") CONFIG_FILES="$CONFIG_FILES common/id-generator/module.mk" ;;
+    "common/gossip/module.mk") CONFIG_FILES="$CONFIG_FILES common/gossip/module.mk" ;;
+    "common/gen-locks/module.mk") CONFIG_FILES="$CONFIG_FILES common/gen-locks/module.mk" ;;
+    "common/misc/module.mk") CONFIG_FILES="$CONFIG_FILES common/misc/module.mk" ;;
+    "io/bmi/module.mk") CONFIG_FILES="$CONFIG_FILES io/bmi/module.mk" ;;
+    "io/description/module.mk") CONFIG_FILES="$CONFIG_FILES io/description/module.mk" ;;
+    "io/flow/module.mk") CONFIG_FILES="$CONFIG_FILES io/flow/module.mk" ;;
+    "io/job/module.mk") CONFIG_FILES="$CONFIG_FILES io/job/module.mk" ;;
+    "io/dev/module.mk") CONFIG_FILES="$CONFIG_FILES io/dev/module.mk" ;;
+    "client/sysint/module.mk") CONFIG_FILES="$CONFIG_FILES client/sysint/module.mk" ;;
+    "client/mpi-io/module.mk") CONFIG_FILES="$CONFIG_FILES client/mpi-io/module.mk" ;;
+    "client/vfs/module.mk") CONFIG_FILES="$CONFIG_FILES client/vfs/module.mk" ;;
+    "proto/module.mk") CONFIG_FILES="$CONFIG_FILES proto/module.mk" ;;
+    "server/module.mk") CONFIG_FILES="$CONFIG_FILES server/module.mk" ;;
+    "server/request-scheduler/module.mk") CONFIG_FILES="$CONFIG_FILES server/request-scheduler/module.mk" ;;
+    "correctness/pts/module.mk") CONFIG_FILES="$CONFIG_FILES correctness/pts/module.mk" ;;
+    "correctness/module.mk") CONFIG_FILES="$CONFIG_FILES correctness/module.mk" ;;
+    "common/pav/configfile.sample") CONFIG_FILES="$CONFIG_FILES common/pav/configfile.sample" ;;
+    "kernel/linux-2.6/module.mk") CONFIG_FILES="$CONFIG_FILES kernel/linux-2.6/module.mk" ;;
+    "maint/mpi-depend.sh") CONFIG_FILES="$CONFIG_FILES maint/mpi-depend.sh" ;;
+    "shared/module.mk") CONFIG_FILES="$CONFIG_FILES shared/module.mk" ;;
+    "perfbase/benchmarks/module.mk") CONFIG_FILES="$CONFIG_FILES perfbase/benchmarks/module.mk" ;;
+    "posix/module.mk") CONFIG_FILES="$CONFIG_FILES posix/module.mk" ;;
+
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+#
+# Set up the sed scripts for CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+
+_ACEOF
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+BUILD_ABSOLUTE_TOP!$BUILD_ABSOLUTE_TOP$ac_delim
+SRC_RELATIVE_TOP!$SRC_RELATIVE_TOP$ac_delim
+SRC_ABSOLUTE_TOP!$SRC_ABSOLUTE_TOP$ac_delim
+QUIET_COMPILE!$QUIET_COMPILE$ac_delim
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+INSTALL_DATA!$INSTALL_DATA$ac_delim
+CC!$CC$ac_delim
+CFLAGS!$CFLAGS$ac_delim
+LDFLAGS!$LDFLAGS$ac_delim
+CPPFLAGS!$CPPFLAGS$ac_delim
+ac_ct_CC!$ac_ct_CC$ac_delim
+EXEEXT!$EXEEXT$ac_delim
+OBJEXT!$OBJEXT$ac_delim
+CPP!$CPP$ac_delim
+HAVE_PERL!$HAVE_PERL$ac_delim
+HAVE_FIND!$HAVE_FIND$ac_delim
+HAVE_BISON!$HAVE_BISON$ac_delim
+HAVE_FLEX!$HAVE_FLEX$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$ac_delim
+INTELC!$INTELC$ac_delim
+GNUC!$GNUC$ac_delim
+PVFS2_SRC_RELATIVE_TOP!$PVFS2_SRC_RELATIVE_TOP$ac_delim
+PVFS2_BUILD_RELATIVE_TOP!$PVFS2_BUILD_RELATIVE_TOP$ac_delim
+SERVERLIBS!$SERVERLIBS$ac_delim
+PVFS2_TOP_PREFIX!$PVFS2_TOP_PREFIX$ac_delim
+MPICC!$MPICC$ac_delim
+BUILD_MPI!$BUILD_MPI$ac_delim
+MPI_INTELC!$MPI_INTELC$ac_delim
+MPI_GNUC!$MPI_GNUC$ac_delim
+DB_CFLAGS!$DB_CFLAGS$ac_delim
+DB_LIB!$DB_LIB$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 72; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[	 ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+   { (exit 1); exit 1; }; };;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+   { (exit 1); exit 1; }; };;
+      esac
+      ac_file_inputs="$ac_file_inputs $ac_f"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input="Generated from "`IFS=:
+	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    fi
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin";;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  { as_dir="$ac_dir"
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+case `sed -n '/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+    s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&2;}
+
+  rm -f "$tmp/stdin"
+  case $ac_file in
+  -) cat "$tmp/out"; rm -f "$tmp/out";;
+  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+  esac
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+_ACEOF
+
+# Transform confdefs.h into a sed script `conftest.defines', that
+# substitutes the proper values into config.h.in to produce config.h.
+rm -f conftest.defines conftest.tail
+# First, append a space to every undef/define line, to ease matching.
+echo 's/$/ /' >conftest.defines
+# Then, protect against being on the right side of a sed subst, or in
+# an unquoted here document, in config.status.  If some macros were
+# called several times there might be several #defines for the same
+# symbol, which is useless.  But do not sort them, since the last
+# AC_DEFINE must be honored.
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
+# NAME is the cpp macro being defined, VALUE is the value it is being given.
+# PARAMS is the parameter list in the macro definition--in most cases, it's
+# just an empty string.
+ac_dA='s,^\\([	 #]*\\)[^	 ]*\\([	 ]*'
+ac_dB='\\)[	 (].*,\\1define\\2'
+ac_dC=' '
+ac_dD=' ,'
+
+uniq confdefs.h |
+  sed -n '
+	t rset
+	:rset
+	s/^[	 ]*#[	 ]*define[	 ][	 ]*//
+	t ok
+	d
+	:ok
+	s/[\\&,]/\\&/g
+	s/^\('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
+	s/^\('"$ac_word_re"'\)[	 ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
+  ' >>conftest.defines
+
+# Remove the space that was appended to ease matching.
+# Then replace #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+# (The regexp can be short, since the line contains either #define or #undef.)
+echo 's/ $//
+s,^[	 #]*u.*,/* & */,' >>conftest.defines
+
+# Break up conftest.defines:
+ac_max_sed_lines=50
+
+# First sed command is:	 sed -f defines.sed $ac_file_inputs >"$tmp/out1"
+# Second one is:	 sed -f defines.sed "$tmp/out1" >"$tmp/out2"
+# Third one will be:	 sed -f defines.sed "$tmp/out2" >"$tmp/out1"
+# et cetera.
+ac_in='$ac_file_inputs'
+ac_out='"$tmp/out1"'
+ac_nxt='"$tmp/out2"'
+
+while :
+do
+  # Write a here document:
+    cat >>$CONFIG_STATUS <<_ACEOF
+    # First, check the format of the line:
+    cat >"\$tmp/defines.sed" <<\\CEOF
+/^[	 ]*#[	 ]*undef[	 ][	 ]*$ac_word_re[	 ]*\$/b def
+/^[	 ]*#[	 ]*define[	 ][	 ]*$ac_word_re[(	 ]/b def
+b
+:def
+_ACEOF
+  sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+    sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
+  ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
+  sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
+  grep . conftest.tail >/dev/null || break
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines conftest.tail
+
+echo "ac_result=$ac_in" >>$CONFIG_STATUS
+cat >>$CONFIG_STATUS <<\_ACEOF
+  if test x"$ac_file" != x-; then
+    echo "/* $configure_input  */" >"$tmp/config.h"
+    cat "$ac_result" >>"$tmp/config.h"
+    if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f $ac_file
+      mv "$tmp/config.h" $ac_file
+    fi
+  else
+    echo "/* $configure_input  */"
+    cat "$ac_result"
+  fi
+  rm -f "$tmp/out12"
+ ;;
+
+
+  esac
+
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/Makefile.in
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/Makefile.in	(revision 7500)
+++ /tags/B2O-Blue-Sync-Temp-End/test/Makefile.in	(revision 7500)
@@ -0,0 +1,409 @@
+# Top level makefile for pvfs2 test programs
+# define a few generic variables that we need to use
+
+srcdir = @srcdir@
+prefix = @prefix@
+mandir = @mandir@
+exec_prefix = @exec_prefix@
+pvfs2_srcdir = @PVFS2_SRC_RELATIVE_TOP@
+pvfs2_builddir = @PVFS2_BUILD_RELATIVE_TOP@
+
+VPATH = $(srcdir)
+SHELL = @SHELL@
+INSTALL = @INSTALL@
+# TODO: should probably check for bison and flex in configure
+BISON = bison
+FLEX = flex
+LDSHARED = $(CC) -shared
+PICFLAGS = -fPIC
+BUILD_MPI = @BUILD_MPI@
+MPICC = @MPICC@
+GNUC = @GNUC@
+INTELC = @INTELC@
+MPI_GNUC = @MPI_GNUC@
+MPI_INTELC = @MPI_INTELC@
+TARGET_OS_DARWIN = @TARGET_OS_DARWIN@
+TARGET_OS_LINUX = @TARGET_OS_LINUX@
+TARGET_OS_BSD = @TARGET_OS_BSD@
+# override default quiet mode with "make V=1"
+QUIET_COMPILE = @QUIET_COMPILE@
+ifdef V
+    QUIET_COMPILE = 0
+endif
+
+ifeq ($(QUIET_COMPILE),1)
+  # say a one-line description of the action, do not echo the command
+  Q=@echo
+  E=@
+else
+  # do not say the short Q lines, but do echo the entire command
+  Q=@echo >/dev/null
+  E=
+endif
+
+# some of the test programs require the use of the pvfs2 server library;
+# we therefore need to find out what libraries the original pvfs2 build
+# used for server components
+SERVERLIBS = @SERVERLIBS@
+
+# Eliminate all default suffixes.  We want explicit control.
+.SUFFIXES:
+
+# PHONEY targets are targets that do not result in the generation
+#    of a file that has the same name as the target.  Listing them
+#    here keeps make from accidentally doing too much work (see GNU
+#    make manual).
+.PHONY: all clean distclean cscope tags 
+
+################################################################
+# Find project subdirectories
+
+# MODULES is a list of subdirectories that we wish to operate on.
+#    They are identified by the presence of module.mk files (makefile
+#    includes).
+MODULES := $(shell find . -name "*.mk" | sed -e 's/^.\///;s/module.mk//')
+
+# List of directories to search for headers.
+INCLUDES := \
+    ${pvfs2_srcdir}/src/client/sysint \
+    ${pvfs2_srcdir}/src/common/misc \
+    ${pvfs2_srcdir}/src/common/quickhash \
+    ${pvfs2_srcdir}/src/common/quicklist \
+    ${pvfs2_srcdir}/src/common/dotconf \
+    ${pvfs2_srcdir}/src/common/id-generator \
+    ${pvfs2_srcdir}/src/common/gossip \
+    ${pvfs2_srcdir}/src/common/gen-locks \
+    ${pvfs2_srcdir}/src/common/llist \
+    ${pvfs2_srcdir}/src/io/trove \
+    ${pvfs2_srcdir}/src/io/bmi \
+    ${pvfs2_srcdir}/src/io/description \
+    ${pvfs2_srcdir}/src/io/flow \
+    ${pvfs2_srcdir}/src/io/buffer \
+    ${pvfs2_srcdir}/src/io/job \
+    ${pvfs2_srcdir}/src/io/dev \
+    ${pvfs2_srcdir}/src/proto \
+    ${pvfs2_srcdir}/src/server \
+    ${pvfs2_srcdir}/src/server/request-scheduler \
+    ${pvfs2_srcdir} \
+    ${pvfs2_srcdir} \
+    ${pvfs2_builddir}/include
+
+#################################################################
+# Setup global flags
+
+# These should all be self explanatory; they are standard flags
+# for compiling and linking unless otherwise noted
+CC = @CC@
+CFLAGS = @CFLAGS@ @DB_CFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@ 
+LD = gcc
+LDSHARED = $(CC) -shared
+PICFLAGS = -fPIC
+LDFLAGS += -Llib 
+
+  # turn on large file support by default
+CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
+  # include current directory (for pvfs2-test-config.h)
+CFLAGS += -I .
+  # add in include paths from pvfs2 src tree
+CFLAGS += $(patsubst %,-I%,$(INCLUDES))
+
+# special Intel cc options, all warnings, but disable:
+  # remark #279: controlling expression is constant
+  #   shows up in ifdefs such as "do { ... } while (0)" construct
+INTEL_CFLAGS := -Wall -wd279
+  # special gcc options
+GCC_CFLAGS := -Wall -Wstrict-prototypes -pipe
+
+################################################################
+# Setup component specific flags
+
+# Use these same cflags for the mpi test codes.
+MPICFLAGS := $(CFLAGS)
+
+# Add gcc-specific flags if we know it is a gnu compiler.
+ifdef GNUC
+CFLAGS += $(GCC_CFLAGS)
+endif
+ifdef INTELC
+CFLAGS += $(INTEL_CFLAGS)
+endif
+ifdef MPI_INTELC
+MPICFLAGS += $(INTEL_CFLAGS)
+endif
+ifdef MPI_GNUC
+MPICFLAGS += $(GCC_CFLAGS)
+endif
+
+#################################################################
+# Starter variables 
+
+# NOTES: These variables are used to categorize the various source
+#    files.  We let the makefile includes append to them so that we
+#    gradually build up a list of source files without having to
+#    list them all at the top level.
+
+# TESTSRC is source code for test programs
+TESTSRC :=
+# MISCSRC is a grab bag of other sources that must be built into
+#    object form (for example, shared test components)
+MISCSRC := 
+# SHAREDSRC is a hack to get things to build when mpi is not passed to configure.
+SHAREDSRC :=
+# MPIIOTESTSRC is the source for test programs that must be compiled 
+#    with MPI-IO
+MPIIOTESTSRC :=
+# MPITESTSRC is the source code for test programs that must be compiled
+#    with MPI
+MPITESTSRC :=
+# MPIMISCSRC is a collection of sources that must be built into
+#    object form using MPI
+MPIMISCSRC :=
+# DLLSRC is a collection of sources that must be built into
+# dlls/shared objects.
+DLLSRC := 
+# files generated as part of the build that should be deleted on "make clean"
+CLEANFILES :=
+
+################################################################
+# Top level (default) targets
+
+# default rule builds server, library, and test programs
+all: tests
+
+################################################################
+# Makefile includes
+
+# this is how we pull build information from all of the project
+#    subdirectories, make sure to catch top level module.mk as well
+include $(patsubst %, %/module.mk, $(MODULES))
+
+################################################################
+# Derived file lists
+
+# NOTES: At this point, the subdirectory makefile includes have informed
+#    us what the source files are.  Now we want to generate some
+#    other lists (such as objects, executables, and dependency files)
+#    by manipulating the lists of source files
+
+# TESTOBJS is a list of test program objects
+TESTOBJS := $(patsubst %.c,%.o, $(filter %.c,$(TESTSRC)))
+# TESTS is a list of test program executables
+TESTS := $(patsubst %.c,%, $(filter %.c, $(TESTSRC)))
+# TESTDEPENDS is a list of dependency files for test programs
+TESTDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(TESTSRC)))
+
+# MISCOBJS is a list of misc. objects not in the above categories
+MISCOBJS := $(patsubst %.c,%.o, $(filter %.c,$(MISCSRC)))
+# MISCDEPENDS is a list of dependency files for misc. objects
+MISCDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(MISCSRC)))
+
+# SHAREDOBJS is a list of shared. objects not in the above categories
+SHAREDOBJS := $(patsubst %.c,%.o, $(filter %.c,$(SHAREDSRC)))
+# SHAREDDEPENDS is a list of dependency files for shared. objects
+SHAREDDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(SHAREDSRC)))
+
+# MPIMISCOBJS is a list of misc. MPI objects not in the above categories
+MPIMISCOBJS := $(patsubst %.c,%.o, $(filter %.c,$(MPIMISCSRC)))
+# MPIMISCDEPENDS is a list of dependency files for MPI misc. objects
+MPIMISCDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(MPIMISCSRC)))
+
+# DLLOBJS is a list of misc. objects made into DLLs
+DLLOBJS := $(patsubst %.c,%.po, $(filter %.c,$(DLLSRC)))
+# DLLDEPENDS is a list of dependency files for dll objects
+DLLDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(DLLSRC)))
+#DLLS is a list of DLLs
+DLLS := $(patsubst %.c,%.so, $(filter %.c,$(DLLSRC)))
+
+# MPITESTOBJS is a list of MPI test program objects
+MPITESTOBJS := $(patsubst %.c,%.o, $(filter %.c,$(MPITESTSRC)))
+# MPITESTS is a list of MPI test program executables
+MPITESTS := $(patsubst %.c,%, $(filter %.c, $(MPITESTSRC)))
+# TESTDEPENDS is a list of dependency files for MPI test programs
+MPITESTDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(MPITESTSRC)))
+
+# MPIIOTESTOBJS is a list of MPI-IO test program objects
+MPIIOTESTOBJS := $(patsubst %.c,%.o, $(filter %.c,$(MPIIOTESTSRC)))
+# MPIIOTESTS is a list of MPI-IO test program executables
+MPIIOTESTS := $(patsubst %.c,%, $(filter %.c, $(MPIIOTESTSRC)))
+# MPIIOTESTDEPENDS is a list of dependency files for MPI-IO test programs
+MPIIOTESTDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(MPIIOTESTSRC)))
+
+# DEPENDS is a global list of all of our dependency files.  
+# NOTE: sort is just a trick to remove duplicates; the order
+#   doesn't matter at all.
+DEPENDS := $(sort $(TESTDEPENDS) $(MISCDEPENDS) $(DLLDEPENDS))
+ifdef BUILD_MPI
+DEPENDS += $(MPITESTDEPENDS) $(MPIMISCDEPENDS)
+endif
+
+####################################################################
+# Rules and dependencies
+
+# target for building MPI-IO test programs 
+mpiiotests: $(MPIIOTESTS)
+
+# Just like dir, but strip the slash off the end, to be pretty.
+dirname = $(patsubst %/,%,$(dir $(1)))
+
+# Generate the canonical in-tree location of a file, given a possibly
+# out-of-tree reference.
+canonname = $(patsubst $(srcdir)/%,%,$(call dirname,$(1)))
+
+# Grab any CFLAGS defined by the make stub for a particular file, and
+# for the directory in which the source resides.
+# Always add the directory in question for "local" includes.
+modcflags = $(MODCFLAGS_$(call canonname,$(1))) \
+            $(MODCFLAGS_$(patsubst $(srcdir)/%,%,$(1))) \
+	    -I$(call dirname,$(1))
+
+modldflags = $(MODLDFLAGS_$(call canonname,$(1))) \
+            $(MODLDFLAGS_$(patsubst $(srcdir)/%,%,$(1))) \
+	    -L$(call dirname,$(1))
+
+
+# target for building the test program executables
+tests: $(TESTS)
+
+# target for building MPI test program executables
+mpitests: $(MPITESTS)
+ifdef BUILD_MPI
+# add MPI programs to default rule
+all: mpitests mpiiotests
+endif
+
+# rule for building MPI objects
+$(MPITESTOBJS): %.o: %.c
+ifdef BUILD_MPI
+	$(Q) "  MPICC		$@"
+	$(E)$(MPICC) $(LIBCFLAGS) $(MPICFLAGS) $(call modcflags,$<) $< -c -o $@
+else
+	@echo Error: You must specify --with-mpi=dir at configure time 
+	@echo   in order to enable compilation of MPI programs.
+	@false
+endif
+
+# rule for building MPI-IO objects
+$(MPIIOTESTOBJS): %.o: %.c
+ifdef BUILD_MPI
+	$(Q) "  MPICC		$@"
+	$(E)$(MPICC) $(LIBCFLAGS) $(MPICFLAGS) $(call modcflags,$<) $< -c -o $@
+else
+	@echo Error: You must specify --with-mpi=dir at configure time 
+	@echo   in order to enable compilation of MPI programs.
+	@false
+endif
+
+# rule for building MPI misc. objects
+$(MPIMISCOBJS): %.o: %.c
+ifdef BUILD_MPI
+	$(Q) "  MPICC		$@"
+	$(E)$(MPICC) $(LIBCFLAGS) $(MPICFLAGS) $(call modcflags,$<) $< -c -o $@
+else
+	@echo Error: You must specify --with-mpi=dir at configure time 
+	@echo   in order to enable compilation of MPI programs.
+	@false
+endif
+
+# rule for building MPI executables from object files
+$(MPITESTS): %: %.o $(MPIMISCOBJS) $(SHAREDOBJS) $(LIBRARIES)
+	$(Q) "  MPILD		$@"
+	$(E)$(MPICC) $^ $(LDFLAGS) $(call modldflags,$<) $(LIBS) -lm -o $@
+
+# rule for building MPI-IO executables from object files
+# note: add a $(MPIMISCOBJS) prereq if we build multi-object tests someday
+$(MPIIOTESTS): %: %.o $(LIBRARIES)
+	$(Q) "  MPILD		$@"
+	$(E)$(MPICC) $^ $(LDFLAGS) $(call modldflags,$<) $(LIBS) -lm -o $@
+
+# default rule for building executables from object files
+%: %.o $(LIBRARIES) $(MISCOBJS) $(SHAREDOBJS)
+	$(Q) "  LD		$@"
+	$(E)$(LD) $(LDFLAGS) $(call modldflags,$<) $< $(MISCOBJS) $(SHAREDOBJS) $(LIBS) -o $@
+
+# default rule for building objects 
+%.o: %.c
+	$(Q) "  CC		$@"
+	$(E)$(CC) $(LIBCFLAGS) $(CFLAGS) $(call modcflags,$<) $< -c -o $@
+
+# rule for building shared objects 
+%.po: %.c
+	$(Q) "  CCPIC		$@"
+	$(E)$(CC) $(LIBCFLAGS) $(CFLAGS) $(PICFLAGS) $(call modcflags,$<) $< -c -o $@
+
+%.so: $(DLLOBJS)
+	$(Q) " LDSO		$@"
+	$(E)$(LDSHARED) -o $@ $(DLLOBJS)
+
+# all test programs depend on the pvfs2 library
+$(TESTS): %: %.o $(LIBRARIES)
+
+# rule for generating cscope information
+cscope:
+	find @SRC_ABSOLUTE_TOP@ -iname "*.[ch]" -o -iname "*.sm" \
+		 > $(srcdir)/cscope.files
+	( cd @SRC_ABSOLUTE_TOP@; cscope -be -i @SRC_ABSOLUTE_TOP@/cscope.files )
+
+# build editor tags file over all source files *.[ch] *.sm and
+# some known scripts
+tags:
+	( find $(addprefix $(srcdir)/,$(MODULES)) \
+	    -maxdepth 1 -name '*.[ch]' ;\
+	) | ctags -L- --excmd=pattern -B --extra=+f -I __hidden
+
+# top rule for cleaning up tree
+clean: 
+	$(Q) "  CLEAN"
+	$(E)rm -f $(TESTOBJS) $(MISCOBJS) $(TESTS) $(MISCDEPENDS)\
+		$(DEPENDS) $(CLEANFILES) $(MPIMISCOBJS) $(SHAREDOBJS) $(SHAREDDEPENDS)\
+		$(MPITESTS) $(MPITESTOBJS) $(MPITESTDEPENDS) $(MPIMISCDEPENDS)\
+		$(MPIIOTESTOBJS) $(MPIIOTESTS) $(DLLDEPENDS) $(DLLS) $(DLLOBJS)
+
+# some stuff that is cleaned in both distclean and dist targets
+cleaner: clean
+	rm -f tags
+	rm -f examples/pvfs2-server.rc
+	rm -rf autom4te*.cache
+	rm -f $(srcdir)/cscope.out $(srcdir)/cscope.files
+	rm -f config.log config.status config.cache 
+	rm -f maint/mpi-depend.sh common/pav/configfile.sample
+
+# _really_ clean the tree; should go back to pristine state
+distclean: cleaner 
+	find . -name "module.mk" -exec rm \{\} \;
+	rm -f Makefile pvfs2-test-config.h
+
+# this is where we include all of our automatic dependencies.
+# NOTE: we wrap this in ifneq's in order to prevent the
+#    dependencies from being generated for special targets that don't 
+#    require them
+ifeq (,$(filter clean distclean cscope tags nodep,$(MAKECMDGOALS)))
+-include $(DEPENDS)
+endif
+# add this as a make goal to disable rebuilding dependencies
+.PHONY: nodep
+nodep:; @:
+
+# rule for generating dependency files for MPI code
+#
+# note: mpi-depend.sh is automatically generated, so it is in
+#       the build directory already.
+ifdef BUILD_MPI
+$(MPITESTDEPENDS) $(MPIMISCDEPENDS): %.d: %.c
+	$(Q) "  DEP		$@"
+	$(E)sh ./maint/mpi-depend.sh `dirname $*` $(MPICFLAGS) $(call modcflags,$<) $< > $@
+endif
+
+# default rule for generating dependency files
+%.d: %.c
+	$(Q) "  DEP		$@"
+	$(E)CC="$(CC)" $(pvfs2_srcdir)/maint/depend.sh $(call dirname,$*) $(CFLAGS) $(call modcflags,$<) $< > $@
+
+install:: 
+	install -d @PVFS2_TOP_PREFIX@/test
+	install -m 755 $(TESTS) @PVFS2_TOP_PREFIX@/test
+ifdef BUILD_MPI
+	install -m 755 $(MPITESTS) @PVFS2_TOP_PREFIX@/test
+	install -m 755 $(MPIIOTESTS) @PVFS2_TOP_PREFIX@/test
+endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/CONFIG.template
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/CONFIG.template	(revision 3228)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/CONFIG.template	(revision 3228)
@@ -0,0 +1,11 @@
+[Config]
+MPICHBINDIR=/home/USER/testing/DATE/work/mpich2/bin/
+PVFS2BINDIR=/home/USER/testing/DATE/work/INSTALL-pvfs2/bin/
+PVFS2TABFILE=/tmp/pvfs2-pav/pvfs2tab
+PAVDIR=/home/USER/testing/DATE/work/pvfs2/test/common/pav/
+MOUNTPOINT=/tmp/pvfs2-pav-mount
+EMAIL=pvfs2-testing@beowulf-underground.org
+
+[Tests]
+TEST2=./simple.sh
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/fsx.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/fsx.c	(revision 4831)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/fsx.c	(revision 4831)
@@ -0,0 +1,1064 @@
+/*
+ *	Copyright (C) 1991, NeXT Computer, Inc.  All Rights Reserverd.
+ *
+ *	File:	fsx.c
+ *	Author:	Avadis Tevanian, Jr.
+ *
+ *	File system exerciser. 
+ *
+ *	Rewritten 8/98 by Conrad Minshall.
+ *
+ *	Small changes to work under Linux -- davej@suse.de
+ *
+ */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef _UWIN
+# include <sys/param.h>
+# include <limits.h>
+# include <time.h>
+# include <strings.h>
+# define MAP_FILE 0
+#else
+#ifndef linux
+# include <sys/dirent.h>
+#endif
+#endif
+#include <sys/file.h>
+#include <sys/mman.h>
+#include <limits.h>
+#include <err.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdarg.h>
+#include <errno.h>
+
+#define NUMPRINTCOLUMNS 32	/* # columns of data to print on each line */
+
+/*
+ *	A log entry is an operation and a bunch of arguments.
+ */
+
+struct log_entry {
+	int	operation;
+	int	args[3];
+};
+
+#define	LOGSIZE	1000
+
+struct log_entry	oplog[LOGSIZE];	/* the log */
+int			logptr = 0;	/* current position in log */
+int			logcount = 0;	/* total ops */
+
+/*
+ *	Define operations
+ */
+
+#define	OP_READ		1
+#define OP_WRITE	2
+#define OP_TRUNCATE	3
+#define OP_CLOSEOPEN	4
+#define OP_MAPREAD	5
+#define OP_MAPWRITE	6
+#define OP_SKIPPED	7
+
+#ifndef PAGE_SIZE
+#define PAGE_SIZE       4096
+#endif
+#define PAGE_MASK       (PAGE_SIZE - 1)
+
+char	*original_buf;			/* a pointer to the original data */
+char	*good_buf;			/* a pointer to the correct data */
+char	*temp_buf;			/* a pointer to the current data */
+char	*fname;				/* name of our test file */
+int	fd;				/* fd for our test file */
+
+off_t		file_size = 0;
+off_t		biggest = 0;
+char		state[256];
+unsigned long	testcalls = 0;		/* calls to function "test" */
+
+unsigned long	simulatedopcount = 0;	/* -b flag */
+int	closeprob = 0;			/* -c flag */
+int	debug = 0;			/* -d flag */
+unsigned long	debugstart = 0;		/* -D flag */
+unsigned long	maxfilelen = 256 * 1024;	/* -l flag */
+int	sizechecks = 1;			/* -n flag disables them */
+int	maxoplen = 64 * 1024;		/* -o flag */
+int	quiet = 0;			/* -q flag */
+unsigned long progressinterval = 0;	/* -p flag */
+int	readbdy = 1;			/* -r flag */
+int	style = 0;			/* -s flag */
+int	truncbdy = 1;			/* -t flag */
+int	writebdy = 1;			/* -w flag */
+long	monitorstart = -1;		/* -m flag */
+long	monitorend = -1;		/* -m flag */
+int	lite = 0;			/* -L flag */
+long	numops = -1;			/* -N flag */
+int	randomoplen = 1;		/* -O flag disables it */
+int	seed = 1;			/* -S flag */
+int     mapped_writes = 1;              /* -W flag disables */
+int 	mapped_reads = 1;		/* -R flag disables it */
+int	fsxgoodfd = 0;
+FILE *	fsxlogf = NULL;
+int badoff = -1;
+int closeopen = 0;
+
+
+void
+prt(char *fmt, ...)
+{
+	va_list args;
+
+	va_start(args, fmt);
+	vfprintf(stdout, fmt, args);
+	if (fsxlogf)
+		vfprintf(fsxlogf, fmt, args);
+	va_end(args);
+}
+
+void
+prterr(char *prefix)
+{
+	prt("%s%s%s\n", prefix, prefix ? ": " : "", strerror(errno));
+}
+
+
+void
+log4(int operation, int arg0, int arg1, int arg2)
+{
+	struct log_entry *le;
+
+	le = &oplog[logptr];
+	le->operation = operation;
+	if (closeopen)
+		le->operation = ~ le->operation;
+	le->args[0] = arg0;
+	le->args[1] = arg1;
+	le->args[2] = arg2;
+	logptr++;
+	logcount++;
+	if (logptr >= LOGSIZE)
+		logptr = 0;
+}
+
+
+void
+logdump(void)
+{
+	int	i, count, down;
+	struct log_entry	*lp;
+
+	prt("LOG DUMP (%d total operations):\n", logcount);
+	if (logcount < LOGSIZE) {
+		i = 0;
+		count = logcount;
+	} else {
+		i = logptr;
+		count = LOGSIZE;
+	}
+	for ( ; count > 0; count--) {
+		int opnum;
+
+		opnum = i+1 + (logcount/LOGSIZE)*LOGSIZE;
+		prt("%d(%d mod 256): ", opnum, opnum%256);
+		lp = &oplog[i];
+		if ((closeopen = lp->operation < 0))
+			lp->operation = ~ lp->operation;
+			
+		switch (lp->operation) {
+		case OP_MAPREAD:
+			prt("MAPREAD\t0x%x thru 0x%x\t(0x%x bytes)",
+			    lp->args[0], lp->args[0] + lp->args[1] - 1,
+			    lp->args[1]);
+			if (badoff >= lp->args[0] && badoff <
+						     lp->args[0] + lp->args[1])
+				prt("\t***RRRR***");
+			break;
+		case OP_MAPWRITE:
+			prt("MAPWRITE 0x%x thru 0x%x\t(0x%x bytes)",
+			    lp->args[0], lp->args[0] + lp->args[1] - 1,
+			    lp->args[1]);
+			if (badoff >= lp->args[0] && badoff <
+						     lp->args[0] + lp->args[1])
+				prt("\t******WWWW");
+			break;
+		case OP_READ:
+			prt("READ\t0x%x thru 0x%x\t(0x%x bytes)",
+			    lp->args[0], lp->args[0] + lp->args[1] - 1,
+			    lp->args[1]);
+			if (badoff >= lp->args[0] &&
+			    badoff < lp->args[0] + lp->args[1])
+				prt("\t***RRRR***");
+			break;
+		case OP_WRITE:
+			prt("WRITE\t0x%x thru 0x%x\t(0x%x bytes)",
+			    lp->args[0], lp->args[0] + lp->args[1] - 1,
+			    lp->args[1]);
+			if (lp->args[0] > lp->args[2])
+				prt(" HOLE");
+			else if (lp->args[0] + lp->args[1] > lp->args[2])
+				prt(" EXTEND");
+			if ((badoff >= lp->args[0] || badoff >=lp->args[2]) &&
+			    badoff < lp->args[0] + lp->args[1])
+				prt("\t***WWWW");
+			break;
+		case OP_TRUNCATE:
+			down = lp->args[0] < lp->args[1];
+			prt("TRUNCATE %s\tfrom 0x%x to 0x%x",
+			    down ? "DOWN" : "UP", lp->args[1], lp->args[0]);
+			if (badoff >= lp->args[!down] &&
+			    badoff < lp->args[!!down])
+				prt("\t******WWWW");
+			break;
+		case OP_SKIPPED:
+			prt("SKIPPED (no operation)");
+			break;
+		default:
+			prt("BOGUS LOG ENTRY (operation code = %d)!",
+			    lp->operation);
+		}
+		if (closeopen)
+			prt("\n\t\tCLOSE/OPEN");
+		prt("\n");
+		i++;
+		if (i == LOGSIZE)
+			i = 0;
+	}
+}
+
+
+void
+save_buffer(char *buffer, off_t bufferlength, int fd)
+{
+	off_t ret;
+	ssize_t byteswritten;
+
+	if (fd <= 0 || bufferlength == 0)
+		return;
+
+	if (bufferlength > SSIZE_MAX) {
+		prt("fsx flaw: overflow in save_buffer\n");
+		exit(67);
+	}
+	if (lite) {
+		off_t size_by_seek = lseek(fd, (off_t)0, L_XTND);
+		if (size_by_seek == (off_t)-1)
+			prterr("save_buffer: lseek eof");
+		else if (bufferlength > size_by_seek) {
+			warn("save_buffer: .fsxgood file too short... will save 0x%qx bytes instead of 0x%qx\n", (unsigned long long)size_by_seek,
+			     (unsigned long long)bufferlength);
+			bufferlength = size_by_seek;
+		}
+	}
+
+	ret = lseek(fd, (off_t)0, SEEK_SET);
+	if (ret == (off_t)-1)
+		prterr("save_buffer: lseek 0");
+	
+	byteswritten = write(fd, buffer, (size_t)bufferlength);
+	if (byteswritten != bufferlength) {
+		if (byteswritten == -1)
+			prterr("save_buffer write");
+		else
+			warn("save_buffer: short write, 0x%x bytes instead of 0x%qx\n",
+			     (unsigned)byteswritten,
+			     (unsigned long long)bufferlength);
+	}
+}
+
+
+void
+report_failure(int status)
+{
+	logdump();
+	
+	if (fsxgoodfd) {
+		if (good_buf) {
+			save_buffer(good_buf, file_size, fsxgoodfd);
+			prt("Correct content saved for comparison\n");
+			prt("(maybe hexdump \"%s\" vs \"%s.fsxgood\")\n",
+			    fname, fname);
+		}
+		close(fsxgoodfd);
+	}
+	exit(status);
+}
+
+
+#define short_at(cp) ((unsigned short)((*((unsigned char *)(cp)) << 8) | \
+				        *(((unsigned char *)(cp)) + 1)))
+
+void
+check_buffers(unsigned offset, unsigned size)
+{
+	unsigned char c, t;
+	unsigned i = 0;
+	unsigned n = 0;
+	unsigned op = 0;
+	unsigned bad = 0;
+
+	if (bcmp(good_buf + offset, temp_buf, size) != 0) {
+		prt("READ BAD DATA: offset = 0x%x, size = 0x%x\n",
+		    offset, size);
+		prt("OFFSET\tGOOD\tBAD\tRANGE\n");
+		while (size > 0) {
+			c = good_buf[offset];
+			t = temp_buf[i];
+			if (c != t) {
+			        if (n == 0) {
+					bad = short_at(&temp_buf[i]);
+				        prt("0x%5x\t0x%04x\t0x%04x", offset,
+				            short_at(&good_buf[offset]), bad);
+					op = temp_buf[offset & 1 ? i+1 : i];
+				}
+				n++;
+				badoff = offset;
+			}
+			offset++;
+			i++;
+			size--;
+		}
+		if (n) {
+		        prt("\t0x%5x\n", n);
+			if (bad)
+				prt("operation# (mod 256) for the bad data may be %u\n", ((unsigned)op & 0xff));
+			else
+				prt("operation# (mod 256) for the bad data unknown, check HOLE and EXTEND ops\n");
+		} else
+		        prt("????????????????\n");
+		report_failure(110);
+	}
+}
+
+
+void
+check_size(void)
+{
+	struct stat	statbuf;
+	off_t	size_by_seek;
+
+	if (fstat(fd, &statbuf)) {
+		prterr("check_size: fstat");
+		statbuf.st_size = -1;
+	}
+	size_by_seek = lseek(fd, (off_t)0, L_XTND);
+	if (file_size != statbuf.st_size || file_size != size_by_seek) {
+		prt("Size error: expected 0x%qx stat 0x%qx seek 0x%qx\n",
+		    (unsigned long long)file_size,
+		    (unsigned long long)statbuf.st_size,
+		    (unsigned long long)size_by_seek);
+		report_failure(120);
+	}
+}
+
+
+void
+check_trunc_hack(void)
+{
+	struct stat statbuf;
+
+	ftruncate(fd, (off_t)0);
+	ftruncate(fd, (off_t)100000);
+	fstat(fd, &statbuf);
+	if (statbuf.st_size != (off_t)100000) {
+		prt("no extend on truncate! not posix!\n");
+		exit(130);
+	}
+	ftruncate(fd, 0);
+}
+
+
+void
+doread(unsigned offset, unsigned size)
+{
+	off_t ret;
+	unsigned iret;
+
+	offset -= offset % readbdy;
+	if (size == 0) {
+		if (!quiet && testcalls > simulatedopcount)
+			prt("skipping zero size read\n");
+		log4(OP_SKIPPED, OP_READ, offset, size);
+		return;
+	}
+	if (size + offset > file_size) {
+		if (!quiet && testcalls > simulatedopcount)
+			prt("skipping seek/read past end of file\n");
+		log4(OP_SKIPPED, OP_READ, offset, size);
+		return;
+	}
+
+	log4(OP_READ, offset, size, 0);
+
+	if (testcalls <= simulatedopcount)
+		return;
+
+	if (!quiet && (progressinterval && testcalls % progressinterval == 0 ||
+		       debug &&
+		       (monitorstart == -1 ||
+			offset + size > monitorstart &&
+			(monitorend == -1 || offset <= monitorend))))
+		prt("%lu read\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls,
+		    offset, offset + size - 1, size);
+	ret = lseek(fd, (off_t)offset, SEEK_SET);
+	if (ret == (off_t)-1) {
+		prterr("doread: lseek");
+		report_failure(140);
+	}
+	iret = read(fd, temp_buf, size);
+	if (iret != size) {
+		if (iret == -1)
+			prterr("doread: read");
+		else
+			prt("short read: 0x%x bytes instead of 0x%x\n",
+			    iret, size);
+		report_failure(141);
+	}
+	check_buffers(offset, size);
+}
+
+
+void
+domapread(unsigned offset, unsigned size)
+{
+	unsigned pg_offset;
+	unsigned map_size;
+	char    *p;
+
+	offset -= offset % readbdy;
+	if (size == 0) {
+		if (!quiet && testcalls > simulatedopcount)
+			prt("skipping zero size read\n");
+		log4(OP_SKIPPED, OP_MAPREAD, offset, size);
+		return;
+	}
+	if (size + offset > file_size) {
+		if (!quiet && testcalls > simulatedopcount)
+			prt("skipping seek/read past end of file\n");
+		log4(OP_SKIPPED, OP_MAPREAD, offset, size);
+		return;
+	}
+
+	log4(OP_MAPREAD, offset, size, 0);
+
+	if (testcalls <= simulatedopcount)
+		return;
+
+	if (!quiet && (progressinterval && testcalls % progressinterval == 0 ||
+		       debug &&
+		       (monitorstart == -1 ||
+			offset + size > monitorstart &&
+			(monitorend == -1 || offset <= monitorend))))
+		prt("%lu mapread\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls,
+		    offset, offset + size - 1, size);
+
+	pg_offset = offset & PAGE_MASK;
+	map_size  = pg_offset + size;
+
+#ifdef linux
+	if ((p = (char *)mmap(0, map_size, PROT_READ, MAP_SHARED, fd,
+#else
+	if ((p = (char *)mmap(0, map_size, PROT_READ, MAP_FILE, fd,
+#endif
+			      (off_t)(offset - pg_offset))) == (char *)-1) {
+	        prterr("domapread: mmap");
+		report_failure(190);
+	}
+	memcpy(temp_buf, p + pg_offset, size);
+	if (munmap(p, map_size) != 0) {
+		prterr("domapread: munmap");
+		report_failure(191);
+	}
+
+	check_buffers(offset, size);
+}
+
+
+void
+gendata(char *original_buf, char *good_buf, unsigned offset, unsigned size)
+{
+	while (size--) {
+		good_buf[offset] = testcalls % 256; 
+		if (offset % 2)
+			good_buf[offset] += original_buf[offset];
+		offset++;
+	}
+}
+
+
+void
+dowrite(unsigned offset, unsigned size)
+{
+	off_t ret;
+	unsigned iret;
+
+	offset -= offset % writebdy;
+	if (size == 0) {
+		if (!quiet && testcalls > simulatedopcount)
+			prt("skipping zero size write\n");
+		log4(OP_SKIPPED, OP_WRITE, offset, size);
+		return;
+	}
+
+	log4(OP_WRITE, offset, size, file_size);
+
+	gendata(original_buf, good_buf, offset, size);
+	if (file_size < offset + size) {
+		if (file_size < offset)
+			bzero(good_buf + file_size, offset - file_size);
+		file_size = offset + size;
+		if (lite) {
+			warn("Lite file size bug in fsx!");
+			report_failure(149);
+		}
+	}
+
+	if (testcalls <= simulatedopcount)
+		return;
+
+	if (!quiet && (progressinterval && testcalls % progressinterval == 0 ||
+		       debug &&
+		       (monitorstart == -1 ||
+			offset + size > monitorstart &&
+			(monitorend == -1 || offset <= monitorend))))
+		prt("%lu write\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls,
+		    offset, offset + size - 1, size);
+	ret = lseek(fd, (off_t)offset, SEEK_SET);
+	if (ret == (off_t)-1) {
+		prterr("dowrite: lseek");
+		report_failure(150);
+	}
+	iret = write(fd, good_buf + offset, size);
+	if (iret != size) {
+		if (iret == -1)
+			prterr("dowrite: write");
+		else
+			prt("short write: 0x%x bytes instead of 0x%x\n",
+			    iret, size);
+		report_failure(151);
+	}
+}
+
+
+void
+domapwrite(unsigned offset, unsigned size)
+{
+	unsigned pg_offset;
+	unsigned map_size;
+	off_t    cur_filesize;
+	char    *p;
+
+	offset -= offset % writebdy;
+	if (size == 0) {
+		if (!quiet && testcalls > simulatedopcount)
+			prt("skipping zero size write\n");
+		log4(OP_SKIPPED, OP_MAPWRITE, offset, size);
+		return;
+	}
+	cur_filesize = file_size;
+
+	log4(OP_MAPWRITE, offset, size, 0);
+
+	gendata(original_buf, good_buf, offset, size);
+	if (file_size < offset + size) {
+		if (file_size < offset)
+			bzero(good_buf + file_size, offset - file_size);
+		file_size = offset + size;
+		if (lite) {
+			warn("Lite file size bug in fsx!");
+			report_failure(200);
+		}
+	}
+
+	if (testcalls <= simulatedopcount)
+		return;
+
+	if (!quiet && (progressinterval && testcalls % progressinterval == 0 ||
+		       debug &&
+		       (monitorstart == -1 ||
+			offset + size > monitorstart &&
+			(monitorend == -1 || offset <= monitorend))))
+		prt("%lu mapwrite\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls,
+		    offset, offset + size - 1, size);
+
+	if (file_size > cur_filesize) {
+	        if (ftruncate(fd, file_size) == -1) {
+		        prterr("domapwrite: ftruncate");
+			exit(201);
+		}
+	}
+	pg_offset = offset & PAGE_MASK;
+	map_size  = pg_offset + size;
+
+	if ((p = (char *)mmap(0, map_size, PROT_READ | PROT_WRITE,
+			      MAP_FILE | MAP_SHARED, fd,
+			      (off_t)(offset - pg_offset))) == (char *)-1) {
+	        prterr("domapwrite: mmap");
+		report_failure(202);
+	}
+	memcpy(p + pg_offset, good_buf + offset, size);
+	if (msync(p, map_size, 0) != 0) {
+		prterr("domapwrite: msync");
+		report_failure(203);
+	}
+	if (munmap(p, map_size) != 0) {
+		prterr("domapwrite: munmap");
+		report_failure(204);
+	}
+}
+
+
+void
+dotruncate(unsigned size)
+{
+	int oldsize = file_size;
+
+	size -= size % truncbdy;
+	if (size > biggest) {
+		biggest = size;
+		if (!quiet && testcalls > simulatedopcount)
+			prt("truncating to largest ever: 0x%x\n", size);
+	}
+
+	log4(OP_TRUNCATE, size, (unsigned)file_size, 0);
+
+	if (size > file_size)
+		bzero(good_buf + file_size, size - file_size);
+	file_size = size;
+
+	if (testcalls <= simulatedopcount)
+		return;
+	
+	if (progressinterval && testcalls % progressinterval == 0 ||
+	    debug && (monitorstart == -1 || monitorend == -1 ||
+		      size <= monitorend))
+		prt("%lu trunc\tfrom 0x%x to 0x%x\n", testcalls, oldsize, size);
+	if (ftruncate(fd, (off_t)size) == -1) {
+	        prt("ftruncate1: %x\n", size);
+		prterr("dotruncate: ftruncate");
+		report_failure(160);
+	}
+}
+
+
+void
+writefileimage()
+{
+	ssize_t iret;
+
+	if (lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) {
+		prterr("writefileimage: lseek");
+		report_failure(171);
+	}
+	iret = write(fd, good_buf, file_size);
+	if ((off_t)iret != file_size) {
+		if (iret == -1)
+			prterr("writefileimage: write");
+		else
+			prt("short write: 0x%x bytes instead of 0x%qx\n",
+			    iret, (unsigned long long)file_size);
+		report_failure(172);
+	}
+	if (lite ? 0 : ftruncate(fd, file_size) == -1) {
+	        prt("ftruncate2: %qx\n", (unsigned long long)file_size);
+		prterr("writefileimage: ftruncate");
+		report_failure(173);
+	}
+}
+
+
+void
+docloseopen(void)
+{ 
+	if (testcalls <= simulatedopcount)
+		return;
+
+	if (debug)
+		prt("%lu close/open\n", testcalls);
+	if (close(fd)) {
+		prterr("docloseopen: close");
+		report_failure(180);
+	}
+	fd = open(fname, O_RDWR, 0);
+	if (fd < 0) {
+		prterr("docloseopen: open");
+		report_failure(181);
+	}
+}
+
+
+void
+test(void)
+{
+	unsigned long	offset;
+	unsigned long	size = maxoplen;
+	unsigned long	rv = random();
+	unsigned long	op = rv % (3 + !lite + mapped_writes);
+
+        /* turn off the map read if necessary */
+
+        if (op == 2 && !mapped_reads)
+            op = 0;
+
+	if (simulatedopcount > 0 && testcalls == simulatedopcount)
+		writefileimage();
+
+	testcalls++;
+
+	if (closeprob)
+		closeopen = (rv >> 3) < (1 << 28) / closeprob;
+
+	if (debugstart > 0 && testcalls >= debugstart)
+		debug = 1;
+
+	if (!quiet && testcalls < simulatedopcount && testcalls % 100000 == 0)
+		prt("%lu...\n", testcalls);
+
+	/*
+	 * READ:	op = 0
+	 * WRITE:	op = 1
+	 * MAPREAD:     op = 2
+	 * TRUNCATE:	op = 3
+	 * MAPWRITE:    op = 3 or 4
+	 */
+	if (lite ? 0 : op == 3 && (style & 1) == 0) /* vanilla truncate? */
+		dotruncate(random() % maxfilelen);
+	else {
+		if (randomoplen)
+			size = random() % (maxoplen+1);
+		if (lite ? 0 : op == 3)
+			dotruncate(size);
+		else {
+			offset = random();
+			if (op == 1 || op == (lite ? 3 : 4)) {
+				offset %= maxfilelen;
+				if (offset + size > maxfilelen)
+					size = maxfilelen - offset;
+				if (op != 1)
+					domapwrite(offset, size);
+				else
+					dowrite(offset, size);
+			} else {
+				if (file_size)
+					offset %= file_size;
+				else
+					offset = 0;
+				if (offset + size > file_size)
+					size = file_size - offset;
+				if (op != 0)
+					domapread(offset, size);
+				else
+					doread(offset, size);
+			}
+		}
+	}
+	if (sizechecks && testcalls > simulatedopcount)
+		check_size();
+	if (closeopen)
+		docloseopen();
+}
+
+
+void
+cleanup(sig)
+	int	sig;
+{
+	if (sig)
+		prt("signal %d\n", sig);
+	prt("testcalls = %lu\n", testcalls);
+	exit(sig);
+}
+
+
+void
+usage(void)
+{
+	fprintf(stdout, "usage: %s",
+		"fsx [-dnqLOW] [-b opnum] [-c Prob] [-l flen] [-m start:end] [-o oplen] [-p progressinterval] [-r readbdy] [-s style] [-t truncbdy] [-w writebdy] [-D startingop] [-N numops] [-P dirpath] [-S seed] fname\n\
+	-b opnum: beginning operation number (default 1)\n\
+	-c P: 1 in P chance of file close+open at each op (default infinity)\n\
+	-d: debug output for all operations\n\
+	-l flen: the upper bound on file size (default 262144)\n\
+	-m startop:endop: monitor (print debug output) specified byte range (default 0:infinity)\n\
+	-n: no verifications of file size\n\
+	-o oplen: the upper bound on operation size (default 65536)\n\
+	-p progressinterval: debug output at specified operation interval\n\
+	-q: quieter operation\n\
+	-r readbdy: 4096 would make reads page aligned (default 1)\n\
+	-s style: 1 gives smaller truncates (default 0)\n\
+	-t truncbdy: 4096 would make truncates page aligned (default 1)\n\
+	-w writebdy: 4096 would make writes page aligned (default 1)\n\
+	-D startingop: debug output starting at specified operation\n\
+	-L: fsxLite - no file creations & no file size changes\n\
+	-N numops: total # operations to do (default infinity)\n\
+	-O: use oplen (see -o flag) for every op (default random)\n\
+	-P: save .fsxlog and .fsxgood files in dirpath (default ./)\n\
+	-S seed: for random # generator (default 1) 0 gets timestamp\n\
+	-W: mapped write operations DISabled\n\
+        -R: read() system calls only (mapped reads disabled)\n\
+	fname: this filename is REQUIRED (no default)\n");
+	exit(90);
+}
+
+
+int
+getnum(char *s, char **e)
+{
+	int ret = -1;
+
+	*e = (char *) 0;
+	ret = strtol(s, e, 0);
+	if (*e)
+		switch (**e) {
+		case 'b':
+		case 'B':
+			ret *= 512;
+			*e = *e + 1;
+			break;
+		case 'k':
+		case 'K':
+			ret *= 1024;
+			*e = *e + 1;
+			break;
+		case 'm':
+		case 'M':
+			ret *= 1024*1024;
+			*e = *e + 1;
+			break;
+		case 'w':
+		case 'W':
+			ret *= 4;
+			*e = *e + 1;
+			break;
+		}
+	return (ret);
+}
+
+
+int
+main(int argc, char **argv)
+{
+	int	i, style, ch;
+	char	*endp;
+	char goodfile[1024];
+	char logfile[1024];
+
+	goodfile[0] = 0;
+	logfile[0] = 0;
+
+	setvbuf(stdout, (char *)0, _IOLBF, 0); /* line buffered stdout */
+
+	while ((ch = getopt(argc, argv, "b:c:dl:m:no:p:qr:s:t:w:D:LN:OP:RS:W"))
+	       != EOF)
+		switch (ch) {
+		case 'b':
+			simulatedopcount = getnum(optarg, &endp);
+			if (!quiet)
+				fprintf(stdout, "Will begin at operation %ld\n",
+					simulatedopcount);
+			if (simulatedopcount == 0)
+				usage();
+			simulatedopcount -= 1;
+			break;
+		case 'c':
+			closeprob = getnum(optarg, &endp);
+			if (!quiet)
+				fprintf(stdout,
+					"Chance of close/open is 1 in %d\n",
+					closeprob);
+			if (closeprob <= 0)
+				usage();
+			break;
+		case 'd':
+			debug = 1;
+			break;
+		case 'l':
+			maxfilelen = getnum(optarg, &endp);
+			if (maxfilelen <= 0)
+				usage();
+			break;
+		case 'm':
+			monitorstart = getnum(optarg, &endp);
+			if (monitorstart < 0)
+				usage();
+			if (!endp || *endp++ != ':')
+				usage();
+			monitorend = getnum(endp, &endp);
+			if (monitorend < 0)
+				usage();
+			if (monitorend == 0)
+				monitorend = -1; /* aka infinity */
+			debug = 1;
+		case 'n':
+			sizechecks = 0;
+			break;
+		case 'o':
+			maxoplen = getnum(optarg, &endp);
+			if (maxoplen <= 0)
+				usage();
+			break;
+		case 'p':
+			progressinterval = getnum(optarg, &endp);
+			if (progressinterval < 0)
+				usage();
+			break;
+		case 'q':
+			quiet = 1;
+			break;
+		case 'r':
+			readbdy = getnum(optarg, &endp);
+			if (readbdy <= 0)
+				usage();
+			break;
+		case 's':
+			style = getnum(optarg, &endp);
+			if (style < 0 || style > 1)
+				usage();
+			break;
+		case 't':
+			truncbdy = getnum(optarg, &endp);
+			if (truncbdy <= 0)
+				usage();
+			break;
+		case 'w':
+			writebdy = getnum(optarg, &endp);
+			if (writebdy <= 0)
+				usage();
+			break;
+		case 'D':
+			debugstart = getnum(optarg, &endp);
+			if (debugstart < 1)
+				usage();
+			break;
+		case 'L':
+		        lite = 1;
+			break;
+		case 'N':
+			numops = getnum(optarg, &endp);
+			if (numops < 0)
+				usage();
+			break;
+		case 'O':
+			randomoplen = 0;
+			break;
+		case 'P':
+			strncpy(goodfile, optarg, sizeof(goodfile));
+			strcat(goodfile, "/");
+			strncpy(logfile, optarg, sizeof(logfile));
+			strcat(logfile, "/");
+			break;
+                case 'R':
+                        mapped_reads = 0;
+                        break;
+		case 'S':
+                        seed = getnum(optarg, &endp);
+			if (seed == 0)
+				seed = time(0) % 10000;
+			if (!quiet)
+				fprintf(stdout, "Seed set to %d\n", seed);
+			if (seed < 0)
+				usage();
+			break;
+		case 'W':
+		        mapped_writes = 0;
+			if (!quiet)
+				fprintf(stdout, "mapped writes DISABLED\n");
+			break;
+              
+		default:
+			usage();
+			/* NOTREACHED */
+		}
+	argc -= optind;
+	argv += optind;
+	if (argc != 1)
+		usage();
+	fname = argv[0];
+
+	signal(SIGHUP,	cleanup);
+	signal(SIGINT,	cleanup);
+	signal(SIGPIPE,	cleanup);
+	signal(SIGALRM,	cleanup);
+	signal(SIGTERM,	cleanup);
+	signal(SIGXCPU,	cleanup);
+	signal(SIGXFSZ,	cleanup);
+	signal(SIGVTALRM,	cleanup);
+	signal(SIGUSR1,	cleanup);
+	signal(SIGUSR2,	cleanup);
+
+	initstate(seed, state, 256);
+	setstate(state);
+	fd = open(fname, O_RDWR|(lite ? 0 : O_CREAT|O_TRUNC), 0666);
+	if (fd < 0) {
+		prterr(fname);
+		exit(91);
+	}
+	strncat(goodfile, fname, 256);
+	strcat (goodfile, ".fsxgood");
+	fsxgoodfd = open(goodfile, O_RDWR|O_CREAT|O_TRUNC, 0666);
+	if (fsxgoodfd < 0) {
+		prterr(goodfile);
+		exit(92);
+	}
+	strncat(logfile, fname, 256);
+	strcat (logfile, ".fsxlog");
+	fsxlogf = fopen(logfile, "w");
+	if (fsxlogf == NULL) {
+		prterr(logfile);
+		exit(93);
+	}
+	if (lite) {
+		off_t ret;
+		file_size = maxfilelen = lseek(fd, (off_t)0, L_XTND);
+		if (file_size == (off_t)-1) {
+			prterr(fname);
+			warn("main: lseek eof");
+			exit(94);
+		}
+		ret = lseek(fd, (off_t)0, SEEK_SET);
+		if (ret == (off_t)-1) {
+			prterr(fname);
+			warn("main: lseek 0");
+			exit(95);
+		}
+	}
+	original_buf = (char *) malloc(maxfilelen);
+	for (i = 0; i < maxfilelen; i++)
+		original_buf[i] = random() % 256;
+	good_buf = (char *) malloc(maxfilelen);
+	bzero(good_buf, maxfilelen);
+	temp_buf = (char *) malloc(maxoplen);
+	bzero(temp_buf, maxoplen);
+	if (lite) {	/* zero entire existing file */
+		ssize_t written;
+
+		written = write(fd, good_buf, (size_t)maxfilelen);
+		if (written != maxfilelen) {
+			if (written == -1) {
+				prterr(fname);
+				warn("main: error on write");
+			} else
+				warn("main: short write, 0x%x bytes instead of 0x%x\n",
+				     (unsigned)written, maxfilelen);
+			exit(98);
+		}
+	} else 
+		check_trunc_hack();
+
+	while (numops == -1 || numops--)
+		test();
+
+	if (close(fd)) {
+		prterr("close");
+		report_failure(99);
+	}
+	prt("All operations completed A-OK!\n");
+
+	exit(0);
+	return 0;
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/symlink-vfs
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/symlink-vfs	(revision 4976)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/symlink-vfs	(revision 4976)
@@ -0,0 +1,6 @@
+#!/bin/sh 
+
+PATH=${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin:${PATH}
+echo $PATH
+export PATH
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/test/test-symlink-perms --directory ${PVFS2_MOUNTPOINT} 
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/dbench
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/dbench	(revision 4466)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/dbench	(revision 4466)
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+cd ${EXTRA_TESTS}/dbench-3.03
+./configure -q
+make 2>&1
+cp client.txt ${PVFS2_MOUNTPOINT}
+cd ${PVFS2_MOUNTPOINT} &&  ${EXTRA_TESTS}/dbench-3.03/dbench -c client.txt 10 -t 300  2>&1
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/tail
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/tail	(revision 5664)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/tail	(revision 5664)
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+pvfs2_tailtest=${PVFS2_MOUNTPOINT}/tail_test
+local_reference=${PVFS2_DEST}/tail_ref
+datagen() {
+	for I in `seq 1 25`; do
+		echo "line$I" 
+	done
+}
+
+datagen > $pvfs2_tailtest
+
+tail $pvfs2_tailtest
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/append2
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/append2	(revision 5890)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/append2	(revision 5890)
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+pvfs2_testdir=${PVFS2_MOUNTPOINT}/append_dir
+pvfs2_testfile=${pvfs2_testdir}/append_test2
+local_reference=${PVFS2_DEST}/append_ref2
+
+datagen() {
+	for I in `seq 1 25`; do
+		echo "line$I" 
+	done
+}
+
+mkdir -p $pvfs2_testdir
+
+datagen > $local_reference
+datagen > $pvfs2_testfile
+datagen >> $local_reference
+datagen >> $pvfs2_testfile
+
+diff -u $local_reference $pvfs2_testfile
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/fstest.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/fstest.c	(revision 5167)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/fstest.c	(revision 5167)
@@ -0,0 +1,337 @@
+/* filesystem verification tool, designed to detect data corruption on a filesystem
+
+   tridge@samba.org, March 2002
+ */
+#define _GNU_SOURCE
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <string.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <errno.h>
+
+/* variables settable on the command line */
+static int loop_count = 100;
+static int num_files = 1;
+static int file_size = 1024*1024;
+static int block_size = 1024;
+static char *base_dir = ".";
+static int use_mmap;
+static int use_sync;
+
+typedef unsigned char uchar;
+
+#ifndef MIN
+#define MIN(a,b) ((a)<(b)?(a):(b))
+#endif
+
+static void *x_malloc(int size)
+{
+	void *ret = malloc(size);
+	if (!ret) {
+		fprintf(stderr,"Out of memory for size %d!\n", size);
+		exit(1);
+	}
+	return ret;
+}
+
+
+/* generate a buffer for a particular child, fnum etc. Just use a simple buffer
+   to make debugging easy 
+*/
+static void gen_buffer(uchar *buf, int loop, int child, int fnum, int ofs)
+{
+	uchar v = (loop+child+fnum+(ofs/block_size)) % 256;
+	memset(buf, v, block_size);
+}
+
+/* 
+   check if a buffer from disk is correct
+*/
+static void check_buffer(uchar *buf, int loop, int child, int fnum, int ofs)
+{
+	uchar *buf2;
+
+	buf2 = x_malloc(block_size);
+
+	gen_buffer(buf2, loop, child, fnum, ofs);
+	
+	if (memcmp(buf, buf2, block_size) != 0) {
+		int i, j;
+		for (i=0;buf[i] == buf2[i] && i<block_size;i++) ;
+		fprintf(stderr,"Corruption in child %d fnum %d at offset %d\n",
+			child, fnum, ofs+i);
+
+		printf("Correct:   ");
+		for (j=0;j<MIN(20, block_size-i);j++) {
+			printf("%02x ", buf2[j+i]);
+		}
+		printf("\n");
+
+		printf("Incorrect: ");
+		for (j=0;j<MIN(20, block_size-i);j++) {
+			printf("%02x ", buf[j+i]);
+		}
+		printf("\n");
+		exit(1);
+	}
+
+	free(buf2);
+}
+
+/*
+  create a file with a known data set for a child
+ */
+static void create_file(const char *dir, int loop, int child, int fnum)
+{
+	uchar *buf;
+	int size, fd;
+	char fname[1024];
+
+	buf = x_malloc(block_size);
+	sprintf(fname, "%s/file%d", dir, fnum);
+	fd = open(fname, O_RDWR|O_CREAT|O_TRUNC | (use_sync?O_SYNC:0), 0644);
+	if (fd == -1) {
+		perror(fname);
+		exit(1);
+	}
+		
+	if (!use_mmap) {
+		for (size=0; size<file_size; size += block_size) {
+			gen_buffer(buf, loop, child, fnum, size);
+			if (pwrite(fd, buf, block_size, size) != block_size) {
+				fprintf(stderr,"Write failed at offset %d\n", size);
+				exit(1);
+			}
+		}
+	} else {
+		char *p;
+		if (ftruncate(fd, file_size) != 0) {
+			perror("ftruncate");
+			exit(1);
+		}
+		p = mmap(NULL, file_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
+		if (p == (char *)-1) {
+			perror("mmap");
+			exit(1);
+		}
+		for (size=0; size<file_size; size += block_size) {
+			gen_buffer((uchar *)p+size, loop, child, fnum, size);
+		}
+		munmap(p, file_size);
+	}
+
+	free(buf);
+	close(fd);
+}
+
+/* 
+   check that a file has the right data
+ */
+static void check_file(const char *dir, int loop, int child, int fnum)
+{
+	uchar *buf;
+	int size, fd;
+	char fname[1024];
+
+	buf = x_malloc(block_size);
+
+	sprintf(fname, "%s/file%d", dir, fnum);
+	fd = open(fname, O_RDONLY);
+	if (fd == -1) {
+		perror(fname);
+		exit(1);
+	}
+
+	for (size=0; size<file_size; size += block_size) {
+		if (pread(fd, buf, block_size, size) != block_size) {
+			fprintf(stderr,"read failed at offset %d\n", size);
+			exit(1);
+		}
+		check_buffer(buf, loop, child, fnum, size);
+	}
+
+	free(buf);
+	close(fd);
+}
+
+/* 
+   revsusive directory traversal - used for cleanup
+   fn() is called on all files/dirs in the tree
+ */
+void traverse(const char *dir, int (*fn)(const char *))
+{
+	DIR *d;
+	struct dirent *de;
+
+	d = opendir(dir);
+	if (!d) return;
+
+	while ((de = readdir(d))) {
+		char fname[1024];
+		struct stat st;
+
+		if (strcmp(de->d_name,".") == 0) continue;
+		if (strcmp(de->d_name,"..") == 0) continue;
+
+		sprintf(fname, "%s/%s", dir, de->d_name);
+		if (lstat(fname, &st)) {
+			perror(fname);
+			continue;
+		}
+
+		if (S_ISDIR(st.st_mode)) {
+			traverse(fname, fn);
+		}
+
+		fn(fname);
+	}
+
+	closedir(d);
+}
+
+/* the main child function - this creates/checks the file for one child */
+static void run_child(int child)
+{
+	int i, loop;
+	char dir[1024];
+
+	sprintf(dir, "%s/child%d", base_dir, child);
+
+	/* cleanup any old files */
+	if (remove(dir) != 0 && errno != ENOENT) {
+		printf("Child %d cleaning %s\n", child, dir);
+		traverse(dir, remove);
+		remove(dir);
+	}
+
+	if (mkdir(dir, 0755) != 0) {
+		perror(dir);
+		exit(1);
+	}
+
+	for (loop = 0; loop < loop_count; loop++) {
+		printf("Child %d loop %d\n", child, loop);
+		for (i=0;i<num_files;i++) {
+			create_file(dir, loop, child, i);
+		}
+		for (i=0;i<num_files;i++) {
+			check_file(dir, loop, child, i);
+		}
+	}
+
+	/* cleanup afterwards */
+	printf("Child %d cleaning up %s\n", child, dir);
+	traverse(dir, remove);
+	remove(dir);
+
+	exit(0);
+}
+
+static void usage(void)
+{
+	printf("\n"
+"Usage: fstest [options]\n"
+"\n"
+" -n num_children       set number of child processes\n"
+" -f num_files          set number of files\n"
+" -s file_size          set file sizes\n"
+" -b block_size         set block (IO) size\n"
+" -p path               set base path\n"
+" -l loops              set loop count\n"
+" -m                    use mmap\n"
+" -S                    use synchronous IO\n"
+" -h                    show this help message\n");
+}
+
+/* main program */
+int main(int argc, char *argv[])
+{
+	int c;
+	extern char *optarg;
+	extern int optind;
+	int num_children = 1;
+	int i, status, ret;
+
+	while ((c = getopt(argc, argv, "n:s:f:p:l:b:Shm")) != -1) {
+		switch (c) {
+		case 'n':
+			num_children = strtol(optarg, NULL, 0);
+			break;
+		case 'b':
+			block_size = strtol(optarg, NULL, 0);
+			break;
+		case 'f':
+			num_files = strtol(optarg, NULL, 0);
+			break;
+		case 's':
+			file_size = strtol(optarg, NULL, 0);
+			break;
+		case 'p':
+			base_dir = optarg;
+			break;
+		case 'm':
+			use_mmap = 1;
+			break;
+		case 'S':
+			use_sync = 1;
+			break;
+		case 'l':
+			loop_count = strtol(optarg, NULL, 0);
+			break;
+		case 'h':
+			usage();
+			exit(0);
+		default:
+			usage();
+			exit(1);
+		}
+	}
+
+	argc -= optind;
+	argv += optind;
+
+	/* round up the file size */
+	if (file_size % block_size != 0) {
+		file_size = (file_size + (block_size-1)) / block_size;
+		file_size *= block_size;
+		printf("Rounded file size to %d\n", file_size);
+	}
+
+	printf("num_children=%d file_size=%d num_files=%d loop_count=%d block_size=%d\nmmap=%d sync=%d\n",
+	       num_children, file_size, num_files, loop_count, block_size, use_mmap, use_sync);
+
+	printf("Total data size %.1f Mbyte\n",
+	       num_files * num_children * 1.0e-6 * file_size);
+
+	/* fork and run run_child() for each child */
+	for (i=0;i<num_children;i++) {
+		if (fork() == 0) {
+			run_child(i);
+			exit(0);
+		}
+	}
+
+	ret = 0;
+
+	/* wait for children to exit */
+	while (waitpid(0, &status, 0) == 0 || errno != ECHILD) {
+		if (WEXITSTATUS(status) != 0) {
+			ret = WEXITSTATUS(status);
+			printf("Child exited with status %d\n", ret);
+		}
+	}
+
+	if (ret != 0) {
+		printf("fstest failed with status %d\n", ret);
+	}
+
+	return ret;
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/ltp-20080630-accept4-wrapper.patch
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/ltp-20080630-accept4-wrapper.patch	(revision 8277)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/ltp-20080630-accept4-wrapper.patch	(revision 8277)
@@ -0,0 +1,21 @@
+diff -Naupr ltp-full-20081130/testcases/kernel/syscalls/accept4/accept4_01.c ltp-full-20081130-mod/testcases/kernel/syscalls/accept4/accept4_01.c
+--- ltp-full-20081130/testcases/kernel/syscalls/accept4/accept4_01.c	2008-11-19 04:34:38.000000000 -0600
++++ ltp-full-20081130-mod/testcases/kernel/syscalls/accept4/accept4_01.c	2010-02-02 15:40:12.000000000 -0600
+@@ -147,7 +147,7 @@ setup()
+ 
+ 
+ static int
+-accept4(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags)
++accept4_internal(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags)
+ {
+ #ifdef DEBUG
+    tst_resm(TINFO, "Calling accept4(): flags = %x", flags);
+@@ -202,7 +202,7 @@ do_test(int lfd, struct sockaddr_in *con
+        die("Connect Error");
+ 
+    addrlen = sizeof(struct sockaddr_in);
+-   acceptfd = accept4(lfd, (struct sockaddr *) &claddr, &addrlen,
++   acceptfd = accept4_internal(lfd, (struct sockaddr *) &claddr, &addrlen,
+                       closeonexec_flag | nonblock_flag);
+    if (acceptfd == -1)
+        die("accept4() Error");
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/ltp-20080630-zoo-path.patch
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/ltp-20080630-zoo-path.patch	(revision 7256)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/ltp-20080630-zoo-path.patch	(revision 7256)
@@ -0,0 +1,53 @@
+--- ltp-full-20080630/runltp	2008-06-28 16:19:02.000000000 -0400
++++ ltp-full-20080630-new/runltp	2008-07-21 15:47:54.000000000 -0400
+@@ -79,6 +79,7 @@ setup()
+     export TMP="${TMPBASE}/ltp-$$"
+     export TMPDIR="${TMP}"
+     export PATH="${PATH}:${LTPROOT}/testcases/bin"
++    export ZOOFILE="$$"
+ 
+     [ -d $LTPROOT/testcases/bin ] ||
+     {
+@@ -152,6 +153,7 @@ usage() 
+     -v              Print more verbose output to screen.                   
+     -w CMDFILEADDR  Uses wget to get the user's list of testcases.
+     -x INSTANCES    Run multiple instances of this testsuite.
++    -z ZOOFILE      Specify an alternate path to zoo file.
+ 
+     example: ./${0##*/} -c 2 -i 2 -m 2,4,10240,1 -D 2,10,10240,1 -p -q  -l /tmp/result-log.$$ -o /tmp/result-output.$$ -C /tmp/result-failed.$$ -d ${PWD}
+ 
+@@ -191,7 +193,7 @@ main()
+     local DEFAULT_FILE_NAME_GENERATION_TIME=`date +"%Y_%b_%d-%Hh_%Mm_%Ss"`
+     version_date=`head -n 1 $LTPROOT/ChangeLog`
+ 
+-    while getopts a:c:C:d:D:f:ehi:g:l:m:Nno:pqr:s:t:T:vw:x: arg
++    while getopts a:c:C:d:D:f:ehi:g:l:m:Nno:pqr:s:t:T:vw:x:z: arg
+     do  case $arg in
+         a)  EMAIL_TO=$OPTARG
+             ALT_EMAIL_OUT=1;;
+@@ -377,6 +379,7 @@ main()
+             sleep 10 
+             INSTANCES="-x $OPTARG -O ${TMP}";;
+     
++	z)  ZOOFILE=$OPTARG;;
+         \?) usage;;
+         esac
+     done
+@@ -624,7 +627,7 @@ main()
+     fi
+ 
+     [ ! -z "$QUIET_MODE" ] && { echo "INFO: Test start time: $(date)" ; }
+-    PAN_COMMAND="${LTPROOT}/pan/pan $QUIET_MODE -e -S $INSTANCES $DURATION -a $$ \
++    PAN_COMMAND="${LTPROOT}/pan/pan $QUIET_MODE -e -S $INSTANCES $DURATION -a $ZOOFILE \
+     -n $$ $PRETTY_PRT -f ${TMP}/alltests $LOGFILE $OUTPUTFILE $FAILCMDFILE"
+     if [ ! -z "$VERBOSE_MODE" ] ; then
+       echo "COMMAND:    $PAN_COMMAND"
+@@ -652,7 +655,7 @@ main()
+ 
+     echo "Running tests......."
+     test_start_time=$(date)
+-    ${LTPROOT}/pan/pan $QUIET_MODE -e -S $INSTANCES $DURATION -a $$ -n $$ $PRETTY_PRT -f ${TMP}/alltests $LOGFILE $OUTPUTFILE $FAILCMDFILE
++    ${LTPROOT}/pan/pan $QUIET_MODE -e -S $INSTANCES $DURATION -a $ZOOFILE -n $$ $PRETTY_PRT -f ${TMP}/alltests $LOGFILE $OUTPUTFILE $FAILCMDFILE
+      
+     if [ $? -eq 0 ]; then
+       echo "INFO: pan reported all tests PASS"
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/vfs-cp
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/vfs-cp	(revision 4871)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/vfs-cp	(revision 4871)
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+cp ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-cp ${PVFS2_MOUNTPOINT}
+cp ${PVFS2_MOUNTPOINT}/pvfs2-cp ${PVFS2_DEST}
+
+cmp ${PVFS2_DEST}/pvfs2-cp ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-cp
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/ltp
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/ltp	(revision 8317)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/ltp	(revision 8317)
@@ -0,0 +1,93 @@
+#!/bin/bash
+
+LTPVER="20081130"
+THISDATE=`date +%F-%R`
+DOWNLOAD="http://www-unix.mcs.anl.gov/~carns/nightly-download/ltp-full-${LTPVER}.tgz"
+
+cd ${EXTRA_TESTS}
+
+# get rid of any old copies
+sudo rm -rf ltp-full-${LTPVER} ltp-full-${LTPVER}.tgz 
+
+# download
+echo Downloading LTP...
+wget -q ${DOWNLOAD} > /dev/null
+if [ "${?}" != 0 ]
+then
+    echo "Error: failed to download ${DOWNLOAD}."
+    exit 1;
+fi
+
+tar -xvzf ltp-full-${LTPVER}.tgz > /dev/null
+if [ "${?}" != 0 ]
+then
+    echo "Error: failed to untar ${DOWNLOAD}."
+    exit 1;
+fi
+
+# fix some pvfs specific problems
+cd ltp-full-${LTPVER}
+for patch in \
+	${VFS_SCRIPTS}/ltp-20080630-zoo-path.patch \
+        ${VFS_SCRIPTS}/ltp-20080630-accept4-wrapper.patch; do
+		patch -p1 < $patch
+done
+if [ "${?}" != 0 ]
+then
+    echo "Error: failed to apply patches to LTP."
+    exit 1;
+fi
+
+echo Compiling LTP...
+export CFLAGS="-g"
+make >& /dev/null 
+if [ "${?}" != 0 ]
+then
+    echo "Error: failed to build LTP."
+    exit 1;
+fi
+
+# NOTE: this does not install anything outside of the ltp directory.  It
+# just configures the test programs so that they can be executed.  We
+# deliberately avoid running make install at the top level because that
+# _would_ install files in /opt/ltp unecessarily.
+cd testcases
+sudo make install > /dev/null
+if [ "${?}" != 0 ]
+then
+    echo "Error: failed to make install LTP testcases."
+    exit 1;
+fi
+cd ../
+
+# copy pvfs friendly test cases; we should pass all of these
+cp ${VFS_SCRIPTS}/ltp-pvfs-testcases runtest/
+mkdir -p ${PVFS2_MOUNTPOINT}/ltp-tmp 
+chmod 777 ${PVFS2_MOUNTPOINT}/ltp-tmp
+umask 0
+
+# run ltp
+echo Running LTP...
+sudo ./runltp -p -l `pwd`/../ltp-pvfs-testcases-${THISDATE}.log -d ${PVFS2_MOUNTPOINT}/ltp-tmp -f ltp-pvfs-testcases -z ${EXTRA_TESTS}/zoo.tmp >& `pwd`/../ltp-pvfs-testcases-$THISDATE.output
+LTPRET=${?}
+if [ "${LTPRET}" != 0 ]
+then
+    echo "Error: either failed to invoke LTP, or at least one test failed"
+fi
+
+cd ..
+
+FAILCOUNT=`grep FAIL ltp-pvfs-testcases-$THISDATE.log | wc -l`
+
+if [ "${FAILCOUNT}" != 0 -o "${LTPRET}" != 0 ]
+then 
+    echo "Error: failed the following LTP test cases:"
+    grep FAIL ltp-pvfs-testcases-$THISDATE.log
+    echo "log file:                    ${EXTRA_TESTS}/ltp-pvfs-testcases-$THISDATE.log"
+    echo "record of stdout and stderr: ${EXTRA_TESTS}/ltp-pvfs-testcases-$THISDATE.output"
+    exit 1
+fi
+
+echo "Completed LTP tests."
+
+exit 0
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/fsx
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/fsx	(revision 4834)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/fsx	(revision 4834)
@@ -0,0 +1,9 @@
+#!/bin/sh 
+
+# fsx options: 
+# -W disables mapped writes (which pvfs2 does not support)
+# -R disables mapped reads.  In FSX, mmap reads are MAP_SHARED, which pvfs2
+#    does not support.
+# good catch, sam!
+
+gcc ${VFS_SCRIPTS}/fsx.c -o ${PVFS2_DEST}/fsx && ${PVFS2_DEST}/fsx -N 1000 -W -R ${PVFS2_MOUNTPOINT}/fsx_testfile
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/ltp-20080630-hackbench-limits.patch
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/ltp-20080630-hackbench-limits.patch	(revision 7287)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/ltp-20080630-hackbench-limits.patch	(revision 7287)
@@ -0,0 +1,11 @@
+diff -burpN -x cscope.out -x MakefileHost -x MakefileTarget ltp-full-20080630/testcases/kernel/sched/cfs-scheduler/hackbench.c ltp-full-20080630.modified/testcases/kernel/sched/cfs-scheduler/hackbench.c
+--- ltp-full-20080630/testcases/kernel/sched/cfs-scheduler/hackbench.c	2008-06-28 15:19:08.000000000 -0500
++++ ltp-full-20080630.modified/testcases/kernel/sched/cfs-scheduler/hackbench.c	2008-07-25 10:47:08.000000000 -0500
+@@ -48,6 +48,7 @@
+ /*                                                                            */
+ /******************************************************************************/
+ #include <pthread.h>
++#include <limits.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/mkdir-vfs
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/mkdir-vfs	(revision 4976)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/mkdir-vfs	(revision 4976)
@@ -0,0 +1,6 @@
+#!/bin/sh 
+
+PATH=${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin:${PATH}
+echo $PATH
+export PATH
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/test/test-mkdir --directory ${PVFS2_MOUNTPOINT} 
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/iozone
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/iozone	(revision 5819)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/iozone	(revision 5819)
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+cd ${EXTRA_TESTS}/iozone3_239/src/current  || exit 1
+make linux  || exit 1
+# -y min record size
+# -q max record size
+# -n min file size
+# -g max file size
+./iozone -a -y 4096 -q $((1024*16)) -n 4096 -g $((1024*16*2)) \
+        -f ${PVFS2_MOUNTPOINT}/test_iozone_file
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/append
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/append	(revision 4722)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/append	(revision 4722)
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+pvfs2_testfile=${PVFS2_MOUNTPOINT}/append_test
+local_reference=${PVFS2_DEST}/append_ref
+datagen() {
+	for I in `seq 1 25`; do
+		echo "line$I" 
+	done
+}
+
+datagen > $local_reference
+datagen > $pvfs2_testfile
+datagen >> $local_reference
+datagen >> $pvfs2_testfile
+
+diff -u $local_reference $pvfs2_testfile
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/ltp-pvfs-testcases
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/ltp-pvfs-testcases	(revision 7186)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/ltp-pvfs-testcases	(revision 7186)
@@ -0,0 +1,323 @@
+# LTP test cases for PVFS
+# known to work with LTP version 20060717, not sure about later versions
+
+access03 access03
+asyncio02 asyncio02
+chdir02 chdir02
+chown01 chown01
+close08 close08
+creat09 creat09
+dup01 dup01
+dup02 dup02
+dup03 dup03
+dup04 dup04
+fchmod01 fchmod01
+fchown01 fchown01
+fcntl02 fcntl02
+fcntl03 fcntl03
+fcntl04 fcntl04
+fcntl07 fcntl07
+fcntl08 fcntl08
+fpathconf01 fpathconf01
+fstat01 fstat01
+fstatfs01 fstatfs01
+fsync01 fsync01
+lseek01 lseek01
+lseek02 lseek02
+lseek03 lseek03
+lseek05 lseek05
+lstat02 lstat02
+mkdir01 mkdir01
+mkdir08 mkdir08
+open03 open03
+pathconf01 pathconf01
+read01 read01
+readdir01 readdir01
+readlink02 readlink02
+rename02 rename02
+rmdir04 rmdir04
+rmdir05 rmdir05
+select01 select01
+select02 select02
+stat05 stat05
+stat06 stat06
+statfs01 statfs01
+sync01 sync01
+umask01 umask01
+unlink05 unlink05
+unlink07 unlink07
+unlink08 unlink08
+write01 write01
+symlink01 symlink01
+symlink02 symlink02
+readlink01 symlink01 -T readlink01
+lstat01 symlink01 -T lstat01
+mkdir05 symlink01 -T mkdir05
+rmdir03 symlink01 -T rmdir03
+chdir01 symlink01 -T chdir01
+unlink01 symlink01 -T unlink01
+chmod01 symlink01 -T chmod01
+utime01 symlink01 -T utime01
+rename01 symlink01 -T rename01
+open01 symlink01 -T open01
+abort01 ulimit -c 1024;abort01
+access02 access02
+access04 access04
+access05 access05
+chdir01 chdir01
+chdir01A symlink01 -T chdir01
+chdir03 chdir03
+chdir04 chdir04
+chmod01A symlink01 -T chmod01
+chown05 chown05
+chroot01 chroot01
+chroot02 chroot02
+chroot03 chroot03
+chroot04 chroot04
+close01 close01
+close02 close02
+creat01 creat01
+creat03 creat03
+creat04 creat04
+creat05 creat05
+creat06 creat06
+creat07 creat07 -F $LTPROOT/testcases/bin/test1
+creat08 creat08
+dup06 dup06
+dup07 dup07
+dup201 dup201
+dup202 dup202
+dup203 dup203
+dup204 dup204
+dup205 dup205
+fchdir01 fchdir01
+fchdir02 fchdir02
+fchdir03 fchdir03
+fchown04 export change_owner=$LTPROOT/testcases/bin/change_owner;fchown04
+fchown05 fchown05
+fcntl01 fcntl01
+fcntl06 fcntl06
+fcntl12 fcntl12
+fcntl13 fcntl13
+fcntl18 fcntl18
+fdatasync01 fdatasync01
+fdatasync02 fdatasync02
+fstat02 fstat02
+fstat03 fstat03
+fstat04 fstat04
+fstat05 fstat05
+fstatfs02 fstatfs02
+fsync03 fsync03
+ftruncate01 ftruncate01
+ftruncate02 ftruncate02
+ftruncate03 ftruncate03
+ftruncate04 ftruncate04
+getcwd01 getcwd01
+getcwd02 getcwd02
+getcwd03 getcwd03
+getdents01 getdents01
+getdents02 getdents02
+getdents03 getdents03
+getdents04 getdents04
+ioperm01 ioperm01
+iopl01 iopl01
+iopl02 iopl02
+lchown01 lchown01
+link06 link06
+link07 link07
+llseek01 llseek01
+llseek02 llseek02
+lseek06 lseek06
+lseek07 lseek07
+lseek08 lseek08
+lseek09 lseek09
+lstat01 lstat01
+lstat03 lstat03
+mallopt01 mallopt01
+mkdir02 mkdir02
+mkdir03 mkdir03
+mkdir04 mkdir04
+mkdir05 mkdir05
+mkdir05A symlink01 -T mkdir05
+mkdir09 mkdir09
+mmap06 mmap06
+mmap07 mmap07
+mmap08 mmap08
+modify_ldt01 modify_ldt01
+modify_ldt02 modify_ldt02
+mprotect01 mprotect01
+mremap02 mremap02
+mremap03 mremap03
+mremap04 mremap04
+msync03 msync03
+msync04 msync04
+msync05 msync05
+nftw01 nftw01
+nftw6401 nftw6401
+open01A symlink01 -T open01
+open02 open02
+open04 open04
+open05 open05
+open07 open07
+open08 open08
+open09 open09
+open10 open10
+pipe01 pipe01
+pipe02 pipe02
+pipe03 pipe03
+pipe04 pipe04
+pipe05 pipe05
+pipe06 pipe06
+pipe07 pipe07
+pipe08 pipe08
+pipe09 pipe09
+pipe10 pipe10
+pipe11 pipe11
+prctl01 prctl01
+prctl02 prctl02
+pread01 pread01
+pread02 pread02
+pread03 pread03
+profil01 profil01
+ptrace01 ptrace01
+ptrace02 ptrace02
+ptrace03 ptrace03
+pwrite01 pwrite01
+pwrite02 pwrite02
+pwrite03 pwrite03
+pwrite04 pwrite04
+read02 read02
+read04 read04
+readdir02 readdir02
+readlink01A symlink01 -T readlink01
+readlink01 readlink01
+readlink03 readlink03
+readlink04 cp -f $LTPROOT/testcases/bin/creat_slink $TMP; readlink04
+readv01 readv01
+readv02 readv02
+readv03 readv03
+rename01 rename01
+rename01A symlink01 -T rename01
+rename03 rename03
+rename04 rename04
+rename05 rename05
+rename06 rename06
+rename07 rename07
+rename08 rename08
+rename09 rename09
+rename10 rename10
+rename14 rename14
+rmdir01 rmdir01
+rmdir02 rmdir02
+rmdir03A symlink01 -T rmdir03
+stat01 stat01
+stat02 stat02
+stat03 stat03
+statfs02 statfs02
+statfs03 statfs03
+symlink03 symlink03
+symlink04 symlink04
+symlink05 symlink05
+sync02 sync02
+syscall01 syscall01
+sysconf01 sysconf01
+sysfs02 sysfs02
+sysfs03 sysfs03
+sysfs04 sysfs04
+sysfs05 sysfs05
+sysfs06 sysfs06
+sysinfo01 sysinfo01
+sysinfo02 sysinfo02
+truncate01 truncate01
+truncate02 truncate02
+truncate03 truncate03
+truncate04 truncate04
+umask02 umask02
+umask03 umask03
+uname01 uname01
+uname02 uname02
+uname03 uname03
+ustat01 ustat01
+ustat02 ustat02
+utime01 utime01
+utime01A symlink01 -T utime01
+utime02 utime02
+utime03 utime03
+utime04 utime04
+utime05 utime05
+utime06 utime06
+write02 write02
+write03 write03
+write05 write05
+writev02 writev02
+writev05 writev05
+pipeio_3 pipeio -T pipeio_3 -c 5 -s 4090 -i 100 -u -b -f x80
+pipeio_4 pipeio -T pipeio_4 -c 5 -s 4090 -i 100 -u -f x80
+pipeio_6 pipeio -T pipeio_6 -c 5 -s 5000 -i 10 -b -u -f x80
+pipeio_8 pipeio -T pipeio_8 -c 5 -s 5000 -i 10 -u -f x80
+openfile01 openfile -f10 -t10
+statvfs01 statvfs01
+stat04 symlink01 -T stat04
+lstat01A symlink01 -T lstat01
+
+
+# TESTS THAT ARE KNOWN TO FAIL 
+###############################################
+
+# this is a known issue, not likely to be fixed.  The posix semantics are not
+# well defined for writev in some cases and pvfs2 differs in its
+# interpretation from ext3
+# http://www.beowulf-underground.org/pipermail/pvfs2-developers/2005-August/001449.html
+
+# writev01 writev01
+# writev03 writev03
+# writev04 writev04
+
+# PVFS does not support mkfifo, needed by a few pipeio,lseek,unlink tests
+
+# These tests use tests/pipeio to put pipes (named or unnamed) through a workout
+#
+# pipeio_1 pipeio -T pipeio_1 -c 5 -s 4090 -i 100 -b -f x80
+
+# spawns 5 children to write 100 chunks of 4090 bytes to an unnamed pipe 
+# using non-blocking I/O
+# pipeio_5 pipeio -T pipeio_5 -c 5 -s 5000 -i 10 -b -f x80
+# unlink06 unlink06
+
+# PVFS does not support mknod, needed by this lseek,open,read test
+# lseek10 lseek10
+# open06 open06
+# read03 read03
+# write04 write04
+
+# PVFS does not support the S_ISVTX (sticky) permission bit
+# rename12 rename12
+# rmdir03 rmdir03
+
+# PVFS does not support hard links
+# rename13 rename13
+
+# PVFS does not support close-on-exec (see F_SETFD in fcntl man page)
+# open01      1  FAIL  :  Save test bit cleared, but should not have been
+# open01 open01
+
+# PVFS does not support suid?
+# chown04 cp -p $LTPROOT/testcases/bin/change_owner $TMP;chown04
+# fchmod06 cp -p $LTPROOT/testcases/bin/change_owner $TMP;fchmod06
+# lchown02 cp -p $LTPROOT/testcases/bin/create_link $TMP; lchown02
+
+# PVFS does not support flocks
+# fcntl05 fcntl05
+# fcntl22 fcntl22
+# fcntl09 fcntl09
+# fcntl10 fcntl10
+# fcntl11 fcntl11
+# fcntl14 fcntl14
+# fcntl15 fcntl15
+# fcntl17 fcntl17
+# fcntl19 fcntl19
+# fcntl20 fcntl20
+# fcntl21 fcntl21
+
+# this test is specific to ext2
+# sysfs01 sysfs01
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/shelltest
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/shelltest	(revision 4879)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/shelltest	(revision 4879)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+sh ${PVFS2_DEST}/pvfs2-${CVS_TAG}/test/kernel/linux-2.6/pvfs2-shell-test.sh ${PVFS2_MOUNTPOINT} 2>&1
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/fstest
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/fstest	(revision 4834)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/fstest	(revision 4834)
@@ -0,0 +1,6 @@
+#!/bin/sh 
+
+mkdir ${PVFS2_MOUNTPOINT}/fstest
+
+gcc ${VFS_SCRIPTS}/fstest.c -o ${PVFS2_DEST}/fstest && \
+	${PVFS2_DEST}/fstest -p ${PVFS2_MOUNTPOINT}/fstest
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/fdtree
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/fdtree	(revision 4477)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/fdtree	(revision 4477)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+cd ${PVFS2_MOUNTPOINT} &&  ${EXTRA_TESTS}/fdtree-1.0.1/fdtree.bash -l 4 -d 5
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/bonnie
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/bonnie	(revision 4530)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/vfs-tests.d/bonnie	(revision 4530)
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+cd ${EXTRA_TESTS}/bonnie++-1.03a
+./configure -q && make 2>&1 && cd ${PVFS2_MOUNTPOINT} || exit 1
+cd ${PVFS2_MOUNTPOINT} && \
+	${EXTRA_TESTS}/bonnie++-1.03a/bonnie++  -n 1:0:0:1  -r 8 -s 16 2>&1
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/PAVCONFIG.template
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/PAVCONFIG.template	(revision 3224)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/PAVCONFIG.template	(revision 3224)
@@ -0,0 +1,18 @@
+NODEFILE="/home/USER/testing/DATE/work/nodes.conf"
+IONCOUNT=4
+METACOUNT=1
+UNIQUEMETA=0
+PROTOCOL=tcp
+PVFSPORT=3349
+WORKINGDIR="/tmp/pvfs2-pav"
+STORAGE="/tmp/pvfs2-pav/storage"
+SERVERLOG="/tmp/pvfs2-pav/log"
+MOUNTPOINT="/tmp/pvfs2-pav-mount"
+BINDIR="/home/USER/testing/DATE/work/INSTALL-pvfs2/bin"
+RCMDPROG=rsh
+RCPPROG=rcp
+SERVER="/home/USER/testing/DATE/work/INSTALL-pvfs2/sbin/pvfs2-server"
+PINGPROG="/home/USER/testing/DATE/work/INSTALL-pvfs2/bin/pvfs2-ping"
+GENCONFIG="/home/USER/testing/DATE/work/INSTALL-pvfs2/bin/pvfs2-genconfig"
+COPYBINS=1
+PVFS2TAB_FILE="/tmp/pvfs2-pav/pvfs2tab"
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/testscrpt-mpi.sh
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/testscrpt-mpi.sh	(revision 5020)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/testscrpt-mpi.sh	(revision 5020)
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+# parent script already built and deployed pvfs2 and mpich2.  All we need to do
+# now is set up PAV and kick off some scripts
+# At this point we have:
+#
+#   ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}         installation prefix for pvfs2
+#   ${PVFS2_DEST}/pvfs2-${CVS_TAG}/test/common/pav location of pav scripts
+#   ${PVFS2_DEST}/soft/mpich2                     installation prefix for mpich2
+#   $PVFS2_MOUNTPOINT                             mountpoint for pvfs2
+
+if [ -z "$PVFS2_DEST" ] ; then
+	echo "do not run this script directly."
+	exit 1
+fi
+
+MPIIO_SCRIPTS=${PVFS2_DEST}/pvfs2-${CVS_TAG}/test/automated/mpiio-tests.d
+
+
+# we will only do multi processor tests if there's a pav config file 
+# we can use.   several tests can fall back to single processor, and 
+# still do something reasonable. 
+
+export PAV_CONFIG=${HOME}/pav-config-testing
+
+# cluster environments need a few things available on a cluster-wide file
+# system: pav (which needs some pvfs2 programs), the mpi program, mpich2
+# (specifically mpd and tools )
+
+export CLUSTER_DIR=${HOME}/nightly
+[ -d ${CLUSTER_DIR} ] ||  mkdir -p ${CLUSTER_DIR}
+rm -rf ${CLUSTER_DIR}/pav ${CLUSTER_DIR}/mpich2 ${CLUSTER_DIR}/pvfs2
+cp -ar ${PVFS2_DEST}/pvfs2-${CVS_TAG}/test/common/pav ${CLUSTER_DIR}
+cp -ar ${PVFS2_DEST}/soft/mpich2 ${CLUSTER_DIR}
+cp -ar ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG} ${CLUSTER_DIR}/pvfs2
+
+run_parts ${MPIIO_SCRIPTS}
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/kmod_ctrl.sh
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/kmod_ctrl.sh	(revision 3440)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/kmod_ctrl.sh	(revision 3440)
@@ -0,0 +1,107 @@
+#!/bin/sh
+
+host="localhost"
+port=3334
+rootdir=$1
+srcdir=$rootdir/pvfs2
+builddir=$rootdir/BUILD-pvfs2
+installdir=$rootdir/INSTALL-pvfs2
+
+if [ $PVFSPORT ] ; then
+    port=$PVFSPORT
+fi
+
+#load the module
+insmod_kmmod() {
+  sudo /sbin/insmod $installdir/sbin/pvfs2.ko
+  if [ $? != 0 ] ; then
+    echo "Error loading the kernel module. Aborting."
+    exit 1
+  else
+    echo "Kernel module loaded."
+  fi
+}
+#unload the module
+rmmod_kmmod() {
+  sleep 3
+  sudo /sbin/rmmod pvfs2
+  if [ $? != 0 ] ; then
+    echo "Error removing the kernel module. Aborting."
+    exit 1
+  else
+    echo "Kernel module unloaded."
+  fi
+}
+
+#mount the pvfs2 filesystem for use by the kernel module
+mount_fs() {
+  mkdir -p $installdir/mnt/pvfs2
+  sudo /bin/mount -t pvfs2 tcp://$host:$port/pvfs2-fs $installdir/mnt/pvfs2
+  if [ $? != 0 ] ; then
+    echo "Error mounting the pvfs2 filesystem. Aborting."
+    exit 1
+  else
+    echo "PVFS2 Filesystem mounted correctly on $installdir/mnt/pvfs2"
+  fi 
+}
+#unmount the pvfs2 filesystem
+umount_fs() {
+  sudo umount $installdir/mnt/pvfs2
+  if [ $? != 0 ] ; then
+    echo "Error unmounting the pvfs2 filesystem. Aborting."
+    exit 1
+  else
+    echo "PVFS2 Filesystem unmounted."
+  fi 
+}
+
+#start the pvfs2 client
+start_client() {
+  echo "$installdir/sbin/pvfs2-client -p $installdir/sbin/pvfs2-client-core" > /tmp/pvfs2-client-launcher.$USER
+  chmod u+x /tmp/pvfs2-client-launcher.$USER
+  sudo /tmp/pvfs2-client-launcher.$USER
+  if [ $? != 0 ] ; then
+    echo "Error starting client. Aborting."
+    exit 1
+  else
+    echo "PVFS2 client started."
+  fi
+}
+#stop the pvfs2 client
+stop_client() {
+  pvfs2_client_pid=`ps aux | awk '/pvfs2-client/ && !/awk/ {print $2}'`
+  sudo /bin/kill $pvfs2_client_pid
+  if [ $? != 0 ] ; then
+    echo "Error shutting down the PVFS2 client."
+    exit 1
+  else
+    echo "PVFS2 client shutdown."
+  fi
+}
+
+# See how we were called.
+case "$2" in
+  start)
+    # load the kernel module
+    insmod_kmmod || exit 1
+    #start the server
+    start_client || exit 1
+    #mount the pvfs2 filesystem
+    mount_fs || exit 1
+  ;;
+  stop)
+    #unmount the pvfs2 filesystem
+    umount_fs || exit 1
+    #stop the client
+    stop_client || exit 1
+    #remove the kernel module
+    rmmod_kmmod || exit 1
+  ;;
+  restart)
+    $0 $1 stop
+    $0 $1 start
+  ;;
+  *)
+    echo "Usage: $0 <PVFS2 install dir> {start|stop|restart}"
+    exit 1
+esac
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/run-test-adenine.sh
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/run-test-adenine.sh	(revision 4859)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/run-test-adenine.sh	(revision 4859)
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+DATE=`date "+%b%d-%Y"`
+old_wd=`pwd`
+
+mkdir -p /home/$USER/testing/$DATE/work
+
+sed -e s/DATE/$DATE/g PAVCONFIG.template | sed -e s/USER/$USER/g > PAVCONFIG
+sed -e s/DATE/$DATE/g CONFIG.template | sed -e s/USER/$USER/g > CONFIG
+sed -e s/DATE/$DATE/g SUBMIT.pbs.template | sed -e s/USER/$USER/g > SUBMIT.pbs
+
+email=`grep EMAIL CONFIG | cut -d "=" -f 2`
+
+cd ../../maint/build/
+
+./pvfs2-build.sh -r /home/$USER/testing/$DATE/work > tmp.out 2>&1
+if [ $? != 0 ] ; then
+    mail -s "PVFS2 test: FAIL (pvfs2-build.sh)" "$email" < tmp.out
+    exit 1
+fi
+
+./mpich2-build.py -r /home/$USER/testing/$DATE/work > tmp.out 2>&1
+if [ $? != 0 ] ; then
+    mail -s "PVFS2 test: FAIL (mpich2-build.py)" "$email" < tmp.out
+    exit 1
+fi
+
+cd $old_wd
+qsub -l nodes=4:ppn=1 SUBMIT.pbs
+
+exit 0
+
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/README.tests
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/README.tests	(revision 8317)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/README.tests	(revision 8317)
@@ -0,0 +1,70 @@
+#
+# $Date: 2010-04-30 20:00:56 $
+#
+# A brief description of the contents of the test/automated directory
+
+
+From time to time we (pvfs2 developers) make an effort to thouroughly
+test pvfs2.  We really do think it's important... it just ends up taking
+a back seat to lots of other important items.   
+
+CURRENT APPROACH:
+
+  It would be hard to describe this as "minimally invasive".  We want to
+  test the VFS interface in addition to the libpvfs and mpi-io
+  interfaces, so we need significant modifications to the host machine.
+  At MCS, we have 'gil' and 'lain', two "red" machines (machines on
+  which we have root acces and no support from our system
+  adminitrators).  
+
+  The scripts require occaional root access, so it's best to set up sudo
+  with a NOPASSWD entry (i.e. a line like "robl    ALL=NOPASSWD: ALL" in
+  /etc/sudoers).  
+
+  The main driver is 'testscrpt.sh' (name subject to change).  It
+  builds pvfs2, starts up the servers, loads the kernel module, and
+  starts pvfs2-client and pvfs2-client-core.   The script needs a few
+  variables set:
+
+    PVFS2_DEST:       staging location for checking out, building, logging
+    PVFS2_MOUNTPOINT: where we mount pvfs2
+    EXTRA_TESTS:      directory where more sophisticated benchmarks (like
+                      bonnie, iozone, ior, etc) live
+
+  Then it proceeds to run every executable file in 'sysint-tests.d',
+  'vfs-tests.d' and 'mpiio-tests.d' These files are simple little shell
+  scripts that do something to exercise pvfs2.  
+
+  Sam set up a tinderbox on lain.mcs.anl.gov, and wrote
+  tinder-pvfs2-status to make it easy for scripts to lob bits at it.   A
+  couple things that tripped me up when I first started using it:
+
+  - The states are enumerated in 'BuildStatus.pm' in the tinderbox
+    directory.  
+  - there seems to be a 6 minute interval where if you start a new run
+    you'll overwrite the old run
+
+On a Cluster:
+  The common way to deploy PVFS2 on a cluster is through our pav
+  scripts.  Thus, we need a pav config file, specified by the PAV_CONFIG
+  variable.  We also want to run the usual battery of tests
+
+OLDER APPROACHES:
+
+These files aren't used anymore but might provide someone with some
+useful ideas on how to script up a benchmark and interact with PBS.  If
+anybody wants to document them, feel free to elaborate on this section.
+
+  bonnie++.sh
+  CONFIG.template
+  kmod_ctrl.sh
+  PAVCONFIG.template
+  pvfs2tests.py
+  run-cron-adenine.sh
+  run-cron-heroin.sh
+  run-test-adenine.sh
+  simple.sh
+  single-node-kernel-test.sh
+  SUBMIT.pbs.template
+
+# vim: tw=72
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/run-cron-heroin.sh
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/run-cron-heroin.sh	(revision 3472)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/run-cron-heroin.sh	(revision 3472)
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+email=pvfs2-testing@beowulf-underground.org
+
+cvsroot=:pserver:anonymous@cvs.parl.clemson.edu:/anoncvs
+
+DATE=`date "+%b%d-%Y"`
+
+mkdir -p $HOME/testing/$DATE
+cd $HOME/testing/$DATE
+
+expect -c "spawn -noecho cvs -Q -d $cvsroot login; send \r;"
+cvs -Q -d $cvsroot co pvfs2
+if [ $? -ne 0 ] ; then
+    echo "Pulling PVFS2 from $cvsroot failed."
+    exit 1
+fi
+
+cd pvfs2/test/automated/
+
+mkdir -p $HOME/testing/$DATE/work
+
+sudo /bin/dmesg -c
+
+echo "test output:" > /tmp/test_out.txt
+echo "=======================" >> /tmp/test_out.txt
+echo " " >> /tmp/test_out.txt
+
+
+./single-node-kernel-test.sh -k /home/pvfs2/linux-2.6.3/ -r $HOME/testing/$DATE/work/ >> /tmp/test_out.txt 2>&1 
+if [ $? -ne 0 ] ; then
+    subject="PVFS2 kernel test: FAIL"
+else
+    subject="PVFS2 kernel test: PASS"
+fi
+
+echo "dmesg output:" >> /tmp/test_out.txt
+echo "=======================" >> /tmp/test_out.txt
+echo " " >> /tmp/test_out.txt
+
+sudo /bin/dmesg 2>&1 >> /tmp/test_out.txt
+
+rm -rf $HOME/testing/$DATE
+
+mail -s "$subject" "$email" < /tmp/test_out.txt
+
+exit 0
+
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/heidelberg-IO.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/heidelberg-IO.c	(revision 6146)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/heidelberg-IO.c	(revision 6146)
@@ -0,0 +1,320 @@
+#define _GNU_SOURCE
+#include <mpi.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#define DATATYPE MPI_BYTE
+
+#define MPI_Sleep(c, n) MPI_Barrier(c); sleep(n); MPI_Barrier(c);
+
+#define DEFAULT_ELEMENTS (10 * 1024 * 1024)
+#define DEFAULT_FILENAME "pvfs2:///pvfs2/foobar"
+#define DEFAULT_ITERATIONS 10
+
+#define BOOL(n) (((n) == 0) ? "false" : "true")
+
+typedef struct {
+	char* name;
+	void (*function) (void);
+} test;
+
+/* Stuff needed by getopt() */
+extern char *optarg;
+extern int optind, opterr, optopt;
+
+int rank;
+int size;
+int datatype_size;
+
+/* Options */
+unsigned int elements = DEFAULT_ELEMENTS;
+char* filename = DEFAULT_FILENAME;
+unsigned int iterations = DEFAULT_ITERATIONS;
+
+int mode = MPI_MODE_RDWR | MPI_MODE_CREATE;
+char* buffer = NULL;
+MPI_Info info;
+MPI_Datatype datatype;
+
+void Test_level0 (void);
+void Test_level1 (void);
+void Test_level2 (void);
+void Test_level3 (void);
+
+void usage (char**);
+void get_args (int, char**);
+
+void allocate_buffer (int);
+void free_buffer (void);
+
+test tests[] = {
+	{ "level0", Test_level0 },
+	{ "level1", Test_level1 },
+	{ "level2", Test_level2 },
+	{ "level3", Test_level3 }
+};
+
+/* Tests must return void and take no arguments. */
+/* Level 0: non-collective, contiguous */
+void Test_level0 ()
+{
+	MPI_File fh;
+	MPI_Status status;
+	int i;
+
+	allocate_buffer(elements);
+
+	MPI_File_open(MPI_COMM_WORLD, filename, mode, info, &fh);
+	MPI_File_set_view(fh, 0, DATATYPE, datatype, "native", info);
+	MPI_File_seek(fh, 0, MPI_SEEK_SET);
+
+	for (i = 0; i < iterations; ++i)
+	{
+		MPI_File_write(fh, buffer, elements, DATATYPE, &status);
+	}
+
+	MPI_Sleep(MPI_COMM_WORLD, 1);
+	MPI_File_seek(fh, 0, MPI_SEEK_SET);
+
+	for (i = 0; i < iterations; ++i)
+	{
+		MPI_File_read(fh, buffer, elements, DATATYPE, &status);
+	}
+
+	MPI_File_close(&fh);
+
+	free_buffer();
+}
+
+/* Level 1: collective, contiguous */
+void Test_level1 ()
+{
+	MPI_File fh;
+	MPI_Status status;
+	int i;
+
+	allocate_buffer(elements);
+
+	MPI_File_open(MPI_COMM_WORLD, filename, mode, info, &fh);
+	MPI_File_set_view(fh, 0, DATATYPE, datatype, "native", info);
+	MPI_File_seek(fh, 0, MPI_SEEK_SET);
+
+	for (i = 0; i < iterations; ++i)
+	{
+		MPI_File_write_all(fh, buffer, elements, DATATYPE, &status);
+	}
+
+	MPI_Sleep(MPI_COMM_WORLD, 1);
+	MPI_File_seek(fh, 0, MPI_SEEK_SET);
+
+	for (i = 0; i < iterations; ++i)
+	{
+		MPI_File_read_all(fh, buffer, elements, DATATYPE, &status);
+	}
+
+	MPI_File_close(&fh);
+
+	free_buffer();
+}
+
+/* Level 2: non-collective, non-contiguous */
+void Test_level2 ()
+{
+	MPI_File fh;
+	MPI_Status status;
+
+	allocate_buffer(iterations * elements);
+
+	MPI_File_open(MPI_COMM_WORLD, filename, mode, info, &fh);
+	MPI_File_set_view(fh, 0, DATATYPE, datatype, "native", info);
+	MPI_File_seek(fh, 0, MPI_SEEK_SET);
+
+	MPI_File_write(fh, buffer, iterations * elements, DATATYPE, &status);
+
+	MPI_Sleep(MPI_COMM_WORLD, 1);
+	MPI_File_seek(fh, 0, MPI_SEEK_SET);
+
+	MPI_File_read(fh, buffer, iterations * elements, DATATYPE, &status);
+
+	MPI_File_close(&fh);
+
+	free_buffer();
+}
+
+/* Level 3: collective, non-contiguous */
+void Test_level3 ()
+{
+	MPI_File fh;
+	MPI_Status status;
+
+	allocate_buffer(iterations * elements);
+
+	MPI_File_open(MPI_COMM_WORLD, filename, mode, info, &fh);
+	MPI_File_set_view(fh, 0, DATATYPE, datatype, "native", info);
+	MPI_File_seek(fh, 0, MPI_SEEK_SET);
+
+	MPI_File_write_all(fh, buffer, iterations * elements, DATATYPE, &status);
+
+	MPI_Sleep(MPI_COMM_WORLD, 1);
+	MPI_File_seek(fh, 0, MPI_SEEK_SET);
+
+	MPI_File_read_all(fh, buffer, iterations * elements, DATATYPE, &status);
+
+	MPI_File_close(&fh);
+
+	free_buffer();
+}
+
+void usage (char** argv)
+{
+	printf(	"Usage: %s [-d] [-f filename] [-h] [-H hints] [-i iterations] [-s elements]\n"
+			"	-d		Toggle delete file on close. (Default: %s)\n"
+			"	-f		The name of the file used for the tests. (Default: %s)\n"
+			"	-h		Display this help.\n"
+			"	-H		Hints, in the form key=value.\n"
+			"	-i		Number of iterations. (Default: %d)\n"
+			"	-s		The number of elements per iteration per process. (Default: %d)\n"
+			"			Filesize = Elements * Iterations * %d\n"
+	, argv[0], BOOL(mode & MPI_MODE_DELETE_ON_CLOSE), DEFAULT_FILENAME, DEFAULT_ITERATIONS, DEFAULT_ELEMENTS, datatype_size);
+}
+
+void get_args (int argc, char** argv)
+{
+	int opt;
+	char* key;
+	char* value;
+	char multiplier;
+
+	while ((opt = getopt(argc, argv, "df:hH:i:s:")) != -1)
+	{
+		switch (opt)
+		{
+			case 'd':
+				mode ^= MPI_MODE_DELETE_ON_CLOSE;
+				break;
+			case 'f':
+				filename = strdup(optarg);
+				break;
+			case 'h':
+				usage(argv);
+				MPI_Finalize();
+				exit(0);
+			case 'H':
+				/* Hint format must be key=value. */
+				key = optarg;
+
+				if ((value = strchr(optarg, '=')) == NULL)
+				{
+					if (rank == 0)
+					{
+						printf("Error: Invalid hint.\n");
+					}
+
+					MPI_Abort(MPI_COMM_WORLD, 1);
+				}
+
+				/* Separate key and value. */
+				*value = '\0';
+				++value;
+
+				if (rank == 0)
+				{
+					printf("Hint: %s=%s\n", key, value);
+				}
+
+				MPI_Info_set(info, key, value);
+
+				/* Restore the string. */
+				--value;
+				*value = '=';
+				break;
+			case 'i':
+				iterations = atoi(optarg);
+				break;
+			case 's':
+				elements = atoi(optarg);
+				multiplier = *(optarg + strlen(optarg) - 1);
+
+				switch (multiplier)
+				{
+					case 'G':
+						elements *= 1024;
+					case 'M':
+						elements *= 1024;
+					case 'K':
+						elements *= 1024;
+						break;
+				}
+
+				break;
+		}
+	}
+}
+
+void allocate_buffer (int buffer_size)
+{
+	if ((buffer = malloc(buffer_size * datatype_size)) == NULL)
+	{
+		printf("%3d/%3d: Error: Can not allocate memory.\n", rank + 1, size);
+
+		MPI_Abort(MPI_COMM_WORLD, 1);
+	}
+
+	memset(buffer, rank, buffer_size * datatype_size);
+}
+
+void free_buffer ()
+{
+	free(buffer);
+	buffer = NULL;
+}
+
+int main (int argc, char** argv)
+{
+	int i, j;
+
+	MPI_Init(&argc, &argv);
+
+	MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+	MPI_Comm_size(MPI_COMM_WORLD, &size);
+	MPI_Type_size(DATATYPE, &datatype_size);
+
+	printf("%3d/%3d: Hello world!\n", rank + 1, size);
+
+	MPI_Barrier(MPI_COMM_WORLD);
+
+	MPI_Info_create(&info);
+
+	get_args(argc, argv);
+
+	int array_sizes[] = { size * elements };
+	int array_subsizes[] = { elements };
+	int array_starts[] = { rank * elements };
+
+	MPI_Type_create_subarray(1, array_sizes, array_subsizes, array_starts, MPI_ORDER_C, DATATYPE, &datatype);
+	MPI_Type_commit(&datatype);
+
+	MPI_Barrier(MPI_COMM_WORLD);
+
+	/* Run all specified tests in the given order. */
+	for (i = optind; i < argc; ++i)
+	{
+		for (j = 0; j < sizeof(tests) / sizeof(test); ++j)
+		{
+			if (strcmp(argv[i], tests[j].name) == 0)
+			{
+				printf("%3d/%3d: Running %s...\n", rank + 1, size, tests[j].name);
+				tests[j].function();
+			}
+		}
+	}
+
+	MPI_Type_free(&datatype);
+	MPI_Info_free(&info);
+
+	MPI_Finalize();
+
+	return 0;
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/stadler-file-view-test.cpp
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/stadler-file-view-test.cpp	(revision 5823)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/stadler-file-view-test.cpp	(revision 5823)
@@ -0,0 +1,94 @@
+/*
+From: Stadler Hans-Christian <hans-christian.stadler@psi.ch>
+To: mpich2-maint@mcs.anl.gov
+Subject: [MPICH2 Req #2077] Wrong Transfer Size in MPI::File::Write_at (mpich2-1.0.2p1)
+Date: Tue, 8 Nov 2005 14:42:38 +0100
+
+In MPI-2 July 18, 1997
+
+1) on page 225: The offset is always in etype units relative to the current
+view.  
+2) on page 226: A data access routine attempts to transfer (read or write)
+count data items of type datatype.
+
+In the test below, the file consists of 3 consecutive instances of an array of
+12 shorts. The fileview of each node consists of subarrays of 4 shorts, one
+subarray for each consecutive array instance.  Each of the 3 nodes tries to
+write one element ( of datatype short) to the first element (of etype short) of
+its own subarray within the second consecutive array instance.
+
+Erroneous behaviour: However, each node writes 4 elements (of datatype short)
+to its own subarray.
+
+Thie requirement (2) is violated in this case. The offset is handled correctly
+as specified in (1).
+
+Hans-Christian Stadler
+
+*/
+
+#include <iostream>
+
+#undef SEEK_CUR
+#undef SEEK_SET
+#undef SEEK_END
+#include <mpi.h>
+
+using namespace std;
+
+int main (int argc, char *argv[])
+{
+        MPI::Intracomm &world = MPI::COMM_WORLD;
+        MPI::File fh;
+        MPI::Datatype &base = MPI::SHORT;
+        MPI::Datatype view;
+        int size, rank;
+        int chunk_size, subchunk_size, subchunk_offset;
+        short *buf;
+	short *reference;
+        int i;
+
+        MPI::Init(argc, argv);
+        size = world.Get_size();
+        rank = world.Get_rank();
+        subchunk_size = 4;
+        chunk_size = size * subchunk_size;
+        subchunk_offset = subchunk_size * rank;
+        buf = new short[chunk_size];
+        for (i=0; i<chunk_size; ++i)
+                buf[i] = ('0'+rank) << 8 | ('a'+i);
+
+        try {
+                view = base.Create_subarray(1, &chunk_size, &subchunk_size, 
+				&subchunk_offset, MPI::ORDER_C);
+                view.Commit();
+                fh = MPI::File::Open(world, argv[1],
+				MPI::MODE_RDWR|MPI::MODE_CREATE, 
+				MPI::INFO_NULL);
+                fh.Write_at(chunk_size*rank*sizeof(short), buf, 
+				chunk_size, base);
+                fh.Set_view(0, base, view, "native", MPI::INFO_NULL);
+                for (i=0; i<chunk_size; ++i)
+                        buf[i] = ('0'+rank) << 8 | ('A'+i);
+                fh.Write_at(subchunk_size, buf, 1, base);
+                fh.Close();
+        } catch (MPI::Exception &ex) {
+                cerr << "MPI Exception: " << ex.Get_error_string() << endl;
+                world.Abort(-1);
+        }
+
+        if (! rank) {
+		fh = MPI::File::Open(MPI::COMM_SELF, argv[1], 
+				MPI::MODE_RDONLY, MPI::INFO_NULL);
+		fh.Read(buf, chunk_size*size, MPI::SHORT);
+		fh.Close();
+		for (int j=0; j<chunk_size*size; j++)
+			cout << buf[j] << " ";
+		cout << endl;
+
+                cout << "size=" << size << ", chunk_size=" << chunk_size << ", subchunk_size=" << subchunk_size << endl;
+                cout << "file_size=" << chunk_size*size*sizeof(short) << endl;
+        }
+        MPI::Finalize();
+        return 0;
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-split_coll
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-split_coll	(revision 6767)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-split_coll	(revision 6767)
@@ -0,0 +1,58 @@
+#!/bin/sh 
+
+. functions
+
+##
+## entry point for script
+##
+
+# all the ROMIO tests have the same form: <testname> -fname <file>
+# only the name changes:
+
+TESTNAME=split_coll
+TEST_DEST=${CLUSTER_DIR}/$TESTNAME
+
+
+(cd ${PVFS2_DEST}/mpich2-snapshot/build/src/mpi/romio/test && \
+	make $TESTNAME && cp $TESTNAME $TEST_DEST)
+
+if [ $? -ne 0 ] ; then
+	exit 1
+fi
+
+
+# like the other mpiio tests we can only do multi processor tests if there's a
+# pav config file we can use
+# If we have to we can fall back to single processor, and still do something
+# reasonable. 
+
+if [ -f $PAV_CONFIG ] ; then 
+	# write out a pbs script
+	pbs_script=${CLUSTER_DIR}/${TESTNAME}.sh
+	make_pbs_script ${TEST_DEST} -fname pvfs2:\${MOUNTPOINT}/$TESTNAME \
+		> $pbs_script
+
+	# submit it
+	job_id=$(qsub -N $TESTNAME $pbs_script | cut -d . -f1)
+
+	if [ $? -ne 0 ] ; then
+		exit 1
+	fi	
+
+	if [ -z "$job_id" ] ; then
+		exit 1
+	fi	
+
+	# wait patently for it to complete
+	block_until_done $job_id
+
+	# need to get results into per-test log files
+	cat ${TESTNAME}.o$job_id
+
+	grep -q '^ No Errors$' ${TESTNAME}.o$job_id
+	if [ $? -ne 0 ] ; then 
+		exit 1
+	fi
+
+	exit 0
+fi
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/stadler-file-view-test.std
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/stadler-file-view-test.std	(revision 5823)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/stadler-file-view-test.std	(revision 5823)
@@ -0,0 +1,3 @@
+12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12353 12642 12643 12644 12609 12646 12647 12648 12865 12650 12651 12652 13121 12654 12655 12656 12897 12898 12899 12900 12901 12902 12903 12904 12905 12906 12907 12908 12909 12910 12911 12912 13153 13154 13155 13156 13157 13158 13159 13160 13161 13162 13163 13164 13165 13166 13167 13168 
+size=4, chunk_size=16, subchunk_size=4
+file_size=128
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-psimple
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-psimple	(revision 6767)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-psimple	(revision 6767)
@@ -0,0 +1,58 @@
+#!/bin/sh 
+
+. functions
+
+##
+## entry point for script
+##
+
+# all the ROMIO tests have the same form: <testname> -fname <file>
+# only the name changes:
+
+TESTNAME=psimple
+TEST_DEST=${CLUSTER_DIR}/$TESTNAME
+
+
+(cd ${PVFS2_DEST}/mpich2-snapshot/build/src/mpi/romio/test && \
+	make $TESTNAME && cp $TESTNAME $TEST_DEST)
+
+if [ $? -ne 0 ] ; then
+	exit 1
+fi
+
+
+# like the other mpiio tests we can only do multi processor tests if there's a
+# pav config file we can use
+# If we have to we can fall back to single processor, and still do something
+# reasonable. 
+
+if [ -f $PAV_CONFIG ] ; then 
+	# write out a pbs script
+	pbs_script=${CLUSTER_DIR}/${TESTNAME}.sh
+	make_pbs_script ${TEST_DEST} -fname pvfs2:\${MOUNTPOINT}/$TESTNAME \
+		> $pbs_script
+
+	# submit it
+	job_id=$(qsub -N $TESTNAME $pbs_script | cut -d . -f1)
+
+	if [ $? -ne 0 ] ; then
+		exit 1
+	fi	
+
+	if [ -z "$job_id" ] ; then
+		exit 1
+	fi	
+
+	# wait patently for it to complete
+	block_until_done $job_id
+
+	# need to get results into per-test log files
+	cat ${TESTNAME}.o$job_id
+
+	grep -q '^ No Errors$' ${TESTNAME}.o$job_id
+	if [ $? -ne 0 ] ; then 
+		exit 1
+	fi
+
+	exit 0
+fi
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/noncontig
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/noncontig	(revision 5494)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/noncontig	(revision 5494)
@@ -0,0 +1,54 @@
+#!/bin/sh 
+
+. functions
+
+##
+## entry point for script
+##
+
+NONCONTIG=${CLUSTER_DIR}/noncontig
+
+(cd ${EXTRA_TESTS}/noncontig-test/noncontig && \
+${CLUSTER_DIR}/mpich2/bin/mpicc noncontig.c parse_cmdline.c -o ${NONCONTIG} )
+
+if [ $? -ne 0 ] ; then
+	exit 1
+fi
+
+
+# like the other mpiio tests we can only do multi processor tests if there's a
+# pav config file we can use
+# If we have to we can fall back to single processor, and still do something
+# reasonable. 
+
+if [ -f $PAV_CONFIG ] ; then 
+	# write out a pbs script
+	pbs_script=${CLUSTER_DIR}/noncontig.sh
+	make_pbs_script ${NONCONTIG} -fname pvfs2:\${MOUNTPOINT}/ncfile1 \
+		-v -veclen $((1024*2)) -elmtcount 1  \
+		-veccount 1 -timing -all -loops 1 > $pbs_script
+
+	# submit it
+	job_id=$(qsub -N noncontig $pbs_script | cut -d . -f1)
+
+	if [ $? -ne 0 ] ; then
+		exit 1
+	fi	
+
+	if [ -z "$job_id" ] ; then
+		exit 1
+	fi	
+
+	# wait patently for it to complete
+	block_until_done $job_id
+
+	# need to get results into per-test log files
+	cat noncontig.o$job_id
+
+	egrep -q '(Assertion*failed|error:|Error|killed by signal)' noncontig.o$job_id
+	if [ $? -eq 0 ] ; then 
+		exit 1
+	fi
+
+	exit 0
+fi
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/heidelberg-IO
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/heidelberg-IO	(revision 6199)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/heidelberg-IO	(revision 6199)
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+. functions
+
+##
+## entry point for script
+##
+
+IO_TEST=${CLUSTER_DIR}/heidelberg-io
+
+${CLUSTER_DIR}/mpich2/bin/mpicc ${PVFS2_DEST}/pvfs2-${CVS_TAG}/test/automated/mpiio-tests.d/heidelberg-IO.c -o $IO_TEST
+
+if [ $? -eq 1 ] ; then
+	exit 1
+fi
+
+# like the other mpiio tests we can only do multi processor tests if there's a
+# pav config file we can use
+# If we have to we can fall back to single processor, and still do something
+# reasonable. 
+
+if [ -f $PAV_CONFIG ] ; then 
+	# write out a pbs script
+	pbs_script=${CLUSTER_DIR}/heidelberg.sh
+	make_pbs_script ${IO_TEST} -f pvfs2:\${MOUNTPOINT}/io-test-1 level0 level1 level2 level3 > $pbs_script
+
+	# submit it
+	job_id=$(qsub -N heidelberg $pbs_script | cut -d . -f1)
+
+	# wait patently for it to complete
+	block_until_done $job_id
+
+	# need to get results into per-test log files
+	cat heidelberg.o$job_id
+
+	# need to know if we failed or not
+	egrep -q '(Assertion*failed|error:|Error|killed by signal)' heidelberg.o$job_id
+        if [ $? -eq 0 ] ; then 
+                exit 1
+        fi
+
+fi
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/stadler-file-view-test
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/stadler-file-view-test	(revision 5823)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/stadler-file-view-test	(revision 5823)
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+. functions
+
+##
+## entry point for script
+##
+
+FILE_VIEW_TEST=${CLUSTER_DIR}/file_view_test
+
+${CLUSTER_DIR}/mpich2/bin/mpicxx ${PVFS2_DEST}/pvfs2-${CVS_TAG}/test/automated/mpiio-tests.d/stadler-file-view-test.cpp -o $FILE_VIEW_TEST
+
+if [ $? -eq 1 ] ; then
+	exit 1
+fi
+
+# like the other mpiio tests we can only do multi processor tests if there's a
+# pav config file we can use
+# If we have to we can fall back to single processor, and still do something
+# reasonable. 
+
+if [ -f $PAV_CONFIG ] ; then 
+	# write out a pbs script
+	pbs_script=${CLUSTER_DIR}/fileviewtest.sh
+	make_pbs_script ${FILE_VIEW_TEST} pvfs2:\${MOUNTPOINT}/fview-1 > $pbs_script
+
+	# submit it
+	job_id=$(qsub -N fileview $pbs_script | cut -d . -f1)
+
+	# wait patently for it to complete
+	block_until_done $job_id
+
+	# need to get results into per-test log files
+	cat fileview.o$job_id
+
+	# need to know if we failed or not
+	grep -q "`cat ${PVFS2_DEST}/pvfs2-${CVS_TAG}/test/automated/mpiio-tests.d/stadler-file-view-test.std`" fileview.o$job_id 
+fi
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-async
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-async	(revision 6767)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-async	(revision 6767)
@@ -0,0 +1,58 @@
+#!/bin/sh 
+
+. functions
+
+##
+## entry point for script
+##
+
+# all the ROMIO tests have the same form: <testname> -fname <file>
+# only the name changes:
+
+TESTNAME=async
+TEST_DEST=${CLUSTER_DIR}/$TESTNAME
+
+
+(cd ${PVFS2_DEST}/mpich2-snapshot/build/src/mpi/romio/test && \
+	make $TESTNAME && cp $TESTNAME $TEST_DEST)
+
+if [ $? -ne 0 ] ; then
+	exit 1
+fi
+
+
+# like the other mpiio tests we can only do multi processor tests if there's a
+# pav config file we can use
+# If we have to we can fall back to single processor, and still do something
+# reasonable. 
+
+if [ -f $PAV_CONFIG ] ; then 
+	# write out a pbs script
+	pbs_script=${CLUSTER_DIR}/${TESTNAME}.sh
+	make_pbs_script ${TEST_DEST} -fname pvfs2:\${MOUNTPOINT}/$TESTNAME \
+		> $pbs_script
+
+	# submit it
+	job_id=$(qsub -N $TESTNAME $pbs_script | cut -d . -f1)
+
+	if [ $? -ne 0 ] ; then
+		exit 1
+	fi	
+
+	if [ -z "$job_id" ] ; then
+		exit 1
+	fi	
+
+	# wait patently for it to complete
+	block_until_done $job_id
+
+	# need to get results into per-test log files
+	cat ${TESTNAME}.o$job_id
+
+	grep -q '^ No Errors$' ${TESTNAME}.o$job_id
+	if [ $? -ne 0 ] ; then 
+		exit 1
+	fi
+
+	exit 0
+fi
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/ior-mpiio-2
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/ior-mpiio-2	(revision 5643)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/ior-mpiio-2	(revision 5643)
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+. functions
+
+##
+## entry point for script
+##
+
+IOR=${CLUSTER_DIR}/IOR
+
+(cd ${EXTRA_TESTS}/IOR-2.8.6 && make mpiio && cp src/C/IOR ${IOR} )
+
+if [ $? -eq 1 ] ; then
+	exit 1
+fi
+
+# like the other mpiio tests we can only do multi processor tests if there's a
+# pav config file we can use
+# If we have to we can fall back to single processor, and still do something
+# reasonable. 
+
+if [ -f $PAV_CONFIG ] ; then 
+	# write out a pbs script
+	pbs_script=${CLUSTER_DIR}/ior2.sh
+	# the '-e' (fsync after write) option is not avaliable to MPIIO
+	make_pbs_script ${IOR} -a MPIIO -C -i 3 -o pvfs2:\${MOUNTPOINT}/iortest > $pbs_script
+
+	# submit it
+	job_id=$(qsub -N ior2 $pbs_script | cut -d . -f1)
+
+	# wait patently for it to complete
+	block_until_done $job_id
+
+	# need to get results into per-test log files
+	cat ior2.o$job_id
+
+	# need to know if we failed or not
+	egrep -q '(Abort:|Assertion.*failed|Actual file size)' ior2.o$job_id
+	if [ $? -eq 0 ] ; then
+		exit 1
+	fi
+	grep -q 'Max Read' ior2.o$job_id
+fi
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/ior-mpiio
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/ior-mpiio	(revision 4907)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/ior-mpiio	(revision 4907)
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+. functions
+
+##
+## entry point for script
+##
+
+IOR=${CLUSTER_DIR}/IOR
+
+(cd ${EXTRA_TESTS}/IOR-2.8.6 && make mpiio && cp src/C/IOR ${IOR} )
+
+if [ $? -eq 1 ] ; then
+	exit 1
+fi
+
+# like the other mpiio tests we can only do multi processor tests if there's a
+# pav config file we can use
+# If we have to we can fall back to single processor, and still do something
+# reasonable. 
+
+if [ -f $PAV_CONFIG ] ; then 
+	# write out a pbs script
+	pbs_script=${CLUSTER_DIR}/ior.sh
+	make_pbs_script ${IOR} -a MPIIO -i 3 -o pvfs2:\${MOUNTPOINT}/iortest > $pbs_script
+
+	# submit it
+	job_id=$(qsub -N ior $pbs_script | cut -d . -f1)
+
+	# wait patently for it to complete
+	block_until_done $job_id
+
+	# need to get results into per-test log files
+	cat ior.o$job_id
+
+	# need to know if we failed or not
+	egrep -q '(Abort:|Assertion.*failed|Actual file size)' ior.o$job_id
+	if [ $? -eq 0 ] ; then
+		exit 1
+	fi
+	grep -q 'Max Read' ior.o$job_id
+fi
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/ior-mpiio-3
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/ior-mpiio-3	(revision 5643)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/ior-mpiio-3	(revision 5643)
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+. functions
+
+##
+## entry point for script
+##
+
+IOR=${CLUSTER_DIR}/IOR
+
+(cd ${EXTRA_TESTS}/IOR-2.8.6 && make mpiio && cp src/C/IOR ${IOR} )
+
+if [ $? -eq 1 ] ; then
+	exit 1
+fi
+
+# like the other mpiio tests we can only do multi processor tests if there's a
+# pav config file we can use
+# If we have to we can fall back to single processor, and still do something
+# reasonable. 
+
+if [ -f $PAV_CONFIG ] ; then 
+	# write out a pbs script
+	pbs_script=${CLUSTER_DIR}/ior3.sh
+	# -F: one file per process
+	# the '-e' option (fsync after write) is not available with MPIIO)
+	make_pbs_script ${IOR} -a MPIIO -C -i 3 -F -o pvfs2:\${MOUNTPOINT}/iortest > $pbs_script
+
+	# submit it
+	job_id=$(qsub -N ior3 $pbs_script | cut -d . -f1)
+
+	# wait patently for it to complete
+	block_until_done $job_id
+
+	# need to get results into per-test log files
+	cat ior3.o$job_id
+
+	# need to know if we failed or not
+	egrep -q '(Abort:|Assertion.*failed|Actual file size)' ior3.o$job_id
+	if [ $? -eq 0 ] ; then
+		exit 1
+	fi
+	grep -q 'Max Read' ior3.o$job_id
+fi
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-status
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-status	(revision 6767)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-status	(revision 6767)
@@ -0,0 +1,58 @@
+#!/bin/sh 
+
+. functions
+
+##
+## entry point for script
+##
+
+# all the ROMIO tests have the same form: <testname> -fname <file>
+# only the name changes:
+
+TESTNAME=status
+TEST_DEST=${CLUSTER_DIR}/$TESTNAME
+
+
+(cd ${PVFS2_DEST}/mpich2-snapshot/build/src/mpi/romio/test && \
+	make $TESTNAME && cp $TESTNAME $TEST_DEST)
+
+if [ $? -ne 0 ] ; then
+	exit 1
+fi
+
+
+# like the other mpiio tests we can only do multi processor tests if there's a
+# pav config file we can use
+# If we have to we can fall back to single processor, and still do something
+# reasonable. 
+
+if [ -f $PAV_CONFIG ] ; then 
+	# write out a pbs script
+	pbs_script=${CLUSTER_DIR}/${TESTNAME}.sh
+	make_pbs_script ${TEST_DEST} -fname pvfs2:\${MOUNTPOINT}/$TESTNAME \
+		> $pbs_script
+
+	# submit it
+	job_id=$(qsub -N $TESTNAME $pbs_script | cut -d . -f1)
+
+	if [ $? -ne 0 ] ; then
+		exit 1
+	fi	
+
+	if [ -z "$job_id" ] ; then
+		exit 1
+	fi	
+
+	# wait patently for it to complete
+	block_until_done $job_id
+
+	# need to get results into per-test log files
+	cat ${TESTNAME}.o$job_id
+
+	grep -q '^ No Errors$' ${TESTNAME}.o$job_id
+	if [ $? -ne 0 ] ; then 
+		exit 1
+	fi
+
+	exit 0
+fi
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/mpi-io-test
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/mpi-io-test	(revision 5021)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/mpi-io-test	(revision 5021)
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+. functions
+
+##
+## entry point for script
+##
+
+MPI_IO_TEST=${CLUSTER_DIR}/mpi-io-test
+
+${CLUSTER_DIR}/mpich2/bin/mpicc ${PVFS2_DEST}/pvfs2-${CVS_TAG}/test/client/mpi-io/mpi-io-test.c -o $MPI_IO_TEST
+
+if [ $? -eq 1 ] ; then
+	exit 1
+fi
+
+# like the other mpiio tests we can only do multi processor tests if there's a
+# pav config file we can use
+# If we have to we can fall back to single processor, and still do something
+# reasonable. 
+
+if [ -f $PAV_CONFIG ] ; then 
+	# write out a pbs script
+	pbs_script=${CLUSTER_DIR}/mpiiotest.sh
+	make_pbs_script ${MPI_IO_TEST} -f pvfs2:\${MOUNTPOINT}/file1 -b $((1024*1024*32)) -y -c> $pbs_script
+
+	# submit it
+	job_id=$(qsub -N mpiiotest $pbs_script | cut -d . -f1)
+
+	# wait patently for it to complete
+	block_until_done $job_id
+
+	# need to get results into per-test log files
+	cat mpiiotest.o$job_id
+
+	# need to know if we failed or not
+	grep -q 'bandwidth' mpiiotest.o$job_id
+fi
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/functions
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/functions	(revision 5500)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/functions	(revision 5500)
@@ -0,0 +1,48 @@
+# the only thing you should pass to make_pbs_script is the parallel program you
+# want to run and its arguments.  
+# Example:
+#	make_pbs_script cpi
+#	make_pbs_scirpt mpi-io-test -f pvfs2:/mnt/pvfs2/testfile
+#
+# i'm terribly sorry for how confusing this function is... I want to generate a
+# pbs script that itself uses some environment variables.  Thus we escape some
+# dollar signs before things like $PATH, but not others like $PAV_CONFIG.  
+
+make_pbs_script() {
+
+	echo "#!/bin/sh
+#PBS -l walltime=0:10:0
+#PBS -l nodes=8
+#PBS -j oe
+#PBS -q shared
+
+nprocs=4
+
+$CLUSTER_DIR/pav/pav_start -c $PAV_CONFIG -n \$nprocs >/dev/null
+
+eval \$( $CLUSTER_DIR/pav/pav_info -c $PAV_CONFIG)
+export PVFS2TAB_FILE
+
+PATH=${CLUSTER_DIR}/mpich2/bin:\${PATH}
+mpdboot --file=\${WORKINGDIR}/compnodes --totalnum=\$nprocs
+
+mpiexec -np \$nprocs $@
+mpdallexit
+$CLUSTER_DIR/pav/pav_stop -c $PAV_CONFIG >/dev/null" 
+}
+
+# takes one argument: the PBS job id on which to block
+
+block_until_done() {
+	while true ; do 
+		qstat -i $1 >/dev/null 2>&1 
+		if [ $? -eq 0 ] ; then
+			sleep 60
+			continue
+		else
+			break
+		fi	
+	done
+}
+
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-coll_test
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-coll_test	(revision 6767)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-coll_test	(revision 6767)
@@ -0,0 +1,58 @@
+#!/bin/sh 
+
+. functions
+
+##
+## entry point for script
+##
+
+# all the ROMIO tests have the same form: <testname> -fname <file>
+# only the name changes:
+
+TESTNAME=coll_test
+TEST_DEST=${CLUSTER_DIR}/$TESTNAME
+
+
+(cd ${PVFS2_DEST}/mpich2-snapshot/build/src/mpi/romio/test && \
+	make $TESTNAME && cp $TESTNAME $TEST_DEST)
+
+if [ $? -ne 0 ] ; then
+	exit 1
+fi
+
+
+# like the other mpiio tests we can only do multi processor tests if there's a
+# pav config file we can use
+# If we have to we can fall back to single processor, and still do something
+# reasonable. 
+
+if [ -f $PAV_CONFIG ] ; then 
+	# write out a pbs script
+	pbs_script=${CLUSTER_DIR}/${TESTNAME}.sh
+	make_pbs_script ${TEST_DEST} -fname pvfs2:\${MOUNTPOINT}/$TESTNAME \
+		> $pbs_script
+
+	# submit it
+	job_id=$(qsub -N $TESTNAME $pbs_script | cut -d . -f1)
+
+	if [ $? -ne 0 ] ; then
+		exit 1
+	fi	
+
+	if [ -z "$job_id" ] ; then
+		exit 1
+	fi	
+
+	# wait patently for it to complete
+	block_until_done $job_id
+
+	# need to get results into per-test log files
+	cat ${TESTNAME}.o$job_id
+
+	grep -q '^ No Errors$' ${TESTNAME}.o$job_id
+	if [ $? -ne 0 ] ; then 
+		exit 1
+	fi
+
+	exit 0
+fi
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-simple
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-simple	(revision 6767)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-simple	(revision 6767)
@@ -0,0 +1,58 @@
+#!/bin/sh 
+
+. functions
+
+##
+## entry point for script
+##
+
+# all the ROMIO tests have the same form: <testname> -fname <file>
+# only the name changes:
+
+TESTNAME=simple
+TEST_DEST=${CLUSTER_DIR}/$TESTNAME
+
+
+(cd ${PVFS2_DEST}/mpich2-snapshot/build/src/mpi/romio/test && \
+	make $TESTNAME && cp $TESTNAME $TEST_DEST)
+
+if [ $? -ne 0 ] ; then
+	exit 1
+fi
+
+
+# like the other mpiio tests we can only do multi processor tests if there's a
+# pav config file we can use
+# If we have to we can fall back to single processor, and still do something
+# reasonable. 
+
+if [ -f $PAV_CONFIG ] ; then 
+	# write out a pbs script
+	pbs_script=${CLUSTER_DIR}/${TESTNAME}.sh
+	make_pbs_script ${TEST_DEST} -fname pvfs2:\${MOUNTPOINT}/$TESTNAME \
+		> $pbs_script
+
+	# submit it
+	job_id=$(qsub -N $TESTNAME $pbs_script | cut -d . -f1)
+
+	if [ $? -ne 0 ] ; then
+		exit 1
+	fi	
+
+	if [ -z "$job_id" ] ; then
+		exit 1
+	fi	
+
+	# wait patently for it to complete
+	block_until_done $job_id
+
+	# need to get results into per-test log files
+	cat ${TESTNAME}.o$job_id
+
+	grep -q '^ No Errors$' ${TESTNAME}.o$job_id
+	if [ $? -ne 0 ] ; then 
+		exit 1
+	fi
+
+	exit 0
+fi
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-noncontig_coll2
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-noncontig_coll2	(revision 6767)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-noncontig_coll2	(revision 6767)
@@ -0,0 +1,58 @@
+#!/bin/sh 
+
+. functions
+
+##
+## entry point for script
+##
+
+# all the ROMIO tests have the same form: <testname> -fname <file>
+# only the name changes:
+
+TESTNAME=noncontig_coll2
+TEST_DEST=${CLUSTER_DIR}/$TESTNAME
+
+
+(cd ${PVFS2_DEST}/mpich2-snapshot/build/src/mpi/romio/test && \
+	make $TESTNAME && cp $TESTNAME $TEST_DEST)
+
+if [ $? -ne 0 ] ; then
+	exit 1
+fi
+
+
+# like the other mpiio tests we can only do multi processor tests if there's a
+# pav config file we can use
+# If we have to we can fall back to single processor, and still do something
+# reasonable. 
+
+if [ -f $PAV_CONFIG ] ; then 
+	# write out a pbs script
+	pbs_script=${CLUSTER_DIR}/${TESTNAME}.sh
+	make_pbs_script ${TEST_DEST} -fname pvfs2:\${MOUNTPOINT}/$TESTNAME \
+		> $pbs_script
+
+	# submit it
+	job_id=$(qsub -N $TESTNAME $pbs_script | cut -d . -f1)
+
+	if [ $? -ne 0 ] ; then
+		exit 1
+	fi	
+
+	if [ -z "$job_id" ] ; then
+		exit 1
+	fi	
+
+	# wait patently for it to complete
+	block_until_done $job_id
+
+	# need to get results into per-test log files
+	cat ${TESTNAME}.o$job_id
+
+	grep -q '^ No Errors$' ${TESTNAME}.o$job_id
+	if [ $? -ne 0 ] ; then 
+		exit 1
+	fi
+
+	exit 0
+fi
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-error
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-error	(revision 6767)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-error	(revision 6767)
@@ -0,0 +1,58 @@
+#!/bin/sh 
+
+. functions
+
+##
+## entry point for script
+##
+
+# all the ROMIO tests have the same form: <testname> -fname <file>
+# only the name changes:
+
+TESTNAME=error
+TEST_DEST=${CLUSTER_DIR}/$TESTNAME
+
+
+(cd ${PVFS2_DEST}/mpich2-snapshot/build/src/mpi/romio/test && \
+	make $TESTNAME && cp $TESTNAME $TEST_DEST)
+
+if [ $? -ne 0 ] ; then
+	exit 1
+fi
+
+
+# like the other mpiio tests we can only do multi processor tests if there's a
+# pav config file we can use
+# If we have to we can fall back to single processor, and still do something
+# reasonable. 
+
+if [ -f $PAV_CONFIG ] ; then 
+	# write out a pbs script
+	pbs_script=${CLUSTER_DIR}/${TESTNAME}.sh
+	make_pbs_script ${TEST_DEST} -fname pvfs2:\${MOUNTPOINT}/$TESTNAME \
+		> $pbs_script
+
+	# submit it
+	job_id=$(qsub -N $TESTNAME $pbs_script | cut -d . -f1)
+
+	if [ $? -ne 0 ] ; then
+		exit 1
+	fi	
+
+	if [ -z "$job_id" ] ; then
+		exit 1
+	fi	
+
+	# wait patently for it to complete
+	block_until_done $job_id
+
+	# need to get results into per-test log files
+	cat ${TESTNAME}.o$job_id
+
+	grep -q '^ No Errors$' ${TESTNAME}.o$job_id
+	if [ $? -ne 0 ] ; then 
+		exit 1
+	fi
+
+	exit 0
+fi
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-file_info
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-file_info	(revision 6767)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-file_info	(revision 6767)
@@ -0,0 +1,58 @@
+#!/bin/sh 
+
+. functions
+
+##
+## entry point for script
+##
+
+# all the ROMIO tests have the same form: <testname> -fname <file>
+# only the name changes:
+
+TESTNAME=file_info
+TEST_DEST=${CLUSTER_DIR}/$TESTNAME
+
+
+(cd ${PVFS2_DEST}/mpich2-snapshot/build/src/mpi/romio/test && \
+	make $TESTNAME && cp $TESTNAME $TEST_DEST)
+
+if [ $? -ne 0 ] ; then
+	exit 1
+fi
+
+
+# like the other mpiio tests we can only do multi processor tests if there's a
+# pav config file we can use
+# If we have to we can fall back to single processor, and still do something
+# reasonable. 
+
+if [ -f $PAV_CONFIG ] ; then 
+	# write out a pbs script
+	pbs_script=${CLUSTER_DIR}/${TESTNAME}.sh
+	make_pbs_script ${TEST_DEST} -fname pvfs2:\${MOUNTPOINT}/$TESTNAME \
+		> $pbs_script
+
+	# submit it
+	job_id=$(qsub -N $TESTNAME $pbs_script | cut -d . -f1)
+
+	if [ $? -ne 0 ] ; then
+		exit 1
+	fi	
+
+	if [ -z "$job_id" ] ; then
+		exit 1
+	fi	
+
+	# wait patently for it to complete
+	block_until_done $job_id
+
+	# need to get results into per-test log files
+	cat ${TESTNAME}.o$job_id
+
+	grep -q '^ No Errors$' ${TESTNAME}.o$job_id
+	if [ $? -ne 0 ] ; then 
+		exit 1
+	fi
+
+	exit 0
+fi
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-excl
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-excl	(revision 6767)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpiio-tests.d/romio-excl	(revision 6767)
@@ -0,0 +1,58 @@
+#!/bin/sh 
+
+. functions
+
+##
+## entry point for script
+##
+
+# all the ROMIO tests have the same form: <testname> -fname <file>
+# only the name changes:
+
+TESTNAME=excl
+TEST_DEST=${CLUSTER_DIR}/$TESTNAME
+
+
+(cd ${PVFS2_DEST}/mpich2-snapshot/build/src/mpi/romio/test && \
+	make $TESTNAME && cp $TESTNAME $TEST_DEST)
+
+if [ $? -ne 0 ] ; then
+	exit 1
+fi
+
+
+# like the other mpiio tests we can only do multi processor tests if there's a
+# pav config file we can use
+# If we have to we can fall back to single processor, and still do something
+# reasonable. 
+
+if [ -f $PAV_CONFIG ] ; then 
+	# write out a pbs script
+	pbs_script=${CLUSTER_DIR}/${TESTNAME}.sh
+	make_pbs_script ${TEST_DEST} -fname pvfs2:\${MOUNTPOINT}/$TESTNAME \
+		> $pbs_script
+
+	# submit it
+	job_id=$(qsub -N $TESTNAME $pbs_script | cut -d . -f1)
+
+	if [ $? -ne 0 ] ; then
+		exit 1
+	fi	
+
+	if [ -z "$job_id" ] ; then
+		exit 1
+	fi	
+
+	# wait patently for it to complete
+	block_until_done $job_id
+
+	# need to get results into per-test log files
+	cat ${TESTNAME}.o$job_id
+
+	grep -q '^ No Errors$' ${TESTNAME}.o$job_id
+	if [ $? -ne 0 ] ; then 
+		exit 1
+	fi
+
+	exit 0
+fi
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/SUBMIT.pbs.template
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/SUBMIT.pbs.template	(revision 3230)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/SUBMIT.pbs.template	(revision 3230)
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+#PBS -N PVFS2TEST
+#PBS -l walltime=1:00:00
+#PBS -o /tmp/PVFS2TEST.out.DATE
+#PBS -e /tmp/PVFS2TEST.err.DATE
+
+# Change into the working directory
+cd $PBS_O_WORKDIR
+# Set the path to match the path of the submitter
+PATH=$PBS_O_PATH
+
+# TODO: need to update path to get proper mpich2 build
+
+############################
+#Change these variables if you want
+#to name your config files something
+#else.
+CONFIGFILE="CONFIG"
+PAVCONFIG="PAVCONFIG"
+NODEFILE="nodes.conf"
+
+cat $PBS_NODEFILE>/home/USER/testing/DATE/work/$NODEFILE
+cd $PBS_O_WORKDIR
+email=`grep EMAIL $CONFIGFILE | cut -d "=" -f 2`
+
+mpdboot --rsh=rsh --file=$HOME/nightly/nodes.conf
+
+# run test harness, send email if it returns an error code
+./pvfs2tests.py $CONFIGFILE $PAVCONFIG /home/USER/testing/DATE/work/$NODEFILE
+if [ $? != 0 ] ; then
+	echo "pvfs2tests.py failure." | mail -s "PVFS2 test: FAIL" "$email" 
+fi
+
+mpdallexit
+
+# cleanup scratch area
+rm -rf /home/USER/testing/DATE
+
+exit 0
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/simple.sh
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/simple.sh	(revision 3640)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/simple.sh	(revision 3640)
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+export PVFS2TAB_FILE=$pvfs2tabfile
+
+echo $pvfs2bindir/pvfs2-statfs -m /tmp/pvfs2-pav-mount
+$pvfs2bindir/pvfs2-statfs -m /tmp/pvfs2-pav-mount
+if [ $? != 0 ] ; then
+    echo "statfs failed. Aborting."
+    exit 1
+fi
+
+echo $pvfs2bindir/pvfs2-cp -t $pvfs2bindir/pvfs2-cp /tmp/pvfs2-pav-mount/simple-test
+$pvfs2bindir/pvfs2-cp -t $pvfs2bindir/pvfs2-cp /tmp/pvfs2-pav-mount/simple-test
+if [ $? != 0 ] ; then
+    echo "import failed. Aborting."
+    exit 1
+fi
+
+echo $pvfs2bindir/pvfs2-cp -t /tmp/pvfs2-pav-mount/simple-test /tmp/simple-test
+$pvfs2bindir/pvfs2-cp -t /tmp/pvfs2-pav-mount/simple-test /tmp/simple-test
+if [ $? != 0 ] ; then
+    echo "export failed. Aborting."
+    exit 1
+fi
+
+echo diff $pvfs2bindir/pvfs2-cp /tmp/simple-test
+diff $pvfs2bindir/pvfs2-cp /tmp/simple-test
+if [ $? != 0 ] ; then
+    echo "diff failed. Aborting."
+    exit 1
+fi
+
+exit 0
+
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpi-vfs-tests.d/fsx-mpi.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpi-vfs-tests.d/fsx-mpi.c	(revision 7643)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpi-vfs-tests.d/fsx-mpi.c	(revision 7643)
@@ -0,0 +1,1281 @@
+/*
+ * Copyright (c) 1998-2001 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 2.0 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ *
+ *	File:	fsx.c
+ *	Author:	Avadis Tevanian, Jr.
+ *
+ *	File system exerciser. 
+ *
+ *	Rewrite and enhancements 1998-2001 Conrad Minshall -- conrad@mac.com
+ *
+ *	Various features from Joe Sokol, Pat Dirks, and Clark Warner.
+ *
+ *	Small changes to work under Linux -- davej@suse.de
+ *
+ *	Sundry porting patches from Guy Harris 12/2001
+ *
+ *	Checks for mmap last-page zero fill.
+ *
+ *	Updated license to APSL 2.0, 2004/7/27 - Jordan Hubbard
+ *  
+ *  Modified to test file system symantics using MPI. 07/2008 - Sumit Narayan
+ *
+ * $FreeBSD: src/tools/regression/fsx/fsx.c,v 1.5 2007/06/26 13:51:53 delphij Exp $
+ *
+ */
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef _UWIN
+# include <sys/param.h>
+# include <limits.h>
+# include <time.h>
+# include <strings.h>
+#endif
+#include <fcntl.h>
+#include <sys/mman.h>
+#ifndef MAP_FILE
+# define MAP_FILE 0
+#endif
+#include <limits.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdarg.h>
+#include <errno.h>
+
+#define NUMPRINTCOLUMNS 32	/* # columns of data to print on each line */
+
+#define FSX_MPI /* Enable tests using MPI */
+
+#ifdef FSX_MPI
+#include <mpi.h>
+int rank;
+#endif
+
+/*
+ *	A log entry is an operation and a bunch of arguments.
+ */
+
+struct log_entry {
+	  int	operation;
+	  int	args[3];
+};
+
+#define	LOGSIZE	1000
+
+struct log_entry	oplog[LOGSIZE];	/* the log */
+int			logptr = 0;	/* current position in log */
+int			logcount = 0;	/* total ops */
+
+/*
+ *	Define operations
+ */
+
+#define	OP_READ		1
+#define OP_WRITE	2
+#define OP_TRUNCATE	3
+#define OP_CLOSEOPEN	4
+#define OP_MAPREAD	5
+#define OP_MAPWRITE	6
+#define OP_SKIPPED	7
+
+int page_size;
+int page_mask;
+
+char	*original_buf;			/* a pointer to the original data */
+char	*good_buf;			/* a pointer to the correct data */
+char	*temp_buf;			/* a pointer to the current data */
+char	*fname;				/* name of our test file */
+int	fd;				/* fd for our test file */
+
+off_t		file_size = 0;
+off_t		biggest = 0;
+char		state[256];
+unsigned long	testcalls = 0;		/* calls to function "test" */
+
+unsigned long	simulatedopcount = 0;	/* -b flag */
+int	closeprob = 0;			/* -c flag */
+int	debug = 0;			/* -d flag */
+unsigned long	debugstart = 0;		/* -D flag */
+unsigned long	maxfilelen = 256 * 1024;	/* -l flag */
+int	sizechecks = 1;			/* -n flag disables them */
+int	maxoplen = 64 * 1024;		/* -o flag */
+int	quiet = 0;			/* -q flag */
+unsigned long progressinterval = 0;	/* -p flag */
+int	readbdy = 1;			/* -r flag */
+int	style = 0;			/* -s flag */
+int	truncbdy = 1;			/* -t flag */
+int	writebdy = 1;			/* -w flag */
+long	monitorstart = -1;		/* -m flag */
+long	monitorend = -1;		/* -m flag */
+int	lite = 0;			/* -L flag */
+long	numops = -1;			/* -N flag */
+int	randomoplen = 1;		/* -O flag disables it */
+int	seed = 1;			/* -S flag */
+int     mapped_writes = 1;	      /* -W flag disables */
+int 	mapped_reads = 1;		/* -R flag disables it */
+int	fsxgoodfd = 0;
+FILE *	fsxlogf = NULL;
+int badoff = -1;
+int closeopen = 0;
+
+
+void
+vwarnc(code, fmt, ap)
+   int code;
+   const char *fmt;
+   va_list ap;
+{
+   fprintf(stderr, "fsx: ");
+   if (fmt != NULL) {
+	  vfprintf(stderr, fmt, ap);
+	  fprintf(stderr, ": ");
+   }
+   fprintf(stderr, "%s\n", strerror(code));
+}
+
+
+void
+warn(const char * fmt, ...)
+{
+   va_list ap;
+   va_start(ap, fmt);
+   vwarnc(errno, fmt, ap);
+   va_end(ap);
+}
+
+
+void
+prt(char *fmt, ...)
+{
+   va_list args;
+   va_start(args, fmt);
+   vfprintf(stdout, fmt, args);
+
+   va_end(args);
+
+   if (fsxlogf) {
+	  va_start(args, fmt);
+	  vfprintf(fsxlogf, fmt, args);
+	  va_end(args);
+   }
+}
+
+void
+prterr(char *prefix)
+{
+   prt("%s%s%s\n", prefix, prefix ? ": " : "", strerror(errno));
+}
+
+
+void
+log4(int operation, int arg0, int arg1, int arg2)
+{
+   struct log_entry *le;
+
+   le = &oplog[logptr];
+   le->operation = operation;
+   if (closeopen)
+	  le->operation = ~ le->operation;
+   le->args[0] = arg0;
+   le->args[1] = arg1;
+   le->args[2] = arg2;
+   logptr++;
+   logcount++;
+   if (logptr >= LOGSIZE)
+	  logptr = 0;
+}
+
+
+void
+logdump(void)
+{
+   int	i, count, down;
+   struct log_entry	*lp;
+
+   prt("LOG DUMP (%d total operations):\n", logcount);
+   if (logcount < LOGSIZE) {
+	  i = 0;
+	  count = logcount;
+   } else {
+	  i = logptr;
+	  count = LOGSIZE;
+   }
+   for ( ; count > 0; count--) {
+	  int opnum;
+
+	  opnum = i+1 + (logcount/LOGSIZE)*LOGSIZE;
+	  prt("%d(%d mod 256): ", opnum, opnum%256);
+	  lp = &oplog[i];
+	  if ((closeopen = lp->operation < 0))
+		 lp->operation = ~ lp->operation;
+			
+	  switch (lp->operation) {
+		 case OP_MAPREAD:
+			prt("MAPREAD\t0x%x thru 0x%x\t(0x%x bytes)",
+			    lp->args[0], lp->args[0] + lp->args[1] - 1,
+			    lp->args[1]);
+			if (badoff >= lp->args[0] && badoff <
+				lp->args[0] + lp->args[1])
+			   prt("\t***RRRR***");
+			break;
+		 case OP_MAPWRITE:
+			prt("MAPWRITE 0x%x thru 0x%x\t(0x%x bytes)",
+			    lp->args[0], lp->args[0] + lp->args[1] - 1,
+			    lp->args[1]);
+			if (badoff >= lp->args[0] && badoff <
+				lp->args[0] + lp->args[1])
+			   prt("\t******WWWW");
+			break;
+		 case OP_READ:
+			prt("READ\t0x%x thru 0x%x\t(0x%x bytes)",
+			    lp->args[0], lp->args[0] + lp->args[1] - 1,
+			    lp->args[1]);
+			if (badoff >= lp->args[0] &&
+			    badoff < lp->args[0] + lp->args[1])
+			   prt("\t***RRRR***");
+			break;
+		 case OP_WRITE:
+			prt("WRITE\t0x%x thru 0x%x\t(0x%x bytes)",
+			    lp->args[0], lp->args[0] + lp->args[1] - 1,
+			    lp->args[1]);
+			if (lp->args[0] > lp->args[2])
+			   prt(" HOLE");
+			else if (lp->args[0] + lp->args[1] > lp->args[2])
+			   prt(" EXTEND");
+			if ((badoff >= lp->args[0] || badoff >=lp->args[2]) &&
+			    badoff < lp->args[0] + lp->args[1])
+			   prt("\t***WWWW");
+			break;
+		 case OP_TRUNCATE:
+			down = lp->args[0] < lp->args[1];
+			prt("TRUNCATE %s\tfrom 0x%x to 0x%x",
+			    down ? "DOWN" : "UP", lp->args[1], lp->args[0]);
+			if (badoff >= lp->args[!down] &&
+			    badoff < lp->args[!!down])
+			   prt("\t******WWWW");
+			break;
+		 case OP_SKIPPED:
+			prt("SKIPPED (no operation)");
+			break;
+		 default:
+			prt("BOGUS LOG ENTRY (operation code = %d)!",
+			    lp->operation);
+	  }
+	  if (closeopen)
+		 prt("\n\t\tCLOSE/OPEN");
+	  prt("\n");
+	  i++;
+	  if (i == LOGSIZE)
+		 i = 0;
+   }
+}
+
+
+void
+save_buffer(char *buffer, off_t bufferlength, int fd)
+{
+   off_t ret;
+   ssize_t byteswritten;
+
+   if (fd <= 0 || bufferlength == 0)
+	  return;
+
+   if (bufferlength > SSIZE_MAX) {
+	  prt("fsx flaw: overflow in save_buffer\n");
+	  exit(67);
+   }
+   if (lite) {
+	  off_t size_by_seek = lseek(fd, (off_t)0, SEEK_END);
+	  if (size_by_seek == (off_t)-1)
+		 prterr("save_buffer: lseek eof");
+	  else if (bufferlength > size_by_seek) {
+		 warn("save_buffer: .fsxgood file too short... will save 0x%llx bytes instead of 0x%llx\n", (unsigned long long)size_by_seek,
+			  (unsigned long long)bufferlength);
+		 bufferlength = size_by_seek;
+	  }
+   }
+
+   ret = lseek(fd, (off_t)0, SEEK_SET);
+   if (ret == (off_t)-1)
+	  prterr("save_buffer: lseek 0");
+	
+   byteswritten = write(fd, buffer, (size_t)bufferlength);
+   if (byteswritten != bufferlength) {
+	  if (byteswritten == -1)
+		 prterr("save_buffer write");
+	  else
+		 warn("save_buffer: short write, 0x%x bytes instead of 0x%llx\n",
+			  (unsigned)byteswritten,
+			  (unsigned long long)bufferlength);
+   }
+}
+
+
+void
+report_failure(int status)
+{
+   logdump();
+	
+   if (fsxgoodfd) {
+	  if (good_buf) {
+		 save_buffer(good_buf, file_size, fsxgoodfd);
+		 prt("Correct content saved for comparison\n");
+		 prt("(maybe hexdump \"%s\" vs \"%s.fsxgood\")\n",
+			 fname, fname);
+	  }
+	  close(fsxgoodfd);
+   }
+   exit(status);
+}
+
+
+#define short_at(cp) ((unsigned short)((*((unsigned char *)(cp)) << 8) | \
+					*(((unsigned char *)(cp)) + 1)))
+
+void
+check_buffers(unsigned offset, unsigned size)
+{
+   unsigned char c, t;
+   unsigned i = 0;
+   unsigned n = 0;
+   unsigned op = 0;
+   unsigned bad = 0;
+
+   if (memcmp(good_buf + offset, temp_buf, size) != 0) {
+	  prt("READ BAD DATA: offset = 0x%x, size = 0x%x\n",
+		  offset, size);
+	  prt("OFFSET\tGOOD\tBAD\tRANGE\n");
+	  while (size > 0) {
+		 c = good_buf[offset];
+		 t = temp_buf[i];
+		 if (c != t) {
+			if (n == 0) {
+			   bad = short_at(&temp_buf[i]);
+			   prt("0x%5x\t0x%04x\t0x%04x", offset,
+				   short_at(&good_buf[offset]), bad);
+			   op = temp_buf[offset & 1 ? i+1 : i];
+			}
+			n++;
+			badoff = offset;
+		 }
+		 offset++;
+		 i++;
+		 size--;
+	  }
+	  if (n) {
+		 prt("\t0x%5x\n", n);
+		 if (bad)
+			prt("operation# (mod 256) for the bad data may be %u\n", ((unsigned)op & 0xff));
+		 else
+			prt("operation# (mod 256) for the bad data unknown, check HOLE and EXTEND ops\n");
+	  } else
+		 prt("????????????????\n");
+	  report_failure(110);
+   }
+}
+
+void
+check_size(void)
+{
+   struct stat	statbuf;
+   off_t	size_by_seek;
+
+   if (fstat(fd, &statbuf)) {
+	  prterr("check_size: fstat");
+	  statbuf.st_size = -1;
+   }
+   size_by_seek = lseek(fd, (off_t)0, SEEK_END);
+   if (file_size != statbuf.st_size || file_size != size_by_seek) {
+	  prt("Size error: expected 0x%llx stat 0x%llx seek 0x%llx\n",
+		  (unsigned long long)file_size,
+		  (unsigned long long)statbuf.st_size,
+		  (unsigned long long)size_by_seek);
+	  report_failure(120);
+   }
+}
+
+
+void
+check_trunc_hack(void)
+{
+   struct stat statbuf;
+
+   ftruncate(fd, (off_t)0);
+   ftruncate(fd, (off_t)100000);
+   fstat(fd, &statbuf);
+   if (statbuf.st_size != (off_t)100000) {
+	  prt("no extend on truncate! not posix!\n");
+	  exit(130);
+   }
+   ftruncate(fd, (off_t)0);
+}
+
+
+void
+doread(unsigned offset, unsigned size)
+{
+   off_t ret;
+   unsigned iret;
+
+   offset -= offset % readbdy;
+   if (size == 0) {
+	  if (!quiet && testcalls > simulatedopcount)
+		 prt("skipping zero size read\n");
+	  log4(OP_SKIPPED, OP_READ, offset, size);
+	  return;
+   }
+   if (size + offset > file_size) {
+	  if (!quiet && testcalls > simulatedopcount)
+		 prt("skipping seek/read past end of file\n");
+	  log4(OP_SKIPPED, OP_READ, offset, size);
+	  return;
+   }
+
+   log4(OP_READ, offset, size, 0);
+
+   if (testcalls <= simulatedopcount)
+	  return;
+
+   if (!quiet && ((progressinterval &&
+				   testcalls % progressinterval == 0) ||
+				  (debug &&
+				   (monitorstart == -1 ||
+					(offset + size > monitorstart &&
+					 (monitorend == -1 || offset <= monitorend))))))
+	  prt("%lu read\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls,
+		  offset, offset + size - 1, size);
+   ret = lseek(fd, (off_t)offset, SEEK_SET);
+   if (ret == (off_t)-1) {
+	  prterr("doread: lseek");
+	  report_failure(140);
+   }
+   iret = read(fd, temp_buf, size);
+   if (iret != size) {
+	  if (iret == -1)
+		 prterr("doread: read");
+	  else
+		 prt("short read: 0x%x bytes instead of 0x%x\n",
+			 iret, size);
+	  report_failure(141);
+   }
+   check_buffers(offset, size);
+}
+
+
+void
+check_eofpage(char *s, unsigned offset, char *p, int size)
+{
+   uintptr_t last_page, should_be_zero;
+
+   if (offset + size <= (file_size & ~page_mask))
+	  return;
+   /*
+	* we landed in the last page of the file
+	* test to make sure the VM system provided 0's 
+	* beyond the true end of the file mapping
+	* (as required by mmap def in 1996 posix 1003.1)
+	*/
+   last_page = ((uintptr_t)p + (offset & page_mask) + size) & ~page_mask;
+
+   for (should_be_zero = last_page + (file_size & page_mask);
+		should_be_zero < last_page + page_size;
+		should_be_zero++)
+	  if (*(char *)should_be_zero) {
+		 prt("Mapped %s: non-zero data past EOF (0x%llx) page offset 0x%x is 0x%04x\n",
+			 s, file_size - 1, should_be_zero & page_mask,
+			 short_at(should_be_zero));
+		 report_failure(205);
+	  }
+}
+
+
+void
+domapread(unsigned offset, unsigned size)
+{
+   unsigned pg_offset;
+   unsigned map_size;
+   char    *p;
+
+   offset -= offset % readbdy;
+   if (size == 0) {
+	  if (!quiet && testcalls > simulatedopcount)
+		 prt("skipping zero size read\n");
+	  log4(OP_SKIPPED, OP_MAPREAD, offset, size);
+	  return;
+   }
+   if (size + offset > file_size) {
+	  if (!quiet && testcalls > simulatedopcount)
+		 prt("skipping seek/read past end of file\n");
+	  log4(OP_SKIPPED, OP_MAPREAD, offset, size);
+	  return;
+   }
+
+   log4(OP_MAPREAD, offset, size, 0);
+
+   if (testcalls <= simulatedopcount)
+	  return;
+
+   if (!quiet && ((progressinterval &&
+				   testcalls % progressinterval == 0) ||
+				  (debug &&
+				   (monitorstart == -1 ||
+					(offset + size > monitorstart &&
+					 (monitorend == -1 || offset <= monitorend))))))
+	  prt("%lu mapread\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls,
+		  offset, offset + size - 1, size);
+
+   pg_offset = offset & page_mask;
+   map_size  = pg_offset + size;
+
+   if ((p = (char *)mmap(0, map_size, PROT_READ, MAP_FILE | MAP_SHARED, fd,
+						 (off_t)(offset - pg_offset))) == (char *)-1) {
+	  prterr("domapread: mmap");
+	  report_failure(190);
+   }
+   memcpy(temp_buf, p + pg_offset, size);
+
+   check_eofpage("Read", offset, p, size);
+
+   if (munmap(p, map_size) != 0) {
+	  prterr("domapread: munmap");
+	  report_failure(191);
+   }
+
+   check_buffers(offset, size);
+}
+
+
+void
+gendata(char *original_buf, char *good_buf, unsigned offset, unsigned size)
+{
+   while (size--) {
+	  good_buf[offset] = testcalls % 256; 
+	  if (offset % 2)
+		 good_buf[offset] += original_buf[offset];
+	  offset++;
+   }
+}
+
+
+void
+dowrite(unsigned offset, unsigned size)
+{
+   off_t ret;
+   unsigned iret;
+
+   offset -= offset % writebdy;
+   if (size == 0) {
+	  if (!quiet && testcalls > simulatedopcount)
+		 prt("skipping zero size write\n");
+	  log4(OP_SKIPPED, OP_WRITE, offset, size);
+	  return;
+   }
+
+   log4(OP_WRITE, offset, size, file_size);
+
+   gendata(original_buf, good_buf, offset, size);
+   if (file_size < offset + size) {
+	  if (file_size < offset)
+		 memset(good_buf + file_size, '\0', offset - file_size);
+	  file_size = offset + size;
+	  if (lite) {
+		 warn("Lite file size bug in fsx!");
+		 report_failure(149);
+	  }
+   }
+
+   if (testcalls <= simulatedopcount)
+	  return;
+
+   if (!quiet && ((progressinterval &&
+				   testcalls % progressinterval == 0) ||
+				  (debug &&
+				   (monitorstart == -1 ||
+					(offset + size > monitorstart &&
+					 (monitorend == -1 || offset <= monitorend))))))
+	  prt("%lu write\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls,
+		  offset, offset + size - 1, size);
+   ret = lseek(fd, (off_t)offset, SEEK_SET);
+   if (ret == (off_t)-1) {
+	  prterr("dowrite: lseek");
+	  report_failure(150);
+   }
+
+#ifdef FSX_MPI
+   if(rank == 0)
+   {
+#endif
+   iret = write(fd, good_buf + offset, size);
+   if (iret != size) {
+	  if (iret == -1)
+		 prterr("dowrite: write");
+	  else
+		 prt("short write: 0x%x bytes instead of 0x%x\n",
+			 iret, size);
+	  report_failure(151);
+   }
+#ifdef FSX_MPI
+   }
+#endif
+}
+
+void
+domapwrite(unsigned offset, unsigned size)
+{
+   unsigned pg_offset;
+   unsigned map_size;
+   off_t    cur_filesize;
+   char    *p;
+
+   offset -= offset % writebdy;
+   if (size == 0) {
+	  if (!quiet && testcalls > simulatedopcount)
+		 prt("skipping zero size write\n");
+	  log4(OP_SKIPPED, OP_MAPWRITE, offset, size);
+	  return;
+   }
+   cur_filesize = file_size;
+
+   log4(OP_MAPWRITE, offset, size, 0);
+
+   gendata(original_buf, good_buf, offset, size);
+   if (file_size < offset + size) {
+	  if (file_size < offset)
+		 memset(good_buf + file_size, '\0', offset - file_size);
+	  file_size = offset + size;
+	  if (lite) {
+		 warn("Lite file size bug in fsx!");
+		 report_failure(200);
+	  }
+   }
+
+   if (testcalls <= simulatedopcount)
+	  return;
+
+   if (!quiet && ((progressinterval &&
+				   testcalls % progressinterval == 0) ||
+				  (debug &&
+				   (monitorstart == -1 ||
+					(offset + size > monitorstart &&
+					 (monitorend == -1 || offset <= monitorend))))))
+	  prt("%lu mapwrite\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls,
+		  offset, offset + size - 1, size);
+
+   if (file_size > cur_filesize) {
+	  if (ftruncate(fd, file_size) == -1) {
+		 prterr("domapwrite: ftruncate");
+		 exit(201);
+	  }
+   }
+   pg_offset = offset & page_mask;
+   map_size  = pg_offset + size;
+
+   if ((p = (char *)mmap(0, map_size, PROT_READ | PROT_WRITE,
+						 MAP_FILE | MAP_SHARED, fd,
+						 (off_t)(offset - pg_offset))) == (char *)-1) {
+	  prterr("domapwrite: mmap");
+	  report_failure(202);
+   }
+   memcpy(p + pg_offset, good_buf + offset, size);
+   if (msync(p, map_size, 0) != 0) {
+	  prterr("domapwrite: msync");
+	  report_failure(203);
+   }
+
+   check_eofpage("Write", offset, p, size);
+
+   if (munmap(p, map_size) != 0) {
+	  prterr("domapwrite: munmap");
+	  report_failure(204);
+   }
+}
+
+void
+dotruncate(unsigned size)
+{
+   int oldsize = file_size;
+
+   size -= size % truncbdy;
+   if (size > biggest) {
+	  biggest = size;
+#ifdef FSX_MPI
+	  if(rank == 0)
+#endif
+	  if (!quiet && testcalls > simulatedopcount)
+		 prt("truncating to largest ever: 0x%x\n", size);
+   }
+
+   log4(OP_TRUNCATE, size, (unsigned)file_size, 0);
+
+   if (size > file_size)
+	  memset(good_buf + file_size, '\0', size - file_size);
+   file_size = size;
+
+   if (testcalls <= simulatedopcount)
+	  return;
+
+#ifdef FSX_MPI
+   if(rank == 0)
+   {
+#endif	
+	  if ((progressinterval && testcalls % progressinterval == 0) ||
+		  (debug && (monitorstart == -1 || monitorend == -1 ||
+					 size <= monitorend)))
+		 prt("%lu trunc\tfrom 0x%x to 0x%x\n", testcalls, oldsize, size);
+	  if (ftruncate(fd, (off_t)size) == -1) {
+		 prt("ftruncate1: %x\n", size);
+		 prterr("dotruncate: ftruncate");
+		 report_failure(160);
+	  }
+#ifdef FSX_MPI
+   }
+   MPI_Bcast(&file_size, 1, MPI_LONG, 0, MPI_COMM_WORLD);
+#endif
+}
+
+
+void
+writefileimage()
+{
+   ssize_t iret;
+
+   if (lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) {
+	  prterr("writefileimage: lseek");
+	  report_failure(171);
+   }
+   iret = write(fd, good_buf, file_size);
+   if ((off_t)iret != file_size) {
+	  if (iret == -1)
+		 prterr("writefileimage: write");
+	  else
+		 prt("short write: 0x%x bytes instead of 0x%llx\n",
+			 iret, (unsigned long long)file_size);
+	  report_failure(172);
+   }
+   if (lite ? 0 : ftruncate(fd, file_size) == -1) {
+	  prt("ftruncate2: %llx\n", (unsigned long long)file_size);
+	  prterr("writefileimage: ftruncate");
+	  report_failure(173);
+   }
+}
+
+
+void
+docloseopen(void)
+{ 
+   if (testcalls <= simulatedopcount)
+	  return;
+
+   if (debug)
+	  prt("%lu close/open\n", testcalls);
+   if (close(fd)) {
+	  prterr("docloseopen: close");
+	  report_failure(180);
+   }
+   fd = open(fname, O_RDWR, 0);
+   if (fd < 0) {
+	  prterr("docloseopen: open");
+	  report_failure(181);
+   }
+}
+
+
+void
+test(void)
+{
+   unsigned long	offset;
+   unsigned long	size = maxoplen;
+   unsigned long	rv = random();
+   unsigned long	op = rv % (3 + !lite + mapped_writes);
+
+   /* turn off the map read if necessary */
+
+   if (op == 2 && !mapped_reads)
+	  op = 0;
+
+#ifdef FSX_MPI
+   MPI_Bcast(&op, 1, MPI_UNSIGNED_LONG, 0, MPI_COMM_WORLD);
+   if(rank == 0)
+#endif
+	  if (simulatedopcount > 0 && testcalls == simulatedopcount)
+		 writefileimage();
+
+   testcalls++;
+
+   if (closeprob)
+   {
+	  closeopen = (rv >> 3) < (1 << 28) / closeprob;
+#ifdef FSX_MPI
+	  MPI_Bcast(&closeopen, 1, MPI_INT, 0, MPI_COMM_WORLD);
+#endif
+   }
+   if (debugstart > 0 && testcalls >= debugstart)
+	  debug = 1;
+
+   if (!quiet && testcalls < simulatedopcount && testcalls % 100000 == 0)
+	  prt("%lu...\n", testcalls);
+
+   /*
+	* READ:	op = 0
+	* WRITE:	op = 1
+	* MAPREAD:     op = 2
+	* TRUNCATE:	op = 3
+	* MAPWRITE:    op = 3 or 4
+	*/
+
+   if (lite ? 0 : op == 3 && style == 0) /* vanilla truncate? */
+	  dotruncate(random() % maxfilelen);
+   else {
+	  if (randomoplen)
+		 size = random() % (maxoplen+1);
+	  if (lite ? 0 : op == 3)
+		 dotruncate(size);
+	  else {
+		 offset = random();
+		 if (op == 1 || op == (lite ? 3 : 4)) {
+			offset %= maxfilelen;
+			if (offset + size > maxfilelen)
+			   size = maxfilelen - offset;
+			if (op != 1)
+			   domapwrite(offset, size);
+			else
+			{
+#ifdef FSX_MPI
+			   MPI_Bcast(&offset, 1, MPI_UNSIGNED_LONG, 0, MPI_COMM_WORLD);
+			   MPI_Bcast(&size, 1, MPI_UNSIGNED_LONG, 0, MPI_COMM_WORLD);
+#endif
+			   dowrite(offset, size);
+			}
+
+#ifdef FSX_MPI
+			MPI_Barrier(MPI_COMM_WORLD);
+			if(rank != 0 && size != 0)
+			   doread(offset, size);
+#endif
+		 } else {
+			if (file_size)
+			   offset %= file_size;
+			else
+			   offset = 0;
+			if (offset + size > file_size)
+			   size = file_size - offset;
+			if (op != 0)
+			   domapread(offset, size);
+			else
+			{
+#ifdef FSX_MPI
+			   MPI_Bcast(&offset, 1, MPI_UNSIGNED_LONG, 0, MPI_COMM_WORLD);
+			   MPI_Bcast(&size, 1, MPI_UNSIGNED_LONG, 0, MPI_COMM_WORLD);
+#endif
+			   doread(offset, size);
+			}
+		 }
+	  }
+   }
+   if (sizechecks && testcalls > simulatedopcount)
+   {
+#ifdef FSX_MPI
+	  MPI_Barrier(MPI_COMM_WORLD);
+#endif
+	  check_size();
+   }
+   if (closeopen)
+	  docloseopen();
+}
+
+
+void
+cleanup(sig)
+   int	sig;
+{
+   if (sig)
+	  prt("signal %d\n", sig);
+   prt("testcalls = %lu\n", testcalls);
+   exit(sig);
+}
+
+
+void
+usage(void)
+{
+   fprintf(stdout, "usage: %s",
+		   "fsx [-dnqLOW] [-b opnum] [-c Prob] [-l flen] [-m start:end] [-o oplen] [-p progressinterval] [-r readbdy] [-s style] [-t truncbdy] [-w writebdy] [-D startingop] [-N numops] [-P dirpath] [-S seed] fname\n\
+	-b opnum: beginning operation number (default 1)\n\
+	-c P: 1 in P chance of file close+open at each op (default infinity)\n\
+	-d: debug output for all operations\n\
+	-l flen: the upper bound on file size (default 262144)\n\
+	-m startop:endop: monitor (print debug output) specified byte range (default 0:infinity)\n\
+	-n: no verifications of file size\n\
+	-o oplen: the upper bound on operation size (default 65536)\n\
+	-p progressinterval: debug output at specified operation interval\n\
+	-q: quieter operation\n\
+	-r readbdy: 4096 would make reads page aligned (default 1)\n\
+	-s style: 1 gives smaller truncates (default 0)\n\
+	-t truncbdy: 4096 would make truncates page aligned (default 1)\n\
+	-w writebdy: 4096 would make writes page aligned (default 1)\n\
+	-D startingop: debug output starting at specified operation\n\
+	-L: fsxLite - no file creations & no file size changes\n\
+	-N numops: total # operations to do (default infinity)\n\
+	-O: use oplen (see -o flag) for every op (default random)\n\
+	-P dirpath: save .fsxlog and .fsxgood files in dirpath (default ./)\n\
+	-S seed: for random # generator (default 1) 0 gets timestamp\n\
+	-W: mapped write operations DISabled\n\
+	-R: mapped read operations DISabled)\n\
+	fname: this filename is REQUIRED (no default)\n");
+   exit(90);
+}
+
+
+int
+getnum(char *s, char **e)
+{
+   int ret = -1;
+
+   *e = (char *) 0;
+   ret = strtol(s, e, 0);
+   if (*e)
+	  switch (**e) {
+		 case 'b':
+		 case 'B':
+			ret *= 512;
+			*e = *e + 1;
+			break;
+		 case 'k':
+		 case 'K':
+			ret *= 1024;
+			*e = *e + 1;
+			break;
+		 case 'm':
+		 case 'M':
+			ret *= 1024*1024;
+			*e = *e + 1;
+			break;
+		 case 'w':
+		 case 'W':
+			ret *= 4;
+			*e = *e + 1;
+			break;
+	  }
+   return (ret);
+}
+
+
+int
+main(int argc, char **argv)
+{
+   int	i, ch;
+   char	*endp;
+   char goodfile[1024];
+   char logfile[1024];
+
+#ifdef FSX_MPI
+   int num_processors, ss;
+
+   MPI_Init(&argc, &argv);
+   MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+#endif
+
+   goodfile[0] = 0;
+   logfile[0] = 0;
+
+   page_size = getpagesize();
+   page_mask = page_size - 1;
+
+   setvbuf(stdout, (char *)0, _IOLBF, 0); /* line buffered stdout */
+
+   while ((ch = getopt(argc, argv, "b:c:dl:m:no:p:qr:s:t:w:D:LN:OP:RS:W"))
+		  != EOF)
+	  switch (ch) {
+		 case 'b':
+			simulatedopcount = getnum(optarg, &endp);
+			if (!quiet)
+			   fprintf(stdout, "Will begin at operation %ld\n",
+					   simulatedopcount);
+			if (simulatedopcount == 0)
+			   usage();
+			simulatedopcount -= 1;
+			break;
+		 case 'c':
+			closeprob = getnum(optarg, &endp);
+			if (!quiet)
+			   fprintf(stdout,
+					   "Chance of close/open is 1 in %d\n",
+					   closeprob);
+			if (closeprob <= 0)
+			   usage();
+			break;
+		 case 'd':
+			debug = 1;
+			break;
+		 case 'l':
+			maxfilelen = getnum(optarg, &endp);
+			if (maxfilelen <= 0)
+			   usage();
+			break;
+		 case 'm':
+			monitorstart = getnum(optarg, &endp);
+			if (monitorstart < 0)
+			   usage();
+			if (!endp || *endp++ != ':')
+			   usage();
+			monitorend = getnum(endp, &endp);
+			if (monitorend < 0)
+			   usage();
+			if (monitorend == 0)
+			   monitorend = -1; /* aka infinity */
+			debug = 1;
+		 case 'n':
+			sizechecks = 0;
+			break;
+		 case 'o':
+			maxoplen = getnum(optarg, &endp);
+			if (maxoplen <= 0)
+			   usage();
+			break;
+		 case 'p':
+			progressinterval = getnum(optarg, &endp);
+			if (progressinterval < 0)
+			   usage();
+			break;
+		 case 'q':
+			quiet = 1;
+			break;
+		 case 'r':
+			readbdy = getnum(optarg, &endp);
+			if (readbdy <= 0)
+			   usage();
+			break;
+		 case 's':
+			style = getnum(optarg, &endp);
+			if (style < 0 || style > 1)
+			   usage();
+			break;
+		 case 't':
+			truncbdy = getnum(optarg, &endp);
+			if (truncbdy <= 0)
+			   usage();
+			break;
+		 case 'w':
+			writebdy = getnum(optarg, &endp);
+			if (writebdy <= 0)
+			   usage();
+			break;
+		 case 'D':
+			debugstart = getnum(optarg, &endp);
+			if (debugstart < 1)
+			   usage();
+			break;
+		 case 'L':
+			lite = 1;
+			break;
+		 case 'N':
+			numops = getnum(optarg, &endp);
+			if (numops < 0)
+			   usage();
+			break;
+		 case 'O':
+			randomoplen = 0;
+			break;
+		 case 'P':
+			strncpy(goodfile, optarg, sizeof(goodfile));
+			strcat(goodfile, "/");
+			strncpy(logfile, optarg, sizeof(logfile));
+			strcat(logfile, "/");
+			break;
+		 case 'R':
+			mapped_reads = 0;
+			if (!quiet)
+			   fprintf(stdout, "mapped reads DISABLED\n");
+			break;
+		 case 'S':
+			seed = getnum(optarg, &endp);
+			if (seed == 0)
+			   seed = time(0) % 10000;
+			if (!quiet)
+			   fprintf(stdout, "Seed set to %d\n", seed);
+			if (seed < 0)
+			   usage();
+			break;
+		 case 'W':
+			mapped_writes = 0;
+			if (!quiet)
+			   fprintf(stdout, "mapped writes DISABLED\n");
+			break;
+
+		 default:
+			usage();
+			/* NOTREACHED */
+	  }
+   argc -= optind;
+   argv += optind;
+   if (argc != 1)
+	  usage();
+   fname = argv[0];
+
+   signal(SIGHUP,	cleanup);
+   signal(SIGINT,	cleanup);
+   signal(SIGPIPE,	cleanup);
+   signal(SIGALRM,	cleanup);
+   signal(SIGTERM,	cleanup);
+   signal(SIGXCPU,	cleanup);
+   signal(SIGXFSZ,	cleanup);
+   signal(SIGVTALRM,	cleanup);
+   signal(SIGUSR1,	cleanup);
+   signal(SIGUSR2,	cleanup);
+
+   initstate(seed, state, 256);
+   setstate(state);
+#ifdef FSX_MPI
+   if(rank == 0)
+   {
+#endif
+	  fd = open(fname, O_RDWR|(lite ? 0 : O_CREAT|O_TRUNC), 0666);
+	  if (fd < 0) {
+		 prterr(fname);
+		 exit(91);
+	  }
+	  strncat(goodfile, fname, 256);
+	  strcat (goodfile, ".fsxgood");
+	  fsxgoodfd = open(goodfile, O_RDWR|O_CREAT|O_TRUNC, 0666);
+	  if (fsxgoodfd < 0) {
+		 prterr(goodfile);
+		 exit(92);
+	  }
+	  strncat(logfile, fname, 256);
+	  strcat (logfile, ".fsxlog");
+	  fsxlogf = fopen(logfile, "w");
+	  if (fsxlogf == NULL) {
+		 prterr(logfile);
+		 exit(93);
+	  }
+	  if (lite) {
+		 off_t ret;
+		 file_size = maxfilelen = lseek(fd, (off_t)0, SEEK_END);
+		 if (file_size == (off_t)-1) {
+			prterr(fname);
+			warn("main: lseek eof");
+			exit(94);
+		 }
+		 ret = lseek(fd, (off_t)0, SEEK_SET);
+		 if (ret == (off_t)-1) {
+			prterr(fname);
+			warn("main: lseek 0");
+			exit(95);
+		 }
+	  }
+	  original_buf = (char *) malloc(maxfilelen);
+	  for (i = 0; i < maxfilelen; i++)
+		 original_buf[i] = random() % 256;
+	  good_buf = (char *) malloc(maxfilelen);
+	  memset(good_buf, '\0', maxfilelen);
+	  temp_buf = (char *) malloc(maxoplen);
+	  memset(temp_buf, '\0', maxoplen);
+	  if (lite) {	/* zero entire existing file */
+		 ssize_t written;
+		  
+		 written = write(fd, good_buf, (size_t)maxfilelen);
+		 if (written != maxfilelen) {
+			if (written == -1) {
+			   prterr(fname);
+			   warn("main: error on write");
+			} else
+			   warn("main: short write, 0x%x bytes instead of 0x%x\n",
+					(unsigned)written, maxfilelen);
+			exit(98);
+		 }
+	  } else 
+		 check_trunc_hack();
+#ifdef FSX_MPI
+   }
+   else
+   {
+	  original_buf = (char *) malloc(maxfilelen);
+	  good_buf = (char *) malloc(maxfilelen);
+	  memset(good_buf, '\0', maxfilelen);
+	  temp_buf = (char *) malloc(maxoplen);
+	  memset(temp_buf, '\0', maxoplen);
+   }
+
+   /* Broadcast the original buffer. */
+   MPI_Bcast(original_buf, maxfilelen, MPI_CHAR, 0, MPI_COMM_WORLD);
+
+   if(rank != 0)
+   {
+	  fd = open(fname, O_RDWR| O_TRUNC, 0666);
+	  if(fd < 0)
+	  {
+		 prterr(fname);
+		 exit(91);
+	  }
+
+	  strncat(goodfile, fname, 256);
+	  strcat (goodfile, ".fsxgood");
+	  fsxgoodfd = open(goodfile, O_RDWR | O_TRUNC, 0666);
+	  if (fsxgoodfd < 0) {
+		 prterr(goodfile);
+		 exit(92);
+	  }
+
+	  strncat(logfile, fname, 256);
+	  strcat (logfile, ".fsxlog");
+	  fsxlogf = fopen(logfile, "w");
+	  if (fsxlogf == NULL) {
+		 prterr(logfile);
+		 exit(93);
+	  }
+   }
+
+   /* Barrier - let all process have the file open. */
+   MPI_Barrier(MPI_COMM_WORLD);
+#endif
+
+   while (numops == -1 || numops--)
+   {
+#ifdef FSX_MPI
+	  MPI_Barrier(MPI_COMM_WORLD);
+#endif
+	  test();
+   }
+	
+   if (close(fd)) {
+	  prterr("close");
+	  report_failure(99);
+   }
+
+#ifdef FSX_MPI
+   if(rank == 0)
+#endif
+	  prt("All operations completed A-OK!\n");
+
+#ifdef FSX_MPI
+   MPI_Barrier(MPI_COMM_WORLD);
+   MPI_Finalize();
+#endif
+
+   exit(0);
+   return 0;
+}
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/mpi-vfs-tests.d/Makefile
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/mpi-vfs-tests.d/Makefile	(revision 7643)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/mpi-vfs-tests.d/Makefile	(revision 7643)
@@ -0,0 +1,11 @@
+
+CC=mpicc
+CFLAGS=-g -O0
+
+all: fsx-mpi
+
+fsx-mpi: fsx-mpi.c
+	$(CC) $(CFLAGS) -o fsx-mpi fsx-mpi.c
+
+clean: ;
+	@rm fsx-mpi
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/tinder-pvfs2-status
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/tinder-pvfs2-status	(revision 4648)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/tinder-pvfs2-status	(revision 4648)
@@ -0,0 +1,68 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+require HTTP::Request;
+require LWP::UserAgent;
+
+if($#ARGV < 2)
+{
+    print "\nusage: tinder-pvfs2-status <build name> " .
+          "<status> <start time> [status info]\n\n";
+    exit 1;
+}
+
+my $buildname=shift @ARGV;
+my $status=shift @ARGV;
+my $starttime=shift @ARGV;
+
+my $binfo = "";
+if($#ARGV > -1)
+{
+   $binfo = "TinderboxPrint: " . join(" ", @ARGV);
+}
+
+my $admin="slang\@mcs.anl.gov";
+my $datestr=time();
+
+my $logoutput = "";
+my $line;
+while (defined($line = <STDIN>))
+{
+    $logoutput .= $line;
+}
+
+my $msg = <<"BODYEOF";
+
+tinderbox: administrator: $admin
+tinderbox: starttime: $starttime
+tinderbox: buildname: $buildname
+tinderbox: status: $status
+tinderbox: timenow: $datestr
+tinderbox: tree: PVFS2
+tinderbox: errorparser: unix
+tinderbox: END
+
+$binfo
+
+$logoutput
+
+BODYEOF
+;
+
+my $req = HTTP::Request->new( 
+    "POST" => "http://www.pvfs.org/cgi-bin/pvfs2/tinderbox2/process_build" );
+$req->content( $msg );
+
+my $ua = LWP::UserAgent->new;
+
+my $resp = $ua->request( $req );
+if( $resp->is_success )
+{
+	print $resp->content;
+}
+else
+{
+	die $resp->status_line;
+}
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/testscrpt.sh
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/testscrpt.sh	(revision 7924)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/testscrpt.sh	(revision 7924)
@@ -0,0 +1,300 @@
+#!/bin/sh
+
+# i'm not married to bash. just wanted to get things prototyped
+
+# prereqs: 
+#   - $user needs to be in the sudoers file
+#   - $user needs to be able to sudo w/o prompting
+#   - please don't cheat and run this as root: will not catch permissions bugs
+
+# you can override these settings in nightly-tests.cfg 
+export PVFS2_DEST=/tmp/pvfs2-nightly
+export PVFS2_MOUNTPOINT=/pvfs2-nightly
+export EXTRA_TESTS=${HOME}/src/benchmarks
+
+# look for a 'nightly-test.cfg' in the same directory as this script
+if [ -f $(cd `dirname $0`; pwd)/nightly-tests.cfg ] ; then 
+	. $(cd `dirname $0`; pwd)/nightly-tests.cfg
+fi
+
+
+# need to make this a command line arugment:
+export CVS_TAG="${CVS_TAG:-HEAD}"
+
+# no need to modify these. they make their own gravy
+STARTTIME=`date +%s`
+TINDERSCRIPT=$(cd `dirname $0`; pwd)/tinder-pvfs2-status
+SYSINT_SCRIPTS=${PVFS2_DEST}/pvfs2-${CVS_TAG}/test/automated/sysint-tests.d
+VFS_SCRIPTS=${PVFS2_DEST}/pvfs2-${CVS_TAG}/test/automated/vfs-tests.d
+MPIIO_DRIVER=${PVFS2_DEST}/pvfs2-${CVS_TAG}/test/automated/testscrpt-mpi.sh
+REPORT_LOG=${PVFS2_DEST}/alltests-${CVS_TAG}.log
+
+# for debugging and testing, you might need to set the above to your working
+# direcory.. .unless you like checking in broken scripts
+#SYSINT_SCRIPTS=$(cd `dirname $0`; pwd)/sysint-tests.d
+#VFS_SCRIPTS=$(cd `dirname $0`; pwd)/vfs-tests.d
+MPIIO_DRIVER=$(cd `dirname $0`; pwd)/testscrpt-mpi.sh
+
+TESTNAME="`hostname -s`-nightly"
+
+# before starting any client apps, we need to deal with the possiblity that we
+# might have built with shared libraries
+export LD_LIBRARY_PATH=${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/lib:${LD_LIBRARY_PATH}
+
+# we only have a few hosts that meet all the earlier stated prereqs
+VFS_HOSTS="gil lain stan"
+
+#
+# Detect basic heap corruption
+#
+export MALLOC_CHECK_=2
+
+# takes one argument: a tag or branch in CVS
+pull_and_build_pvfs2 () {
+	# debugging aide... when we run this script repeatedly, we don't 
+	# really need to build everything again 
+	[ -n "$SKIP_BUILDING_PVFS2" ] && return 0
+
+	mkdir -p $PVFS2_DEST
+	with_kernel=""
+	if  [ $do_vfs -eq 1 ] ; then
+		with_kernel="-k /lib/modules/`uname -r`/build"
+	fi
+	# a bit of gross shell hackery, but cuts down on the number of
+	# variables we have to set.  Assumes we ran this script out of a
+	# checked out pvfs2 tree
+	$(cd `dirname $0`;pwd)/../../maint/build/pvfs2-build.sh -t -v $1 \
+		$with_kernel -r $PVFS2_DEST
+	
+}
+
+pull_and_build_mpich2 () {
+	# just to make debugging less painful
+	[ -n "${SKIP_BUILDING_MPICH2}" ] && return 0
+	[ -d ${PVFS2_DEST} ] || mkdir ${PVFS2_DEST}
+	cd ${PVFS2_DEST}
+	rm -rf mpich2-latest.tar.gz
+	wget --passive-ftp --quiet 'ftp://ftp.mcs.anl.gov/pub/mpi/misc/mpich2snap/mpich2-snap-*' -O mpich2-latest.tar.gz
+	rm -rf mpich2-snap-*
+	tar xzf mpich2-latest.tar.gz
+	cd mpich2-snap-*
+	mkdir build
+	cd build
+	../configure -q --prefix=${PVFS2_DEST}/soft/mpich2 \
+		--enable-romio --with-file-system=ufs+nfs+testfs+pvfs2 \
+		--with-pvfs2=${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG} \
+		--enable-g=dbg --without-mpe \
+		--disable-f77 >mpich2config-${CVS_TAG}.log &&\
+	make >/dev/null && make install >/dev/null 
+}
+
+
+teardown_vfs() {
+	sudo umount $PVFS2_MOUNTPOINT
+	sudo killall pvfs2-client
+	sleep 1
+	sudo /sbin/rmmod  pvfs2
+	# let teardown alway ssucceed.  pvfs2-client might already be killed
+	# and pvfs2 kernel module might not be loaded yet 
+	return 0
+}
+
+setup_vfs() {
+	sudo dmesg -c >/dev/null
+	sudo /sbin/insmod ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/lib/modules/`uname -r`/kernel/fs/pvfs2/pvfs2.ko
+	sudo LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-client \
+		-p ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-client-core \
+		-L ${PVFS2_DEST}/pvfs2-client-${CVS_TAG}.log
+	# sudo screen -d -m cgdb -x ${PVFS2_DEST}/.gdbinit --args ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-client-core -L ${PVFS2_DEST}/pvfs2-client-${CVS_TAG}.log
+	#sudo valgrind --log-file=${PVFS2_DEST}/pvfs2-client.vg ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-client-core -L ${PVFS2_DEST}/pvfs2-client-${CVS_TAG}.log &
+	sudo chmod 644 ${PVFS2_DEST}/pvfs2-client-${CVS_TAG}.log
+	sudo mount -t pvfs2 tcp://`hostname -s`:3399/pvfs2-fs ${PVFS2_MOUNTPOINT}
+}
+
+setup_pvfs2() {
+	cd $PVFS2_DEST
+	rm -f fs.conf 
+	INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-genconfig fs.conf \
+		--protocol tcp \
+		--iospec="`hostname -s`:{3396-3399}" \
+		--metaspec="`hostname -s`:{3396-3399}"  \
+		--storage ${PVFS2_DEST}/STORAGE-pvfs2-${CVS_TAG} \
+		--logfile=${PVFS2_DEST}/pvfs2-server-${CVS_TAG}.log --quiet
+	# clean up any artifacts from earlier runs
+	rm -rf ${PVFS2_DEST}/STORAGE-pvfs2-${CVS_TAG}*
+	rm -f ${PVFS2_DEST}/pvfs2-server-${CVS_TAG}.log* 
+	failure_logs="${PVFS2_DEST}/pvfs2-server-${CVS_TAG}.log* $failure_logs"
+	for alias in `grep 'Alias ' fs.conf | cut -d ' ' -f 2`; do
+		INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-server \
+			-p `pwd`/pvfs2-server-${alias}.pid \
+			-f fs.conf -a $alias
+		INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-server \
+			-p `pwd`/pvfs2-server-${alias}.pid  \
+			fs.conf $server_conf -a $alias
+	done
+
+	echo "tcp://`hostname -s`:3399/pvfs2-fs ${PVFS2_MOUNTPOINT} pvfs2 defaults 0 0" > ${PVFS2_DEST}/pvfs2tab
+	# do we need to use our own pvfs2tab file?  If we will mount pvfs2, we
+	# can fall back to /etc/fstab
+	grep -q 'pvfs2-nightly' /etc/fstab
+	if [ $? -ne 0 -a $do_vfs -eq 0 ] ; then
+		export PVFS2TAB_FILE=${PVFS2_DEST}/pvfs2tab
+	fi	
+}
+
+teardown_pvfs2() {
+	for pidfile in ${PVFS2_DEST}/pvfs2-server*.pid ; do
+		[ ! -f $pidfile ] && continue
+
+		kill `cat $pidfile`
+		# occasionally the server ends up in a hard-to-kill state.
+		# server has atexit(3) remove .pid file
+		sleep 3
+		if [ -f $pidfile ] ; then 
+			kill -9 `cat $pidfile`
+		fi
+	done
+
+	# let teardown always succeed.  pvfs2-server.pid could be stale
+	return 0
+}
+
+buildfail() {
+	echo "Failure in build process"
+	cat ${PVFS2_DEST}/configure-${CVS_TAG}.log \
+		${PVFS2_DEST}/make-extracted-${CVS_TAG}.log \
+		${PVFS2_DEST}/make-install-${CVS_TAG}.log \
+		${PVFS2_DEST}/make-${CVS_TAG}.log \
+		${PVFS2_DEST}/make-test-${CVS_TAG}.log | \
+		${TINDERSCRIPT} ${TESTNAME}-${CVS_TAG} build_failed $STARTTIME 
+	exit 1
+}
+
+setupfail() {
+	echo "Failure in setup"
+	dmesg > ${PVFS2_DEST}/dmesg
+	cat ${PVFS2_DEST}/dmesg ${PVFS2_DEST}/pvfs2-client-${CVS_TAG}.log \
+		${PVFS2_DEST}/pvfs2-server-${CVS_TAG}.log* | \
+		${TINDERSCRIPT}  ${TESTNAME}-${CVS_TAG} test_failed $STARTTIME 
+	exit 1
+}
+
+tinder_report() {
+	eval cat $REPORT_LOG $failure_logs |\
+		${TINDERSCRIPT} ${TESTNAME}-${CVS_TAG} $1 $STARTTIME \
+		"$nr_failed of $(( $nr_failed + $nr_passed)) failed"
+}
+
+testfail() {
+	echo "Failure in testing"
+	tinder_report test_failed
+	exit 1
+}
+
+# idea stolen from debian: for a given directory, run every executable file
+run_parts() {
+	cd $1
+	for f in *; do
+		# skip CVS
+		[ -d $f ] && continue
+		if [ -x $f ] ; then 
+			echo -n "====== running $f ..."
+			./$f > ${PVFS2_DEST}/${f}-${CVS_TAG}.log
+			if [ $? -eq 0 ] ; then 
+				nr_passed=$((nr_passed + 1))
+				echo "OK"
+			else
+				nr_failed=$((nr_failed + 1))
+				failure_logs="$failure_logs ${PVFS2_DEST}/${f}-${CVS_TAG}.log"
+				echo "FAILED"
+			fi
+		fi
+	done
+}
+
+###
+### entry point for script
+###
+
+# show that we're doing something
+${TINDERSCRIPT} ${TESTNAME}-${CVS_TAG} building $STARTTIME </dev/null
+
+# will we be able to do VFS-related tests?
+do_vfs=0
+for s in $(echo $VFS_HOSTS); do
+	if [ `hostname -s` = $s ] ; then
+		do_vfs=1
+		break
+	fi
+done
+
+failure_logs=""   # a space-delimited list of logs that failed
+# compile and install
+pull_and_build_pvfs2  $CVS_TAG || buildfail
+
+teardown_pvfs2 && setup_pvfs2 
+
+if [ $? != 0 ] ; then
+	echo "setup failed"
+	setupfail
+fi
+
+if [ $do_vfs -eq 1 ] ; then 
+	teardown_vfs && setup_vfs
+
+	if [ $? != 0 ] ; then
+		echo "setup failed"
+		setupfail
+	fi
+fi
+
+# at this point we've got 
+# - pvfs2 servers running
+# on hosts in our whitelist
+# - an entry in /etc/fstab (that was a prerequisite for this script after all)
+# - the VFS mounted at $PVFS2_MOUNTPOINT
+
+nr_passed=0
+nr_failed=0
+
+# save file descriptors for later
+exec 6<&1
+exec 7<&2
+
+exec 1> ${REPORT_LOG}
+exec 2>&1
+run_parts ${SYSINT_SCRIPTS}
+
+if [ $do_vfs -eq 1 ] ; then
+	export VFS_SCRIPTS
+	run_parts ${VFS_SCRIPTS}
+fi
+
+# down the road (as we get our hands on more clusters) we'll need a more
+# generic way of submitting jobs. for now assume all the world has pbs
+which qsub >/dev/null 2>&1
+if [ $? -eq 0 ] ; then 
+	# go through the hassle of downloading/building mpich2 only if we are
+	# actually going to use it
+	pull_and_build_mpich2 || buildfail
+	. $MPIIO_DRIVER
+fi
+
+# restore file descriptors and close temporary fds
+exec 1<&6 6<&-
+exec 2<&7 7<&-
+
+if [ -f $PVFS2_DEST/pvfs2-built-with-warnings -o \
+	-f ${PVFS2_DEST}/pvfs2-test-built-with-warnings ] ; then
+	tinder_report successwarn
+	rm -f $PVFS2_DEST/pvfs2-built-with-warnings
+	rm -f ${PVFS2_DEST}/pvfs2-test-built-with-warnings
+
+elif [ $nr_failed -gt 0 ]; then
+	tinder_report test_failed
+else
+	tinder_report success
+fi
+
+[ $do_vfs -eq 1 ] && teardown_vfs
+teardown_pvfs2
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/single-node-kernel-test.sh
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/single-node-kernel-test.sh	(revision 3530)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/single-node-kernel-test.sh	(revision 3530)
@@ -0,0 +1,108 @@
+#!/bin/sh 
+
+rootdir=/tmp/pvfs2-build-test
+kerneldir=fake
+
+oldwd=`pwd`
+
+usage()
+{
+    echo "USAGE: single-node-kernel-test.sh <-k kernel source> <-r dir>"
+    echo "  -k: path to kernel source (enables module build)"
+    echo "  -r: path to directory to build and install in"
+    return
+}
+
+# get command line arguments
+while getopts k:r: opt
+do  
+    case "$opt" in
+        k) build_kernel="true"; kerneldir="$OPTARG";;
+        r) rootdir="$OPTARG";;
+        \?) usage; exit 1;;
+    esac
+done
+
+if [ $kerneldir = "fake" ] ; then
+	echo "No kernel path specified with -k; aborting."
+	exit 1
+fi
+
+srcdir=$rootdir/pvfs2
+builddir=$rootdir/BUILD-pvfs2
+
+# run the script that downloads, builds, and installs pvfs2
+cd ../../maint/build/
+./pvfs2-build.sh -k $kerneldir -r $rootdir -t
+if [ $? -ne 0 ] ; then
+	echo "Failed to build PVFS2."
+	exit 1
+fi
+
+cd $builddir
+
+# after installing, create a pvfs volume (PAV)
+#  . start the volume
+#  . load up some environment variables, exporting the important ones 
+#          like PVFS2TAB_FILE
+
+PAV_DIR=/test/common/pav
+$srcdir/$PAV_DIR/pav_start -c $builddir/${PAV_DIR}/configfile.sample > $rootdir/pav-setup.log 2>&1
+
+if [ $? -ne 0 ] ; then
+	echo "Failed to start PAV. see $rootdir/pav-setup.log for details"
+	exit 1
+fi
+
+eval $($srcdir/${PAV_DIR}/pav_info -c $builddir/${PAV_DIR}/configfile.sample)
+export PVFS2TAB_FILE
+export PVFSPORT
+
+cd $oldwd
+./kmod_ctrl.sh $rootdir start
+if [ $? -ne 0 ] ; then
+	echo "Failed to start PVFS2 kernel services."
+	exit 1
+fi
+
+###################################################
+# begin tests
+
+echo "\nPVFS2-SHELL-TEST RESULTS ======================================"
+bash $srcdir/test/kernel/linux-2.6/pvfs2-shell-test.sh $rootdir/INSTALL-pvfs2/mnt/pvfs2 > /tmp/pvfs2-shell-test.${USER} 2>&1
+if [ $? -ne 0 ] ; then
+	cat /tmp/pvfs2-shell-test.${USER}
+	echo "*** pvfs2-shell-test.sh failed."
+	exit 1
+else
+	# only show summary of output if it succeeds
+	cat /tmp/pvfs2-shell-test.${USER} | grep PASS
+fi
+
+echo "[END] PVFS2-SHELL-TEST RESULTS ================================\n"
+
+
+#echo "\nBONNIE++ RESULTS ======================================"
+#./bonnie++.sh -d $rootdir/INSTALL-pvfs2/mnt/pvfs2/bonnie++ 
+#if [ $? -ne 0 ] ; then
+#	echo "*** bonnie++.sh failed."
+#	exit 1
+#fi
+#
+#echo "[END] BONNIE++ RESULTS ================================\n"
+
+
+# end tests
+###################################################
+
+./kmod_ctrl.sh $rootdir stop
+if [ $? -ne 0 ] ; then
+	echo "Failed to stop PVFS2 kernel services."
+	exit 1
+fi
+cd $builddir
+
+# and clean up
+$srcdir/$PAV_DIR/pav_stop -c $builddir/${PAV_DIR}/configfile.sample > $rootdir/pav-shutdown.log 2>&1 &&  echo "Script completed successfully." 
+
+exit 0
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/bonnie++.sh
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/bonnie++.sh	(revision 3481)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/bonnie++.sh	(revision 3481)
@@ -0,0 +1,116 @@
+#!/bin/sh
+
+bonnie_tarballname=bonnie++-1.03a.tgz
+bonnie_url=http://www.parl.clemson.edu/~tluck/$bonnie_tarballname
+
+bonnie_srcdir=/tmp/bonnie++.${USER}
+bonnie_tarball=$bonnie_srcdir/$bonnie_tarballname
+bonnie_tarballdir=`echo $bonnie_tarball | sed -e "s/.tar.gz//" | sed -e "s/.tgz//"`
+bonnie_installdir=/tmp/bonnie++.install.${USER}
+
+usage()
+{
+    echo "USAGE: bonnie++.sh -d <scratch dir>"
+    return
+}
+
+bonnie_scratchdir=fake
+
+while getopts d: opt
+do
+    case "$opt" in
+        d) bonnie_scratchdir="$OPTARG";;
+        \?) usage; exit 1;;
+    esac
+done
+
+if [ $bonnie_scratchdir = "fake" ] ; then 
+	echo "No scratch directory specified with -d; aborting."
+	usage
+	exit 1
+fi
+
+bonnie_configureopts="--prefix=$bonnie_installdir"
+bonnie_csv=/tmp/bonnie++-1.03a.csv.$USER
+bonnie_log=/tmp/bonnie++-1.03a.log.$USER
+
+scratch_size=20
+ram_size=10
+files_to_stat=2
+min_file_size=0
+max_file_size=2
+num_directories=3
+
+
+if [ -d $bonnie_srcdir ] ; then
+	rm -rf $bonnie_srcdir
+fi
+if [ -d $bonnie_installdir ] ; then
+	rm -rf $bonnie_installdir
+fi
+if [ -d $bonnie_scratchdir ] ; then
+	rm -rf $bonnie_scratchdir
+fi
+
+mkdir -p $bonnie_srcdir
+mkdir -p $bonnie_installdir
+mkdir -p $bonnie_scratchdir
+
+# get the source (-nv keeps it kinda quiet)
+cd $bonnie_srcdir
+wget -nv $bonnie_url
+if [ $? != 0 ] ; then
+	echo "wget of $bonnie_url failed.  Aborting."
+	exit 1
+fi
+# untar the source
+tar xzf $bonnie_tarball
+if [ $? != 0 ] ; then
+	echo "Untarring of $bonnie_tarball failed."
+	exit 1
+fi
+#configure bonnie++
+cd $bonnie_tarballdir
+./configure $bonnie_configureopts &> /tmp/bonnie++_configure.log.$USER
+if [ $? != 0 ] ; then
+	echo "Configure of $bonnie_tarballdir failed."
+	echo "See log file: /tmp/bonnie++_configure.log.$USER"
+	exit 1
+fi
+
+# make and install bonnie
+make install &> /tmp/bonnie++_make.log.$USER
+if [ $? != 0 ] ; then
+	echo "Make and install of $bonnie_tarballdir failed."
+	echo "See log file: /tmp/bonnie++_make.log.$USER"
+	exit 1
+fi
+	
+# run bonnie
+rm -f $bonnie_csv $bonnie_log
+time $bonnie_installdir/sbin/bonnie++ \
+	-d $bonnie_scratchdir \
+	-s $scratch_size \
+	-r $ram_size \
+	-n $files_to_stat:$max_file_size:$min_file_size:$num_directories \
+	-q >> $bonnie_csv 2>> $bonnie_log
+if [ $? != 0 ] ; then
+	echo "Bonnie failed to execute."
+	exit 1
+fi
+
+cat $bonnie_log
+
+#usage: bonnie++ [-d scratch-dir] [-s size(Mb)[:chunk-size(b)]]
+#                [-n number-to-stat[:max-size[:min-size][:num-directories]]]
+#								[-m machine-name]
+#								[-r ram-size-in-Mb]
+#								[-x number-of-tests] [-u uid-to-use:gid-to-use] [-g gid-to-use]
+#								[-q] [-f] [-b] [-p processes | -y]
+
+
+#clean up
+rm -f $bonnie_csv $bonnie_log
+rm -rf $bonnie_srcdir
+rm -rf $bonnie_installdir
+rm -rf $bonnie_scratchdir
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/pvfs2tests.py
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/pvfs2tests.py	(revision 3224)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/pvfs2tests.py	(revision 3224)
@@ -0,0 +1,116 @@
+#!/usr/bin/python
+
+#NOTE:Command line takes 3 options: config file, PAV config, PAV machine list
+
+import os,sys,ConfigParser,bsddb,smtplib,string
+
+#This function gets all options from the Config file that was passed
+#at the command line.
+def getconfig():
+
+	Config=bsddb.hashopen(None,'w')
+	Tests=bsddb.hashopen(None,'w')
+
+	config=ConfigParser.ConfigParser()
+	config.readfp(open(sys.argv[1]))
+
+	if not config.has_section('Config'):
+		print "Config file *must* have section [Config]"
+		sys.exit(1)
+	for options in config.options('Config'):
+		Config[options]=config.get('Config',options)
+	if not Config.has_key('pvfs2tabfile'):
+		print "Config section must have a \"PVFS2TABFILE\" option"
+		sys.exit(1)
+	if not Config.has_key('pvfs2bindir'):
+		print "Config section must have a \"PVFS2BINDIR\" option"
+		sys.exit(1)
+	if not Config.has_key('mpichbindir'):
+		print "Config section must have a \"MPICHBINDIR\" option"
+		sys.exit(1)
+	if not Config.has_key('pavdir'):
+		print "Config section must have a \"PAVDIR\" option"
+		sys.exit(1)
+	if not Config.has_key('mountpoint'):
+		print "Config section must have a \"MOUNTPOINT\" option"
+		sys.exit(1)
+	if not Config.has_key('email'):
+		print "Config section must have a \"EMAIL\" option"
+		sys.exit(1)
+
+	if not config.has_section('Tests'):
+		print "Config file *must* have section [Tests]"
+		sys.exit(1)
+
+	for options in config.options('Tests'):
+		Tests[options]=(config.get('Tests',options))
+
+	return Config,Tests
+
+
+def start_pav(pavconfigfile,pavmachinefile,Config):
+    	pav_dir=Config['pavdir']
+
+	#if os.path.exists(Config['mountpoint']):
+	#	os.system('rm -rf '+Config['mountpoint'])
+	#os.mkdir(Config['mountpoint'])
+    	success=os.system(pav_dir+'/pav_start -m '+pavmachinefile+' -c '+pavconfigfile+' > pav_setup.log 2>&1')
+
+    	if success<>0:
+		print 'Failed to start PAV, see pav_setup.log'
+		sys.exit(1)
+
+    	os.system(pav_dir+'/pav_info -c '+pavconfigfile+' > pav_info.log 2>&1')
+
+
+def stop_pav(pavconfigfile,Config):
+	pav_dir=Config['pavdir']
+	cmd=pav_dir+"/pav_stop -c "+oldwd+"/"+pavconfigfile
+	os.system(cmd)
+
+
+#This function is responsible for running all the tests that were in the config file
+def runtests(Config,Tests):
+	#construct mpiexec arguments from Config
+	#construct tests to run from Tests
+	#run the tests contained in Tests
+
+	for KEY in Config.keys():
+		os.environ[KEY]=Config[KEY]
+
+	os.system('rm -f total.output')
+	fail = 0
+	for TEST in Tests.keys():
+		cmd="echo "+Tests[TEST]+" >> total.output"
+		os.system(cmd)
+		cmd="echo ================ >> total.output"
+		os.system(cmd)
+		cmd=Tests[TEST]+" >> total.output 2>&1"
+		outfile="total.output"
+		print cmd
+		if os.system(cmd):
+			fail = 1
+
+	if fail:
+		cmd="mail -s \"PVFS2 test: FAIL\" "
+	else:
+		cmd="mail -s \"PVFS2 test: PASS\" "
+	cmd = cmd + Config['email'] + " < total.output"
+	print cmd
+	if os.system(cmd):
+		print "Error sending email; aborting..."
+		sys.exit(1)
+
+
+if len(sys.argv) <> 4:
+	print repr(len(sys.argv))+" arguments passed"
+	print "Usage: pvfs2tests.py <Test config file> <PAV config> <PAV machine list>"
+	sys.exit(1)
+
+
+Config,Tests=getconfig()
+
+oldwd=os.getcwd()
+start_pav(sys.argv[2],sys.argv[3],Config)
+runtests(Config,Tests)
+stop_pav(sys.argv[2],Config)
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/sysint-tests.d/cp
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/sysint-tests.d/cp	(revision 4871)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/sysint-tests.d/cp	(revision 4871)
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+# run through a bunch of possible command line arguments for pvfs2-cp:
+
+nr_errors=0
+
+# copy_test: 
+#  the idea is we copy a file from local to pvfs2 and back again, seeing if
+#  any differences show up as a result.
+#
+#  usage:  copy_test <src> <dest> <local> 
+#   where <src> is the original local file (source of the 1st copy)
+#         <dest> is a pvfs2 file (destination of the 1st copy, src of the 2nd
+#                 copy) 
+#         <local> is a different local file (dest of the 2nd copy)
+copy_test() 
+{
+	src=$1
+	dest=$2
+	local=$3
+	shift 3 
+	${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-cp $src $dest $@
+	${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-cp $dest $local $@
+
+	diff $src $local 
+	if [ $? -ne 0 ] ; then
+		nr_errors=$((nr_errors+1)) 
+		echo "$local differs from $src"
+	fi
+}
+
+
+copy_test ${PVFS2_DEST}/pvfs2-${CVS_TAG}/configure ${PVFS2_MOUNTPOINT}/configure0\
+	${PVFS2_DEST}/config0 
+
+copy_test ${PVFS2_DEST}/pvfs2-${CVS_TAG}/configure ${PVFS2_MOUNTPOINT}/configure1\
+	${PVFS2_DEST}/config1 -s 128 
+
+copy_test ${PVFS2_DEST}/pvfs2-${CVS_TAG}/configure ${PVFS2_MOUNTPOINT}/configure2\
+	${PVFS2_DEST}/config2 -s $((1024*1024))
+
+copy_test ${PVFS2_DEST}/pvfs2-${CVS_TAG}/configure ${PVFS2_MOUNTPOINT}/configure3\
+	${PVFS2_DEST}/config3 -n 1
+
+copy_test ${PVFS2_DEST}/pvfs2-${CVS_TAG}/configure ${PVFS2_MOUNTPOINT}/configure4\
+	${PVFS2_DEST}/config4 -n 10
+
+copy_test ${PVFS2_DEST}/pvfs2-${CVS_TAG}/configure ${PVFS2_MOUNTPOINT}/configure5\
+	${PVFS2_DEST}/config5 -b 128
+
+copy_test ${PVFS2_DEST}/pvfs2-${CVS_TAG}/configure ${PVFS2_MOUNTPOINT}/configure6\
+	${PVFS2_DEST}/config6 -b $((1024*1024))
+
+if [ $nr_errors -ne 0 ] ; then 
+	echo "$nr_errors errors found"
+	exit 1
+fi
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/sysint-tests.d/zerofill
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/sysint-tests.d/zerofill	(revision 4921)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/sysint-tests.d/zerofill	(revision 4921)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/test/test-zero-fill  -v
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/sysint-tests.d/misc
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/sysint-tests.d/misc	(revision 7684)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/sysint-tests.d/misc	(revision 7684)
@@ -0,0 +1,150 @@
+#!/bin/bash
+
+# try all of the normal pvfs2 command line utilites and make sure they work
+# for basic cases
+
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-touch $PVFS2_MOUNTPOINT/miscfile
+if [ "${?}" != 0 ]
+then
+    echo "pvfs2-touch failure." 1>&2
+    exit 1
+fi
+
+MYGROUP=`groups | cut -d ' ' -f 1`
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-chown $USER $MYGROUP $PVFS2_MOUNTPOINT/miscfile
+if [ "${?}" != 0 ]
+then
+    echo "pvfs2-chown failure." 1>&2
+    exit 1
+fi
+
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-chmod 777 $PVFS2_MOUNTPOINT/miscfile
+if [ "${?}" != 0 ]
+then
+    echo "pvfs2-chmod failure." 1>&2
+    exit 1
+fi
+
+# look at the error message from this tool.  If we got an operation not
+# supported error, it just means that the server either doesn't support the
+# vm drop caches operation, or doesn't have permission.
+DC_OUT=`${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-drop-caches -m $PVFS2_MOUNTPOINT 2>&1` 
+if [ "${?}" != 0 ]
+then
+    TEST=`echo $DC_OUT | grep "not supported"`
+    if [ "${?}" != 0 ]
+    then 
+        echo $DC_OUT 1>&2
+        echo "pvfs2-drop-caches failure." 1>&2
+        exit 1
+    fi
+fi
+
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-fsck -m $PVFS2_MOUNTPOINT
+if [ "${?}" != 0 ]
+then
+    echo "pvfs2-fsck failure." 1>&2
+    exit 1
+fi
+
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-validate -d $PVFS2_MOUNTPOINT -c -f -s
+if [ "${?}" != 0 ]
+then
+    echo "pvfs2-statfs failure." 1>&2
+    exit 1
+fi
+
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-fs-dump -m $PVFS2_MOUNTPOINT
+if [ "${?}" != 0 ]
+then
+    echo "pvfs2-fs-dump failure." 1>&2
+    exit 1
+fi
+
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-fs-dump -m $PVFS2_MOUNTPOINT
+if [ "${?}" != 0 ]
+then
+    echo "pvfs2-fs-dump failure." 1>&2
+    exit 1
+fi
+
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-ls $PVFS2_MOUNTPOINT
+if [ "${?}" != 0 ]
+then
+    echo "pvfs2-ls failure." 1>&2
+    exit 1
+fi
+
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-perror 0 
+if [ "${?}" != 0 ]
+then
+    echo "pvfs2-perror failure." 1>&2
+    exit 1
+fi
+
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-stat $PVFS2_MOUNTPOINT/miscfile
+if [ "${?}" != 0 ]
+then
+    echo "pvfs2-stat failure." 1>&2
+    exit 1
+fi
+
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-viewdist -f $PVFS2_MOUNTPOINT/miscfile
+if [ "${?}" != 0 ]
+then
+    echo "pvfs2-viewdist failure." 1>&2
+    exit 1
+fi
+
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-xattr -s -k user.foo -v bar $PVFS2_MOUNTPOINT/miscfile
+if [ "${?}" != 0 ]
+then
+    echo "pvfs2-xattr failure." 1>&2
+    exit 1
+fi
+
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-rm $PVFS2_MOUNTPOINT/miscfile
+if [ "${?}" != 0 ]
+then
+    echo "pvfs2-rm failure." 1>&2
+    exit 1
+fi
+
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-set-debugmask -m $PVFS2_MOUNTPOINT "none"
+if [ "${?}" != 0 ]
+then
+    echo "pvfs2-set-debugmask failure." 1>&2
+    exit 1
+fi
+
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-set-mode -m $PVFS2_MOUNTPOINT "admin"
+if [ "${?}" != 0 ]
+then
+    echo "pvfs2-set-mode failure."  1>&2
+    exit 1
+fi
+
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-set-mode -m $PVFS2_MOUNTPOINT "normal"
+if [ "${?}" != 0 ]
+then
+    echo "pvfs2-set-mode failure." 1>&2
+    exit 1
+fi
+
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-set-sync -m $PVFS2_MOUNTPOINT -D 0 -M 1
+if [ "${?}" != 0 ]
+then
+    echo "pvfs2-set-sync failure." 1>&2
+    exit 1
+fi
+
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-statfs -m $PVFS2_MOUNTPOINT
+if [ "${?}" != 0 ]
+then
+    echo "pvfs2-statfs failure." 1>&2
+    exit 1
+fi
+
+
+
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/sysint-tests.d/mkdir-sysint
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/sysint-tests.d/mkdir-sysint	(revision 4977)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/sysint-tests.d/mkdir-sysint	(revision 4977)
@@ -0,0 +1,6 @@
+#!/bin/sh 
+
+PATH=${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin:${PATH}
+echo $PATH
+export PATH
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/test/test-mkdir --directory ${PVFS2_MOUNTPOINT} --use-lib 
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/sysint-tests.d/ping
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/sysint-tests.d/ping	(revision 4871)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/sysint-tests.d/ping	(revision 4871)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-ping -m $PVFS2_MOUNTPOINT
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/sysint-tests.d/symlink-sysint
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/sysint-tests.d/symlink-sysint	(revision 4973)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/sysint-tests.d/symlink-sysint	(revision 4973)
@@ -0,0 +1,6 @@
+#!/bin/sh 
+
+PATH=${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin:${PATH}
+echo $PATH
+export PATH
+${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/test/test-symlink-perms --directory ${PVFS2_MOUNTPOINT} --use-lib 
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/nightly-tests.cfg
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/nightly-tests.cfg	(revision 5956)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/nightly-tests.cfg	(revision 5956)
@@ -0,0 +1,12 @@
+
+# a working directory for all the nightly test data: where the scripts will
+# check out CVS, build the source, run the tests, and log what happened
+#export PVFS2_DEST=${HOME}/pvfs2-nightly
+
+# a mountpoint (either a real vfs mountpoint, or a pseudo mountpoint in a pvfs
+# tabfile) for these nightly tests
+#export PVFS2_MOUNTPOINT=/pvfs2-nightly
+
+# this one is kindof annoying:  EXTRA_TESTS points to the location for several
+# benchmarks: bonnie++, IOR, dbench, others.
+#export EXTRA_TESTS=${HOME}/src/benchmarks
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/run-cron-adenine.sh
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/run-cron-adenine.sh	(revision 3232)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/run-cron-adenine.sh	(revision 3232)
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+cvsroot=:pserver:anonymous@cvs.parl.clemson.edu:/anoncvs
+
+source /usr/share/usepackage/use.bsh
+use standard-user
+use mpich2
+
+DATE=`date "+%b%d-%Y"`
+
+mkdir -p $HOME/testing/$DATE
+cd $HOME/testing/$DATE
+
+expect -c "spawn -noecho cvs -Q -d $cvsroot login; send \r;"
+cvs -Q -d $cvsroot co pvfs2
+if [ $? -ne 0 ] ; then
+    echo "Pulling PVFS2 from $cvsroot failed."
+    exit 1
+fi
+
+cd pvfs2/test/automated/
+
+./run-test-adenine.sh 
+if [ $? -ne 0 ] ; then
+    echo "run-test-adenine.sh failed."
+    exit 1
+fi
+
+exit 0
+
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/automated/tacl_xattr.sh
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/automated/tacl_xattr.sh	(revision 6180)
+++ /tags/B2O-Blue-Sync-Temp-End/test/automated/tacl_xattr.sh	(revision 6180)
@@ -0,0 +1,854 @@
+#!/bin/bash
+##############################################################
+#
+#  Copyright (c) International Business Machines  Corp., 2003
+#
+#  This program is free software;  you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY;  without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
+#  the GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program;  if not, write to the Free Software
+#  Foundation, 
+#
+#  FILE        : tacl_xattr.sh
+#  USAGE       : ./tacl_xattr.sh directory
+#
+#  DESCRIPTION : A script that will test ACL and Extend Attribute on Linux system.
+#  REQUIREMENTS:
+#       - Kernel with ACL and Extend Attribute function support
+#       - File system to test mounted with acl and xattr support
+#           - mount -o remount,defaults,acl,user_xattr /
+#           - mount -t pvfs2  -o defaults,acl,user_xattr host:port/fs-name /mnt/pvfs2
+#
+##############################################################
+
+CUR_PATH=""
+CONTENT=""
+RES=""
+USER_PERMISSION=""
+GROUP_PERMISSION=""
+OTHER_PERMISSION=""
+ITEM_OWNER=""
+ITEM_GROUP=""
+
+################################################################
+#
+# Make sure that uid=root is running this script. 
+# Make sure that ACL(Access Control List) and Extended Attribute are 
+#     built into the kernel
+#
+################################################################
+
+if [ $UID != 0 ]
+then
+	echo "FAILED: Must have root access to execute this script"
+	exit 1
+fi
+
+# Ensure correct usage
+if [ $# != 1 ]; then
+	echo "Usage: ./tacl_xattr.sh directory"
+	exit 1
+fi
+
+DIR=$1
+
+#################################################################
+# Directory must exist
+#################################################################
+if [ ! -e $DIR ]
+then
+	echo "FAILED: Directory [ $DIR ] doesn't exist"
+	exit 1
+fi
+
+#################################################################
+# Create a temporary directory
+#################################################################
+if [ ! -e $DIR/tacl ]
+then
+	mkdir -m 777 $DIR/tacl
+else 
+	echo "FAILED: Directory [$DIR/tacl] already exists"
+	exit 1
+fi
+
+#################################################################
+#
+# Prepare file system for ACL and Extended Attribute test
+# Make some directory , file and symlink for the test
+# Add three users for the test
+#
+#################################################################
+cd $DIR/tacl
+CUR_PATH=`pwd`
+
+/usr/sbin/useradd -d $CUR_PATH/tacluser1 tacluser1
+mkdir -p $CUR_PATH/tacluser1
+chown tacluser1 $CUR_PATH/tacluser1
+/usr/sbin/useradd -d $CUR_PATH/tacluser2 tacluser2
+mkdir -p $CUR_PATH/tacluser2
+chown tacluser2 $CUR_PATH/tacluser2
+/usr/sbin/useradd -d $CUR_PATH/tacluser3 tacluser3
+mkdir -p $CUR_PATH/tacluser3
+chown tacluser3 $CUR_PATH/tacluser3
+/usr/sbin/useradd -d $CUR_PATH/tacluser4 tacluser4
+mkdir -p $CUR_PATH/tacluser4
+chown tacluser4 $CUR_PATH/tacluser4
+
+if [ ! -e shared ]
+then
+	mkdir -p -m 777 shared    
+fi
+
+su - tacluser1 << TACL_USER1
+
+	mkdir $CUR_PATH/shared/team1
+	touch $CUR_PATH/shared/team1/file1
+	
+	cd $CUR_PATH/shared/team1
+	ln -sf file1 symlinkfile1
+	cd $CUR_PATH
+
+	cd $CUR_PATH/shared
+	ln -sf team1 symlinkdir1
+	cd $CUR_PATH
+
+TACL_USER1
+
+su - tacluser2 << TACL_USER2
+
+	mkdir $CUR_PATH/shared/team2
+	touch $CUR_PATH/shared/team2/file1
+	
+	cd $CUR_PATH/shared/team2
+	ln -sf file1 symlinkfile1
+	cd $CUR_PATH
+
+	cd $CUR_PATH/shared
+	ln -sf team2 symlinkdir2
+	cd $CUR_PATH
+	
+TACL_USER2
+
+#############################################################################################
+#
+#  The permissions bit limit user's act
+#  lrwxrwxrwx    1 tacluser1 tacluser1        5 Jun 23 13:39 symlinkdir1 -> team1
+#  lrwxrwxrwx    1 tacluser2 tacluser2        5 Jun 23 13:39 symlinkdir2 -> team2
+#  dr-x------    2 tacluser1 tacluser1     1024 Jun 23 13:39 team1
+#  drwxrwxr-x    2 tacluser2 tacluser2     1024 Jun 23 13:39 team2	
+#
+#############################################################################################
+
+chmod 500 shared/team1
+
+su - tacluser1 << TACL_USER1
+
+	touch $CUR_PATH/shared/team1/newfil1 2> /dev/null
+	if [ -e $CUR_PATH/shared/team1/newfile1 ]
+	then
+		echo ""
+		echo "FAILED:  [ touch ] Create file must be denied by file permission bits"
+		echo -e "\t [ Physical Directory ]"
+	else
+		echo ""
+		echo "SUCCESS: Create file denied by file permission bits [ Physical directory ]"
+	fi
+	
+	touch $CUR_PATH/shared/symlinkdir1/newfil2 2> /dev/null
+	if [ -e $CUR_PATH/shared/team1/newfile1 ]
+	then
+		echo ""
+		echo "FAILED:  [ touch ] Create file must be denied by file permission bits"
+		echo -e "\t [ Symlink Directory ]"
+	else
+		echo ""
+		echo "SUCCESS: Create file denied by file permission bits [ Symlink directory ]"
+	fi
+	
+TACL_USER1
+
+
+#
+##################################################################
+##
+## ACL_USER_OBJ are a superset of the permissions specified 
+##   by the file permission bits. 
+## The effective user ID of the process matches the user ID of 
+##   the file object owner.
+## Owner's act are based ACL_USER_OBJ
+## 
+##################################################################
+#
+setfacl -m u::rx shared/team1
+su - tacluser1 << TACL_USER1
+
+	cd $CUR_PATH/shared/team1/ 2> /dev/null
+	if [ $? != 0 ]
+	then
+		echo ""
+		echo "FAILED:  [ touch ] ACL_USER_OBJ  entry already contains the owner execute"
+		echo -e "\t permissions, but operation failed [ Physical Directory ]"
+	else
+		echo ""
+		echo "SUCCESS: ACL_USER_OBJ  entry contains the owner execute permissions, "
+		echo -e "\t operation success [ Physical Directory ]"
+	fi
+
+	cd $CUR_PATH/shared/symlinkdir1/ 2> /dev/null
+	if [ $? != 0 ]
+	then
+		echo ""
+		echo "FAILED: [ touch ] ACL_USER_OBJ  entry already contains the owner execute"
+		echo -e "\t permissions, but operation failed [ Symlink Directory ]"
+	else
+		echo ""
+		echo "SUCCESS: ACL_USER_OBJ  entry contains the owner execute permissions,"
+		echo -e "\t operation success [ Symlink Directory ]"
+	fi
+
+TACL_USER1
+
+
+setfacl -m u::rwx shared/team1
+
+su - tacluser1 << TACL_USER1
+
+	touch $CUR_PATH/shared/team1/newfil1 2> /dev/null
+	if [ -e $CUR_PATH/shared/team1/newfile1 ]
+	then
+		echo ""
+		echo "FAILED:  [ touch ] ACL_USER_OBJ  entry already contains the owner write "
+		echo -e "\t permissions, but operation failed [ Physical Directory ]"
+	else
+		echo ""
+		echo "SUCCESS: ACL_USER_OBJ  entry contains the owner write permissions,"
+		echo -e "\t operation success [ Physical Directory ]"
+	fi
+
+	touch $CUR_PATH/shared/symlinkdir1/newfil2 2> /dev/null
+	if [ -e $CUR_PATH/shared/team1/newfile2 ]
+	then
+		echo ""
+		echo "FAILED:  [ touch ] ACL_USER_OBJ  entry already contains the owner write "
+		echo -e "\t permissions, but operation failed [ Symlink Directory ]"
+	else
+		echo ""
+		echo "SUCCESS: ACL_USER_OBJ  entry contains the owner write permissions,"
+		echo -e "\t operation success [ Symlink Directory ]"
+	fi
+
+TACL_USER1
+
+#################################################################
+#
+# The effective user ID of the process matches the qualifier of 
+#   any entry of type ACL_USER
+# IF  the  matching  ACL_USER entry and the ACL_MASK 
+#   entry contain the requested permissions,#  access is granted, 
+#  ELSE access is denied.
+#
+#################################################################
+
+setfacl -m u:tacluser3:rwx shared/team1
+
+su - tacluser3 << TACL_USER3
+
+	touch $CUR_PATH/shared/team1/newfile3 2> /dev/null
+	if [ -e $CUR_PATH/shared/team1/newfile3 ]
+	then
+		echo ""
+		echo "SUCCESS: ACL_USER entry contains the user permissions, "
+		echo -e "\t operation success [ Physical Directory ]"
+	else
+		echo ""
+		echo "FAILED:  ACL_USER entry contains the user permissions," 
+		echo -e "\t but operation denied [ Physical Directory ]"
+	fi
+	
+	touch $CUR_PATH/shared/symlinkdir1/newfile4 2> /dev/null
+	if [ -e $CUR_PATH/shared/symlinkdir1/newfile4 ]
+	then
+		echo ""
+		echo "SUCCESS: ACL_USER entry contains the user permissions, "
+		echo -e "\t operation success [ Symlink Directory ]"
+	else
+		echo ""
+		echo "FAILED:  ACL_USER entry contains the user permissions,"
+		echo -e "\t but operation denied [ Symlink Directory ]"
+	fi
+
+TACL_USER3
+
+setfacl -m mask:--- shared/team1
+
+su - tacluser3 << TACL_USER3
+
+	touch $CUR_PATH/shared/team1/newfile5 2> /dev/null
+	if [ -e $CUR_PATH/shared/team1/newfile5 ]
+	then
+		echo ""
+		echo "FAILED:  [ touch ] ACL_USER entry contains the user permissions"
+		echo -e "\t but ACL_MASK are set --- , "
+		echo -e "\t operation must be denied [ Physical Directory ]"
+	else
+		echo ""
+		echo "SUCCESS: ACL_USER entry contains the user permissions,"
+		echo -e "\t but ACL_MASK are set ___ ,"
+		echo -e "\t operation success [ Physical Directory ]"
+	fi
+	
+	touch $CUR_PATH/shared/symlinkdir1/newfile6 2> /dev/null
+	if [ -e $CUR_PATH/shared/symlinkdir1/newfile6 ]
+	then
+		echo ""
+		echo "FAILED:  [ touch ] ACL_USER entry contains the user permissions"
+		echo -e "\t but ACL_MASK are set --- ,"
+		echo -e "\t operation must be denied [ Symlink Directory ]"
+	else
+		echo ""
+		echo "SUCCESS: ACL_USER entry contains the user permissions,"
+		echo -e "\t but ACL_MASK are set ___ ,"
+		echo -e "\t operation success [ Symlink Directory ]"
+	fi
+
+TACL_USER3
+
+###########################################################################################
+#
+# The effective group ID or any of the supplementary group IDs of the process match the 
+#  qualifier of the entry of type ACL_GROUP_OBJ, or the qualifier of any entry of type 
+#  ACL_GROUP
+#
+# IF the ACL contains an ACL_MASK entry, THEN                                                                                                              
+#                 if  the ACL_MASK entry and any of the matching ACL_GROUP_OBJ
+#                 or ACL_GROUP  entries  contain  the  requested  permissions,
+#                 access is granted,
+#                                                                                                               
+#                 else access is denied.
+#                                                                                                               
+# ELSE  (note  that  there  can be no ACL_GROUP entries without an ACL_MASK entry)                                                                                                               
+#                 if the ACL_GROUP_OBJ entry contains  the  requested  permis-
+#                 sions, access is granted,
+#                                                                                                              
+#                 else access is denied.
+#
+###########################################################################################
+
+setfacl -m g:tacluser2:rwx shared/team1
+
+su - tacluser2 << TACL_USER2
+	touch $CUR_PATH/shared/team1/newfile7 2> /dev/null
+	if [ -e $CUR_PATH/shared/team1/newfile7 ]
+	then
+		echo ""
+		echo "SUCCESS: ACL_GROUP entry contains the group permissions,"
+		echo -e "\t option success [ Physical Directory ]"
+	else
+		echo ""
+		echo "FAILED:  [ touch ] ACL_GROUP entry already contains the group permissions,"
+		echo -e "\t but option success [ Physical Directory ]"
+	fi
+	
+	touch $CUR_PATH/shared/symlinkdir1/newfile8 2> /dev/null
+	if [ -e $CUR_PATH/shared/symlinkdir1/newfile8 ]
+	then
+		echo ""
+		echo "SUCCESS: ACL_GROUP entry contains the group permissions,"
+		echo -e "\t option success [ Symlink Directory ]"
+	else
+		echo ""
+		echo "FAILED:  [ touch ] ACL_GROUP entry already contains the group permissions,"
+		echo -e "\t but option success [ Symlink Directory ]"
+	fi
+
+TACL_USER2
+
+setfacl -m mask:--- shared/team1
+
+su - tacluser2 << TACL_USER2
+	touch $CUR_PATH/shared/team1/newfile9 2> /dev/null
+	if [ -e $CUR_PATH/shared/team1/newfile9 ]
+	then
+		echo ""
+		echo "FAILED:  [ touch ] ACL_GROUP entry contains the group permissions"
+		echo -e "\t and ACL_MASK entry are set ---,"
+		echo -e "\t option must no be success [ Physical Directory ]"
+	else
+		echo ""
+		echo "SUCCESS: ACL_GROUP entry already contains the group permissions"
+		echo -e "\t and ACL_MASK entry are set ---,"
+		echo -e "\t option success [ Physical Directory ]"
+	fi
+	
+	touch $CUR_PATH/shared/symlinkdir1/newfile10 2> /dev/null
+	if [ -e $CUR_PATH/shared/symlinkdir1/newfile10 ]
+	then
+		echo ""
+		echo "FAILED:  [ touch ] ACL_GROUP entry contains the group permissions"
+		echo -e "\t and ACL_MASK entry are set ---, "
+		echo -e "\t option must no be success [ Symlink Directory ]"
+	else
+		echo ""
+		echo "SUCCESS: ACL_GROUP entry already contains the group permissions"
+		echo -e "\t and ACL_MASK entry are set ---,"
+		echo -e "\t option success [ Symlink Directory ]"
+	fi
+
+TACL_USER2
+
+setfacl -m g::rwx shared/team1
+usermod -g tacluser1 tacluser2
+
+su - tacluser2 << TACL_USER2
+
+	touch $CUR_PATH/shared/team1/newfile11 2> /dev/null
+	if [ -e $CUR_PATH/shared/team1/newfile11 ]
+	then
+		echo ""
+		echo "SUCCESS: ACL_GROUP_OBJ entry contains the group owner permissions,"
+		echo -e "\t option success [ Physical Directory ]"
+	else
+		echo ""
+		echo "FAILED:  [ touch ] ACL_GROUP_OBJ entry already contains the group owner,"
+		echo -e "\t but option denied [ Physical Directory ]"
+	fi
+	
+	touch $CUR_PATH/shared/symlinkdir1/newfile12 2> /dev/null
+	if [ -e $CUR_PATH/shared/symlinkdir1/newfile12 ]
+	then
+		echo ""
+		echo "SUCCESS: ACL_GROUP_OBJ entry contains the group owner permissions,"
+		echo -e "\t option success [ Symlink Directory ]"
+	else
+		echo ""
+		echo "FAILED:  [ touch ] ACL_GROUP_OBJ entry already contains the group owner,"
+		echo -e "\t but option denied [ Symlink Directory ]"
+	fi
+
+TACL_USER2
+
+setfacl -m mask:--- shared/team1
+
+su - tacluser2 << TACL_USER2
+	touch $CUR_PATH/shared/team1/newfile13 2> /dev/null
+	if [ -e $CUR_PATH/shared/team1/newfile13 ]
+	then
+		echo ""
+		echo "FAILED:  [ touch ] ACL_GROUP_OBJ entry contains the group owner permissions"
+		echo -e "\t and ACL_MASK entry are set ---,"
+		echo -e "\t option must no be success [ Physical Directory ]"
+	else
+		echo ""
+		echo "SUCCESS: ACL_GROUP_OBJ entry already contains the group owner permissions"
+		echo -e "\t and ACL_MASK entry are set ---,"
+		echo -e "\t option success [ Physical Directory ]"
+	fi
+	
+	touch $CUR_PATH/shared/symlinkdir1/newfile14 2> /dev/null
+	if [ -e $CUR_PATH/shared/symlinkdir1/newfile14 ]
+	then
+		echo ""
+		echo "FAILED:  [ touch ] ACL_GROUP_OBJ entry contains the group owner permissions"
+		echo -e "\t and ACL_MASK entry are set ---,"
+		echo -e "\t option must no be success [ Symlink Directory ]"
+	else
+		echo ""
+		echo "SUCCESS: ACL_GROUP_OBJ entry already contains the group owner permissions"
+		echo -e "\t and ACL_MASK entry are set ---, "
+		echo -e "\t option success [ Symlink Directory ]"
+	fi
+
+TACL_USER2
+
+usermod -g tacluser2 tacluser2
+
+###################################################################################
+#
+# IF the ACL_OTHER entry contains the requested permissions, access is granted
+#
+###################################################################################
+
+setfacl -m o::rwx shared/team1
+
+su - tacluser4 << TACL_USER4
+
+	touch $CUR_PATH/shared/team1/newfile15 2> /dev/null
+	if [ -e $CUR_PATH/shared/team1/newfile15 ]
+	then
+		echo ""
+		echo "SUCCESS: ACL_OTHER entry contains the user permissions,"
+		echo -e "\t operation success [ Physical Directory ]"
+	else
+		echo ""
+		echo "FAILED:  ACL_OTHER entry contains the user permissions,"
+		echo -e "\t but operation denied [ Physical Directory ]"
+	fi
+	
+	touch $CUR_PATH/shared/symlinkdir1/newfile16 2> /dev/null
+	if [ -e $CUR_PATH/shared/symlinkdir1/newfile16 ]
+	then
+		echo ""
+		echo "SUCCESS: ACL_OTHER entry contains the user permissions,"
+		echo -e "\t operation success [ Symlink Directory ]"
+	else
+		echo ""
+		echo "FAILED:  ACL_OTHER entry contains the user permissions,"
+		echo -e "\t but operation denied [ Symlink Directory ]"
+	fi
+
+TACL_USER4
+
+setfacl -m mask:--- shared/team1
+
+su - tacluser4 << TACL_USER4
+
+	touch $CUR_PATH/shared/team1/newfile17 2> /dev/null
+	if [ -e $CUR_PATH/shared/team1/newfile17 ]
+	then
+		echo ""
+		echo "SUCCESS: [ touch ] ACL_OTHER do not strick by ACL_MASK [ Physical Directory ]"
+	else
+		echo ""
+		echo "FAILED:  ACL_OTHER do not strick by ACL_MASK [ Physical Directory ]"
+	fi
+	
+	touch $CUR_PATH/shared/symlinkdir1/newfile18 2> /dev/null
+	if [ -e $CUR_PATH/shared/symlinkdir1/newfile18 ]
+	then
+		echo ""
+		echo "SUCCESS: [ touch ] ACL_OTHER do not strick by ACL_MASK [ Symlink Directory ]"
+	else
+		echo ""
+		echo "FAILED:  ACL_OTHER do not strick by ACL_MASK [ Symlink Directory ]"
+	fi
+
+TACL_USER4
+
+############################################################################
+#
+# OBJECT CREATION AND DEFAULT ACLs
+# The new object inherits the default ACL of the containing directory as its access ACL.
+#
+############################################################################
+
+rm -f shared/team1/newfil*
+
+#
+# Test ACL_USER_OBJ default ACLs
+#
+setfacl -m d:u::r -m d:g::r -m d:o::r shared/team1
+
+su - tacluser1 << TACL_USER1
+	
+	MASK=`umask`
+	umask 0
+	touch $CUR_PATH/shared/team1/newfile1
+	umask $MASK > /dev/null
+	
+TACL_USER1
+
+CONTENT=""
+CONTENT=`ls -l shared/team1/newfile1`
+RES=`echo $CONTENT | grep ".r--r--r--" | awk '{print $1}'`
+
+if [ "$RES" != "" ]
+then
+	echo ""
+	echo "SUCCESS: With default ACLs set , new file permission set correct."
+else	
+	echo ""
+	echo "FAILED:  With default ACLs set , new file permission set not correct"
+fi
+
+
+
+#
+# Test ACL_USER and ACL_GROUP defaults ACLs
+#
+setfacl -m d:u:tacluser3:rw -m d:g:tacluser3:rw shared/team1
+su - tacluser3 << TACL_USER3
+	
+	MASK=`umask`
+	umask 0
+	touch $CUR_PATH/shared/team1/newfile2
+	umask $MASK > /dev/null
+	
+TACL_USER3
+
+CONTENT=""
+CONTENT=`ls -l shared/team1/newfile2`
+RES=`echo $CONTENT | grep ".r--rw-r--" | awk '{print $1}'`
+
+if [ "$RES" != "" ]
+then
+	echo ""
+	echo "SUCCESS: With default ACLs set , new file permission set correct."
+else
+	echo ""
+	echo "FAILED:  With default ACLs set , new file permission set not correct"
+fi
+
+#
+# Test ACL_GROUP default ACLs
+#
+
+setfacl -m d:u::rwx -m d:g::rwx -m d:o::rwx shared/team1
+su - tacluser3 << TACL_USER3
+	
+	MASK=`umask`
+	umask 0
+	touch $CUR_PATH/shared/team1/newfile3
+	umask $MASK > /dev/null
+	
+TACL_USER3
+
+CONTENT=""
+CONTENT=`ls -l shared/team1/newfile3`
+RES=`echo $CONTENT | grep ".rw-rw-rw-" | awk '{print \$1}'`
+
+if [ "$RES" != "" ]
+then
+	echo ""
+	echo "SUCCESS: With default ACLs set , new file permission set correct."
+else
+	echo ""
+	echo "FAILED:  With default ACLs set , new file permission set not correct"
+fi
+
+
+#################################################################################
+#
+# Chmod also change ACL_USER_OBJ ACL_GROUP_OBJ and ACL_OTHER permissions
+#
+#################################################################################
+su - tacluser3 << TACL_USER3
+	MASK=`umask`
+	umask 0
+	
+	chmod 777 $CUR_PATH/shared/team1/newfile3
+	umask $MASK > /dev/null
+TACL_USER3
+
+CONTENT=""
+CONTENT=`getfacl shared/team1/newfile3`
+
+USER_PERMISSION=`echo $CONTENT | awk '{print \$10}'`
+
+GROUP_PERMISSION=`echo $CONTENT | awk '{print \$12}'`
+OTHER_PERMISSION=`echo $CONTENT | awk '{print \$15}'`
+
+if [ "$USER_PERMISSION" == "user::rwx" ]
+then
+	if [ "$GROUP_PERMISSION" == "group::rwx" ]
+	then
+		if [ "$OTHER_PERMISSION" == "other::rwx" ]
+		then 
+			echo ""
+			echo "SUCCESS: Chmod with ACL_USER_OBJ ACL_GROUP_OBJ and ACL_OTHER are correct"
+		else
+			echo ""
+			echo "FAILED:  Chmod with ACL_USER_OBJ ACL_GROUP_OBJ and ACL_OTHER are not correct"
+		fi
+	else
+		echo ""
+		echo "FAILED:  Chmod with ACL_USER_OBJ ACL_GROUP_OBJ and ACL_OTHER are not correct"
+	fi
+else
+	echo ""
+	echo "FAILED:  Chmod with ACL_USER_OBJ ACL_GROUP_OBJ and ACL_OTHER are not correct"
+fi
+
+
+#####################################################################################
+#
+# Chown only change object owner and group
+#
+#####################################################################################
+
+chown tacluser2.tacluser2 shared/team1/newfile2
+CONTENT=""
+CONTENT=`getfacl shared/team1/newfile2`
+
+ITEM_OWNER=`echo $CONTENT | awk '{print \$6}'`
+ITEM_GROUP=`echo $CONTENT | awk '{print \$9}'`
+
+if [ "$ITEM_OWNER" == "tacluser2" ]
+then 
+	if [ "$ITEM_GROUP" == "tacluser2" ]
+	then
+		echo ""
+		echo "SUCCESS: Chown correct"
+	else
+		echo ""
+		echo "FAILED:  Chown are not correct"
+	fi
+else
+	echo "FAILED:  Chown are not correct"
+fi
+
+#####################################################
+#
+# Test ACLs backup and restore
+#
+#####################################################
+
+getfacl -RP shared > tmp1
+setfacl -m u::--- -m g::--- -m o::--- shared/team1
+setfacl --restore tmp1
+getfacl -RP shared > tmp2
+
+if [ `diff tmp1 tmp2` ]
+then 
+	echo ""
+	echo "FAILED:  ACLs backup and restore are not correct"
+else
+	echo ""
+	echo "SUCCESS: ACLs backup and restore are correct"
+fi
+
+echo ""
+echo -e "\tEnd ACLs Test"
+
+#####################################################
+#
+# Now begin Extend Attribute test
+#
+#####################################################
+
+echo
+echo "Now begin Extend Attribute Test"
+
+# dir
+echo 
+echo "Attach name:value pair to object dir "
+echo ""
+attr -s attrname1 -V attrvalue1 shared/team2
+if [ $? != 0 ]
+then
+	echo "FAILED: Attach name:value pair to object dir"
+fi
+
+#file
+echo 
+echo "Attach name:value pair to object file "
+echo ""
+attr -s attrname2 -V attrvalue2 shared/team2/file1
+if [ $? != 0 ]
+then
+	echo "FAILED: Attach name:value pair to object file"
+fi
+
+#symlink file
+echo 
+echo "Attach name:value pair to object symlink file"
+echo ""
+attr -s attrname3 -V attrvalue3 shared/team2/symlinkfile1
+if [ $? != 0 ]
+then
+	echo "INFO: Can't attach name:value pair to object symlink file"
+fi
+
+echo ""
+ls -lRt shared/team2
+
+echo 
+echo "get extended attributes of filesystem objects"
+echo ""
+
+echo "Dump the values"
+getfattr -d shared/team2
+if [ $? != 0 ]
+then
+	echo "FAILED: getfattr: Dump the values" 
+fi
+
+echo "Recursively dump the values"
+getfattr -dR $CUR_PATH/*
+if [ $? != 0 ]
+then
+	echo "FAILED: getfattr: Recursively Dump the values" 
+fi
+
+echo "Do not follow symlinks."     
+echo "but extended user attributes are disallowed for symbolic links"
+getfattr -h --no-dereference shared/team2/symlinkfile1
+if [ $? != 0 ]
+then
+        echo "FAILED: getfattr: Do not follow symlinks."
+fi
+echo 
+
+echo "Logical walk, follow symbolic links"
+getfattr -L shared/team2/*
+if [ $? != 0 ]
+then
+	echo "FAILED: getfattr: Logical walk"                  
+fi
+
+echo "Physical walk, skip all symbolic links"
+getfattr -P shared/team2/*
+if [ $? != 0 ]
+then
+	echo "FAILED: getfattr: Physical walk"                  
+fi
+
+echo "attr -g to search the named object"                 
+attr -g attrname1 shared/team2
+if [ $? != 0 ]
+then
+	echo "FAILED: attr: to search the named object"     
+fi
+echo 
+
+echo "attr -r to remove the named object"                 
+attr -r attrname2 shared/team2/file1
+if [ $? != 0 ]
+then
+	echo "FAILED: attr: to remove the named object"     
+fi
+
+
+#################################
+#
+# Backup and Restore
+#
+#################################
+getfattr -dhR -m- -e hex shared > backup.ea
+setfattr -h --restore=backup.ea
+
+getfattr -dhR -m- -e hex shared > backup.ea1
+if [ `diff  backup.ea1  backup.ea` ]
+then
+        echo ""
+        echo "FAILED:  EAs backup and restore are not correct"
+else
+        echo ""
+        echo "SUCCESS: EAs backup and restore are correct"
+fi
+
+echo ""
+echo -e "\tEnd EAs Test"
+
+
+
+#####################################################
+#
+# Clean up 
+#
+#####################################################
+
+userdel tacluser1
+userdel tacluser2
+userdel tacluser3
+userdel tacluser4
+cd $DIR
+rm -rf tacl
Index: /tags/B2O-Blue-Sync-Temp-End/test/configure.in
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/configure.in	(revision 8317)
+++ /tags/B2O-Blue-Sync-Temp-End/test/configure.in	(revision 8317)
@@ -0,0 +1,281 @@
+dnl **************************************************************
+dnl PVFS2 AUTOCONF SCRIPT
+dnl
+dnl Process this file with autoconf to produce a configure script.
+dnl You may need to use autoheader as well if changing any DEFINEs
+
+dnl sanity checks, output header, location of scripts used here
+AC_INIT(correctness/pts/pts.h)
+AC_CONFIG_HEADER(pvfs2-test-config.h)
+AC_CONFIG_AUX_DIR(maint)
+
+USR_CFLAGS=$CFLAGS
+if test "x$USR_CFLAGS" = "x"; then
+	USR_CFLAGS_SET=no
+fi
+
+dnl PAV configuration needs absolute location of source and build.
+dnl Linux-2.6 module needs absolute location of source, and uses the
+dnl relative location for soft links for out-of-tree builds.
+BUILD_ABSOLUTE_TOP=`pwd`
+SRC_RELATIVE_TOP=$srcdir
+SRC_ABSOLUTE_TOP=`cd $srcdir ; pwd`
+
+AC_SUBST(BUILD_ABSOLUTE_TOP)
+AC_SUBST(SRC_RELATIVE_TOP)
+AC_SUBST(SRC_ABSOLUTE_TOP)
+
+dnl Check if user actually wants to see all our build output (compiles, links, etc.).
+AC_ARG_ENABLE(verbose-build,
+[  --enable-verbose-build  Enables full output during build process],
+QUIET_COMPILE=0,
+QUIET_COMPILE=1)
+
+AC_SUBST(QUIET_COMPILE)
+
+dnl Check for utilities that we need during the build process
+AC_PROG_INSTALL
+AC_PROG_CC
+
+AC_MSG_CHECKING(whether cc is gcc)
+if test "x$GCC" = "x"; then
+	AC_MSG_ERROR(pvfs2 currently requires gcc as the compiler)
+fi
+CFLAGS=$USR_CFLAGS
+
+AC_PROG_CPP
+AC_CHECK_PROG(HAVE_PERL, perl, yes, no)
+AC_CHECK_PROG(HAVE_FIND, find, yes, no)
+AC_CHECK_PROG(HAVE_BISON, bison, yes, no)
+AC_CHECK_PROG(HAVE_FLEX, flex, yes, no)
+
+AC_CHECK_HEADERS(openssl/evp.h)
+AC_CHECK_HEADERS(openssl/crypto.h)
+AC_CHECK_HEADERS(zlib.h)
+dnl See if CC is a GNU compiler.  This may require a real test in future
+dnl versions of autoconf.  In 2.13 it is a side-effect of AC_PROG_CC.  First
+dnl check if it is an Intel compiler; those lie and claim to be gcc but are
+dnl not argument compatible
+INTELC=
+GNUC=
+AC_MSG_CHECKING(whether cc is an Intel compiler)
+AC_TRY_COMPILE([
+#ifndef __ICC
+       choke me
+#endif
+], [],
+    AC_MSG_RESULT(yes)
+    INTELC=1
+    ,
+    AC_MSG_RESULT(no)
+)
+if test x$INTELC = x ; then
+    if test x$GCC = xyes ; then
+	GNUC=1
+    fi
+fi
+AC_SUBST(INTELC)
+AC_SUBST(GNUC)
+
+AC_ARG_WITH(efence,
+[  --with-efence=<path>    Use electric fence for malloc debugging.],
+	if test x$withval != xyes ; then
+		LDFLAGS="${LDFLAGS} -L$withval"
+	fi
+	AC_CHECK_LIB(efence,malloc)
+)
+
+AC_ARG_WITH(zlib,
+[  --with-zlib=<path>      Use zlib for checksums.],
+        if test x$withval != xyes ; then
+                LDFLAGS="${LDFLAGS} -L$withval"
+        fi
+)
+AC_CHECK_LIB(z, adler32, [
+        LIBS="${LIBS} -lz"
+        AC_DEFINE(HAVE_LIBZ, 1, Define if libz exists)
+])
+
+AC_ARG_WITH(mpi, 
+[  --with-mpi=<dir>        Location of the MPI installation],
+    if test x$withval = xyes; then
+	AC_MSG_ERROR(--with-mpi must be given a pathname)
+    else
+	MPICC="${withval}/bin/mpicc"
+	CFLAGS="${CFLAGS} -I${withval}/include"
+	LDFLAGS="${LDFLAGS} -L${withval}/lib"
+	BUILD_MPI="1"
+    fi
+)
+
+dnl a mechanism to turn off threads in the client library
+AC_ARG_ENABLE(thread-safety,
+[  --disable-thread-safety Disables thread safety in the client library],
+[if test "x$enableval" = "xno" ; then
+    CFLAGS="$CFLAGS -D__GEN_NULL_LOCKING__"
+    AC_MSG_RESULT(no)
+fi],
+[   CFLAGS="$CFLAGS -D__GEN_POSIX_LOCKING__"
+    AC_MSG_RESULT(yes) ]
+)
+
+dnl default paths:
+PVFS2_SRC_RELATIVE_TOP="${srcdir}/.."
+PVFS2_BUILD_RELATIVE_TOP=".."
+
+AC_ARG_WITH(pvfs2-src, 
+[  --with-pvfs2-src=<dir>  Location of the PVFS2 src directory],
+    if test x$withval = xyes; then
+	AC_MSG_ERROR(--with-pvfs2-src must be given a pathname)
+    else
+	PVFS2_SRC_RELATIVE_TOP="${withval}"
+	PVFS2_BUILD_RELATIVE_TOP="${withval}"
+    fi
+)
+
+AC_ARG_WITH(pvfs2-build, 
+[  --with-pvfs2-build=<dir> Location of the PVFS2 build dir (if different from src dir)],
+    if test x$withval = xyes; then
+	AC_MSG_ERROR(--with-pvfs2-build must be given a pathname)
+    else
+	PVFS2_BUILD_RELATIVE_TOP="${withval}"
+    fi
+)
+AC_SUBST(PVFS2_SRC_RELATIVE_TOP)
+AC_SUBST(PVFS2_BUILD_RELATIVE_TOP)
+
+AC_ARG_ENABLE(strict,
+[  --enable-strict         Turn on strict debugging with gcc],
+[
+if test "x$USR_CFLAGS_SET" = "xno"; then
+    CFLAGS="$CFLAGS -g -Wall -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wpointer-arith -Wbad-function-cast"
+fi
+],
+[
+if test "x$USR_CFLAGS_SET" = "xno"; then
+    CFLAGS="$CFLAGS -O2"
+fi
+])
+
+LDFLAGS="${LDFLAGS} -L${PVFS2_BUILD_RELATIVE_TOP}/lib"
+CFLAGS="${CFLAGS} -I${PVFS2_SRC_RELATIVE_TOP} -I${PVFS2_SRC_RELATIVE_TOP}/include -I${PVFS2_BUILD_RELATIVE_TOP}"
+CPPFLAGS="${CFLAGS} -I${PVFS2_SRC_RELATIVE_TOP} -I${PVFS2_SRC_RELATIVE_TOP}/include -I${PVFS2_BUILD_RELATIVE_TOP}"
+
+dnl make sure we actually were supplied all of the PVFS2 components we need
+AC_CHECK_HEADER(pvfs2-config.h, ,
+    AC_MSG_ERROR("could not find pvfs2-config.h... must specify path to PVFS2 src with --with-pvfs2-src")
+    )
+
+dnl ask pvfs2-config to tell us what libraries to use for client and server
+dnl tests
+LIBS="${LIBS} `/bin/sh ${PVFS2_BUILD_RELATIVE_TOP}/src/apps/admin/pvfs2-config --libs`"
+SERVERLIBS=`/bin/sh ${PVFS2_BUILD_RELATIVE_TOP}/src/apps/admin/pvfs2-config --serverlibs`
+PVFS2_TOP_PREFIX=`/bin/sh ${PVFS2_BUILD_RELATIVE_TOP}/src/apps/admin/pvfs2-config --prefix`
+AC_SUBST(SERVERLIBS)
+AC_SUBST(PVFS2_TOP_PREFIX)
+
+dnl make sure the libs exist and work
+AC_CHECK_LIB(pvfs2, PVFS_sys_create, ,
+    AC_MSG_ERROR("could not find libpvfs2... must specify path to PVFS2 installation or build tree with --with-pvfs2-build")
+    )
+
+MPI_INTELC=
+MPI_GNUC=
+if test x$BUILD_MPI = x1; then
+    AC_MSG_CHECKING(whether the mpicc compiler works)
+    saveCC="$CC"
+    CC="$MPICC"
+    AC_TRY_COMPILE([#include <mpi.h>], [int ret = MPI_Init(0, (void*)0)],
+	AC_MSG_RESULT(yes),
+	AC_MSG_RESULT(no)
+	AC_MSG_ERROR($CC doesn't appear to be a valid MPI compiler)
+    )
+    dnl See if mpicc is a GNU compiler, notice that intel compiler claims
+    dnl it is GCC, but isn't argument compatible, hence check it first.
+    AC_MSG_CHECKING(whether mpicc is an Intel compiler)
+    AC_TRY_COMPILE([
+    #ifndef __ICC
+	   choke me
+    #endif
+    ], [],
+	AC_MSG_RESULT(yes)
+	MPI_INTELC=1
+	,
+	AC_MSG_RESULT(no)
+    )
+    if test x$MPI_INTELC = x; then
+	AC_MSG_CHECKING(whether mpicc is a GNU compiler)
+	AC_TRY_COMPILE([
+	#ifndef __GNUC__
+	       choke me
+	#endif
+	], [],
+	    AC_MSG_RESULT(yes)
+	    MPI_GNUC=1
+	    ,
+	    AC_MSG_RESULT(no)
+	)
+    fi
+    CC="$saveCC"
+    AC_SUBST(MPICC)
+    AC_SUBST(BUILD_MPI)
+fi
+AC_SUBST(MPI_INTELC)
+AC_SUBST(MPI_GNUC)
+
+AC_ARG_WITH(db,
+	[  --with-db=<dir>         Location of installed DB package (default=/usr)],
+	[AX_BERKELEY_DB(${withval})],
+	[AX_BERKELEY_DB("")])
+
+AC_ARG_WITH(openssl,
+		 [  --with-openssl=<dir>  Location of installed openssl package (default=/usr)
+		 	 --without-openssl     Don't build with openssl.
+		 ],
+		 [AX_OPENSSL(${withval})],
+		 [AX_OPENSSL_OPTIONAL])
+
+AC_ARG_WITH(libaio,
+		 [  --with-libaio=<dir>  Location of installed libaio package (default=/usr)
+		 	 --without-libaio     Don't build with libaio.
+		 ],
+		 [AX_AIO(${withval})],
+		 [AX_AIO_OPTIONAL])
+
+dnl create any missing subdirectories that wouldn't be created
+dnl by AC_OUTPUT below (which won't create intermediate dirs).
+for d in common io client correctness/pts kernel ; do
+	install -d $d;
+done
+
+dnl output final version of top level makefile and subdirectory
+dnl    makefile includes
+AC_OUTPUT(Makefile
+io/trove/module.mk
+io/buffer/module.mk
+common/quicklist/module.mk
+common/id-generator/module.mk
+common/gossip/module.mk
+common/gen-locks/module.mk
+common/misc/module.mk
+io/bmi/module.mk
+io/description/module.mk
+io/flow/module.mk
+io/job/module.mk
+io/dev/module.mk
+client/sysint/module.mk
+client/mpi-io/module.mk
+client/vfs/module.mk
+proto/module.mk
+server/module.mk
+server/request-scheduler/module.mk
+correctness/pts/module.mk
+correctness/module.mk
+common/pav/configfile.sample
+kernel/linux-2.6/module.mk
+maint/mpi-depend.sh
+shared/module.mk
+perfbase/benchmarks/module.mk
+posix/module.mk
+)
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/perfbase/perfbase-web-input
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/perfbase/perfbase-web-input	(revision 5012)
+++ /tags/B2O-Blue-Sync-Temp-End/test/perfbase/perfbase-web-input	(revision 5012)
@@ -0,0 +1,107 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+require HTTP::Request;
+require LWP::UserAgent;
+
+use Getopt::Std;
+
+my $descfile = undef;
+my $operation = undef;
+my $metaservers = undef;
+my $ioservers = undef;
+my $cvstag = undef;
+my $cvsdate = undef;
+
+my %opts = ();
+getopts('o:m:i:t:d:f:h', \%opts);
+
+sub usage()
+{
+	print "\nusage: perfbase-web-input [options]\n";
+	print "\nREQUIRED ARGS:\n\n";
+	print "   -o <operation>	- the file system operation\n";
+	print "   -m <meta servers>     - the number of meta servers used\n";
+	print "   -i <io servers>       - the number of io servers used\n";
+	print "   -f <input desc>       - the input descriptor file\n";
+	print "\n\nOPTIONAL ARGS:\n\n";
+	print "   -t <cvs tag>          - cvs tag or branch used\n";
+	print "   -d <cvs date>         - cvs date tag\n";
+	print "   -h                    - help\n\n"; 
+        exit 1;
+}
+
+my %option_vars = ('o' => \$operation,
+		   'm' => \$metaservers,
+		   'i' => \$ioservers,
+		   't' => \$cvstag,
+		   'd' => \$cvsdate,
+		   'f' => \$descfile);
+
+for (keys %opts)
+{
+	if(exists $option_vars{$_})
+	{
+		my $varref = $option_vars{$_};
+		$$varref = $opts{$_};
+	}
+	else 
+	{ 
+		usage;
+	}
+}
+
+if(!defined($operation) || !defined($metaservers) || !defined($ioservers) || 
+   !defined($descfile))
+{
+	usage;
+}
+
+if(!defined($cvstag))
+{
+	$cvstag = "HEAD";
+}
+
+if(!defined($cvsdate))
+{
+	$cvsdate = `date --iso-8601=date`;
+}
+
+my $line;
+my $msg = "";
+
+my $input_desc = `cat $descfile`;
+
+$msg = << "INPUTDESC"
+INPUT DESCRIPTION BEGIN
+$input_desc
+INPUT DESCRIPTION END
+INPUTDESC
+;;
+
+my $hostn=`hostname`;
+$msg .= "cvsstamp=$cvstag-$cvsdate\nhost=$hostn\n";
+$msg .= "op=$operation\nmeta=$metaservers\nio=$ioservers\n";
+
+while (defined($line = <STDIN>))
+{
+    $msg .= $line;
+}
+
+my $req = HTTP::Request->new(
+    "POST" => "http://lain.mcs.anl.gov/bin/perfbase-input.cgi" );
+$req->content( $msg );
+
+my $ua = LWP::UserAgent->new;
+
+my $resp = $ua->request( $req );
+if( $resp->is_success )
+{
+	print $resp->content;
+}
+else
+{
+	die $resp->status_line;
+}
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/perfbase/experiments/pvfs2-meta-input.xml
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/perfbase/experiments/pvfs2-meta-input.xml	(revision 5139)
+++ /tags/B2O-Blue-Sync-Temp-End/test/perfbase/experiments/pvfs2-meta-input.xml	(revision 5139)
@@ -0,0 +1,61 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE input SYSTEM "../../dtd/pb_input.dtd">
+
+<input>
+ <experiment>pvfs2_meta</experiment>
+
+ <named_location>
+  <name>operation</name>
+  <match>op=</match>
+ </named_location>
+
+ <named_location>
+  <name>machine</name>
+  <match>host=</match>
+ </named_location>
+
+ <named_location>
+  <name>cvs_stamp</name>
+  <match>cvsstamp=</match>
+ </named_location>
+
+ <named_location>
+  <name>meta_servers</name>
+  <match>meta=</match>
+ </named_location>
+
+ <named_location>
+  <name>io_servers</name>
+  <match>io=</match>
+ </named_location>
+
+ <named_location>
+  <name>clients</name>
+  <match>procs: </match>
+ </named_location>
+
+ <named_location>
+  <name>OP_total</name>
+  <match>ops: </match>
+ </named_location>
+
+ <named_location>
+  <name>capacity</name>
+  <match>dbsize: </match>
+ </named_location>
+
+ <tabular_location columns="3">
+  <match>====</match>
+  <skip>1</skip>
+
+  <tabular_value>
+   <name>iteration</name>
+   <pos>1</pos>
+  </tabular_value>
+
+  <tabular_value>
+   <name>latency</name>
+   <pos>2</pos>
+  </tabular_value>
+ </tabular_location>
+</input>
Index: /tags/B2O-Blue-Sync-Temp-End/test/perfbase/experiments/pvfs2-meta-exp.xml
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/perfbase/experiments/pvfs2-meta-exp.xml	(revision 5139)
+++ /tags/B2O-Blue-Sync-Temp-End/test/perfbase/experiments/pvfs2-meta-exp.xml	(revision 5139)
@@ -0,0 +1,96 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE experiment SYSTEM "../../dtd/pb_experiment.dtd">
+
+<experiment>
+ <name>pvfs2_meta</name>
+
+ <info>
+  <performed_by>
+    <name>slang</name>
+  </performed_by>
+
+  <project>PVFS2</project>
+  <synopsis>Benchmark of PVFS2 tests</synopsis>
+
+  <description>
+	Track performance of pvfs2's operations with different configuration and test parameters over time.
+  </description>
+ </info>
+
+ <!-- generic pvfs2 parameters -->
+
+ <parameter occurrence="once">
+  <name>cvs_stamp</name>
+  <synopsis>Tag/Date from CVS of the PVFS2 version</synopsis>
+  <datatype>string</datatype>
+  <default>HEAD-now</default>
+ </parameter>
+
+ <parameter occurrence="once">
+  <name>machine</name>
+  <synopsis>The machine used for this experiment</synopsis>
+  <datatype>string</datatype>
+ </parameter>
+
+ <parameter occurrence="once">
+  <name>meta_servers</name>
+  <synopsis>Number of meta servers used</synopsis>
+  <datatype>integer</datatype>
+  <default>1</default>
+ </parameter>
+
+ <parameter occurrence="once">
+  <name>io_servers</name>
+  <synopsis>Number of i/o servers used</synopsis>
+  <datatype>integer</datatype>
+  <default>5</default>
+ </parameter>
+
+ <!-- parameters specific to this experiment-->
+
+ <parameter occurrence="once">
+  <name>operation</name>
+  <synopsis>PVFS2 Operation type</synopsis>
+  <datatype>string</datatype>
+  <default>create</default>
+ </parameter>
+
+ <parameter occurrence="once">
+  <name>clients</name>
+  <synopsis>Number of clients</synopsis>
+  <datatype>integer</datatype>
+  <default>1</default>
+ </parameter>
+
+ <parameter occurrence="once">
+  <name>OP_total</name>
+  <synopsis>Total operations per run</synopsis>
+  <datatype>integer</datatype>
+  <default>100</default>
+ </parameter>
+
+ <parameter>
+  <name>iteration</name>
+  <synopsis>Iteration Index</synopsis>
+  <datatype>integer</datatype>
+ </parameter>
+
+ <parameter>
+  <name>capacity</name>
+  <synopsis>Number of entries in the file system</synopsis>
+  <datatype>integer</datatype>
+ </parameter>
+
+ <!-- results -->
+ 
+ <result>
+ <name>latency</name>
+  <synopsis>Seconds per Operation</synopsis>
+  <datatype>float</datatype>
+  <unit>
+   <base_unit>s</base_unit>
+  </unit>
+ </result>
+
+</experiment>
Index: /tags/B2O-Blue-Sync-Temp-End/test/perfbase/run-perfbase-tests
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/perfbase/run-perfbase-tests	(revision 5141)
+++ /tags/B2O-Blue-Sync-Temp-End/test/perfbase/run-perfbase-tests	(revision 5141)
@@ -0,0 +1,285 @@
+#!/usr/bin/perl -w
+
+use strict;
+use Getopt::Std;
+
+sub factor_sequence;
+sub usage;
+sub run_tests;
+
+my ($clients_range, $io_range, $meta_range, $branch, $cvsdate, $basepath,
+        $mountpoint, $iterations, $verbose, $exp) = 
+(undef, undef, undef, undef, undef, undef, undef, undef, undef, undef);
+
+my %option_vars = (
+        "c" => \$clients_range,
+        "i" => \$io_range,
+        "k" => \$meta_range,
+        "b" => \$branch,
+        "d" => \$cvsdate,
+        "p" => \$basepath,
+        "m" => \$mountpoint,
+        "n" => \$iterations,
+        "e" => \$exp,
+        "v" => \$verbose);
+
+my $operation = pop @ARGV;
+
+if(!defined($operation))
+{
+    print "\n\nERROR: Missing an <operation> argument\n";
+    usage;
+}
+
+my %opts = ();
+getopts("c:i:k:b:p:m:n:e:vh", \%opts) || usage;
+
+for (keys %opts)
+{
+    if(exists $option_vars{$_})
+    {
+        my $var = $option_vars{$_};
+        $$var = $opts{$_};
+    }
+    else
+    {
+        usage;
+    }
+}
+
+$clients_range = "1:1" if !defined($clients_range);
+$io_range = "1:5" if !defined($io_range);
+$meta_range = "1:1" if !defined($meta_range);
+$branch = "HEAD" if !defined($branch);
+$cvsdate = `date --iso-8601=date` if !defined($cvsdate);
+$basepath = "." if !defined($basepath);
+$iterations = 100 if !defined($iterations);
+$exp = "meta" if !defined($exp);
+
+my $benchpath = $basepath . "/BUILD-pvfs2-$branch/test/perfbase/benchmarks";
+
+if(!defined($mountpoint))
+{
+    print "\n\nERROR: No mountpoint specified.\n";
+    usage;
+}
+
+my @procs = factor_sequence($clients_range);
+my @meta_servers = factor_sequence($meta_range);
+my @io_servers = factor_sequence($io_range);
+
+my $hostname=`uname -n`;
+chomp($hostname);
+
+run_tests;
+
+sub myexec
+{
+    my $cmd = shift;
+    my $error = shift;
+
+    print "RUNNING: $cmd\n" if $verbose;
+    system($cmd);
+    if($? != 0)
+    {
+        print STDERR $error;
+        exit $?
+    }
+}
+
+sub check_exec
+{
+    my $cmd = shift;
+
+    system("which $cmd > /dev/null 2>&1");
+    if($? != 0)
+    {
+        print STDERR "\nScript requires $cmd to be in your PATH\n\n";
+        exit $?;
+    }
+}
+
+sub run_tests()
+{
+    check_exec("mpiexec");
+    check_exec("mpdtrace");
+
+    if(!exists $ENV{"PVFS2TAB_FILE"})
+    {
+        print STDERR "PVFS2TAB_FILE must be set.\n\n";
+        exit 1;
+    }
+
+    my $mpdprocs = `mpdtrace`;
+    if(!defined($mpdprocs) || $mpdprocs eq "")
+    {
+        print STDERR "mpdtrace found no mpd processes.\n\n";
+        exit 1;
+    }
+
+    my @mpdprocs_list = split(/\n/, $mpdprocs);
+
+    if(! -d "/tmp/mpi-test-data")
+    {
+        myexec("mkdir /tmp/mpi-test-data",
+               "Failed to create directory: /tmp/mpi-test-data\n");
+    }
+
+    for my $meta (@meta_servers)
+    {
+        for my $io (@io_servers)
+        {
+            check_exec("$hostname-restart-servers");
+
+            myexec("$hostname-restart-servers $basepath/INSTALL-pvfs2-$branch $io $meta",
+                   "Failed to restart servers with:\n" .
+                   "meta servers: $meta\nio servers: $io\n" .
+                   "branch: $branch\n\n");
+
+            for my $proc (@procs)
+            {
+                my $datfile = "/tmp/perftest-$operation-c$proc-m$meta-i$io-$branch.dat";
+
+                myexec("mpiexec -1 -n $proc -env PVFS2TAB_FILE \"" . 
+                       $ENV{PVFS2TAB_FILE} . "\" $benchpath/$operation-test " .
+                       "-d $mountpoint -n $iterations > $datfile",
+                       "Test run failed: proc: $proc, meta: $meta, io: $io\n");
+
+                open(WEBINPUT,
+                     "|./perfbase-web-input -o $operation -m $meta -i $io " .
+                     "-f ./experiments/pvfs2-op-input.xml -t $branch > /tmp/perfbase_input_result 2>&1");
+                
+                if($? != 0)
+                {
+                    print STDERR "Can't fork perfbase-web-input: $!\n" .
+                                 "Failed to submit test results to perfbase " .
+                                 "for run: proc: $proc, " .
+                                 "meta: $meta, io: $io\n\n" .
+                                 `cat /tmp/perfbase_input_result`;
+                    exit 1;
+                }
+
+                if($verbose)
+                {
+                    print "RUNNING: ./perfbase-web-input -o $operation " .
+                          "-m $meta -i $io -f " .
+                          "./experiments/pvfs2-$exp-input.xml -t $branch\n";
+                }
+
+                open(WEBINPUT,
+                     "|./perfbase-web-input -o $operation -m $meta -i $io " .
+                     "-f ./experiments/pvfs2-$exp-input.xml -t $branch > /tmp/perfbase_input_result 2> /tmp/perfbase_input_error");
+                
+                my $datresults = `cat $datfile`;
+                print WEBINPUT $datresults;
+                
+                my $res = close WEBINPUT; 
+                if(!$res)
+                {
+                    print STDERR "Failed to submit results to perfbase: $! $?\n" .
+                                 "for run: proc: $proc, meta: $meta, io: $io\n";
+                    exit 1;
+                }
+
+                my $error_bytes=`cat /tmp/perfbase_input_error | wc -c`;
+                if($? != 0 || $error_bytes != 0)
+                {
+                    print STDERR "Can't fork perfbase-web-input: $!\n" .
+                                 "Failed to submit test results to perfbase " .
+                                 "for run: proc: $proc, " .
+                                 "meta: $meta, io: $io\n\n" .
+                                 `cat /tmp/perfbase_input_result`;
+                    exit 1;
+                }
+
+            }
+        }
+    }
+}
+
+sub factor_sequence()
+{
+    my $inc = 1;
+    my ($first, $last);
+    my $seq = shift;
+
+    if($seq =~ /(\d+):(\d+):(\d+)/)
+    {
+        $first = $1;
+        $inc = $2;
+        $last = $3;
+    }
+    else
+    {
+        $seq =~ /(\d+):(\d+)/;
+        $first = $1;
+        $last = $2;
+    }
+
+    my @seq_array = ();
+
+    for(my $i = $first; $i <= $last; $i += $inc)
+    {
+        push(@seq_array, $i);
+    }
+    return @seq_array;
+}
+
+sub usage()
+{
+    print << "USAGE"
+
+usage: $0 [options] -<operation>
+
+<operation> must be the operation to test, where <operation>-test is
+the executable to run.  All such executables must take the same parameter
+set: -d <pvfs2 mountpoint> -i <iterations>.  The <operation>-test program
+should perform the operation as many times as specified in <iterations>
+and print to stdout on a separate line for each iteration:
+
+<iteration> <time (seconds)>
+
+
+OPTIONS:
+
+Range options must be in the form <min>:<max> or <min>:<inc>:<max> 
+where the test will be run from <min> to <max>, 
+incrementing by <inc> after each iteration.
+<inc> defaults to 1 if not specified.
+
+          -h             : Help.
+          -c <range>     : the range of mpi processes to use.  
+                           Defaults to 1:1.
+          -i <range>     : the range of io servers to use.  
+                           Defaults to 1:4.
+          -k <range>     : the range of meta servers to use.  
+                           Defaults to 1:1.
+          -b <branch>    : the name of the CVS branch to use.  
+                           Defaults to HEAD.
+          -d <date>      : iso-8601 valid date string to 
+                           use for CVS checkout.  
+                           Defaults to latest.
+          -p <base path> : path to base pvfs2 test directory.  Defaults to \$PWD.
+                           This should contain {BUILD,INSTALL}-pvfs2-* dirs.
+          -m <dir>       : pvfs2 mount point (passed to test program)
+          -n <iter>      : number of iterations (passed to test program).
+                           Defaults to 100.
+          -e <exp>       : perfbase experiment to submit the test results.
+                           This should only include the experiment component
+                           of the name.
+                           Defaults to 'meta'
+          -v             : Verbose.  Show commands as they are being
+                           executed.
+
+USAGE
+;;
+
+    exit 1;
+}
+
+#
+# Local variables:
+# c-indent-level: 4
+# c-basic-offset: 4
+# End:
+# vim: ft=perl ts=8 sts=4 sw=4 expandtab
Index: /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/module.mk.in
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/module.mk.in	(revision 5663)
+++ /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/module.mk.in	(revision 5663)
@@ -0,0 +1,10 @@
+DIR := perfbase/benchmarks
+
+MPIMISCSRC += \
+       $(DIR)/benchmark-utils.c
+
+MPITESTSRC += \
+	$(DIR)/mpi-create-test.c \
+	$(DIR)/create-subdir-test.c \
+	$(DIR)/create-test.c \
+	$(DIR)/readdir-end-test.c
Index: /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/create-test.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/create-test.c	(revision 6373)
+++ /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/create-test.c	(revision 6373)
@@ -0,0 +1,191 @@
+/*
+ * usage:  -d /path/to/directory -n number_of_files
+ */
+
+#include <sys/time.h>
+#include <time.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <limits.h>
+#include <unistd.h>
+#include <assert.h>
+#include <mpi.h>
+#include "pvfs2-sysint.h"
+#include "pvfs2-util.h"
+
+#include "benchmark-utils.h"
+
+#ifndef PATH_MAX
+#define PATH_MAX FILENAME_MAX
+#endif
+
+extern char *optarg;
+int opt_nfiles = -1;
+char opt_basedir[PATH_MAX];
+int opt_dirarg = -1;
+
+void usage(char *name);
+int parse_args(int argc, char **argv);
+void handle_error(int errcode, char *str);
+
+void usage(char *name)
+{
+    fprintf(stderr, "usage: %s -d /path/to/directory -n #_of_files\n", name);
+    exit(-1);
+}
+int parse_args(int argc, char **argv)
+{
+    int c;
+
+	 if(argc < 3)
+	 {
+		  usage(argv[0]);
+	 }
+
+    while ( (c = getopt(argc, argv, "d:n:")) != -1 ) {
+		  switch (c) {
+				case 'd':
+					 strncpy(opt_basedir, optarg, PATH_MAX);
+					 opt_dirarg = 1;
+					 break;
+				case 'n':
+					 opt_nfiles = atoi(optarg);
+					 break;
+				case '?':
+				case ':':
+				default:
+					 usage(argv[0]);
+		  }
+	 }
+
+	 if(opt_nfiles == -1 || opt_dirarg == -1)
+	 {
+		  usage(argv[0]);
+	 }
+
+	 return 0;
+}
+
+void handle_error(int errcode, char *str)
+{
+    char msg[MPI_MAX_ERROR_STRING];
+    int resultlen;
+    MPI_Error_string(errcode, msg, &resultlen);
+    fprintf(stderr, "%s: %s\n", str, msg);
+    MPI_Abort(MPI_COMM_WORLD, 1);
+}
+
+
+int main(int argc, char **argv)
+{
+	 PVFS_error pvfs_error;
+    int i;
+	 char test_file[PATH_MAX];
+	 PVFS_sys_attr attr;
+	 PVFS_fs_id cur_fs;
+	 PVFS_credentials credentials;
+	 PVFS_sysresp_lookup lookup_resp;
+	 PVFS_sysresp_create create_resp;
+	 char basepath[PATH_MAX];
+	 
+    int rank, nprocs, ret;
+    MPI_Info info;
+
+	 MPI_Init(&argc, &argv);
+    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+    MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
+
+    parse_args(argc, argv);
+
+    /* provide hints if you want  */
+    info = MPI_INFO_NULL;
+
+	 if (rank == 0)
+	 {
+		  printf("\nprocs: %d\nops: %d\n===========\n", nprocs, opt_nfiles);
+	 }
+
+	 ret = PVFS_util_init_defaults();
+	 if(ret != 0)
+	 {
+		  PVFS_perror("PVFS_util_init_defaults", ret);
+		  return ret;
+	 }
+
+	 ret = PVFS_util_resolve(opt_basedir, &cur_fs, basepath, PATH_MAX);
+	 if(ret != 0)
+	 {
+		  PVFS_perror("PVFS_util_resolve", ret);
+		  return ret;
+	 }
+
+	 PVFS_util_gen_credentials(&credentials);
+
+	 pvfs_error = PVFS_sys_lookup(
+		  cur_fs, basepath, &credentials, &lookup_resp, 
+		  PVFS2_LOOKUP_LINK_NO_FOLLOW);
+	 if(pvfs_error != 0)
+	 {
+		  PVFS_perror("PVFS_sys_lookup", pvfs_error);
+		  return PVFS_get_errno_mapping(pvfs_error);
+	 }
+
+	 attr.mask = PVFS_ATTR_SYS_ALL_SETABLE;
+	 attr.owner = credentials.uid;
+	 attr.group = credentials.gid;
+	 attr.perms = 1877;
+	 attr.atime = attr.ctime = attr.mtime = time(NULL);
+
+	 /* synchronize with other clients (if any) */
+	 MPI_Barrier(MPI_COMM_WORLD);
+
+	 for(i = 0; i < opt_nfiles; ++i)
+    {
+		  memset(test_file, 0, PATH_MAX);
+		  snprintf(test_file, PATH_MAX, "testfile.%d.%d", rank, i);
+
+		  test_util_start_timing();
+		  pvfs_error = PVFS_sys_create(test_file, lookup_resp.ref,
+												 attr, &credentials,
+												 NULL, NULL, &create_resp);
+		  test_util_stop_timing();
+		  if(pvfs_error != 0)
+		  {
+				PVFS_perror("PVFS_sys_craete", pvfs_error);
+				return PVFS_get_errno_mapping(pvfs_error);
+		  }
+
+		  test_util_print_timing(rank);
+	 }
+	 
+	 for(i = 0; i < opt_nfiles; ++i)
+	 {
+		  memset(test_file, 0, PATH_MAX);
+		  snprintf(test_file, PATH_MAX, "testfile.%d.%d", rank, i);
+
+		  pvfs_error = PVFS_sys_remove(test_file, lookup_resp.ref, &credentials);
+		  if(pvfs_error != 0)
+		  {
+				fprintf(stderr, "Failed to remove: %s\n", test_file);
+				PVFS_perror("PVFS_sys_remove", pvfs_error);
+				return PVFS_get_errno_mapping(pvfs_error);
+		  }
+	 }
+
+	 MPI_Finalize();
+    return 0;
+}
+
+ 
+/*
+ * Local variables:
+ *  c-indent-level: 3
+ *  c-basic-offset: 3
+ *  tab-width: 3
+ *
+ * vim: ts=3
+ * End:
+ */ 
+
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/mpi-create-test.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/mpi-create-test.c	(revision 5012)
+++ /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/mpi-create-test.c	(revision 5012)
@@ -0,0 +1,146 @@
+/*
+ * usage:  -d /path/to/directory -n number_of_files
+ */
+
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <limits.h>
+#include <unistd.h>
+#include <assert.h>
+#include <mpi.h>
+#include <math.h>
+
+#ifndef PATH_MAX
+#define PATH_MAX FILENAME_MAX
+#endif
+
+extern char *optarg;
+int opt_nfiles = -1;
+char opt_basedir[PATH_MAX];
+int opt_dirarg = -1;
+
+void usage(char *name);
+int parse_args(int argc, char **argv);
+void handle_error(int errcode, char *str);
+
+void usage(char *name)
+{
+    fprintf(stderr, "usage: %s -d /path/to/directory -n #_of_files\n", name);
+    exit(-1);
+}
+int parse_args(int argc, char **argv)
+{
+    int c;
+
+	 if(argc < 3)
+	 {
+		  usage(argv[0]);
+	 }
+
+    while ( (c = getopt(argc, argv, "d:n:")) != -1 ) {
+		  switch (c) {
+				case 'd':
+					 snprintf(opt_basedir, PATH_MAX, "pvfs2:%s", optarg);
+					 opt_dirarg = 1;
+					 break;
+				case 'n':
+					 opt_nfiles = atoi(optarg);
+					 break;
+				case '?':
+				case ':':
+				default:
+					 usage(argv[0]);
+		  }
+	 }
+
+	 if(opt_nfiles == -1 || opt_dirarg == -1)
+	 {
+		  usage(argv[0]);
+	 }
+
+	 return 0;
+}
+
+void handle_error(int errcode, char *str)
+{
+    char msg[MPI_MAX_ERROR_STRING];
+    int resultlen;
+    MPI_Error_string(errcode, msg, &resultlen);
+    fprintf(stderr, "%s: %s\n", str, msg);
+    MPI_Abort(MPI_COMM_WORLD, 1);
+}
+
+
+int main(int argc, char **argv)
+{
+    int i;
+	 char test_file[PATH_MAX];
+    MPI_File fh;
+    int errcode;
+
+    int rank, nprocs;
+    MPI_Info info;
+    double test_start, test_end;
+	 double time, maxtime;
+
+    MPI_Init(&argc, &argv);
+    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+    MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
+
+    parse_args(argc, argv);
+
+    /* provide hints if you want  */
+    info = MPI_INFO_NULL;
+
+	 if (rank == 0)
+	 {
+		  printf("\nprocs: %d\nops: %d\n===========\n", nprocs, opt_nfiles);
+	 }
+
+    for(i = 0; i < opt_nfiles; ++i)
+    {
+		  snprintf(test_file, PATH_MAX, "%s/testfile.%d", opt_basedir, i);
+		  test_start = MPI_Wtime();
+
+		  errcode = MPI_File_open(MPI_COMM_WORLD, test_file, 
+										  MPI_MODE_CREATE|MPI_MODE_RDWR, 
+										  info, &fh); 
+		  if(errcode != MPI_SUCCESS)
+		  {
+				handle_error(errcode, "MPI_File_open");
+		  }
+
+		  test_end = MPI_Wtime();
+		  time = test_end - test_start;
+
+		  MPI_Allreduce(&time, &maxtime, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD);
+
+		  if (rank == 0) {
+				printf("%d\t%d\t%f\n", rank, i, maxtime);
+		  }
+
+  		  errcode = MPI_File_close(&fh);
+		  if(errcode != MPI_SUCCESS)
+		  {
+				handle_error(errcode, "MPI_File_close");
+		  }
+
+		  MPI_File_delete(test_file, info);
+	 }
+
+    MPI_Finalize();
+    return 0;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 3
+ *  c-basic-offset: 3
+ *  tab-width: 3
+ *
+ * vim: ts=3
+ * End:
+ */ 
+
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/create-subdir-test.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/create-subdir-test.c	(revision 6373)
+++ /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/create-subdir-test.c	(revision 6373)
@@ -0,0 +1,200 @@
+/*
+ * usage:  -d /path/to/directory -n number_of_files
+ */
+
+#include <sys/time.h>
+#include <time.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <limits.h>
+#include <unistd.h>
+#include <assert.h>
+#include <mpi.h>
+#include "pvfs2-sysint.h"
+#include "pvfs2-util.h"
+#include "benchmark-utils.h"
+
+#ifndef PATH_MAX
+#define PATH_MAX FILENAME_MAX
+#endif
+
+extern char *optarg;
+int opt_nfiles = -1;
+char opt_basedir[PATH_MAX];
+int opt_dirarg = -1;
+
+void usage(char *name);
+int parse_args(int argc, char **argv);
+void handle_error(int errcode, char *str);
+
+void usage(char *name)
+{
+    fprintf(stderr, "usage: %s -d /path/to/directory -n #_of_files\n", name);
+    exit(-1);
+}
+int parse_args(int argc, char **argv)
+{
+    int c;
+
+	 if(argc < 3)
+	 {
+		  usage(argv[0]);
+	 }
+
+    while ( (c = getopt(argc, argv, "d:n:")) != -1 ) {
+		  switch (c) {
+				case 'd':
+					 strncpy(opt_basedir, optarg, PATH_MAX);
+					 opt_dirarg = 1;
+					 break;
+				case 'n':
+					 opt_nfiles = atoi(optarg);
+					 break;
+				case '?':
+				case ':':
+				default:
+					 usage(argv[0]);
+		  }
+	 }
+
+	 if(opt_nfiles == -1 || opt_dirarg == -1)
+	 {
+		  usage(argv[0]);
+	 }
+
+	 return 0;
+}
+
+void handle_error(int errcode, char *str)
+{
+    char msg[MPI_MAX_ERROR_STRING];
+    int resultlen;
+    MPI_Error_string(errcode, msg, &resultlen);
+    fprintf(stderr, "%s: %s\n", str, msg);
+    MPI_Abort(MPI_COMM_WORLD, 1);
+}
+
+
+int main(int argc, char **argv)
+{
+	 PVFS_error pvfs_error;
+    int i;
+	 char test_file[PATH_MAX];
+	 char test_dir[PATH_MAX];
+	 PVFS_sys_attr attr;
+	 PVFS_fs_id cur_fs;
+	 PVFS_credentials credentials;
+	 PVFS_sysresp_lookup lookup_resp;
+	 PVFS_sysresp_create create_resp;
+	 PVFS_sysresp_mkdir mkdir_resp;
+	 char basepath[PATH_MAX];
+	 
+    int rank, nprocs, ret;
+    MPI_Info info;
+
+    MPI_Init(&argc, &argv);
+    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+    MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
+
+    parse_args(argc, argv);
+
+    /* provide hints if you want  */
+    info = MPI_INFO_NULL;
+
+	 if (rank == 0)
+	 {
+		  printf("\nprocs: %d\nops: %d\n===========\n", nprocs, opt_nfiles);
+	 }
+
+	 ret = PVFS_util_init_defaults();
+	 if(ret != 0)
+	 {
+		  PVFS_perror("PVFS_util_init_defaults", ret);
+		  return ret;
+	 }
+
+	 ret = PVFS_util_resolve(opt_basedir, &cur_fs, basepath, PATH_MAX);
+	 if(ret != 0)
+	 {
+		  PVFS_perror("PVFS_util_resolve", ret);
+		  return ret;
+	 }
+
+	 PVFS_util_gen_credentials(&credentials);
+
+	 attr.mask = PVFS_ATTR_SYS_ALL_SETABLE;
+	 attr.owner = credentials.uid;
+	 attr.group = credentials.gid;
+	 attr.perms = 1877;
+	 attr.atime = attr.ctime = attr.mtime = time(NULL);
+
+	 pvfs_error = PVFS_sys_lookup(
+		  cur_fs, basepath, &credentials, &lookup_resp, 
+		  PVFS2_LOOKUP_LINK_NO_FOLLOW);
+	 if(pvfs_error != 0)
+	 {
+		  PVFS_perror("PVFS_sys_lookup", pvfs_error);
+		  return PVFS_get_errno_mapping(pvfs_error);
+	 }
+
+	 snprintf(test_dir, PATH_MAX, "testdir.%d", rank);
+	 pvfs_error = PVFS_sys_mkdir(
+		  test_dir, lookup_resp.ref, attr, &credentials, &mkdir_resp);
+	 if(pvfs_error != 0)
+	 {
+		  PVFS_perror("PVFS_sys_lookup", pvfs_error);
+		  return PVFS_get_errno_mapping(pvfs_error);
+	 }
+
+	 /* synchronize with other clients (if any) */
+	 MPI_Barrier(MPI_COMM_WORLD);
+
+	 for(i = 0; i < opt_nfiles; ++i)
+    {
+		  memset(test_file, 0, PATH_MAX);
+		  snprintf(test_file, PATH_MAX, "testfile.%d.%d", rank, i);
+
+		  test_util_start_timing();
+		  pvfs_error = PVFS_sys_create(test_file, mkdir_resp.ref,
+												 attr, &credentials,
+												 NULL, NULL, &create_resp);
+		  test_util_stop_timing();
+		  if(pvfs_error != 0)
+		  {
+				PVFS_perror("PVFS_sys_craete", pvfs_error);
+				return PVFS_get_errno_mapping(pvfs_error);
+		  }
+
+		  test_util_print_timing(rank);
+
+		  pvfs_error = PVFS_sys_remove(test_file, mkdir_resp.ref, &credentials);
+		  if(pvfs_error != 0)
+		  {
+				PVFS_perror("PVFS_sys_remove", pvfs_error);
+				return PVFS_get_errno_mapping(pvfs_error);
+		  }
+	 }
+
+	 pvfs_error = PVFS_sys_remove(test_dir, lookup_resp.ref, &credentials);
+	 if(pvfs_error != 0)
+	 {
+		  PVFS_perror("PVFS_sys_remove", pvfs_error);
+		  return PVFS_get_errno_mapping(pvfs_error);
+	 }
+
+	 MPI_Finalize();
+    return 0;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 3
+ *  c-basic-offset: 3
+ *  tab-width: 3
+ *
+ * vim: ts=3
+ * End:
+ */ 
+
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/benchmark-utils.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/benchmark-utils.c	(revision 7924)
+++ /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/benchmark-utils.c	(revision 7924)
@@ -0,0 +1,256 @@
+
+#include "benchmark-utils.h"
+#include "pvfs2-internal.h"
+#include <stdlib.h>
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+#include <string.h>
+#include <stdio.h>
+#include <math.h>
+
+static struct PVFS_mgmt_perf_stat ** perf_matrix;
+static uint32_t * next_id_array;
+static uint64_t * end_time_ms_array;
+static PVFS_BMI_addr_t * addr_array;
+
+#define HISTORY 5
+
+int test_util_init_perfs(
+    PVFS_fs_id cur_fs,
+    PVFS_credentials creds,
+    int32_t flags,
+    int * server_count)
+{
+    int ret, i;
+    int count;
+
+    /* count how many meta servers we have */
+    ret = PVFS_mgmt_count_servers(cur_fs, &creds, flags,
+				  server_count);
+    if(ret < 0)
+    {
+	PVFS_perror("PVFS_mgmt_count_servers", ret);
+	return(ret);
+    }
+
+    count = *server_count;
+    /* allocate a 2 dimensional array for statistics */
+    perf_matrix = (struct PVFS_mgmt_perf_stat**)malloc(
+	count*sizeof(struct PVFS_mgmt_perf_stat*));
+    if(!perf_matrix)
+    {
+	PVFS_perror("malloc", -1);
+	return(-1);
+    }
+    for(i=0; i<count; i++)
+    {
+	perf_matrix[i] = (struct PVFS_mgmt_perf_stat *)
+	    malloc(HISTORY * sizeof(struct PVFS_mgmt_perf_stat));
+	if (perf_matrix[i] == NULL)
+	{
+	    PVFS_perror("malloc", -1);
+	    return -1;
+	}
+    }
+
+    /* allocate an array to keep up with what iteration of statistics
+     * we need from each server 
+     */
+    next_id_array = (uint32_t *) malloc(count * sizeof(uint32_t));
+    if (next_id_array == NULL)
+    {
+	PVFS_perror("malloc", -1);
+	return -1;
+    }
+    memset(next_id_array, 0, count*sizeof(uint32_t));
+
+    /* allocate an array to keep up with end times from each server */
+    end_time_ms_array = (uint64_t *)
+	malloc(count * sizeof(uint64_t));
+    if (end_time_ms_array == NULL)
+    {
+	PVFS_perror("malloc", -1);
+	return -1;
+    }
+
+    /* build a list of servers to talk to */
+    addr_array = (PVFS_BMI_addr_t *)
+	malloc(count * sizeof(PVFS_BMI_addr_t));
+    if (addr_array == NULL)
+    {
+	PVFS_perror("malloc", -1);
+	return -1;
+    }
+    ret = PVFS_mgmt_get_server_array(cur_fs,
+				     &creds,
+				     flags,
+				     addr_array,
+				     &count);
+    if (ret < 0)
+    {
+	PVFS_perror("PVFS_mgmt_get_server_array", ret);
+	return -1;
+    }
+
+    return 0;
+
+}
+
+int test_util_get_io_perfs(
+    PVFS_fs_id cur_fs,
+    PVFS_credentials creds,
+    int count)
+{
+    int ret, i, j;
+    ret = PVFS_mgmt_perf_mon_list(
+	cur_fs, &creds, perf_matrix, 
+	end_time_ms_array, addr_array, next_id_array,
+	count, HISTORY, NULL, NULL);
+    if(ret < 0)
+    {
+	PVFS_perror("PVFS_mgmt_perf_mon_list", ret);
+	return -1;
+    }
+
+    for(i = 0; i < count; i++)
+    {
+	for(j = 0; j < HISTORY; ++j)
+	{
+	    if(!perf_matrix[i][j].valid_flag)
+	    {
+		break;
+	    }
+
+	    printf("%d\t%llu\t%lld\t%lld\n",
+		   count,
+		   llu(perf_matrix[i][j].start_time_ms),
+		   lld(perf_matrix[i][j].write),
+		   lld(perf_matrix[i][j].read));
+	}
+    }
+
+    return 0;
+}
+
+
+int test_util_get_metadata_perfs(
+    PVFS_fs_id cur_fs,
+    PVFS_credentials creds,
+    int count)
+{
+    int ret, i, j;
+    ret = PVFS_mgmt_perf_mon_list(
+	cur_fs, &creds, perf_matrix, 
+	end_time_ms_array, addr_array, next_id_array,
+	count, HISTORY, NULL, NULL);
+    if(ret < 0)
+    {
+	PVFS_perror("PVFS_mgmt_perf_mon_list", ret);
+	return -1;
+    }
+
+    for(i = 0; i < count; i++)
+    {
+	for(j = 0; j < HISTORY; ++j)
+	{
+	    if(!perf_matrix[i][j].valid_flag)
+	    {
+		break;
+	    }
+
+	    printf("%d\t%llu\t%lld\t%lld\n",
+		   count,
+		   llu(perf_matrix[i][j].start_time_ms),
+		   lld(perf_matrix[i][j].metadata_write),
+		   lld(perf_matrix[i][j].metadata_read));
+	}
+    }
+
+    return 0;
+}
+
+int test_util_get_queue_perfs(
+    PVFS_fs_id cur_fs,
+    PVFS_credentials creds,
+    int count)
+{
+    int ret, i, j;
+    ret = PVFS_mgmt_perf_mon_list(
+	cur_fs, &creds, perf_matrix, 
+	end_time_ms_array, addr_array, next_id_array,
+	count, HISTORY, NULL, NULL);
+    if(ret < 0)
+    {
+	PVFS_perror("PVFS_mgmt_perf_mon_list", ret);
+	return -1;
+    }
+
+    for(i = 0; i < count; i++)
+    {
+	for(j = 0; j < HISTORY; ++j)
+	{
+	    if(!perf_matrix[i][j].valid_flag)
+	    {
+		break;
+	    }
+
+	    printf("%d\t%llu\t%u\t%u\t%u\n",
+		   count,
+		   llu(perf_matrix[i][j].start_time_ms),
+		   perf_matrix[i][j].dspace_queue,
+		   perf_matrix[i][j].keyval_queue,
+		   perf_matrix[i][j].reqsched);
+	}
+    }
+
+    return 0;
+}
+
+double results[10000];
+int results_count = 0;
+double result_sum = 0;
+struct timeval start;
+
+void test_util_start_timing(void)
+{
+    gettimeofday(&start, NULL);
+}
+
+
+    
+void test_util_stop_timing(void)
+{
+    double result;
+    struct timeval stop;
+    gettimeofday(&stop, NULL);
+
+    result = (stop.tv_sec + stop.tv_usec * 1e-6) - 
+	     (start.tv_sec + start.tv_usec * 1e-6);
+
+    results[results_count++] = result;
+    result_sum += result;
+}
+
+void test_util_print_timing(int rank)
+{
+    printf("%d\t%d\t%f\n", rank, results_count, results[results_count-1]);
+}
+
+
+void test_util_print_avg_and_dev(void)
+{
+    int i = 0;
+    float avg, dev;
+
+    avg = ((float)result_sum) / results_count;
+
+    dev = 0;
+    for(i = 0; i < results_count; ++i)
+    {
+	dev += (results[i] - avg) * (results[i] - avg);
+    }
+    dev = sqrt(dev / results_count);
+    
+    printf("%d\t%f\t%f\n", results_count, avg, dev);
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/readdir-end-test.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/readdir-end-test.c	(revision 6373)
+++ /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/readdir-end-test.c	(revision 6373)
@@ -0,0 +1,228 @@
+/*
+ * This test is used to measure the performance of
+ * readdir esp. the skipping of directory entries
+ * to reach the desired position.
+ * 
+ * usage: -d /path/to/directory -n #_of_files
+ */
+
+#include <sys/time.h>
+#include <time.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <limits.h>
+#include <unistd.h>
+#include <assert.h>
+#include <mpi.h>
+#include "pvfs2-sysint.h"
+#include "pvfs2-util.h"
+#include "benchmark-utils.h"
+
+#ifndef PATH_MAX
+#define PATH_MAX FILENAME_MAX
+#endif
+
+extern char *optarg;
+int opt_nfiles = -1;
+char opt_basedir[PATH_MAX];
+int opt_dirarg = -1;
+
+void usage(char *name);
+int parse_args(int argc, char **argv);
+void handle_error(int errcode, char *str);
+
+void usage(char *name)
+{
+    fprintf(stderr, "usage: %s -d /path/to/directory -n #_of_files\n", name);
+    exit(-1);
+}
+int parse_args(int argc, char **argv)
+{
+    int c;
+
+	 if(argc < 3)
+	 {
+		  usage(argv[0]);
+	 }
+
+    while ( (c = getopt(argc, argv, "d:n:")) != -1 ) {
+		  switch (c) {
+				case 'd':
+					 strncpy(opt_basedir, optarg, PATH_MAX);
+					 opt_dirarg = 1;
+					 break;
+				case 'n':
+					 opt_nfiles = atoi(optarg);
+					 break;
+				case '?':
+				case ':':
+				default:
+					 usage(argv[0]);
+		  }
+	 }
+
+	 if(opt_nfiles == -1 || opt_dirarg == -1)
+	 {
+		  usage(argv[0]);
+	 }
+
+	 return 0;
+}
+
+void handle_error(int errcode, char *str)
+{
+    char msg[MPI_MAX_ERROR_STRING];
+    int resultlen;
+    MPI_Error_string(errcode, msg, &resultlen);
+    fprintf(stderr, "%s: %s\n", str, msg);
+    MPI_Abort(MPI_COMM_WORLD, 1);
+}
+
+
+int main(int argc, char **argv)
+{
+    PVFS_error pvfs_error;
+    int i;
+    char test_file[PATH_MAX];
+    char test_dir[PATH_MAX];
+    PVFS_sys_attr attr;
+    PVFS_fs_id cur_fs;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup lookup_resp;
+    PVFS_sysresp_create create_resp;
+    PVFS_sysresp_mkdir mkdir_resp;
+	 PVFS_sysresp_readdir readdir_resp;
+    char basepath[PATH_MAX];
+
+    int rank, nprocs, ret;
+    MPI_Info info;
+	 int tok;
+
+    MPI_Init(&argc, &argv);
+    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+    MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
+
+    parse_args(argc, argv);
+
+    info = MPI_INFO_NULL;
+
+    if(rank == 0)
+    {
+		  printf("\nprocs: %d\nops: %d\n==========\n", nprocs, opt_nfiles);
+    }
+
+    ret = PVFS_util_init_defaults();
+    if(ret != 0)
+    {
+		  PVFS_perror("PVFS_util_init_defaults", ret);
+		  return ret;
+    }
+
+    ret = PVFS_util_resolve(opt_basedir, &cur_fs, basepath, PATH_MAX);
+    if(ret != 0)
+    {
+		  PVFS_perror("PVFS_util_resolve", ret);
+		  return ret;
+    }
+
+    PVFS_util_gen_credentials(&credentials);
+
+    attr.mask = PVFS_ATTR_SYS_ALL_SETABLE;
+    attr.owner = credentials.uid;
+    attr.group = credentials.gid;
+    attr.perms = 1877;
+    attr.atime = attr.ctime = attr.mtime = time(NULL);
+
+	 pvfs_error = PVFS_sys_lookup(
+		  cur_fs, basepath, &credentials, &lookup_resp,
+		  PVFS2_LOOKUP_LINK_NO_FOLLOW);
+	 if(pvfs_error != 0)
+	 {
+		  PVFS_perror("PVFS_sys_lookup", pvfs_error);
+		  return PVFS_get_errno_mapping(pvfs_error);
+	 }
+
+	 snprintf(test_dir, PATH_MAX, "testdir.%d", rank);
+	 pvfs_error = PVFS_sys_mkdir(
+		  test_dir, lookup_resp.ref, attr, &credentials, &mkdir_resp);
+	 if(pvfs_error != 0)
+	 {
+		  PVFS_perror("PVFS_sys_lookup", pvfs_error);
+		  return PVFS_get_errno_mapping(pvfs_error);
+	 }
+
+	 for(i = 0; i < opt_nfiles; ++i)
+	 {
+		  memset(test_file, 0, PATH_MAX);
+		  snprintf(test_file, PATH_MAX, "testfile.%d.%d", rank, i);
+
+		  pvfs_error = PVFS_sys_create(test_file, mkdir_resp.ref,
+												 attr, &credentials,
+												 NULL, NULL, &create_resp);
+		  if(pvfs_error != 0)
+		  {
+				PVFS_perror("PVFS_sys_create", pvfs_error);
+				return PVFS_get_errno_mapping(pvfs_error);
+		  }
+    }
+
+  	 MPI_Barrier(MPI_COMM_WORLD);
+	 tok = PVFS_READDIR_START;
+
+    for(i = 0; i < opt_nfiles; ++i)
+    {
+		  test_util_start_timing();
+
+		  pvfs_error = PVFS_sys_readdir(
+				mkdir_resp.ref,
+				tok,
+				1,
+				&credentials,
+				&readdir_resp);
+		  if(pvfs_error != 0)
+		  {
+				PVFS_perror("PVFS_sys_readdir", pvfs_error);
+				return PVFS_get_errno_mapping(pvfs_error);
+		  }
+
+		  test_util_stop_timing();
+		  tok = readdir_resp.token;
+		  
+		  test_util_print_timing(rank);
+	 }
+
+    for(i = 0; i < opt_nfiles; ++i)
+    {
+		  memset(test_file, 0, PATH_MAX);
+		  snprintf(test_file, PATH_MAX, "testfile.%d.%d", rank, i);
+
+		  pvfs_error = PVFS_sys_remove(
+				test_file, mkdir_resp.ref, &credentials);
+		  if(pvfs_error != 0)
+		  {
+				PVFS_perror("PVFS_sys_remove", pvfs_error);
+				return PVFS_get_errno_mapping(pvfs_error);
+		  }
+    }
+
+    pvfs_error = PVFS_sys_remove(test_dir, lookup_resp.ref, &credentials);
+    if(pvfs_error != 0)
+    {
+		  PVFS_perror("PVFS_sys_remove", pvfs_error);
+		  return PVFS_get_errno_mapping(pvfs_error);
+    }
+
+    MPI_Finalize();
+    return 0;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 3
+ *  c-basic-offset: 3
+ *  tab-width: 3
+ *
+ * vim: ts=3
+ * End:
+ */ 
Index: /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/benchmark-utils.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/benchmark-utils.h	(revision 5012)
+++ /tags/B2O-Blue-Sync-Temp-End/test/perfbase/benchmarks/benchmark-utils.h	(revision 5012)
@@ -0,0 +1,34 @@
+
+#ifndef BENCHMARK_UTILS
+#define BENCHMARK_UTILS
+
+#include "pvfs2-types.h"
+#include "pvfs2-mgmt.h"
+
+int test_util_init_perfs(
+    PVFS_fs_id cur_fs,
+    PVFS_credentials creds,
+    int32_t flags,
+    int * server_count);
+
+int test_util_get_queue_perfs(
+    PVFS_fs_id cur_fs,
+    PVFS_credentials creds,
+    int count);
+
+int test_util_get_io_perfs(
+    PVFS_fs_id cur_fs,
+    PVFS_credentials creds,
+    int count);
+
+int test_util_get_metadata_perfs(
+    PVFS_fs_id cur_fs,
+    PVFS_credentials creds,
+    int count);
+
+void test_util_start_timing(void);
+void test_util_stop_timing(void);
+void test_util_print_avg_and_dev(void);
+void test_util_print_timing(int rank);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/id-generator/module.mk.in
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/id-generator/module.mk.in	(revision 5663)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/id-generator/module.mk.in	(revision 5663)
@@ -0,0 +1,2 @@
+DIR := common/id-generator
+TESTSRC += $(DIR)/test.c
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/id-generator/test.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/id-generator/test.c	(revision 7500)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/id-generator/test.c	(revision 7500)
@@ -0,0 +1,81 @@
+/*
+ * copyright (c) 2000 Clemson University, all rights reserved.
+ *
+ * Written by Phil Carns.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify
+ * it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License,
+ * or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Contacts:  Phil Carns  pcarns@parl.clemson.edu
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "pvfs2.h"
+#include "id-generator.h"
+
+/* This code is a pretty pointless example.  It just generates a handle
+ * for a structure and then uses it elsewhere.  The concept isn't
+ * particularly useful unless you wish to hide the data type that you
+ * are actually representing with the handle.
+ */
+
+typedef PVFS_id_gen_t example_handle;
+
+struct example_struct{
+	int x;
+	int y;
+	int z;
+};
+
+int print_example(example_handle my_handle);
+
+int main(int argc, char **argv)	{
+
+	example_handle my_handle;
+	struct example_struct my_example;
+
+	my_example.x = 1;
+	my_example.y = 2;
+	my_example.z = 3;
+	
+	id_gen_fast_register(&my_handle, &my_example);
+	if(my_handle == 0)
+	{
+		printf("register failed.\n");
+		exit(0);
+	}
+
+	print_example(my_handle);
+
+	return(0);
+}
+
+
+int print_example(example_handle my_handle){
+
+	struct example_struct* foo;
+
+	foo = id_gen_fast_lookup(my_handle);
+	if(!foo)
+	{
+		printf("lookup failed.\n");
+		exit(0);
+	}
+
+	printf("%d, %d, %d.\n", foo->x, foo->y, foo->z);
+	
+	return(0);
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/gen-locks/module.mk.in
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/gen-locks/module.mk.in	(revision 7662)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/gen-locks/module.mk.in	(revision 7662)
@@ -0,0 +1,2 @@
+DIR := common/gen-locks
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/gossip/module.mk.in
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/gossip/module.mk.in	(revision 7751)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/gossip/module.mk.in	(revision 7751)
@@ -0,0 +1,4 @@
+DIR := common/gossip
+TESTSRC += \
+	$(DIR)/test-gossip.c \
+	$(DIR)/time-gossip.c
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/gossip/time-gossip.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/gossip/time-gossip.c	(revision 5)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/gossip/time-gossip.c	(revision 5)
@@ -0,0 +1,68 @@
+#include <math.h>
+#include <stdlib.h>
+#include <sys/time.h>
+
+#include <gossip.h>
+
+enum{
+	DEBUG_SOME_STUFF = 1,
+};
+
+
+double Wtime(void);
+
+int main(int argc, char **argv)	{
+	unsigned int iter = 500000;
+	unsigned int i;
+	float x = 5;
+	float y = 0;
+	double time1, time2, time3;
+	
+	/* try the stderr method first */
+	gossip_enable_stderr();
+
+	/* now let's turn off debugging */
+	gossip_set_debug_mask(0,0);
+
+	time1 = Wtime();
+
+	for(i=0; i<iter; i++)
+	{
+		x += 3;
+		y = x*53;
+		/* try a normal debugging message w/ line numbers */
+		gossip_ldebug(DEBUG_SOME_STUFF, "This shouldn't print!\n");
+	}
+
+	time2 = Wtime();
+
+	for(i=0; i<iter; i++)
+	{
+		x += 3;
+		y = x*53;
+		/* no debugging message */
+	}
+
+	time3 = Wtime();
+
+	/* turn debugging back on to print out some messages */
+	gossip_set_debug_mask(1,DEBUG_SOME_STUFF);
+
+	/* print a normal debugging message */
+	gossip_ldebug(DEBUG_SOME_STUFF, "Timing information:\n");
+	gossip_ldebug(DEBUG_SOME_STUFF, "%u iterations, w/ debugging statment: %f seconds\n", iter, (time2 - time1));
+	gossip_ldebug(DEBUG_SOME_STUFF, "%u iterations, w/ debugging statment: %f seconds\n", iter, (time3 - time2));
+
+	/* shutdown gossip */
+	gossip_disable();
+
+	return(0);
+}
+
+double Wtime(void)
+{
+	struct timeval t;
+
+	gettimeofday(&t, NULL);
+	return((double)t.tv_sec + (double)t.tv_usec / 1000000);
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/gossip/test-gossip.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/gossip/test-gossip.c	(revision 5)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/gossip/test-gossip.c	(revision 5)
@@ -0,0 +1,68 @@
+#include <gossip.h>
+
+enum{
+	DEBUG_SOME_STUFF = 1,
+	DEBUG_OTHER_STUFF = 2,
+	DEBUG_BAD_STUFF = 4
+};
+
+int main(int argc, char **argv)	{
+
+	int foo = 8675309;
+	
+	/* try the stderr method first */
+	gossip_enable_stderr();
+
+	/* turn on debugging and look for some stuff or other stuff :) */
+	gossip_set_debug_mask(1, DEBUG_SOME_STUFF|DEBUG_OTHER_STUFF);
+
+	/* try a normal debugging message */
+	gossip_debug(DEBUG_SOME_STUFF, "Hello, normal debugging.\n");
+
+	/* try it with line numbers */
+	gossip_ldebug(DEBUG_SOME_STUFF, "Debugging w/ line numbers.\n");
+
+	/* use printf style arguments */
+	gossip_ldebug(DEBUG_SOME_STUFF, "Value of foo: %d\n", foo);
+
+	/* try to log something that doesn't match the mask we set */
+	gossip_debug(DEBUG_BAD_STUFF, "This shouldn't print!\n");
+
+	/* try printing a critical error */
+	gossip_err("Critical error message.\n");
+
+
+	/* now, let's turn off debugging on the fly */
+	gossip_set_debug_mask(0,0);
+
+	/* try a normal debugging message w/ line numbers */
+	gossip_ldebug(DEBUG_SOME_STUFF, "This shouldn't print!\n");
+
+	/* try printing a critical error */
+	gossip_lerr("Error messages print even when debugging is off!\n");
+       
+	
+	/* switch to file logging on the fly */
+	gossip_enable_file("test.log", "w");
+
+	/* turn debugging back on for some stuff */
+	gossip_set_debug_mask(1,DEBUG_SOME_STUFF);
+
+	/* print a normal debugging message */
+	gossip_ldebug(DEBUG_SOME_STUFF, "This should print into a file.\n");
+
+
+	/* switch to syslog logging on the fly */
+	gossip_enable_syslog(LOG_USER);
+
+	/* print a normal debugging message */
+	/* commented out because it is annoying if you don't redirect stderr */
+	/*
+	gossip_ldebug(DEBUG_SOME_STUFF, "This should print in syslog.\n");
+	*/
+
+	/* shutdown gossip */
+	gossip_disable();
+
+	return(0);
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_check
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_check	(revision 2280)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_check	(revision 2280)
@@ -0,0 +1,169 @@
+#!/usr/bin/perl -w
+
+use Getopt::Long;
+use POSIX "sys_wait_h";
+use File::Basename;
+
+#globals
+my $session_file;
+my %config;
+my $rc = 0;
+my $pid;
+
+if (init()) {
+    exit 1;
+}
+
+if ($args{'ping'}) {
+    $rc = ping_test(\%config);
+    if ($rc) {
+	print STDERR "WARNING: ping test failed on node $rc, trying to recover\n";
+	$rc = recover_from_bad(\%config, $rc);
+	exit($rc);
+    }
+}
+
+if ($args{'one-all'}) {
+    $rc = one_all_test(\%config);
+    if ($rc) {
+	print STDERR "WARNING: basic remote command one to all test failed on node $rc, trying to recover\n";
+	$rc = recover_from_bad(\%config, $rc);
+	exit($rc);
+    }
+}
+
+if ($args{'each-all'}) {
+    $rc = each_all_test(\%config);
+    if ($rc) {
+	print STDERR "WARNING: extended remote command each to all test failed on node $rc, trying to recover\n";
+	$rc = recover_from_bad(\%config, $rc);
+	exit($rc);
+    }
+}
+
+exit(0);
+
+sub each_all_test {
+    print STDERR "WARNING: test not implimented yet\n";
+    return(0);
+}
+
+sub one_all_test {
+    my $href = shift;
+
+    my @nodes = (@{$href->{'IONODES'}}, @{$href->{'COMPNODES'}});
+
+    if ($href->{'UNIQUEMETA'}) {
+	@nodes = (@nodes, @{$href->{'MGR'}});
+    }
+
+    my $cmd = "%node echo hello world";
+    $cmd = "%node uname -a";
+
+    $rc = do_remote_command($href->{'RCMDPROG'}, 8, 20, $cmd, undef, undef, @nodes);
+    return($rc);
+}
+
+sub ping_test {
+    my $href = shift;
+
+    my @nodes = (@{$href->{'IONODES'}}, @{$href->{'COMPNODES'}});
+
+    if ($href->{'UNIQUEMETA'}) {
+	@nodes = (@nodes, @{$href->{'MGR'}});
+    }
+    my $cmd = "-c 1 %node >/dev/null 2>&1";
+    $rc = do_remote_command("ping", 8, 5, $cmd, undef, undef, @nodes);
+    return($rc);
+}
+    
+
+sub usage {
+
+    print<<EOF;
+Usage: $prog_name [option]
+-s -session       session file for PAV to use
+-sd -sessiondir   directory containing session file 'pvfs_autosession'
+-rsh              remote shell command to use (default 'ssh')
+-rcp              remote copy command to use (default 'scp')
+-h -help          display this message
+EOF
+}
+
+sub init {
+    GetOptions(\%args,
+	       's|session:s',
+	       'sd|sessiondir:s',
+	       'rsh:s',
+	       'rcp:s',
+	       'r|root:s',
+	       'h|help',
+	       'ping',
+	       'one-all',
+	       'each-all',
+	       'pvfs-vol',
+	       'pvfs-size'
+	       );
+
+    if ($args{'h'}) {
+	usage();
+	return(1);
+    }
+
+    if ($args{'s'}) {
+	$session_file = $args{'s'};
+    } elsif ($args{'sd'}) {
+	$session_file = $args{'sd'} . "/pvfs_autosession";
+    } else {
+	usage();
+	return(1);
+    }
+
+    if (!-f $session_file) {
+	print STDERR "ERROR: cannot find session file: $session_file\n";
+	return(1);
+    }
+
+    %config = ('RCMDPROG' => "ssh",
+	       'RCPPROG' => "scp",
+	       'PROGROOT' => "./"
+	       );
+
+    $config{'PROGROOT'} = $args{'r'} || real_dir($0) || $config{'PROGROOT'};
+    my $prog_root = $config{'PROGROOT'};
+    require "$prog_root/pav_lib.pl";
+
+    $rc = read_sessionfile($session_file, \%config);
+    if ($rc) {
+	print STDERR "ERROR: cannot read session file\n";
+	return(1);
+    }
+
+    $config{'RCMDPROG'} = $args{'rsh'} || $config{'RCMDPROG'};
+    $config{'RCPPROG'} = $args{'rcp'} || $config{'RCPPROG'};
+
+    $prog_name = $0;
+    $pid = $$;
+
+    return(0);
+}
+
+sub real_dir {
+   my ($file, $reldir, $suffix) = fileparse(shift);
+   my ($realdir, $envpwd);
+
+   if ($reldir =~ /^\//) {
+      $realdir = $reldir;
+   } else {
+      if (!$ENV{PWD}) {
+         chomp($envpwd = `pwd`);
+      } else {
+         $envpwd = $ENV{PWD};
+      }
+      $realdir = $envpwd . "/$reldir";
+   }
+   $realdir .= '/';
+   $realdir =~ s#/./#/#g;
+   $realdir =~ s#//#/#g;
+   return($realdir);
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_lib.pl
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_lib.pl	(revision 4073)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_lib.pl	(revision 4073)
@@ -0,0 +1,296 @@
+sub recover_from_bad {
+    my $href = shift;
+    my $badnode = shift;
+
+    my @compnodes = @{$href->{'COMPNODES'}};
+    my @ionodes = @{$href->{'IONODES'}};
+    my @metanodes = @{$href->{'MGR'}};
+
+    if (@compnodes) {
+	my $newnode = pop(@compnodes);
+	$href->{'COMPNODES'} = \@compnodes;
+
+	foreach $meta (@metanodes) {
+		my $tmpnode;
+		if ($meta eq $badnode) {
+			$tmpnode = $newnode;
+		} else {
+			$tmpnode = $ionode;
+		}
+		@tmp = (@tmp, $tmpnode);
+	}
+	$href->{'MGR'} = \@tmp;
+
+	foreach $ionode (@ionodes) {
+	    my $tmpnode;
+	    
+	    if ($ionode eq $badnode) {
+		$tmpnode = $newnode;
+	    } else {
+		$tmpnode = $ionode;
+	    }
+	    
+	    @tmp = (@tmp, $tmpnode);
+	}
+	
+	$href->{'IONODES'} = \@tmp;
+    } else {
+	print STDERR "ERROR: all nodes in use! cannot attempt recovery, please add more nodes to your machinefile or remove the bad node '$badnode'\n";
+	return(2);
+    }
+
+    $rc = create_sessionfile($href);
+    if ($rc) {
+	print STDERR "ERROR: cannot create session file with recovery info! ... bailing\n";
+    return(2);
+    } 
+
+    return(1);
+}
+
+
+sub create_sessionfile {
+    my $href = shift;
+
+    my $ofile = $href->{'WORKINGDIR'} . "/pvfs_autosession";
+    my $val = '';
+
+    if (!open(FH, ">$ofile")) {
+	print STDERR "ERROR: cannot open file: $ofile\n";
+	return(1);
+    }
+
+    foreach $key (keys(%{$href})) {
+	if ($key eq "IONODES" || $key eq "COMPNODES" || $key eq "MGR") {
+	    $val = join(',', @{$href->{"$key"}});
+	} else {
+	    $val = $href->{"$key"};
+	}
+
+	print FH "$key=$val\n";
+    }
+
+    close(FH);
+    return(0);
+}
+
+sub uniq(@)
+{
+    my %seen = ();
+    my @tmp_uniq;
+    my $item;
+    foreach $item (@_) {
+	push(@tmp_uniq, $item) unless $seen{$item}++;
+    }
+    return(@tmp_uniq);
+}
+
+# executes "$_[1]" instances of remote-execing command "$_[0]" (rsh or ssh),
+# giving up after "$_[2]" seconds.  The remote machine will execute "$_[3]".  
+# XXX: i don't know what $precmd and $postcmd will do
+# Every machine in @nodes will run this command.
+#
+# all instances of '%node' in $_[3] will be replaced with the node name
+
+sub do_remote_command {
+    my $prog = shift;
+    my $numprocs = shift;
+    my $timeout = shift;
+    my $cmd = shift;
+    my $precmd = shift;
+    my $postcmd = shift;
+    my @nodes = @_;
+    my $pcount = 0;
+    my %nodecommand;
+
+    @nodes = uniq(sort(@nodes));
+    foreach $node (@nodes) {
+	my $nodecmd = $cmd;
+	$nodecmd =~ s/%node/$node/g;
+	$nodecmd = "$prog $nodecmd";
+
+	#run Pre cmd
+	if ($precmd) {
+	    $prc = &$precmd($node);
+	    if ($prc) {
+		print "WARNING: PreCommand failed on node $node\n";
+		next;
+	    }
+	}
+	
+	$nodecommand{$nodecmd} = $node;
+	push(@commands, $nodecmd);
+    }
+
+    my ($todo, $done, $active, $maxrc) = (scalar @commands, 0, 0, 0);
+    my ($pid, $rc, %child);
+
+    while(@commands  ||  $done < $todo) {
+	while (($pid = waitpid(-1, WNOHANG)) > 0) {
+	    if (exists $child{$pid}) {
+		$rc = $? >> 8;
+		$maxrc = $rc if ($rc > $maxrc);
+		if ($rc) {
+		    while(wait() > 0){}
+		    return($rc, $child{$pid});
+		}
+		    
+		$active-- if ($active > 0);
+		$todo--   if ($todo > 0);
+	    }
+	}
+
+	# No commands or at max active
+	unless (@commands && $active < $numprocs) {
+	    select undef, undef, undef, 0.1; # sleep 0.1 seconds
+	    next;
+	} 
+
+	# Fork a command
+	unless ($pid = fork()) { # Child
+	    my $cmd = pop(@commands);
+	    $SIG{ALRM} = \&earlyexit;
+	    alarm($timeout);
+	    
+	    #print "Running remote command $cmd\n";
+	    $rc = system($cmd);
+	    exit($rc >> 8);
+	}
+		
+	my $node = $nodecommand{pop(@commands)};
+	$child{$pid} = $node;
+	$active++;
+    }
+
+
+    foreach $node (@nodes) {
+	#run Post cmd
+	if ($postcmd) {
+	    $prc = &$postcmd($node);
+	    if ($prc) {
+		print "WARNING: PostCommand failed on node $node\n";
+		next;
+	    }
+	}
+
+    }
+
+    return($maxrc);
+}    
+
+sub earlyexit {
+    print STDERR "ERROR: timeout occurred, killing pid $cmdpid, exiting\n";
+    kill(-1, 9);
+    exit(1);
+}
+
+sub dir_parent {
+    my $dir = shift;
+
+    my @breakout = split('/', $dir);
+    
+    while(!$breakout[0]) {
+	shift @breakout;
+    }
+
+    while(!(reverse(@breakout))[0]) {
+	pop(@breakout);
+    }
+
+    pop(@breakout);
+
+    while(!(reverse(@breakout))[0]) {
+	pop(@breakout);
+    }
+
+    my $newdir = "/" . join('/', @breakout);
+    return($newdir);
+}
+
+sub read_sessionfile {
+    my $session_file = shift;
+    my $href = shift;
+
+    my $line_num = 0;
+
+    if (!open(FH, "$session_file")) {
+	print STDERR "ERROR: cannot open session file: $session_file\n";
+	return(1);
+    }
+
+    while(<FH>) {
+	$line_num++;
+	chomp;
+	if (/^#/ || !$_) {
+	    next;
+	}
+	my $line = $_;
+
+	my ($key, $val) = split("=", $line);
+	$val =~ s/\"//g;
+	
+	if ($key eq "IONODES" || $key eq "COMPNODES" || $key eq "MGR") {
+	    my @tmp = split(',', $val);
+	    $href->{"$key"} = \@tmp;
+	} else {
+	    $href->{"$key"} = $val;
+	}
+    }
+    
+    close(FH);
+    return(0);
+}
+
+sub read_configfile {
+    my $config_file = shift;
+    my $href = shift;
+    my $line_num = 0;
+
+    if (!open(FH, "$config_file")) {
+	print STDERR "ERROR: cannot open config file: $config_file\n";
+	return(1);
+    }
+
+    while(<FH>) {
+	$line_num++;
+	chomp;
+	if (/^#/ || !$_) {
+	    next;
+	}
+	my $line = $_;
+
+	# only split the key=val, not embedded '='s
+	my ($key, @val) = split("=", $line);
+	$val = join("=", @val);
+#	print "key: $key val: $val\n";
+
+        if ($val =~ s/^`(.*)`$//) {
+            $val = `$1`;
+            chomp($val);
+        } else {
+	    $val =~ s/"//g;
+	}
+	
+	$href->{"$key"} = $val;
+
+	if ($val =~ /\$/) {
+#	    print "Found var inside val: $val\n";
+	    $val =~ /\$(\w*)/;
+	    my $variable = $1;
+
+	    if (!$href->{"$variable"}) {
+		print STDERR "ERROR: undefined variable '$variable' at line $line_num in config file\n";
+		return(1);
+	    } else {
+		$href->{$key} =~ s/\$$variable/$href->{"$variable"}/g;
+	    }
+	}
+    }
+    
+    close(FH);
+    return(0);
+}
+
+
+
+1
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_clean
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_clean	(revision 2138)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_clean	(revision 2138)
@@ -0,0 +1,113 @@
+#!/usr/bin/perl -w
+
+use Getopt::Long;
+use POSIX "sys_wait_h";
+
+#globals
+my $session_file;
+my %config;
+my $rc = 0;
+my $pid;
+
+if (init()) {
+    exit 1;
+}
+
+#clean out working dir
+$rc = remove_remotedirs(\%config);
+if ($rc) {
+    print "WARNING: remove dir failed on node $rc\n";
+}
+#done
+
+exit(0);
+
+sub remove_remotedirs {
+    my $href = shift;
+    my @ionodes = @{$href->{'IONODES'}};
+    my @compnodes = @{$href->{'COMPNODES'}};
+    my @metas   = @{$href->{'MGR'}};
+    my $rc = 0;
+
+    my $working_dir = $href->{'WORKINGDIR'};
+
+    if ($config{'USERNAME'} eq "root") {
+	print "WARNING: running as root, will be removing '$working_dir', are you sure you want to continue? (y/n): ";
+	chomp(my $yorn = <STDIN>);
+	if ($yorn =~ /n/i) {
+	    return(1);
+	}
+    }
+
+    my $cmd = "%node rm -rf $working_dir";
+    my @nodes = (@ionodes, @compnodes, @metas);
+    $rc = do_remote_command($href->{'RCMDPROG'}, 8, 30, $cmd, undef, undef, @nodes);
+
+    return($rc);
+}
+
+sub usage {
+
+    print<<EOF;
+Usage: $prog_name [option]
+-s -session       session file for PAV to use
+-sd -sessiondir   directory containing session file 'pvfs_autosession'
+-rsh              remote shell command to use (default 'ssh')
+-rcp              remote copy command to use (default 'scp')
+-h -help          display this message
+EOF
+}
+
+sub init {
+    GetOptions(\%args,
+	       's|session:s',
+	       'sd|sessiondir:s',
+	       'rsh:s',
+	       'rcp:s',
+	       'r|root:s',
+	       'h|help'
+	       );
+
+    if ($args{'h'}) {
+	usage();
+	return(1);
+    }
+
+    if ($args{'s'}) {
+	$session_file = $args{'s'};
+    } elsif ($args{'sd'}) {
+	$session_file = $args{'sd'} . "/pvfs_autosession";
+    } else {
+	usage();
+	return(1);
+    }
+
+    if (!-f $session_file) {
+	print STDERR "ERROR: cannot find session file: $session_file\n";
+	return(1);
+    }
+
+    %config = ('RCMDPROG' => "ssh",
+	       'RCPPROG' => "scp",
+	       'PROGROOT' => "./"
+	       );
+
+    $config{'PROGROOT'} = $args{'r'} || $config{'PROGROOT'};
+    my $prog_root = $config{'PROGROOT'};
+    require "$prog_root/pav_lib.pl";
+
+    $rc = read_sessionfile($session_file, \%config);
+    if ($rc) {
+	print STDERR "ERROR: cannot read session file\n";
+	return(1);
+    }
+
+    $config{'RCMDPROG'} = $args{'rsh'} || $config{'RCMDPROG'};
+    $config{'RCPPROG'} = $args{'rcp'} || $config{'RCPPROG'};
+
+    $prog_name = $0;
+    $pid = $$;
+
+    return(0);
+}
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/pav/configfile.sample.in
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/pav/configfile.sample.in	(revision 6234)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/pav/configfile.sample.in	(revision 6234)
@@ -0,0 +1,105 @@
+#
+# BUGS
+#	. comments in this file are ignored only at the beginning of a line
+#	. trailing whitespace can confuse some parts of PAV
+# 
+
+# pav is in the test/ sub-project, but it uses a lot of stuff in the main pvfs2
+# tree.  ASSUMPTION: test/ is a subdir of pvfs2, not a standalone directory
+
+SRCDIR_TOP=@SRC_ABSOLUTE_TOP@/../
+BUILDDIR=@BUILD_ABSOLUTE_TOP@/../
+
+# primative bakctick expansion is allowed: 
+# NODEFILE=`sort $PBS_NODEFILE | uniq > machines ; echo machines`
+NODEFILE=machines.pav
+
+# this is the default number of IO servers, but it can be overridden with -n
+IONCOUNT=1
+
+METACOUNT=1
+UNIQUEMETA=0
+
+
+#
+# EVERYTHING SHOULD BE IN THIS DIRECTORY ON REMOTE NODES
+#
+WORKINGDIR="/tmp/pvfs-pav-working"
+
+#
+# SERVER CONFIGURATION
+#
+
+# be careful: the port has to be a port apropriate for the protocol
+PROTOCOL=tcp
+
+# hopefully random enough...
+PVFSTCPPORT=3349
+#  --  could be --
+# PROTOCOL=gm
+# PVFSGMPORT=6
+#  --  or even --
+# PROTOCOL=ib
+# PVFSIBPORT=12345
+#  --  or multiples --
+# PROTOCOL=ib,tcp
+# PVFSIBPORT=3334
+# PVFSTCPPORT=3335
+
+STORAGE=$WORKINGDIR/storage
+SERVERLOG=$WORKINGDIR/log
+
+MOUNTPOINT="/pvfs2-auto"
+
+BINDIR=$WORKINGDIR/bin
+
+RCMDPROG=ssh
+RCPPROG=scp
+
+#
+# LOCATION OF IMPORTANT BINARIES LOCALLY
+#
+PROGROOT=$SRCDIR_TOP/test/common/pav
+
+# pav understands simple shell-like variables
+#PVFS=/homes/robl/pvfs2
+#SERVER=$PVFS/sbin/pvfs2-server
+#PINGPROG=$PVFS/bin/pvfs2-ping
+#GENCONFIG=$PVFS/bin/pvfs2-genconfig
+
+SERVER=$BUILDDIR/src/server/pvfs2-server
+PINGPROG=$BUILDDIR/src/apps/admin/pvfs2-ping
+GENCONFIG=$SRCDIR_TOP/src/apps/admin/pvfs2-genconfig
+
+# set this to 1 if the machines used by pav need the important pvfs2
+# binaries copied out to them.  set it to 0 if using, for example, NFS
+COPYBINS=1
+
+#this value only has to be set in heterogenous environments 
+#ENCODING="{direct|le_bfield|xdr}" 
+
+# Set this to 0 to turn off trove metadata syncing.  This is EXPERIMENTAL and
+# could cause DATA LOSS, but will give improved performance.
+TROVESYNC=1
+
+# Set this to the desired Trove method (as you would set TroveMethod in
+# fs.conf).  Defaults to 'dbpf'.  'alt-aio' is another good one
+# TROVEMETHOD=dbpf
+
+# set MOUNT_FS if you want PAV to load the kernel module, start
+# pvfs2-client, and mount the file system.  If you set MOUNT_FS, you
+# will also need the path to the kernel module and kernel helper
+# utilities...
+MOUNT_FS=0
+KERNEL_KVER=2.6.20-15-generic
+PVFS_KMOD=/home/robl/soft/pvfs2/lib/modules/$KERNEL_KVER/kernel/fs/pvfs2/pvfs2.ko
+PVFS_CLIENT=$PVFS/sbin/pvfs2-client
+
+#    ... and you will need a way to get root (sudo, ssh with keys, etc):
+#    set this to the apropriate mechansim, e.g.
+# RCMDPROG_ROOT="ssh -l root"
+RCMDPROG_ROOT=$RCMDPROG
+
+# set this to 0 if you would rather have compute nodes come before server
+# nodes in the list of hosts pav uses
+COMPUTENODES_LAST=1
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_stop
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_stop	(revision 2280)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_stop	(revision 2280)
@@ -0,0 +1,148 @@
+#!/usr/bin/perl -w
+
+use Getopt::Long;
+use POSIX "sys_wait_h";
+use File::Basename;
+
+#globals
+my $config_file;
+my %config;
+my $rc = 0;
+my $prog_name;
+my $pid;
+
+if (init()) {
+    exit 1;
+}
+
+my $prog_root = $config{"PROGROOT"};
+my $working_dir = $config{"WORKINGDIR"};
+
+@commands = ("$prog_root/pav_uninit -sd $working_dir -r $prog_root", 
+		"$prog_root/pav_clean -sd $working_dir -r $prog_root");
+
+mainloop:
+my $done = 0;
+while(!$done) {
+    my $stage = 0;
+    foreach $cmd (@commands) {
+	print "PAV: stage $stage running command: $cmd\n";
+	$rc = system("$cmd");
+	$rc = $rc >> 8;
+	print "--------------------------------------------------------------------------------\n";
+#	print "PAV: stage $stage command complete: $rc\n";
+
+	if ($rc == 1) {
+	    print STDERR "WARNING: recoverable error encountered, cleaning up and trying again...\n";
+	    
+	    @stop_commands = ("$prog_root/pav_uninit -sd $working_dir", "$prog_root/pav_clean -sd $working_dir");
+	    foreach $stop_cmd (@stop_commands) {
+		print "PAV: cleaning up: $stop_cmd\n";
+		$rc = system("$stop_cmd");
+		print "--------------------------------------------------------------------------------\n";
+
+	    }
+
+	    @commands = ("$prog_root/pav_create -sd $working_dir", "$prog_root/pav_dist -sd $working_dir", "$prog_root/pav_init -sd $working_dir");
+
+	    goto mainloop;
+	} elsif ($rc == 2) {
+	    print STDERR "ERROR: running command: $cmd\n";
+	    exit(1);
+	}
+	$stage++;
+#	sleep 5;
+    }
+    $done++;
+}
+
+exit(0);
+
+sub usage {
+
+    print<<EOF;
+Usage: $prog_name [option]
+-c -config        configuration file for PAV to use
+-r -root          path to program root (default ./)
+-m -machinefile   file with list of available nodes
+-h -help          display this message
+EOF
+}
+
+sub init {
+    GetOptions(\%args,
+	       'c|config:s',
+	       'r|root:s',
+	       'm|machinefile:s',
+	       'h|help:s'
+	       );
+
+    $prog_name = $0;
+    $pid = $$;
+ 
+    if ($args{'h'}) {
+	usage();
+	return(1);
+    }
+
+    $config_file = $args{'c'} || "~/auto_pvfsvol.conf";
+    if (!-f $config_file) {
+	print STDERR "ERROR: cannot find config file: $config_file\n";
+	usage();
+	return(1);
+    }
+    
+    %config = ('PVFSPORT' => 7000,
+	       'WORKINGDIR' => "/tmp",
+	       'IONCOUNT' => 4,
+	       'NODEFILE' => "machine_file",
+	       'PROTOCOL' => 0,
+	       'UNIQUEMETA' => 0,
+	       'STORAGE' => "/tmp/data",
+	       'SERVERLOG' => "/tmp/log",
+	       'MOUNTPOINT' => "/pvfs_auto",
+	       'BINDIR' => "/tmp/bin",
+	       'SERVER' => "pvfs2-server",
+	       'PINGPROG' => "pvfs2-ping",
+	       'PROGROOT' => "./"
+	       );
+    
+    ($config{'USERNAME'}) = getpwuid($>);
+    my ($gid) = split(/\s*/, $();
+    ($config{'GROUPNAME'}) = getgrgid($gid);
+
+    $config{'PROGROOT'} = $args{'r'} || real_dir($0) || $config{'PROGROOT'};
+    my $prog_root = $config{'PROGROOT'};
+    require "$prog_root/pav_lib.pl";
+
+    $rc = read_configfile($config_file, \%config);
+    if ($rc) {
+	print STDERR "ERROR: reading config file\n";
+	return($rc);
+    }
+
+    $config{'PROGROOT'} = $args{'r'} || $config{'PROGROOT'};
+    $config{'NODEFILE'} = $args{'m'} || $config{'NODEFILE'};
+    
+    return(0);
+}
+
+sub real_dir {
+   my ($file, $reldir, $suffix) = fileparse(shift);
+   my ($realdir, $envpwd);
+
+   if ($reldir =~ /^\//) {
+      $realdir = $reldir;
+   } else {
+      if (!$ENV{PWD}) {
+         chomp($envpwd = `pwd`);
+      } else {
+         $envpwd = $ENV{PWD};
+      }
+      $realdir = $envpwd . "/$reldir";
+   }
+   $realdir .= '/';
+   $realdir =~ s#/./#/#g;
+   $realdir =~ s#//#/#g;
+   return($realdir);
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/pav/README
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/pav/README	(revision 6234)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/pav/README	(revision 6234)
@@ -0,0 +1,140 @@
+Readme for pav-0.1:
+
+Idea:
+
+This package is meant to help with the setup and shutdown of PVFS
+volumes.  It was written with the intent of making the testing of such
+volumes simple, since testing PVFS volumes often involves the
+time consuming process of making changes to PVFS server code, pushing
+the compiled binaries out to server nodes, setting up PVFS server
+config files, and finally starting the iod and mgr processes.  The pav
+package is also useful for users who would like to set up PVFS volumes
+on systems which they only have user accounts on.  Such a user could
+install the pav package in their home directory and use it inside of a
+PBS script to create a useable PVFS volume that only persists for the
+duration of their job.  Sysadmins like the author also use the package
+to push out new versions of PVFS code onto their cluster wide PVFS
+resource.
+
+Typically, PAV is used in two environments.  In one case, a user has a
+handful of workstations.  Using PAV, he can get a mulit-server PVFS2
+volume up and running and quickly start testing.  In the other common
+case, the user requests an allocation of nodes on a cluster.  With PAV,
+the allocation is split into "io nodes" and "compute nodes".  PVFS2
+servers run on the io nodes while the application runs on the compute
+nodes.  This split keeps the application nodes from perturbing the io
+nodes and should yield more consistent results.
+
+PAV can also mount PVFS, but only if you have a way of obtaining root
+without a passowrd.  Without speaking to the security implications, you
+could achieve this with ssh keys or sudo configurations.   See the
+config options below for how you would enable this optional feature.
+
+Using pav:
+
+To use the system (after installation), one must follow these steps:
+
+1.) create a list of machine 'resources'.  This is simple a file
+containing a list of machines, one per line.  Exactly the same as a
+MPICH machines file.
+
+2.) create a pav configfile (we will call the file pav.conf but it can
+be called anything).  The configfile has key=val syntax and can
+contain comments (line beginning with '#').  Any value can use the
+value of a previously declared key by using a $KEY syntax (see STORAGE
+below).  There is a sample configfile with the distribution called
+configfile.sample.
+
+The following keys can be defined:
+
+NODEFILE="</path/to/machinefile>"
+IONCOUNT=<number of 'io' nodes for the system>
+METACOUNT=<number of 'meta' nodes for the system>
+UNIQUEMETA=<1 = dedicated metadata server 
+		0 = metadata server runs on data server >
+PROTOCOL=<'tcp' (TCP/IP), 'gm' (Myrinet), 'ib' (infinband) >
+
+WORKINGDIR="</path/to/pvfs_datadir>" This is where all pvfs data will
+be written to on the remote 'io' nodes.  Usually use a large, fast
+volume for this directory *NOTE: you should always use a unique, empty
+directory for this option.  A pav_stop will remove this entire
+directory tree.  The same is true for STORAGE below, we usually put
+STORAGE as a subdirectory of WORKINGDIR.
+
+PVFSPORT=<port number to use>
+STORAGE="</path/to/storage_adir>" Usually set to $WORKINGDIR/data
+SERVERLOG="</path/to/logdir>" Usually set to $WORKINGDIR/log
+
+MOUNTPOINT="</path/to/pvfs_virtual_mountpoint>" 
+ENCODING="{direct|le_bfield|xdr}" Adds "encoding=" mount option, usually not
+                                  set.
+
+
+BINDIR="</path/to/dir/containing/binaries>" Usually $WORKINGDIR/bin
+
+#USERNAME=nobody
+#GROUPNAME=nobody
+
+RCMDPROG=<rsh|ssh>
+RCPPROG=<rcp|scp>
+
+SERVER="</path/to/pvfs2-server>" This specifies the path to the pvfs2-server
+binary to be pushed out to all systems and executed, this is not the
+path specifying where to run the pvfs2-server from, only where to get the pvfs2-server  
+to use.  Same is true for PINGPROG.
+PINGPROG="</path/to/pvfs2-ping/binary>"
+
+GENCONFIG="</path/to/pvfs2-genconfig>" pvfs2-genconfig generates the config 
+  file for the pvfs2 servers.  It will run locally and then the generated files
+  will later be copied to the pvfs2 nodes.  
+
+COPYBINS=<1 = default, copy binaries out to temp area on each node,
+          0 = do not copy, and run them from the specified path above>
+
+TROVESYNC=<1 = default. sync data after metadata operations,
+           0 = do not perform implicit sync. improved performance at the risk 
+	   		of data loss>
+
+TROVEMETHOD="<desired Trove method>" This defaults to 'dbpf'.
+
+COMPUTENODES_LAST=<1 = default.  Choose compute nodes from end of host list,
+                   0 = Choose compute nodes from beginning of host list>
+
+MOUNT_FS=<0 = default. don't bother with the VFS interface
+          1 = load the kernel module, start the helper apps, and mount
+	      the fs>
+
+PVFS_KMOD="<path to kernel module>"  Be sure to specify a kernel module
+                                     built for the compute nodes
+PVFS_CLIENT="<path to pvfs2-client>" The helper app
+
+RCMDPROG_ROOT="<mechanism for gaining remote root>"  Could be anything
+						     really.  "ssh -l
+						     root" is the one
+						     we've tested most.
+
+3.) execute pav_start -c <configfile>.  You will see the pav system
+setting up a PVFS volume for you.
+
+The following command line arguments can be passed to pav_start:
+
+	-c -config        configuration file for PAV to use
+	-r -root          path to program root (default ./)
+	-m -machinefile   file with list of available nodes
+	-n -ionodecount   number of nodes to use for IO
+	-e -mEtanodecount number of nodes to use as metadata servers
+			  (wanted to use -m but it was taken by machinefile)
+	-h -help          display this message
+
+4.) execute pav_info -c <configfile>.  This command will give you lots
+of information about your newly created PVFS volume, including the
+PVFS2TAB_FILE.
+
+5.) run PVFS tests.  The volume is set up and ready to use!
+
+6.) when finished, clean up using pav_stop -c configfile.  WARNING:
+this command will kill all iod/mgr processes and clean up all data
+stored in the associated data directories.
+
+Thanks and good luck!  Any questions/comments should be sent to
+pvfs2-developers@beowulf-underground.org
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_info
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_info	(revision 3197)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_info	(revision 3197)
@@ -0,0 +1,141 @@
+#!/usr/bin/perl -w
+
+use Getopt::Long;
+use POSIX "sys_wait_h";
+use File::Basename;
+
+#globals
+my $session_file;
+my %config;
+my $rc = 0;
+my $pid;
+
+if (init()) {
+    exit 1;
+}
+
+$config{PVFS2TAB_FILE} = $config{WORKINGDIR} . "/pvfs2tab";
+foreach $key (keys(%config)) {
+    if (ref($config{$key}) eq 'ARRAY') {
+	$aref = $config{$key};
+	print "$key=";
+	
+# Print the compute node file 
+	if (($key eq 'COMPNODES') && (exists $config{'COMP_NODEFILE'})) {
+	    system("rm $config{'COMP_NODEFILE'}");
+	    open FH, ">$config{'COMP_NODEFILE'}" 
+		or die "Couldn't open $config{'COMP_NODEFILE'}";
+	    if (@$aref > 0)  # leave empty if no compute nodes
+	    {
+		for ($i=0; $i<@$aref-1; $i++) {
+		    print FH "$aref->[$i]\n";	    
+		}
+		print FH "$aref->[$i]\n";
+	    }
+	    close FH;
+	}
+
+	if (@$aref > 0)  # leave empty if no compute nodes
+	{
+	    for ($i=0; $i<@$aref-1; $i++) {
+		print "$aref->[$i],";
+	    }
+	    print "$aref->[$i]\n";
+	}
+    } else {
+	print "$key=$config{$key}\n";
+    }
+}
+print "PVFS2TAB_FILE=$config{PVFS2TAB_FILE}\n";
+
+sub init {
+    GetOptions(\%args,
+	       'c|config:s',
+	       's|session:s',
+	       'r|root:s',
+	       'm|machinefile:s',
+	       'h|help:s'
+	       );
+
+    if ($args{'h'}) {
+	usage();
+	return(1);
+    }
+
+    $config_file = $args{'c'} || "~/auto_pvfsvol.conf";
+    if (!-f $config_file) {
+	print STDERR "ERROR: cannot find config file: $config_file\n";
+	usage();
+	return(1);
+    }
+
+    %config = ('PVFSPORT' => 7000,
+	       'WORKINGDIR' => "/tmp",
+	       'IONCOUNT' => 4,
+	       'NODEFILE' => "machine_file",
+	       'PROTOCOL' => 0,
+	       'UNIQUEMETA' => 0,
+	       'STORAGE' => "/tmp/data",
+	       'SERVERLOG' => "/tmp/log",
+	       'MOUNTPOINT' => "/pvfs_auto",
+	       'BINDIR' => "/tmp/bin",
+	       'SERVER' => "pvfs2-server",
+	       'PINGPROG' => "pvfs2-ping",
+	       'PROGROOT' => "./"
+	       );
+    
+    ($config{'USERNAME'}) = getpwuid($>);
+    my ($gid) = split(/\s*/, $();
+    ($config{'GROUPNAME'}) = getgrgid($gid);
+
+    $config{'PROGROOT'} = $args{'r'} || real_dir($0) || $config{'PROGROOT'};
+    my $prog_root = $config{'PROGROOT'};
+    require "$prog_root/pav_lib.pl";
+
+    $rc = read_configfile($config_file, \%config);
+    if ($rc) {
+	print STDERR "ERROR: reading config file\n";
+	return($rc);
+    }
+
+
+    $session_file = $args{'s'} || "$config{'WORKINGDIR'}/pvfs_autosession";
+    if (!-f $session_file) {
+	print STDERR "ERROR: cannot find session file: $session_file\n";
+	usage();
+	return(1);
+    }
+    
+    $rc = read_sessionfile($session_file, \%config);
+    if ($rc) {
+	print STDERR "ERROR: reading session file\n";
+	return($rc);
+    }
+
+    $config{'PROGROOT'} = $args{'r'} || $config{'PROGROOT'};
+    $config{'NODEFILE'} = $args{'m'} || $config{'NODEFILE'};
+    
+    $pid = $$;
+ 
+    return(0);
+}
+
+sub real_dir {
+   my ($file, $reldir, $suffix) = fileparse(shift);
+   my ($realdir, $envpwd);
+
+   if ($reldir =~ /^\//) {
+      $realdir = $reldir;
+   } else {
+      if (!$ENV{PWD}) {
+         chomp($envpwd = `pwd`);
+      } else {
+         $envpwd = $ENV{PWD};
+      }
+      $realdir = $envpwd . "/$reldir";
+   }
+   $realdir .= '/';
+   $realdir =~ s#/./#/#g;
+   $realdir =~ s#//#/#g;
+   return($realdir);
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_start
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_start	(revision 5985)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_start	(revision 5985)
@@ -0,0 +1,172 @@
+#!/usr/bin/perl -w
+
+use Getopt::Long;
+use POSIX "sys_wait_h";
+use File::Basename;
+
+#globals
+my $config_file;
+my %config;
+my $rc = 0;
+my $prog_name;
+my $pid;
+my $retry;
+				
+if (init()) {
+    exit 1;
+}
+
+# Set to one to enable retry if nodes are bad, experimental so turned off by default
+$retry = 0;
+
+my $prog_root = $config{"PROGROOT"};
+my $working_dir = $config{"WORKINGDIR"};
+my $ionodecount = $config{"IONCOUNT"};
+my $metacount = $config{"METACOUNT"};
+
+@commands = ("$prog_root/pav_create -c $config_file -n $ionodecount -e $metacount",
+	"$prog_root/pav_check -ping -one-all -sd $working_dir", 
+	"$prog_root/pav_dist -sd $working_dir", 
+	"$prog_root/pav_init -sd $working_dir");
+    
+mainloop:
+my $done = 0;
+while(!$done) {
+    my $stage = 0;
+    foreach $cmd (@commands) {
+	print "PAV: stage $stage running command: $cmd\n";
+	$rc = system("$cmd");
+	$rc = $rc >> 8;
+	print "--------------------------------------------------------------------------------\n";
+#	print "PAV: stage $stage command complete: $rc\n";
+
+	if ($rc == 1) {
+	    if ($retry) {
+		print STDERR "WARNING: recoverable error encountered, cleaning up and trying again...\n";
+	    
+		@stop_commands = ("$prog_root/pav_uninit -sd $working_dir", "$prog_root/pav_clean -sd $working_dir");
+		foreach $stop_cmd (@stop_commands) {
+		    print "PAV: cleaning up: $stop_cmd\n";
+		    $rc = system("$stop_cmd");
+		    print "--------------------------------------------------------------------------------\n";
+		    
+		}
+
+		@commands = ("$prog_root/pav_create -sd $working_dir", "$prog_root/pav_dist -sd $working_dir", "$prog_root/pav_init -sd $working_dir");
+
+		goto mainloop;
+	    } else {
+		print "ERROR: recoverable error encountered, retry turned off: please check node list and make sure all nodes are available/healthy!\n";
+		exit(1);
+	    }
+	} elsif ($rc == 2) {
+	    print STDERR "ERROR: unrecoverable error running command: $cmd\n";
+	    exit(1);
+	}
+	$stage++;
+    }
+    $done++;
+}
+
+exit(0);
+
+sub usage {
+
+    print<<EOF;
+Usage: $prog_name [option]
+-c -config        configuration file for PAV to use
+-r -root          path to program root (default ./)
+-m -machinefile   file with list of available nodes
+-n -ionodecount   number of nodes to use for IO
+-e -metanodecount number of nodes to use as metadata servers
+-h -help          display this message
+EOF
+}
+
+sub init {
+    GetOptions(\%args,
+	       'c|config:s',
+	       'r|root:s',
+	       'm|machinefile:s',
+	       'n|ionodecount:i',
+	       'e|metanodecount:i',
+	       'h|help'
+	       );
+
+    $prog_name = $0;
+    $pid = $$;
+ 
+    if ($args{'h'}) {
+	usage();
+	return(1);
+    }
+
+    $config_file = $args{'c'} || "~/auto_pvfsvol.conf";
+    if (!-f $config_file) {
+	print STDERR "ERROR: cannot find config file: $config_file\n";
+	usage();
+	return(1);
+    }
+    
+    %config = ('PVFSPORT' => 3334,
+	       'WORKINGDIR' => "/tmp",
+	       'IONCOUNT' => 4,
+	       'METACOUNT' => 1,
+	       'NODEFILE' => "machine_file",
+	       'PROTOCOL' => 0,
+	       'UNIQUEMETA' => 0,
+	       'STORAGE' => "/tmp/data",
+	       'SERVERLOG' => "/tmp/log",
+	       'MOUNTPOINT' => "/pvfs_auto",
+	       'BINDIR' => "/tmp/bin",
+	       'PROG' => "pvfs2-server",
+	       'PINGPROG' => "pvfs2-ping",
+	       'GENCONFIG' => "pvfs2-genconfig",
+	       'TROVESYNC' => 1,
+	       'TROVEMETHOD' => "dbpf",
+	       'COMPUTENODES_LAST' => 1,
+	       'PROGROOT' => "./"
+	       );
+ 
+    $config{'PROGROOT'} = real_dir($0) || $config{'PROGROOT'};
+    ($config{'USERNAME'}) = getpwuid($>);
+    my ($gid) = split(/\s*/, $();
+    ($config{'GROUPNAME'}) = getgrgid($gid);
+
+    $config{'PROGROOT'} = $args{'r'} || $config{'PROGROOT'};
+    my $prog_root = $config{'PROGROOT'};
+    require "$prog_root/pav_lib.pl";
+    
+    $rc = read_configfile($config_file, \%config);
+    if ($rc) {
+	print STDERR "ERROR: reading config file\n";
+	return($rc);
+    }
+
+    $config{'PROGROOT'} = $args{'r'} || $config{'PROGROOT'};
+    $config{'NODEFILE'} = $args{'m'} || $config{'NODEFILE'};
+    $config{'IONCOUNT'} = $args{'n'} || $config{'IONCOUNT'};
+    $config{'METACOUNT'} = $args{'e'} || $config{'METACOUNT'};
+    
+    return(0);
+}
+
+sub real_dir {
+   my ($file, $reldir, $suffix) = fileparse(shift);
+   my ($realdir, $envpwd);
+
+   if ($reldir =~ /^\//) {
+      $realdir = $reldir;
+   } else {
+      if (!$ENV{PWD}) {
+         chomp($envpwd = `pwd`);
+      } else {
+         $envpwd = $ENV{PWD};
+      }
+      $realdir = $envpwd . "/$reldir";
+   }
+   $realdir .= '/';
+   $realdir =~ s#/./#/#g;
+   $realdir =~ s#//#/#g;
+   return($realdir);
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/pav/TODO
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/pav/TODO	(revision 2138)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/pav/TODO	(revision 2138)
@@ -0,0 +1,4 @@
+. Add a makefile
+. Add ability to put lib and binaries in different directories
+. Think about and clean up the 'resource test' functionality of pav, currently
+  disabled
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/pav/INSTALL
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/pav/INSTALL	(revision 2138)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/pav/INSTALL	(revision 2138)
@@ -0,0 +1,9 @@
+Install for pav:
+
+Installation should be extremely simple:
+
+1.) untar the pav-<version>.tar.gz package
+
+2.) copy the resulting directory (pav-<version>) to wherever you like,
+and adjust your PATH environment to include this directory.
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/pav/CHANGES
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/pav/CHANGES	(revision 2138)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/pav/CHANGES	(revision 2138)
@@ -0,0 +1,28 @@
+pav2 
+Big changes for pav and version 2
+added to pvfs2 tree
+
+pav-0.2c * AC change ------- Modified PAV so that the variable
+COMP_NODEFILE will output the compute nodes in the login node.  I also
+added check_all_nodes.pl which will check all these nodes and generate
+node lists of good and bad nodes for ethernet and Myrinet.  I fiexed
+the Myrinet option so that this version of pav will work with both
+Jazz and Chiba for myrinet.
+
+pav-0.2b * AC change ------- Modified the -myr suffix so that it works
+with ccnXXX.mcs.anl.gov and ccnXXX.  Also added a test called
+check_all_nodes.pl that can check a machinefile list with/without
+Myrinet -Avery
+
+pav-0.2 * Second release -------- crude understanding of myrinet: will
+run pvfs over tcp-over-myrinet assuming hosts have the -myr suffix on
+their tcp names (j335 becomes j335-myr)
+
+pav-0.1 * First 'release' -------- added IONODE and COMPNODE keys to
+pav_info output
+
+cleaned up pav_lib.pl searching code, pav_lib.pl must currently be in
+same dir as binaries
+
+removed default behaviour of attempting to retry if some resoures are
+bad
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_create
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_create	(revision 6378)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_create	(revision 6378)
@@ -0,0 +1,465 @@
+#!/usr/bin/perl -w
+
+use     Getopt::Long;
+use 	File::Basename;
+
+#globals
+my $config_file;
+my $session_file;
+my %config;
+my $rc = 0;
+my $pid;
+
+$rc = init();
+if ($rc) {
+    exit $rc;
+}
+
+$rc = pvfs_tmpdir("create", $config{'WORKINGDIR'});
+
+#make ionodefile, compnodefile
+$rc = create_nodefiles(\%config);
+if ($rc) {
+    print "returning $rc\n";
+    exit($rc);
+}
+
+$rc = create_pvfs2config(\%config);
+if ($rc) {
+    print "returning $rc\n";
+    exit($rc);
+}
+
+#make pvfstab
+$rc = create_pvfs2tab(\%config);
+if ($rc) {
+    print "returning $rc\n";
+    exit($rc);
+}
+
+#copy binaries in
+if ($config{'COPYBINS'} > 0) {
+    $rc = copy_pvfsbinaries(\%config);
+    if ($rc) {
+       print "returning $rc\n";
+       exit($rc);
+    }
+}
+
+#make session file
+$rc = create_sessionfile(\%config);
+if ($rc) {
+	print "could not create sessionfile\n";
+	exit($rc);
+}
+
+#$rc = pvfs_tmpdir("remove", $config{'WORKINGDIR'});
+#@foo = @{$config{'IONODES'}};
+#print "FOO: @foo\n";
+
+exit(0);
+
+# local staging: copy from source to working directory
+sub copy_pvfsbinaries {
+    my $href = shift;
+
+    foreach $prog ($href->{'SERVER'}, $href->{'PINGPROG'}) {
+	if (-f "$prog") {
+	    $cmd = "cp -f $prog " . $href->{'WORKINGDIR'};
+	    $rc = system("$cmd");
+	    if ($rc) {
+		print STDERR "ERROR: copying file with command: '$cmd'\n";
+		return(1);
+	    }
+	    system ("$cmd");
+	} else {
+	    print STDERR "ERROR: no such file $prog found, check configs\n";
+	    return(1);
+	}
+    }
+    return(0);
+}
+
+sub create_nodefiles {
+    my $href = shift;
+
+    my $ofile = $href->{'WORKINGDIR'} . "/ionodes";
+
+    if (!open(FH, ">$ofile")) {
+	print STDERR "ERROR: cannot open file: $ofile\n";
+	return(2);
+    }
+
+    my @ionodes = @{$href->{'IONODES'}};
+    foreach $node (@ionodes) {
+	print FH "$node\n";
+    }
+
+    close(FH);
+
+    $ofile = $href->{'WORKINGDIR'} . "/metanodes";
+
+    if (!open(FH, ">$ofile")) {
+	print STDERR "ERROR: cannot open file: $ofile\n";
+	return(2);
+    }
+
+    my @metanodes = @{$href->{'MGR'}};
+    foreach $node (@metanodes) {
+	print FH "$node\n";
+    }
+
+    close(FH);
+
+    $ofile = $href->{'WORKINGDIR'} . "/compnodes";
+
+    if (!open(FH, ">$ofile")) {
+	print STDERR "ERROR: cannot open file: $ofile\n";
+	return(1);
+    }
+
+    my @compnodes = @{$href->{'COMPNODES'}};
+    foreach $node (@compnodes) {
+	print FH "$node\n";
+    }
+
+    close(FH);
+    return(0);
+}
+
+sub create_pvfs2config 
+{
+    my $href = shift;
+    my $conffile = $href->{'WORKINGDIR'} . "/fs.conf";
+    my $ioservers = '';
+    my $metaservers = '';
+    my $rc = -1;
+
+    foreach $server (@{$href->{'IONODES'}}) {
+    	if ($ioservers ne "") {
+		$ioservers .= ",";
+	}
+	$ioservers .= $server;
+    }
+    foreach $server (@{$href->{'MGR'}}) {
+    	if ($metaservers ne "") {
+		$metaservers .= ",";
+	}
+	$metaservers .= $server;
+    }
+
+    my $cmd = $href->{'GENCONFIG'} 
+    		. " --protocol " . $href->{'PROTOCOL'};
+    foreach (split(',', $href->{'PROTOCOL'})) {
+	my $big = $_;
+	$big =~ y/a-z/A-Z/;
+	my $var = "PVFS" . $big . "PORT";
+	$cmd .= " --" . $_ . "port " . $href->{$var};
+    }
+    $cmd       .= " --ioservers ". $ioservers
+		. " --metaservers " . $metaservers
+		. " --logfile "  . $href->{'SERVERLOG'} . "/pvfs2.log"
+		. " --storage "  . $href->{'STORAGE'}
+		. " --trove-method " . $href->{'TROVEMETHOD'}
+		. " --quiet "    . $conffile;
+    if ($href->{'TROVESYNC'} == 0) {
+    	$cmd .= " --notrovesync";
+    }
+
+    $rc = system($cmd);
+    return $rc;
+}
+
+sub create_pvfs2tab {
+    my $href = shift;
+
+    my $ofile = $href->{'WORKINGDIR'} . "/pvfs2tab";
+    
+    my @metas = @{$href->{'MGR'}};
+
+    if (!open(FH, ">$ofile")) {
+	print STDERR "ERROR: cannot open file: $ofile\n";
+	return(1);
+    }
+    my $pvfstab = "undefined pvfstab\n";
+    my $protocol = $href->{'PROTOCOL'};
+
+    # maybe change the encoding
+    my $mntopts = "defaults";
+    if (defined($href->{'ENCODING'})) {
+	$mntopts = "encoding=" . $href->{'ENCODING'};
+    }
+
+    # string looks like this:
+    # tcp://localhost:3334/pvfs2-fs /mnt/pvfs pvfs2 defaults 0 0
+
+    my $num = 0;
+    $pvfstab = "";
+    foreach (split(',', $href->{'PROTOCOL'})) {
+	my $big = $_;
+	$big =~ y/a-z/A-Z/;
+	my $var = "PVFS" . $big . "PORT";
+	++$num;
+	if ($num > 1) {
+	    $pvfstab .= ",";
+	}
+	$pvfstab .= "$_://" . $metas[0] . ":" . $href->{$var} . "/pvfs2-fs";
+    }
+
+    $pvfstab .= " " .  $href->{'MOUNTPOINT'} .  " pvfs2 $mntopts 0 0";
+    
+    print FH "$pvfstab\n";
+    
+    close(FH);
+    return(0);
+}
+
+sub usage {
+
+    print<<EOF;
+Usage: $prog_name [option]
+-c -config        configuration file for PAV to use
+-r -root          path to program root (default ./)
+-m -machinefile   file with list of available nodes
+-n -ionodecount   number of nodes to use for IO
+-h -help          display this message
+EOF
+}
+
+sub init {
+    GetOptions(\%args,
+	       'c|config:s',
+	       's|session:s',
+	       'sd|sessiondir:s',
+	       'r|root:s',
+	       'm|machinefile:s',
+	       'n|ionodecount:i',
+	       'e|metacount:i',
+	       'h|help'
+	       );
+
+    $prog_name = $0;
+    $pid = $$;
+
+    if ($args{'h'}) {
+	usage();
+	return(1);
+    }
+
+    %config = ('PVFSTCPPORT' => 7000,
+               'PVFSGMPORT' => 6,
+               'PVFSIBPORT' => 3334,
+	       'WORKINGDIR' => "/tmp",
+	       'IONCOUNT' => 4,
+	       'METACOUNT' => 1,
+	       'NODEFILE' => machine_file,
+	       'PROTOCOL' => 0,
+	       'UNIQUEMETA' => 0,
+	       'STORAGE' => "/tmp/data",
+	       'SERVERLOG' => "/tmp/log",
+	       'MOUNTPOINT' => "/pvfs_auto",
+	       'BINDIR' => "/tmp/bin",
+	       'SERVER' => "pvfs2-server",
+	       'PINGPROG' => "pvfs2-ping",
+	       'GENCONFIG' => "pvfs2-genconfig",
+	       'TROVESYNC' => 1,
+	       'TROVEMETHOD' => "dbpf",
+	       'COMPUTENODES_LAST' => 1,
+	       'PROGROOT' => "./",
+	       'COPYBINS' => 0
+	       );
+    
+    ($config{'USERNAME'}) = getpwuid($>);
+    my ($gid) = split(/\s*/, $();
+    ($config{'GROUPNAME'}) = getgrgid($gid);
+
+    $config{'PROGROOT'} = $args{'r'} || real_dir($0) || $config{'PROGROOT'};
+    my $prog_root = $config{'PROGROOT'};
+    require "$prog_root/pav_lib.pl";
+
+
+    if ($args{'s'} || $args{'sd'}) {
+	if ($args{'s'}) {
+	    $session_file = $args{'s'};
+	} elsif ($args{'sd'}) {
+	    $session_file = $args{'sd'} . "/pvfs_autosession";
+	}
+
+	if (!-f $session_file) {
+	    print STDERR "ERROR: cannot find session file: $session_file\n";
+	    return(1);
+	}
+	
+	$rc = read_sessionfile($session_file, \%config);
+
+	if ($rc) {
+	    print STDERR "ERROR: cannot read session file\n";
+	    return(1);
+	}
+    } elsif ($args{'c'} || -f "~/pav.conf") {
+	
+	$config_file = $args{'c'} || "~/pav.conf";
+	if (!-f $config_file) {
+	    print STDERR "ERROR: cannot find config file: $config_file\n";
+	    usage();
+	    return(1);
+	}    
+
+	$rc = read_configfile($config_file, \%config);
+	if ($rc) {
+	    print STDERR "ERROR: reading config file\n";
+	    return(1);
+	}
+
+	# override with command line options
+	$config{'IONCOUNT'} = $args{'n'} || $config{'IONCOUNT'};
+	$config{'METACOUNT'} = $args{'e'} || $config{'METACOUNT'};
+
+	$rc = split_machines(\%config);
+	if ($rc) {
+	    return($rc);
+	}
+
+
+    } else {
+	print STDERR "ERROR: must specify -c, -s, -sd or creat a default config file (~/pav.conf)\n";
+	usage();
+	return(1);
+    }
+
+    $config{'PROGROOT'} = $args{'r'} || $config{'PROGROOT'};
+    $config{'NODEFILE'} = $args{'m'} || $config{'NODEFILE'};
+
+    # backward compatibility
+    if (defined($config{'PVFSPORT'})) {
+	$config{'PVFSTCPPORT'} = $config{'PVFSPORT'};
+    }
+    
+    return(0);
+}
+
+sub pvfs_tmpdir {
+    my $mode = shift;
+    my $dir = shift;
+    my $rc;
+
+#    $dir .= ".$pid";
+
+    if ($mode eq "create") {
+	$cmd = "mkdir -p $dir";
+    } elsif ($mode eq "remove") {
+	$cmd = "rm -rf $dir";
+    }
+
+    $rc = system("$cmd");
+
+    if ($rc) {
+	print STDERR "ERROR: running command '$cmd': rc=$rc\n";
+	return(1);
+    }
+
+    return(0);
+}
+
+
+sub split_machines {
+    my $href = shift;
+
+    my @nodelist = (),
+    @ionodes = (),
+    @metanodes = ();
+    @compnodes = ();
+    @servernodes = ();
+
+    my $count=0;
+
+    # let's try something....if for whatever reason we cannot open NODEFILE,
+    # let's assume it had one entry: localhost
+
+    if (!open(FH, $href->{'NODEFILE'})) {
+	print STDOUT "WARNING: cannot open nodefile $href->{NODEFILE}\n";
+	print STDOUT "WARNING: using default 'localhost'\n";
+	$count++;
+	@nodelist = ("localhost");
+    } else {
+
+	    while(<FH>) {
+		chomp;
+		if (/^#/ || !$_) {
+		    next;
+		}
+		my $line = $_;
+
+		@nodelist = (@nodelist, $line);	
+		$count++;
+	    }
+	    close(FH);
+    }
+
+    # decide how many total servers there will be
+    if ($href->{'UNIQUEMETA'}) {
+	$servernum = $href->{'IONCOUNT'} + $href->{'METACOUNT'};
+    } else {
+	# if servers are not unique, choose enough to satisfy larger of meta
+	# or io requirement
+	if ($href->{'METACOUNT'} >= $href->{'IONCOUNT'}) {
+	    $servernum = $href->{'METACOUNT'};
+	} else {
+	    $servernum = $href->{'IONCOUNT'};
+	}
+    }
+
+    if ($count < $servernum) {
+	print STDERR "ERROR: requested more server nodes than are available\n";
+	return(1);
+    }
+
+    my $ionum = $href->{'IONCOUNT'};
+    my $metanum = $href->{'METACOUNT'};
+    my $compnum = $count - $servernum;
+
+    # split total set into servers and clients
+    if ($href->{'COMPUTENODES_LAST'}) {
+	@servernodes = @nodelist[0..($servernum-1)];
+	@compnodes = @nodelist[$servernum..($count-1)];
+    } else {
+	@compnodes = @nodelist[0..($compnum-1)];
+	@servernodes = @nodelist[$compnum..($count-1)];
+    }
+
+    # pick meta nodes 
+    @metanodes = @servernodes[0..($metanum-1)];
+
+    # pick io nodes
+    if ($href->{'UNIQUEMETA'}) {
+	@ionodes = @servernodes[$metanum..($servernum-1)];
+    } else {
+	@ionodes = @servernodes[0..($ionum-1)];
+    }
+
+    $href->{'MGR'} = \@metanodes;
+    $href->{'IONODES'} = \@ionodes;
+    $href->{'COMPNODES'} = \@compnodes;
+
+    return(0);
+}
+
+sub real_dir {
+   my ($file, $reldir, $suffix) = fileparse(shift);
+   my ($realdir, $envpwd);
+
+   if ($reldir =~ /^\//) {
+      $realdir = $reldir;
+   } else {
+      if (!$ENV{PWD}) {
+         chomp($envpwd = `pwd`);
+      } else {
+         $envpwd = $ENV{PWD};
+      }
+      $realdir = $envpwd . "/$reldir";
+   }
+   $realdir .= '/';
+   $realdir =~ s#/./#/#g;
+   $realdir =~ s#//#/#g;
+   return($realdir);
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_dist
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_dist	(revision 3992)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_dist	(revision 3992)
@@ -0,0 +1,192 @@
+#!/usr/bin/perl -w
+
+use Getopt::Long;
+use POSIX "sys_wait_h";
+use File::Basename;
+
+#globals
+my $session_file,
+my %config;
+my $rc = 0;
+my $pid;
+
+if (init()) {
+    exit 1;
+}
+
+#copy out working dir
+$rc = copy_directory(\%config);
+if ($rc) {
+    print STDERR "WARNING: failed to copy dir to remote node $rc, trying to recover\n";
+    
+    $rc = recover_from_bad(\%config, $rc);
+    exit($rc);
+}
+
+#make remote directories
+$rc = make_remotedirs(\%config);
+if ($rc) {
+    print STDERR "WARNING: failed to make remote dir on node $rc, trying to recover\n";
+    
+    $rc = recover_from_bad(\%config, $rc);
+    exit($rc);
+}
+
+#mv remote files to remote directories
+if ( $config{'COPYBINS'} > 0) {
+    $rc = setup_remotedirs(\%config);
+    if ($rc) {
+       print STDERR "WARNING: failed to move files on remote node $rc, trying to recover\n";
+       
+       $rc = recover_from_bad(\%config, $rc);
+       exit($rc);
+    }
+}
+
+#done
+
+exit(0);
+
+sub setup_remotedirs {
+    my $href = shift;
+
+    my @ionodes = @{$href->{'IONODES'}};
+    my @metanodes = @{$href->{'MGR'}};
+
+    my @servers = (@ionodes,@metanodes);
+    my $rc = 0;
+
+    my $bin_dir = $href->{'BINDIR'};
+    my $storage_dir = $href->{'STORAGE'};
+    my $working_dir = $href->{'WORKINGDIR'};
+
+    my $cmd = "%node \'cp -af $working_dir/pvfs2-server $working_dir/pvfs2-ping $working_dir/fs.conf  $bin_dir\'";
+   
+    $rc = do_remote_command($href->{'RCMDPROG'}, 8, 60, $cmd, undef, undef, @servers);
+
+    
+
+    return($rc);
+}
+
+sub make_remotedirs {
+    my $href = shift;
+    my @servers = (@{$href->{'IONODES'}},@{$href->{'MGR'}});
+    my $rc = 0;
+
+    my $bin_dir = $href->{'BINDIR'};
+    my $storage_dir = $href->{'STORAGE'};
+    my $log_dir = $href->{'SERVERLOG'};
+
+    my $cmd = "%node \'mkdir -p $bin_dir\; mkdir -p $log_dir\'";
+   
+    $rc = do_remote_command($href->{'RCMDPROG'}, 8, 30, $cmd, undef, undef, @servers);
+
+    return($rc);
+}
+    
+sub copy_directory {
+    my $href = shift;
+    
+    my @ionodes = @{$href->{'IONODES'}};
+    my @compnodes = @{$href->{'COMPNODES'}};
+    my @metanodes = @{$href->{'MGR'}};
+    my $rc = 0;
+
+    my $remote_dir = dir_parent($href->{'WORKINGDIR'});
+
+    my $cmd = $href->{'WORKINGDIR'} . " %node:$remote_dir";
+
+    my @nodes = uniq(sort(@ionodes,@compnodes,@metanodes));
+    print "DIST: ON @nodes\n";
+    $rc = do_remote_command($href->{'RCPPROG'} . " -r", 8, 60, $cmd, undef, undef, @nodes);
+
+    return($rc);
+}
+
+
+
+sub usage {
+
+    print<<EOF;
+Usage: $prog_name [option]
+-s -session       session file for PAV to use
+-sd -sessiondir   directory containing session file 'pvfs_autosession'
+-rsh              remote shell command to use (default 'ssh')
+-rcp              remote copy command to use (default 'scp')
+-h -help          display this message
+EOF
+}
+
+sub init {
+    GetOptions(\%args,
+	       's|session:s',
+	       'sd|sessiondir:s',
+	       'rsh:s',
+	       'rcp:s',
+	       'r|root:s',
+	       'h|help'
+	       );
+    $prog_name = $0;
+    $pid = $$;
+
+    if ($args{'h'}) {
+	usage();
+	return(1);
+    }
+
+    if ($args{'s'}) {
+	$session_file = $args{'s'};
+    } elsif ($args{'sd'}) {
+	$session_file = $args{'sd'} . "/pvfs_autosession";
+    } else {
+	usage();
+	return(1);
+    }
+
+    if (!-f $session_file) {
+	print STDERR "ERROR: cannot find session file: $session_file\n";
+	return(1);
+    }
+
+    %config = ('RCMDPROG' => "ssh",
+	       'RCPPROG' => "scp",
+	       'PROGROOT' => "./",
+	       'COPYBINS' => 0,
+	       );
+
+    $config{'PROGROOT'} = $args{'r'} || real_dir($0) || $config{'PROGROOT'};
+    my $prog_root = $config{'PROGROOT'};
+    require "$prog_root/pav_lib.pl";
+
+    $rc = read_sessionfile($session_file, \%config);
+    if ($rc) {
+	print STDERR "ERROR: cannot read session file\n";
+	return(1);
+    }
+
+    $config{'RCMDPROG'} = $args{'rsh'} || $config{'RCMDPROG'};
+    $config{'RCPPROG'} = $args{'rcp'} || $config{'RCPPROG'};
+
+    return(0);
+}
+
+sub real_dir {
+   my ($file, $reldir, $suffix) = fileparse(shift);
+   my ($realdir, $envpwd);
+
+   if ($reldir =~ /^\//) {
+      $realdir = $reldir;
+   } else {
+      if (!$ENV{PWD}) {
+         chomp($envpwd = `pwd`);
+      } else {
+         $envpwd = $ENV{PWD};
+      }
+      $realdir = $envpwd . "/$reldir";
+   }
+   $realdir .= '/';
+   $realdir =~ s#/./#/#g;
+   $realdir =~ s#//#/#g;
+   return($realdir);
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_init
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_init	(revision 6378)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_init	(revision 6378)
@@ -0,0 +1,180 @@
+#!/usr/bin/perl -w
+
+use Getopt::Long;
+use POSIX "sys_wait_h";
+use File::Basename;
+
+#globals
+my $session_file;
+my %config;
+my $rc = 0;
+my $pid;
+
+if (init()) {
+    exit 1;
+}
+
+$rc = start_servers(\%config);
+if ($rc) {
+    print STDERR "WARNING: failed to start iod on remote node $rc, trying to recover\n";
+    
+    $rc = recover_from_bad(\%config, $rc);
+    exit($rc);
+}
+
+if ($config{'MOUNT_FS'} == 1) {
+    $rc = do_fs_mount(\%config);
+    if ($rc) {
+    	print STDERR "WARNING: failed to mount FS on remote node $rc\n";
+	exit(-1);
+    }
+}
+
+exit(0);
+
+sub start_servers{
+    my $href = shift;
+
+    my @nodes = ();
+    my $rc = 0;
+
+    @nodes = (@{$href->{'IONODES'}}, @{$href->{'MGR'}});
+    # quite possibly some or all of the IONODES are also META servers
+    @nodes = uniq(sort(@nodes));
+
+    my $binary;
+    if ($href->{'COPYBINS'} > 0) {
+    	$binary = $href->{'BINDIR'} . "/pvfs2-server";
+    } else {
+    	$binary = $href->{'SERVER'};
+    }
+    my $serverconf = $href->{'WORKINGDIR'} . "/fs.conf";
+    my $localconf = $href->{'WORKINGDIR'} . "/server.conf";
+
+    # once to make the storage space, then a second time to run the servers
+
+    my $cmd = "%node $binary  -f $serverconf -a %node";
+    $rc = do_remote_command($href->{'RCMDPROG'}, 8, 30, $cmd, undef, undef, @nodes);
+
+    $cmd = "%node $binary $serverconf -a %node";
+    $rc = do_remote_command($href->{'RCMDPROG'}, 8, 30, $cmd, undef, undef, @nodes);
+    return($rc);
+}
+
+sub do_fs_mount{
+    my $href = shift;
+
+    my @nodes = ();
+    my $rc = 0;
+
+    @nodes = @{$href->{'COMPNODES'}};
+
+    my $cmd = "%node mkdir $href->{'MOUNTPOINT'}";
+    $rc = do_remote_command($href->{'RCMDPROG_ROOT'}, 8, 30, $cmd, undef, undef, @nodes);
+
+    my $kmod = $href->{'PVFS_KMOD'};
+    $cmd = "%node /sbin/insmod $kmod";
+    $rc = do_remote_command($href->{'RCMDPROG_ROOT'}, 8, 30, $cmd, undef, undef, @nodes);
+
+    my $pvfs2_client = $href->{'PVFS_CLIENT'};
+    $cmd = "%node $pvfs2_client";
+    $rc = do_remote_command($href->{'RCMDPROG_ROOT'}, 8, 30, $cmd, undef, undef, @nodes);
+
+    my @metas = @{$href->{'MGR'}};
+    # from create_pvfs2tab:
+    my $big = $href->{'PROTOCOL'};
+    $big =~ y/a-z/A-Z/;
+    my $var = "PVFS" . $big . "PORT"; # PVFSGMPORT, PVFSIBPORT, etc
+
+    # mount -t pvfs2 gm://pmeta0:5/pvfs2-fs /mnt/pvfs2
+    $cmd = "%node /bin/mount -t pvfs2 " . $href->{'PROTOCOL'} . "://" . $metas[0] . ":" . $href->{$var} . "/pvfs2-fs " . $href->{'MOUNTPOINT'}; 
+    $rc = do_remote_command($href->{'RCMDPROG_ROOT'}, 8, 30, $cmd, undef, undef, @nodes);
+
+    return($rc);
+} 
+
+sub usage {
+
+    print<<EOF;
+Usage: $prog_name [option]
+-s -session       session file for PAV to use
+-sd -sessiondir   directory containing session file 'pvfs_autosession'
+-rsh              remote shell command to use (default 'ssh')
+-rcp              remote copy command to use (default 'scp')
+-h -help          display this message
+EOF
+}
+
+sub init {
+    GetOptions(\%args,
+	       's|session:s',
+	       'sd|sessiondir:s',
+	       'rsh:s',
+	       'rcp:s',
+	       'r|root:s',
+	       'h|help'
+	       );
+
+    $prog_name = $0;
+    $pid = $$;
+
+    if ($args{'h'}) {
+	usage();
+	return(1);
+    }
+
+    if ($args{'s'}) {
+	$session_file = $args{'s'};
+    } elsif ($args{'sd'}) {
+	$session_file = $args{'sd'} . "/pvfs_autosession";
+    } else {
+	usage();
+	return(1);
+    }
+
+    if (!-f $session_file) {
+	print STDERR "ERROR: cannot find session file: $session_file\n";
+	return(1);
+    }
+
+    %config = ('RCMDPROG' => "ssh",
+	       'RCPPROG' => "scp",
+	       'PROGROOT' => "./",
+	       'COPYBINS' => 0,
+	       );
+
+    $config{'PROGROOT'} = $args{'r'} || real_dir($0) || $config{'PROGROOT'};
+    my $prog_root = $config{'PROGROOT'};
+    require "$prog_root/pav_lib.pl";
+
+    $rc = read_sessionfile($session_file, \%config);
+    if ($rc) {
+	print STDERR "ERROR: cannot read session file\n";
+	return(1);
+    }
+
+    $config{'RCMDPROG'} = $args{'rsh'} || $config{'RCMDPROG'};
+    $config{'RCPPROG'} = $args{'rcp'} || $config{'RCPPROG'};
+
+    return(0);
+}
+
+sub real_dir {
+   my ($file, $reldir, $suffix) = fileparse(shift);
+   my ($realdir, $envpwd);
+
+   if ($reldir =~ /^\//) {
+      $realdir = $reldir;
+   } else {
+      if (!$ENV{PWD}) {
+         chomp($envpwd = `pwd`);
+      } else {
+         $envpwd = $ENV{PWD};
+      }
+      $realdir = $envpwd . "/$reldir";
+   }
+   $realdir .= '/';
+   $realdir =~ s#/./#/#g;
+   $realdir =~ s#//#/#g;
+   return($realdir);
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/pav/machines.pav
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/pav/machines.pav	(revision 2138)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/pav/machines.pav	(revision 2138)
@@ -0,0 +1,6 @@
+# fill this up with hostnames of machines.  it will be the name of every host
+# (compute, io, metadata) involved with PAV
+foo.localhost
+grumpy.localnet
+kwijybo.localhost.localnet
+werqwerqwer
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_tester
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_tester	(revision 2138)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_tester	(revision 2138)
@@ -0,0 +1,126 @@
+#!/usr/bin/perl -w
+
+use Getopt::Long;
+use POSIX "sys_wait_h";
+
+#globals
+my $session_file,
+    %config,
+    $exitcode = 0,
+    $rc = 0,
+    $pid;
+
+if (init()) {
+    exit 1;
+}
+
+$rc = test_remote(\%config);
+print "TEST_REMOTE: $rc\n";
+#done
+
+exit(0);
+
+sub test_remote {
+    my $href = shift;
+    
+    my @ionodes = @{$href->{'IONODES'}};
+    my $rc = 0;
+
+    my $remote_dir = dir_parent($href->{'WORKINGDIR'});
+
+    my $cmd = "%node uname -a\n";
+    $cmd = "%node ls /foogt";
+
+    $rc = do_remote_command($href->{'RCMDPROG'}, 8, 30, $cmd, \&pre_func, undef, @ionodes);
+
+    print "HERE!\n";
+#    while(1) {
+#	sleep(15);
+#    }
+
+#    while($count<10) {
+#	sleep(1);
+#	$count++;
+#    }
+
+    return($rc);
+}
+
+sub pre_func {
+	my $node = shift;
+				
+	my $cmd = "echo $node pre-func\n";
+#	$cmd = "ls -l /foog";
+
+	my $rc = system("$cmd");
+
+	return($rc);
+
+}
+	
+sub post_func {
+	my $node = shift;
+	
+	my $cmd = "echo $node post-func\n";
+	my $rc = system("$cmd");
+	return($rc);
+
+}
+	
+
+
+sub usage{}
+
+sub init {
+    GetOptions(\%args,
+	       's|session:s',
+	       'sd|sessiondir:s',
+	       'rsh:s',
+	       'rcp:s',
+	       'r|root:s',
+	       'h|help'
+	       );
+
+    if ($args{'h'}) {
+	usage();
+	return(1);
+    }
+
+    if ($args{'s'}) {
+	$session_file = $args{'s'};
+    } elsif ($args{'sd'}) {
+	$session_file = $args{'sd'} . "/pvfs_autosession";
+    } else {
+	usage();
+	return(1);
+    }
+
+    if (!-f $session_file) {
+	print STDERR "ERROR: cannot find session file: $session_file\n";
+	return(1);
+    }
+
+    %config = ('RCMDPROG' => "ssh",
+	       'RCPPROG' => "scp",
+	       'PROGROOT' => "./"
+	       );
+
+    $config{'PROGROOT'} = $args{'r'} || $config{'PROGROOT'};
+    my $prog_root = $config{'PROGROOT'};
+    require "$prog_root/pav_lib.pl";
+
+    $rc = read_sessionfile($session_file, \%config);
+    if ($rc) {
+	print STDERR "ERROR: cannot read session file\n";
+	return(1);
+    }
+
+    $config{'RCMDPROG'} = $args{'rsh'} || $config{'RCMDPROG'};
+    $config{'RCPPROG'} = $args{'rcp'} || $config{'RCPPROG'};
+
+    $prog_name = $0;
+    $pid = $$;
+
+    return(0);
+}
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_uninit
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_uninit	(revision 6234)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/pav/pav_uninit	(revision 6234)
@@ -0,0 +1,129 @@
+#!/usr/bin/perl -w
+
+use Getopt::Long;
+use POSIX "sys_wait_h";
+
+#globals
+my $session_file;
+my %config;
+my $rc = 0;
+my $pid;
+
+if (init()) {
+    exit 1;
+}
+
+if ($config{'MOUNT_FS'} == 1) {
+	$rc = stop_fs_mount(\%config);
+	if ($rc) {
+		print STDERR "WARNING: mount cleanup failed...$rc\n";
+	}
+}
+
+#stop iods
+$rc = stop_servers(\%config);
+if ($rc) {
+    print STDERR "WARNING: server stop failed...$rc\n";
+}
+
+exit(0);
+
+sub stop_fs_mount {
+    my $href = shift;
+
+    my @nodes = ();
+    my $rc = 0;
+
+    @nodes = @{$href->{'COMPNODES'}};
+
+    my $cmd = "%node umount $href->{'MOUNTPOINT'}";
+    $rc = do_remote_command($href->{'RCMDPROG_ROOT'}, 8, 30, $cmd, undef, undef, @nodes);
+
+    $cmd = "%node killall pvfs2-client\\\; sleep 5\\\; killall -9 pvfs2-client";
+    $rc = do_remote_command($href->{'RCMDPROG_ROOT'}, 8, 30, $cmd, undef, undef, @nodes);
+
+    $cmd = "%node /sbin/rmmod $href->{'PVFS_KMOD'}";
+    $rc = do_remote_command($href->{'RCMDPROG_ROOT'}, 8, 30, $cmd, undef, undef, @nodes);
+
+    return ($rc);
+}
+
+
+sub stop_servers {
+    my $href = shift;
+
+    my @servers = (@{$href->{'MGR'}}, @{$href->{'IONODES'}});
+    my $rc = 0;
+
+    # a bit viscious, but we don't store our pid anywhere 
+    my $cmd = "%node killall pvfs2-server \\\; sleep 1 \\\; killall -9 pvfs2-server";
+   
+    $rc = do_remote_command($href->{'RCMDPROG'}, 8, 30, $cmd, undef, undef, @servers);
+
+    return($rc);
+}
+
+sub usage {
+
+    print<<EOF;
+Usage: $prog_name [option]
+-s -session       session file for PAV to use
+-sd -sessiondir   directory containing session file 'pvfs_autosession'
+-rsh              remote shell command to use (default 'ssh')
+-rcp              remote copy command to use (default 'scp')
+-h -help          display this message
+EOF
+}
+
+sub init {
+    GetOptions(\%args,
+	       's|session:s',
+	       'sd|sessiondir:s',
+	       'rsh:s',
+	       'rcp:s',
+	       'r|root:s',
+	       'h|help'
+	       );
+
+    if ($args{'h'}) {
+	usage();
+	return(1);
+    }
+
+    if ($args{'s'}) {
+	$session_file = $args{'s'};
+    } elsif ($args{'sd'}) {
+	$session_file = $args{'sd'} . "/pvfs_autosession";
+    } else {
+	usage();
+	return(1);
+    }
+
+    if (!-f $session_file) {
+	print STDERR "ERROR: cannot find session file: $session_file\n";
+	return(1);
+    }
+
+    %config = ('RCMDPROG' => "ssh",
+	       'RCPPROG' => "scp",
+	       'PROGROOT' => "./"
+	       );
+
+    $config{'PROGROOT'} = $args{'r'} || $config{'PROGROOT'};
+    my $prog_root = $config{'PROGROOT'};
+    require "$prog_root/pav_lib.pl";
+
+    $rc = read_sessionfile($session_file, \%config);
+    if ($rc) {
+	print STDERR "ERROR: cannot read session file\n";
+	return(1);
+    }
+
+    $config{'RCMDPROG'} = $args{'rsh'} || $config{'RCMDPROG'};
+    $config{'RCPPROG'} = $args{'rcp'} || $config{'RCPPROG'};
+
+    $prog_name = $0;
+    $pid = $$;
+
+    return(0);
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/quicklist/module.mk.in
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/quicklist/module.mk.in	(revision 5663)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/quicklist/module.mk.in	(revision 5663)
@@ -0,0 +1,2 @@
+DIR := common/quicklist
+TESTSRC += $(DIR)/example.c
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/quicklist/example.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/quicklist/example.c	(revision 5169)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/quicklist/example.c	(revision 5169)
@@ -0,0 +1,55 @@
+/*
+ * simple little ditty showing how one might use the qlist stuff 
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "quicklist.h"
+
+void init_list(void);
+int add_item(int data);
+void dump_list(void);
+
+struct foo_struct 
+{
+	int blah;
+	struct qlist_head link;
+};
+
+QLIST_HEAD(list_head);
+
+void init_list(void)
+{
+	INIT_QLIST_HEAD(&list_head);
+}
+
+int add_item(int data)
+{
+	struct foo_struct *foo = (struct foo_struct *)calloc(1, sizeof(*foo));
+	foo->blah = data;
+
+	qlist_add(&(foo->link), &list_head);
+	return 0;
+}
+
+void dump_list(void) 
+{
+	struct qlist_head *p;
+
+	qlist_for_each(p, &list_head) {
+		printf("data: %d\n", qlist_entry(p, struct foo_struct, link)->blah);
+	}
+}
+
+int main(int argc, char ** argv )
+{
+	int i;
+	init_list();
+
+	for (i=0; i<10; i++) {
+		add_item(i);
+	}
+
+	dump_list();
+	return 0;
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/misc/module.mk.in
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/misc/module.mk.in	(revision 7500)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/misc/module.mk.in	(revision 7500)
@@ -0,0 +1,7 @@
+DIR := common/misc
+
+TESTSRC += \
+	$(DIR)/test-event-parser.c \
+	$(DIR)/test-event-summary.c \
+        $(DIR)/test-tcache.c \
+ 	$(DIR)/test-perf-counter.c
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/misc/test-tcache.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/misc/test-tcache.c	(revision 6442)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/misc/test-tcache.c	(revision 6442)
@@ -0,0 +1,529 @@
+/*
+ * Copyright © Acxiom Corporation, 2005
+ *
+ * See COPYING in top-level directory.
+ */
+
+#include <stdio.h>
+#include <assert.h>
+#include <unistd.h>
+
+#include "pvfs2.h"
+#include "tcache.h"
+
+static void usage(int argc, char** argv);
+static int foo_compare_key_entry(void* key, struct qhash_head* link);
+static int foo_hash_key(void* key, int table_size);
+static int foo_free_payload(void* payload);
+static void check_param(char *parameter_name, int param, int expected_value);
+
+#define TEST_TIMEOUT_MSEC     4000
+#define TEST_NUM_ENTRIES        30
+#define TEST_HARD_LIMIT         10
+#define TEST_SOFT_LIMIT          5
+#define TEST_ENABLE              1
+#define TEST_RECLAIM_PERCENTAGE 50
+
+
+/* test payload */
+struct foo_payload
+{
+    int key;
+    float value;
+};
+
+int main(int argc, char **argv)
+{
+    struct PINT_tcache* test_tcache;
+    int i;
+    struct foo_payload* tmp_payload;
+    struct PINT_tcache_entry* test_entry = NULL;
+    int ret = 0;
+    int status = 0;
+    unsigned int param = 0;
+    int tmp_count = 0;
+
+    if(argc != 1)
+    {
+        usage(argc, argv);
+        return(-1);
+    }
+
+    /* initialize */
+    printf("Initializing cache... ");
+    test_tcache = PINT_tcache_initialize(foo_compare_key_entry,
+        foo_hash_key,
+        foo_free_payload,
+        -1);
+    if(!test_tcache)
+    {
+        fprintf(stderr, "PINT_tcache_initialize failure.\n");
+        return(-1);
+    }
+    printf("Done.\n");
+
+    /* set parameters */
+    printf("Setting all TCACHE parameters... ");
+    param = TEST_TIMEOUT_MSEC;
+    ret = PINT_tcache_set_info(test_tcache, TCACHE_TIMEOUT_MSECS, param);
+    assert(ret == 0);
+    param = TEST_NUM_ENTRIES;
+    ret = PINT_tcache_set_info(test_tcache, TCACHE_NUM_ENTRIES, param);
+    assert(ret == -PVFS_EINVAL);
+    param = TEST_HARD_LIMIT;
+    ret = PINT_tcache_set_info(test_tcache, TCACHE_HARD_LIMIT, param);
+    assert(ret == 0);
+    param = TEST_SOFT_LIMIT;
+    ret = PINT_tcache_set_info(test_tcache, TCACHE_SOFT_LIMIT, param);
+    assert(ret == 0);
+    param = TEST_ENABLE;
+    ret = PINT_tcache_set_info(test_tcache, TCACHE_ENABLE, param);
+    assert(ret == 0);
+    param = TEST_RECLAIM_PERCENTAGE;
+    ret = PINT_tcache_set_info(test_tcache, TCACHE_RECLAIM_PERCENTAGE, param);
+    assert(ret == 0);
+    printf("Done.\n");
+
+    /* read current parameters */
+    printf("Reading all TCACHE parameters... ");
+    ret = PINT_tcache_get_info(test_tcache, TCACHE_TIMEOUT_MSECS, &param);
+    assert(ret == 0);
+    check_param("TCACHE_TIMEOUT_MSECS", param, TEST_TIMEOUT_MSEC);
+    ret = PINT_tcache_get_info(test_tcache, TCACHE_NUM_ENTRIES, &param);
+    assert(ret == 0);
+    check_param("TCACHE_NUM_ENTRIES", param, 0);
+    ret = PINT_tcache_get_info(test_tcache, TCACHE_HARD_LIMIT, &param);
+    assert(ret == 0);
+    check_param("TCACHE_HARD_LIMIT", param, TEST_HARD_LIMIT);
+    ret = PINT_tcache_get_info(test_tcache, TCACHE_SOFT_LIMIT, &param);
+    assert(ret == 0);
+    check_param("TCACHE_SOFT_LIMIT", param, TEST_SOFT_LIMIT);
+    ret = PINT_tcache_get_info(test_tcache, TCACHE_ENABLE, &param);
+    assert(ret == 0);
+    check_param("TCACHE_ENABLE", param, TEST_ENABLE);
+    ret = PINT_tcache_get_info(test_tcache, TCACHE_RECLAIM_PERCENTAGE, &param);
+    assert(ret == 0);
+    check_param("TCACHE_RECLAIM_PERCENTAGE", param, TEST_RECLAIM_PERCENTAGE);
+    printf("Done.\n");
+
+    /* insert some entries */
+    for(i=0; i< 3; i++)
+    {
+        tmp_payload = (struct foo_payload*)malloc(sizeof(struct
+            foo_payload));
+        assert(tmp_payload);
+        tmp_payload->key = i;
+        tmp_payload->value = i;
+
+        printf("Inserting [%d]... ", i);
+        ret = PINT_tcache_insert_entry(test_tcache, &i, tmp_payload,
+            &tmp_count);
+        if(ret < 0)
+        {
+            PVFS_perror("\nPINT_tcache_insert", ret);
+            return(-1);
+        }
+        printf("Done.\n");
+        sleep(1);
+    }
+
+    /* lookup all three */
+    for(i=0; i<3; i++)
+    {
+        printf("Looking up valid entry [%d]... ", i);
+        ret = PINT_tcache_lookup(test_tcache, &i, &test_entry, &status);
+        if(ret < 0)
+        {
+            PVFS_perror("\nPINT_tcache_lookup", ret);
+            return(-1);
+        }
+        if(status != 0)
+        {
+            PVFS_perror("\nPINT_tcache_lookup status", status);
+            return(-1);
+        }
+        tmp_payload = test_entry->payload;
+        check_param("tcache value", tmp_payload->value, i);
+        printf("Done.\n");
+    }
+
+    /* sleep until at least first expires */
+    sleep(2);
+    i=0;
+    printf("Looking up expired entry [%d]... ", i);
+    ret = PINT_tcache_lookup(test_tcache, &i, &test_entry, &status);
+    if(ret < 0)
+    {
+        PVFS_perror("\nPINT_tcache_lookup", ret);
+        return(-1);
+    }
+    if(status != -PVFS_ETIME) /* The status should be EXPIRED */
+    {
+        PVFS_perror("\nPINT_tcache_lookup status", status);
+        return(-1);
+    }
+    tmp_payload = test_entry->payload;
+    check_param("tcache value", tmp_payload->value, i);
+    printf("Done.\n");
+
+    i=2;
+    printf("Looking up valid entry [%d]... ", i);
+    ret = PINT_tcache_lookup(test_tcache, &i, &test_entry, &status);
+    if(ret < 0)
+    {
+        PVFS_perror("\nPINT_tcache_lookup", ret);
+        return(-1);
+    }
+    if(status != 0)
+    {
+        PVFS_perror("\nPINT_tcache_lookup status", status);
+        return(-1);
+    }
+    tmp_payload = test_entry->payload;
+    check_param("tcache value", tmp_payload->value, i);
+    printf("Done.\n");
+
+    /* try destroying an entry */
+    printf("Destroying an entry...\n");
+    ret = PINT_tcache_delete(test_tcache, test_entry);
+    if(ret < 0)
+    {
+        PVFS_perror("PINT_tcache_delete", ret);
+        return(-1);
+    }
+    printf("Done.\n");
+
+    i=2;
+    printf("Looking up destroyed entry [%d]... ", i);
+    ret = PINT_tcache_lookup(test_tcache, &i, &test_entry, &status);
+    if(ret != -PVFS_ENOENT)
+    {
+        PVFS_perror("\nPINT_tcache_lookup", ret);
+        return(-1);
+    }
+    printf("Done.\n");
+
+    i=200;
+    printf("Looking up entry that never existed [%d]... ", i);
+    ret = PINT_tcache_lookup(test_tcache, &i, &test_entry, &status);
+    if(ret != -PVFS_ENOENT)
+    {
+        PVFS_perror("\nPINT_tcache_lookup", ret);
+        return(-1);
+    }
+    printf("Done.\n");
+
+    /* All entries will be expired after sleep*/
+    printf("Sleeping 5 seconds to expire all entries... ");
+    sleep(5);
+    printf("Done.\n");
+
+    /* insert a new entry */
+    i=3;
+    tmp_payload = (struct foo_payload*)malloc(sizeof(struct
+        foo_payload));
+    assert(tmp_payload);
+    tmp_payload->key = i;
+    tmp_payload->value = i;
+    printf("Inserting [%d]... ", i);
+    ret = PINT_tcache_insert_entry(test_tcache, &i, tmp_payload,
+        &tmp_count);
+    if(ret < 0)
+    {
+        PVFS_perror("PINT_tcache_insert", ret);
+        return(-1);
+    }
+    printf("Done.\n");
+
+    /* reclaim. There should be 3 entries... Soft limit is 5, reclaim percentage
+     * is 50. We should reclaim (soft limit) * (reclaim percentage), so we should
+     * reclaim 2 entries, which leaves us with 1 entry
+     */
+    printf("Issuing a reclaim...");
+    ret = PINT_tcache_reclaim(test_tcache, &tmp_count);
+    if(ret < 0)
+    {
+        PVFS_perror("PINT_tcache_reclaim", ret);
+        return(-1);
+    }
+    ret = PINT_tcache_get_info(test_tcache, TCACHE_NUM_ENTRIES, &param);
+    assert(ret == 0);
+    check_param("TCACHE_NUM_ENTRIES", param, 1);
+    printf("Done.\n");
+
+    /* Check that reclaim removed the expected entries and that only one entry 
+     * exists 
+     */
+    printf("Looking up valid entry [%d]... ", i);
+    ret = PINT_tcache_lookup(test_tcache, &i, &test_entry, &status);
+    if(ret < 0)
+    {
+        PVFS_perror("\nPINT_tcache_lookup", ret);
+        return(-1);
+    }
+    if(status != 0)
+    {
+        PVFS_perror("\nPINT_tcache_lookup status", status);
+        return(-1);
+    }
+    tmp_payload = test_entry->payload;
+    check_param("tcache value", tmp_payload->value, i);
+    printf("Done.\n");
+    
+    /* finalize */
+    printf("Finalizing cache... ");
+    PINT_tcache_finalize(test_tcache);
+    printf("Done.\n");
+
+    /* initialize */
+    printf("Initializing cache... ");
+    test_tcache = PINT_tcache_initialize(foo_compare_key_entry,
+        foo_hash_key,
+        foo_free_payload,
+        -1);
+    if(!test_tcache)
+    {
+        fprintf(stderr, "\nPINT_tcache_initialize failure.\n");
+        return(-1);
+    }
+    printf("Done.\n");
+
+    /* disable */
+    printf("Disabling TCACHE...");
+    param = 0;
+    ret = PINT_tcache_set_info(test_tcache, TCACHE_ENABLE, param);
+    assert(ret == 0);
+    printf("Done.\n");
+
+    /* insert some entries */
+    for(i=0; i< 3; i++)
+    {
+        tmp_payload = (struct foo_payload*)malloc(sizeof(struct
+            foo_payload));
+        assert(tmp_payload);
+        tmp_payload->key = i;
+        tmp_payload->value = i;
+
+        printf("Inserting [%d]... ", i);
+        ret = PINT_tcache_insert_entry(test_tcache, &i, tmp_payload,
+            &tmp_count);
+        if(ret < 0)
+        {
+            PVFS_perror("\nPINT_tcache_insert", ret);
+            return(-1);
+        }
+        printf("Done.\n");
+    }
+
+    /* Try and lookup each entry, make sure it doesn't exist */
+    for(i=0; i<3; i++)
+    {
+        printf("Looking up invalid entry [%d]... ", i);
+        ret = PINT_tcache_lookup(test_tcache, &i, &test_entry, &status);
+        if(ret != -PVFS_ENOENT)
+        {
+            PVFS_perror("\nPINT_tcache_lookup", ret);
+            return(-1);
+        }
+        printf("Done.\n");
+    }
+    
+    /* enable */
+    printf("Enable TCACHE... ");
+    param = 1;
+    ret = PINT_tcache_set_info(test_tcache, TCACHE_ENABLE, param);
+    assert(ret == 0);
+    printf("Done.\n");
+
+    /* set parameters */
+    printf("Setting all TCACHE parameters... ");
+    param = TEST_TIMEOUT_MSEC;
+    ret = PINT_tcache_set_info(test_tcache, TCACHE_TIMEOUT_MSECS, param);
+    assert(ret == 0);
+    param = TEST_NUM_ENTRIES;
+    ret = PINT_tcache_set_info(test_tcache, TCACHE_NUM_ENTRIES, param);
+    assert(ret == -PVFS_EINVAL);
+    param = TEST_HARD_LIMIT;
+    ret = PINT_tcache_set_info(test_tcache, TCACHE_HARD_LIMIT, param);
+    assert(ret == 0);
+    param = TEST_SOFT_LIMIT;
+    ret = PINT_tcache_set_info(test_tcache, TCACHE_SOFT_LIMIT, param);
+    assert(ret == 0);
+    param = TEST_ENABLE;
+    ret = PINT_tcache_set_info(test_tcache, TCACHE_ENABLE, param);
+    assert(ret == 0);
+    param = TEST_RECLAIM_PERCENTAGE;
+    ret = PINT_tcache_set_info(test_tcache, TCACHE_RECLAIM_PERCENTAGE, param);
+    assert(ret == 0);
+    printf("Done.\n");
+
+    /* insert some entries */
+    for(i=0; i< 5; i++)
+    {
+        tmp_payload = (struct foo_payload*)malloc(sizeof(struct
+            foo_payload));
+        assert(tmp_payload);
+        tmp_payload->key = i;
+        tmp_payload->value = i;
+
+        printf("Inserting [%d]... ", i);
+        ret = PINT_tcache_insert_entry(test_tcache, &i, tmp_payload,
+            &tmp_count);
+        if(ret < 0)
+        {
+            PVFS_perror("\nPINT_tcache_insert", ret);
+            return(-1);
+        }
+        printf("Done.\n");
+    }
+
+    /* All entries should be expired after sleep */
+    printf("Sleeping 5 seconds to expire all entries... ");
+    sleep(5);
+    printf("Done.\n");
+
+    /* check num_entries */
+    printf("Checking for 5 entries...");
+    ret = PINT_tcache_get_info(test_tcache, TCACHE_NUM_ENTRIES, &param);
+    assert(ret == 0);
+    check_param("TCACHE_NUM_ENTRIES", param, 5);
+    printf("Done.\n");
+
+    /* insert some entries */
+    for(i=5; i< 6; i++)
+    {
+        tmp_payload = (struct foo_payload*)malloc(sizeof(struct
+            foo_payload));
+        assert(tmp_payload);
+        tmp_payload->key = i;
+        tmp_payload->value = i;
+
+        printf("Inserting [%d]... ", i);
+        /* Soft limit is 5, insert of 6th entry should cause a  reclaim. 5 
+         * expired entries exist. Reclaim of 2 entries should occur 
+         */
+        ret = PINT_tcache_insert_entry(test_tcache, &i, tmp_payload,
+            &tmp_count);
+        if(ret < 0)
+        {
+            PVFS_perror("\nPINT_tcache_insert", ret);
+            return(-1);
+        }
+        printf("Done.\n");
+    }
+
+    /* check num_entries. Reclaim should have purged 2 entries */
+    printf("Checking RECLAIM occurred during last insert. Should contain 4 entries... ");
+    ret = PINT_tcache_get_info(test_tcache, TCACHE_NUM_ENTRIES, &param);
+    assert(ret == 0);
+    check_param("TCACHE_NUM_ENTRIES", param, 4);
+    printf("Done.\n");
+
+    /* insert some entries */
+    for(i=6; i< 20; i++)
+    {
+        tmp_payload = (struct foo_payload*)malloc(sizeof(struct
+            foo_payload));
+        assert(tmp_payload);
+        tmp_payload->key = i;
+        tmp_payload->value = i;
+
+        printf("Inserting [%d]... ", i);
+        /* Inserting should cause reclaims to happen. 3 entries (3-5) are 
+         * expired and should be purged. HARD_LIMIT is 10, so only the last
+         * 10 entries should exist 
+         */
+        ret = PINT_tcache_insert_entry(test_tcache, &i, tmp_payload,
+            &tmp_count);
+        if(ret < 0)
+        {
+            PVFS_perror("\nPINT_tcache_insert", ret);
+            return(-1);
+        }
+        printf("Done.\n");
+    }
+
+    /* check num_entries */
+    ret = PINT_tcache_get_info(test_tcache, TCACHE_NUM_ENTRIES, &param);
+    assert(ret == 0);
+    check_param("TCACHE_NUM_ENTRIES", param, TEST_HARD_LIMIT);
+
+    /* Check to make sure the first 10 entries do NOT exist */
+    /* Try and lookup each entry, make sure it doesn't exist */
+    for(i=0; i<10; i++)
+    {
+        printf("Looking up invalid entry [%d]... ", i);
+        ret = PINT_tcache_lookup(test_tcache, &i, &test_entry, &status);
+        if(ret != -PVFS_ENOENT)
+        {
+            PVFS_perror("\nPINT_tcache_lookup", ret);
+            return(-1);
+        }
+        printf("Done.\n");
+    }
+
+    return(0);
+}
+
+static void usage(int argc, char** argv)
+{
+    fprintf(stderr, "\n");
+    fprintf(stderr, "Usage  : %s\n", argv[0]);
+    return;
+}
+
+static int foo_compare_key_entry(void* key, struct qhash_head* link)
+{
+    int* real_key = (int*)key;
+    struct foo_payload* tmp_payload = NULL;
+    struct PINT_tcache_entry* tmp_entry = NULL;
+
+    tmp_entry = qlist_entry(link, struct PINT_tcache_entry, hash_link);
+    assert(tmp_entry);
+
+    tmp_payload = (struct foo_payload*)tmp_entry->payload;
+    if(*real_key == tmp_payload->key)
+    {
+        return(1);
+    }
+
+    return(0);
+}
+
+static int foo_hash_key(void* key, int table_size)
+{
+    int* real_key = (int*)key;
+    int tmp_ret = 0;
+
+    tmp_ret = (*real_key)%table_size;
+    return(tmp_ret);
+}
+
+static int foo_free_payload(void* payload)
+{
+    free(payload);
+    return(0);
+}
+
+static void check_param(char *parameter_name, int param, int expected_value)
+{
+    if(param != expected_value)
+    {
+        fprintf(stderr, "\n%s does not match expected result\n"
+                        "\t%s = %d\n"
+                        "\texpected value = %d\n",
+                        parameter_name,
+                        parameter_name,
+                        param,
+                        expected_value);
+    }
+}
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/misc/test-perf-counter.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/misc/test-perf-counter.c	(revision 5656)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/misc/test-perf-counter.c	(revision 5656)
@@ -0,0 +1,312 @@
+/*
+ * Copyright © Acxiom Corporation, 2005
+ *
+ * See COPYING in top-level directory.
+ */
+
+#include <stdio.h>
+#include <assert.h>
+#include <unistd.h>
+#include <assert.h>
+#include <stdlib.h>
+
+#include "pvfs2.h"
+#include "pvfs2-internal.h"
+#include "pint-perf-counter.h"
+
+enum 
+{
+   ACACHE_NUM_ENTRIES = 0,
+   ACACHE_SOFT_LIMIT = 1,
+   ACACHE_HARD_LIMIT = 2,
+   ACACHE_HITS = 3,
+   ACACHE_MISSES = 4,
+   ACACHE_UPDATES = 5,
+   ACACHE_PURGES = 6,
+   ACACHE_REPLACEMENTS = 7,
+   ACACHE_ENABLED = 8,
+};
+
+struct PINT_perf_key acache_keys_array[] = 
+{
+   {"ACACHE_NUM_ENTRIES", ACACHE_NUM_ENTRIES, PINT_PERF_PRESERVE},
+   {"ACACHE_SOFT_LIMIT", ACACHE_SOFT_LIMIT, PINT_PERF_PRESERVE},
+   {"ACACHE_HARD_LIMIT", ACACHE_HARD_LIMIT, PINT_PERF_PRESERVE},
+   {"ACACHE_HITS", ACACHE_HITS, 0},
+   {"ACACHE_MISSES", ACACHE_MISSES, 0},
+   {"ACACHE_UPDATES", ACACHE_UPDATES, 0},
+   {"ACACHE_PURGES", ACACHE_PURGES, 0},
+   {"ACACHE_REPLACEMENTS", ACACHE_REPLACEMENTS, 0},
+   {"ACACHE_ENABLED", ACACHE_ENABLED, PINT_PERF_PRESERVE},
+   {NULL, 0, 0},
+};
+
+static void usage(int argc, char** argv);
+
+static void print_counters(struct PINT_perf_counter* pc, int* in_key_count,
+    int* in_history_size);
+
+int main(int argc, char **argv)
+{
+    struct PINT_perf_counter* pc;
+    int tmp_key_count;
+    int tmp_history_size;
+    char* tmp_str;
+
+    if(argc != 1)
+    {
+        usage(argc, argv);
+        return(-1);
+    }
+
+    printf("Initializing...");
+    pc = PINT_perf_initialize(acache_keys_array);
+    if(!pc)
+    {
+        fprintf(stderr, "Error: PINT_perf_initialize() failure.\n");
+        return(-1);
+    }
+    printf("Done.\n");
+
+    print_counters(pc, NULL, NULL);
+
+    PINT_perf_count(pc, ACACHE_NUM_ENTRIES, 1, PINT_PERF_ADD);
+    PINT_perf_count(pc, ACACHE_NUM_ENTRIES, 1, PINT_PERF_ADD);
+    PINT_perf_count(pc, ACACHE_HITS, 1, PINT_PERF_ADD);
+    PINT_perf_count(pc, ACACHE_ENABLED, 1, PINT_PERF_SET);
+    PINT_perf_count(pc, ACACHE_HARD_LIMIT, 500, PINT_PERF_SET);
+
+    print_counters(pc, NULL, NULL);
+
+    printf("Testing rollover...");
+    PINT_perf_rollover(pc);
+    printf("Done.\n");
+
+    PINT_perf_count(pc, ACACHE_NUM_ENTRIES, 1, PINT_PERF_ADD);
+    PINT_perf_count(pc, ACACHE_HITS, 1, PINT_PERF_ADD);
+    PINT_perf_count(pc, ACACHE_HITS, 1, PINT_PERF_ADD);
+    PINT_perf_count(pc, ACACHE_HARD_LIMIT, 300, PINT_PERF_SET);
+
+    sleep(2);
+
+    printf("Testing rollover...");
+    PINT_perf_rollover(pc);
+    printf("Done.\n");
+
+    print_counters(pc, NULL, NULL);
+
+    PINT_perf_count(pc, ACACHE_NUM_ENTRIES, 1, PINT_PERF_SUB);
+
+    printf("Testing generate text...\n");
+    tmp_str = PINT_perf_generate_text(pc, 4096);
+    printf("%s", tmp_str);
+    printf("Done.\n");
+    free(tmp_str);
+
+    sleep(2);
+
+    printf("Testing rollover...");
+    PINT_perf_rollover(pc);
+    printf("Done.\n");
+
+    print_counters(pc, NULL, NULL);
+
+    sleep(2);
+
+    printf("Testing rollover...");
+    PINT_perf_rollover(pc);
+    printf("Done.\n");
+
+    print_counters(pc, NULL, NULL);
+
+    sleep(2);
+
+    printf("Testing rollover...");
+    PINT_perf_rollover(pc);
+    printf("Done.\n");
+
+    print_counters(pc, NULL, NULL);
+
+    sleep(2);
+
+    printf("Testing rollover...");
+    PINT_perf_rollover(pc);
+    printf("Done.\n");
+
+    sleep(2);
+
+    printf("Testing rollover...");
+    PINT_perf_rollover(pc);
+    printf("Done.\n");
+
+    sleep(2);
+
+    printf("Testing rollover...");
+    PINT_perf_rollover(pc);
+    printf("Done.\n");
+
+    sleep(2);
+
+    print_counters(pc, NULL, NULL);
+
+    printf("Reducing history size...");
+    PINT_perf_set_info(pc, PINT_PERF_HISTORY_SIZE, 3);
+    printf("Done.\n");
+
+    print_counters(pc, NULL, NULL);
+
+    PINT_perf_count(pc, ACACHE_HITS, 1, PINT_PERF_ADD);
+    PINT_perf_count(pc, ACACHE_HITS, 1, PINT_PERF_ADD);
+
+    print_counters(pc, NULL, NULL);
+
+    sleep(2);
+
+    printf("Testing rollover...");
+    PINT_perf_rollover(pc);
+    printf("Done.\n");
+
+    print_counters(pc, NULL, NULL);
+
+    printf("Increasing history size...");
+    PINT_perf_set_info(pc, PINT_PERF_HISTORY_SIZE, 5);
+    printf("Done.\n");
+
+    print_counters(pc, NULL, NULL);
+
+    printf("Retrieving larger history and smaller keys than available.\n");
+    tmp_key_count = 4;
+    tmp_history_size = 8;
+    print_counters(pc, &tmp_key_count, &tmp_history_size);
+
+    printf("Reducing history size to one...");
+    PINT_perf_set_info(pc, PINT_PERF_HISTORY_SIZE, 1);
+    printf("Done.\n");
+
+    print_counters(pc, NULL, NULL);
+
+    printf("Testing rollover...");
+    PINT_perf_rollover(pc);
+    printf("Done.\n");
+
+    PINT_perf_count(pc, ACACHE_HITS, 1, PINT_PERF_ADD);
+    PINT_perf_count(pc, ACACHE_HITS, 1, PINT_PERF_ADD);
+
+    sleep(1);
+
+    print_counters(pc, NULL, NULL);
+
+    printf("Testing rollover...");
+    PINT_perf_rollover(pc);
+    printf("Done.\n");
+
+    printf("Testing generate text...\n");
+    tmp_str = PINT_perf_generate_text(pc, 4096);
+    printf("%s", tmp_str);
+    printf("Done.\n");
+    free(tmp_str);
+
+    printf("Finalizing...");
+    PINT_perf_finalize(pc);
+    printf("Done.\n");
+
+    return(0);
+}
+
+static void usage(int argc, char** argv)
+{
+    fprintf(stderr, "\n");
+    fprintf(stderr, "Usage  : %s\n", argv[0]);
+    return;
+}
+
+static void print_counters(struct PINT_perf_counter* pc, int* in_key_count,
+    int* in_history_size)
+{
+    unsigned int key_count;
+    unsigned int history_size;
+    int ret;
+    int64_t** stat_matrix;
+    uint64_t* start_time_array_ms;
+    uint64_t* interval_array_ms;
+    int i,j;
+
+    if(in_key_count)
+    {
+        key_count = *in_key_count;
+    }
+    else
+    {
+        /* get dimensions */
+        ret = PINT_perf_get_info(pc, PINT_PERF_KEY_COUNT, 
+            &key_count);
+        assert(ret == 0);
+    }
+
+    if(in_history_size)
+    {
+        history_size = *in_history_size;
+    }
+    else
+    {
+        ret = PINT_perf_get_info(pc, PINT_PERF_HISTORY_SIZE, 
+            &history_size);
+        assert(ret == 0);
+    }
+
+    /* allocate storage for results */
+    stat_matrix = malloc(key_count*sizeof(int64_t*));
+    for(i=0; i<key_count; i++)
+    {
+        stat_matrix[i] = malloc(history_size*sizeof(int64_t));
+        assert(stat_matrix[i]);
+    }
+    start_time_array_ms = malloc(history_size*sizeof(uint64_t));
+    assert(start_time_array_ms);
+    interval_array_ms = malloc(history_size*sizeof(uint64_t));
+    assert(interval_array_ms);
+
+    /* retrieve values from perf counter api */
+    PINT_perf_retrieve(
+       pc,
+       stat_matrix,
+       start_time_array_ms,
+       interval_array_ms,
+       key_count,
+       history_size);
+
+    printf("===================\n");
+
+    /* print times (column headings) */
+    printf("First start time (ms): %llu\n", llu(start_time_array_ms[0]));
+    printf("%24.24s: ", "Interval size (ms)");
+    for(i=0; i<history_size; i++)
+    {
+        printf("%llu\t", llu(interval_array_ms[i]));
+    }
+    printf("\n");
+
+    /* print key names and values */
+    for(i=0; i<key_count; i++)
+    {
+        printf("%24.24s: ", acache_keys_array[i].key_name);
+
+        for(j=0; j<history_size; j++)
+        {
+            printf("%lld\t", lld(stat_matrix[i][j]));
+        }
+        printf("\n");
+    }
+
+    return;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/misc/test-event-parser.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/misc/test-event-parser.c	(revision 4682)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/misc/test-event-parser.c	(revision 4682)
@@ -0,0 +1,237 @@
+/*
+ * (C) 2001 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+#include <unistd.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/time.h>
+#include <time.h>
+#include <stdlib.h>
+
+#include "pvfs2.h"
+#include "pvfs2-mgmt.h"
+#include "pvfs2-event.h"
+
+#ifndef PVFS2_VERSION
+#define PVFS2_VERSION "Unknown"
+#endif
+
+static void usage(int argc, char** argv);
+
+struct data_point
+{
+    int processed;
+    int server;
+    int api;
+    int op;
+    long long value;
+    long long id;
+    int flags;
+    long sec;
+    long usec;
+};
+
+int main(int argc, char **argv)
+{
+    int ret = -1;
+    FILE* infile;
+    struct data_point* data_array;
+    int array_size = 8000;
+    int cur_index = 0;
+    int run_index = 0;
+    char tmp_buf[512];
+    double tmp_time = 0.0f;
+    double tmp_time2 = 0.0f;
+    double first_time = 0.0f;
+    double last_end_time = 0.0f;
+    double total_empty = 0.0f;
+    int counter = 0;
+
+    if(argc != 2)
+	usage(argc, argv);
+
+    infile = fopen(argv[1], "r");
+    if(!infile)
+    {
+	perror("fopen");
+	return(-1);
+    }
+
+    data_array = (struct data_point*)malloc(array_size*sizeof(struct data_point));
+    if(!data_array)
+    {
+	perror("malloc");
+	return(-1);
+    }
+    memset(data_array, 0, array_size*sizeof(struct data_point));
+
+    printf("# (measurement #) (server) (api_op) (size/value) (start) (end) (length)\n");
+
+    /* pull in all of the data */
+    while(fgets(tmp_buf, 512, infile))
+    {
+	/* skip comments */
+	if(tmp_buf[0] == '#')
+	    continue;
+
+	if(cur_index >= array_size)
+	{
+	    fprintf(stderr, "Overflow.\n");
+	    return(-1);
+	}
+
+	/* read in data line */
+	ret = sscanf(tmp_buf, "%d %d %d %lld %lld %d %ld %ld\n",
+	    &data_array[cur_index].server,
+	    &data_array[cur_index].api,
+	    &data_array[cur_index].op,
+	    &data_array[cur_index].value,
+	    &data_array[cur_index].id,
+	    &data_array[cur_index].flags,
+	    &data_array[cur_index].sec,
+	    &data_array[cur_index].usec);
+	if(ret != 8)
+	{
+	    fprintf(stderr, "Parse error, data line %d.\n", (cur_index+1));
+	    return(-1);
+	}
+	cur_index++;
+    }
+    array_size = cur_index;
+
+    /* iterate through it and turn into something plottable */
+    for(cur_index=0; cur_index < array_size; cur_index++)
+    {
+	if(data_array[cur_index].processed)
+	    continue;
+	if(data_array[cur_index].flags != PVFS_EVENT_FLAG_START)
+	{
+	    data_array[cur_index].processed = 1;
+	    continue;
+	}
+
+	if(first_time == 0)
+	{
+	    first_time = (double)data_array[cur_index].sec + 
+		(double)data_array[cur_index].usec / 1000000;
+	}
+	
+	/* found a starting time; lets look for the matching end time */
+	for(run_index=cur_index; run_index < array_size; run_index++)
+	{
+	    if(
+		!data_array[run_index].processed &&
+		data_array[run_index].flags == PVFS_EVENT_FLAG_END &&
+		data_array[run_index].server == data_array[cur_index].server &&
+		data_array[run_index].api == data_array[cur_index].api &&
+		data_array[run_index].op == data_array[cur_index].op &&
+		data_array[run_index].id == data_array[cur_index].id)
+	    {
+		/* printf("match.\n"); */
+		printf("%d\t", counter);
+		counter++;
+		data_array[run_index].processed = 1;
+		printf("%d\t%d_%d\t", data_array[cur_index].server,
+		    data_array[cur_index].api,
+		    data_array[cur_index].op);
+		if(data_array[cur_index].value > 0)
+		    printf("%lld\t", data_array[cur_index].value);
+		else
+		    printf("%lld\t", data_array[run_index].value);
+		tmp_time = (double)data_array[cur_index].sec + 
+		    (double)data_array[cur_index].usec / 1000000;
+		tmp_time = tmp_time - first_time;
+		/* tmp_time is start time, counted since first event */
+		printf("%f\t", tmp_time);
+
+		if(last_end_time != 0 && last_end_time < tmp_time)
+		{
+#if 0
+		    printf("empty: %f to %f, len %f\n", last_end_time, tmp_time,
+			(tmp_time-last_end_time));
+#endif
+		    total_empty += (tmp_time-last_end_time);
+		}
+		else
+		{
+#if 0
+		    printf("\n overlap\n");
+#endif
+		}
+
+		/* again; end time */
+		tmp_time2 = (double)data_array[run_index].sec + 
+		    (double)data_array[run_index].usec / 1000000;
+		tmp_time2 = tmp_time2 - first_time;
+		/* tmp_time2 is end time, counted since first event */
+		printf("%f\t%f\n", tmp_time2, (tmp_time2-tmp_time));
+
+		if(tmp_time2 > last_end_time)
+		    last_end_time = tmp_time2;
+
+
+		break;
+	    }
+	}
+	if(run_index == array_size)
+	{
+	    /* printf("lost end time.\n"); */
+	}
+    }
+
+    printf("#total empty: %f\n", (total_empty));
+    printf("#total time: %f\n", tmp_time);
+    printf("#percentage idle: %f\n", (100*total_empty/tmp_time));
+
+    free(data_array);
+    fclose(infile);
+
+#if 0
+    printf("# (server number) (api) (operation) (value) (id) (flags) (sec) (usec)\n");
+    for(i=0; i<io_server_count; i++)
+    {
+	for(j=0; j<EVENT_DEPTH; j++)
+	{
+	    if((event_matrix[i][j].flags & PVFS_EVENT_FLAG_INVALID) == 0)
+	    {
+		printf("%d %d %d %lld %lld %d %d %d\n", 
+		    i, 
+		    (int)event_matrix[i][j].api,
+		    (int)event_matrix[i][j].operation,
+		    (long long)event_matrix[i][j].value,
+		    (long long)event_matrix[i][j].id,
+		    (int)event_matrix[i][j].flags,
+		    (int)event_matrix[i][j].tv_sec,
+		    (int)event_matrix[i][j].tv_usec);
+	    }
+	}
+    }
+#endif
+
+    return(ret);
+}
+
+static void usage(int argc, char** argv)
+{
+    fprintf(stderr, "\n");
+    fprintf(stderr, "Usage  : %s <event log>\n",
+	argv[0]);
+    return;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/common/misc/test-event-summary.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/common/misc/test-event-summary.c	(revision 4682)
+++ /tags/B2O-Blue-Sync-Temp-End/test/common/misc/test-event-summary.c	(revision 4682)
@@ -0,0 +1,156 @@
+/*
+ * (C) 2001 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+#include <unistd.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/time.h>
+#include <time.h>
+#include <stdlib.h>
+
+#include "pvfs2.h"
+#include "pvfs2-mgmt.h"
+#include "pvfs2-event.h"
+
+#ifndef PVFS2_VERSION
+#define PVFS2_VERSION "Unknown"
+#endif
+
+static void usage(int argc, char** argv);
+
+#define MAX_TALLY 1000
+
+struct tally
+{
+    int32_t api;
+    int32_t op;
+    float min;
+    float max;
+    float sum;
+    int count;
+};
+
+int main(int argc, char **argv)
+{
+    int ret = -1;
+    FILE* infile;
+    struct tally* tally_array;
+    char tmp_buf[512];
+    int tally_count = 0;
+    int measure_num;
+    int server;
+    int api;
+    int op;
+    long long value;
+    float start;
+    float end;
+    float len;
+    int line = 1;
+    int i;
+
+    if(argc != 2)
+	usage(argc, argv);
+
+    infile = fopen(argv[1], "r");
+    if(!infile)
+    {
+	perror("fopen");
+	return(-1);
+    }
+
+    tally_array = (struct tally*)malloc(MAX_TALLY*sizeof(struct tally));
+    if(!tally_array)
+    {
+	perror("malloc");
+	return(-1);
+    }
+    memset(tally_array, 0, MAX_TALLY*sizeof(struct tally));
+
+    printf("# (api_op) (count) (ave) (min) (max)\n");
+
+    /* pull in all of the data */
+    while(fgets(tmp_buf, 512, infile))
+    {
+	/* skip comments */
+	if(tmp_buf[0] == '#')
+	    continue;
+
+	/* read in data line */
+	ret = sscanf(tmp_buf, "%d\t%d\t%d_%d\t%lld\t%f\t%f\t%f\n",
+	    &measure_num,
+	    &server,
+	    &api,
+	    &op,
+	    &value,
+	    &start,
+	    &end,
+	    &len);
+	if(ret != 8)
+	{
+	    fprintf(stderr, "Parse error, data line %d.\n", (line));
+	    return(-1);
+	}
+	line++;
+
+	/* look for a tally for this type of op */
+	for(i=0; i<tally_count; i++)
+	{
+	    if(tally_array[i].op == op && tally_array[i].api == api)
+		break;
+	}
+	if(i >= tally_count)
+	{
+	    /* no match, start a new tally */
+	    tally_array[i].op = op;
+	    tally_array[i].api = api;
+	    tally_count++;
+	}
+
+	/* add into statistics */
+	if(tally_array[i].min == 0 || tally_array[i].min > len)
+	    tally_array[i].min = len;
+	if(tally_array[i].max == 0 || tally_array[i].max < len)
+	    tally_array[i].max = len;
+	tally_array[i].sum += len;
+	tally_array[i].count++;
+    }
+
+    /* print out results */
+    for(i=0; i<tally_count; i++)
+    {
+	printf("%d_%d\t%d\t%f\t%f\t%f\n",
+	    tally_array[i].api,
+	    tally_array[i].op,
+	    tally_array[i].count,
+	    (tally_array[i].sum / (float)tally_array[i].count),
+	    tally_array[i].min,
+	    tally_array[i].max);
+    }
+
+    return(0);
+}
+
+static void usage(int argc, char** argv)
+{
+    fprintf(stderr, "\n");
+    fprintf(stderr, "Usage  : %s <parsed event log>\n",
+	argv[0]);
+    return;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/mpi-active-delete.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/mpi-active-delete.c	(revision 6884)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/mpi-active-delete.c	(revision 6884)
@@ -0,0 +1,178 @@
+/*
+ * (C) 1995-2001 Clemson University and Argonne National Laboratory.
+ *
+ * See COPYING in top-level directory.
+ */
+
+/* N-1 processes will alternate reading and writing to independent files.
+ * The remaining process will delete one of the other files every 5 seconds.
+ *
+ * All file interaction is done through posix calls; no mpi-io.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/time.h>
+#include <mpi.h>
+#include <errno.h>
+#include <getopt.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+
+/* DEFAULT VALUES FOR OPTIONS */
+static char opt_dir[256] = "";
+
+/* function prototypes */
+static int parse_args(
+    int argc,
+    char **argv);
+static void usage(
+    void);
+
+/* global vars */
+static int mynod = 0;
+static int nprocs = 1;
+
+#define SLEEP_TIME 5
+
+int main(
+    int argc,
+    char **argv)
+{
+    int fd;
+    char file[256];
+    char* buf;
+    int ret;
+    int current_deleter = 0;
+
+    /* startup MPI and determine the rank of this process */
+    MPI_Init(&argc, &argv);
+    MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
+    MPI_Comm_rank(MPI_COMM_WORLD, &mynod);
+
+    if (nprocs < 2)
+    {
+        fprintf(stderr,
+                "Error: this program requires at least two processes.\n");
+        exit(1);
+    }
+
+    /* parse the command line arguments */
+    parse_args(argc, argv);
+
+    if (mynod == 0)
+    {
+        while(1)
+        {
+            current_deleter++;
+            current_deleter = current_deleter % nprocs;
+            if(current_deleter == 0)
+                current_deleter ++;
+
+            sleep(SLEEP_TIME);
+            sprintf(file, "%s/%d", opt_dir, current_deleter);
+            fprintf(stderr, "Deleting: %s\n", file);
+
+            ret = unlink(file);
+            if(ret < 0)
+            {
+                perror("unlink");
+                MPI_Abort(MPI_COMM_WORLD, 1);
+            }
+        }
+    }
+    else
+    {
+        buf = malloc(1024*1024);
+        if(!buf)
+        {
+            perror("malloc");
+            MPI_Abort(MPI_COMM_WORLD, 1);
+        }
+
+        sprintf(file, "%s/%d", opt_dir, mynod);
+
+        while(1)
+        {
+            fd = open(file, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+            if(fd < 0)
+            {
+                perror("open");
+                MPI_Abort(MPI_COMM_WORLD, 1);
+            }
+
+            while(1)
+            {
+                ret = write(fd, buf, 1024*1024);
+                if(ret < 0)
+                {
+                    perror("write");
+                    fprintf(stderr, "... continuing ...");
+                    sleep(SLEEP_TIME/2);
+                    break;
+                }
+                ret = read(fd, buf, 1024*1024);
+                if(ret < 0)
+                {
+                    perror("read");
+                    fprintf(stderr, "... continuing ...");
+                    sleep(SLEEP_TIME/2);
+                    break;
+                }
+            }
+        }
+    }
+
+    MPI_Finalize();
+    return (0);
+}
+
+static int parse_args(
+    int argc,
+    char **argv)
+{
+    int c;
+
+    while ((c = getopt(argc, argv, "d:h")) != EOF)
+    {
+        switch (c)
+        {
+        case 'd':      /* dir */
+            strncpy(opt_dir, optarg, 255);
+            break;
+        case 'h':
+            if (mynod == 0)
+                usage();
+            exit(0);
+        case '?':      /* unknown */
+            if (mynod == 0)
+                usage();
+            exit(1);
+        default:
+            break;
+        }
+    }
+    return (0);
+}
+
+static void usage(
+    void)
+{
+    printf("Usage: mpi-active-delete [<OPTIONS>...]\n");
+    printf("\n<OPTIONS> is one of\n");
+    printf(" -d       directory to place test files in\n");
+    printf(" -h       print this help\n");
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/module.mk.in
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/module.mk.in	(revision 6884)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/module.mk.in	(revision 6884)
@@ -0,0 +1,4 @@
+DIR := correctness
+
+MPIIOTESTSRC += \
+	$(DIR)/mpi-active-delete.c
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-romio-noncontig-pattern2.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-romio-noncontig-pattern2.h	(revision 2076)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-romio-noncontig-pattern2.h	(revision 2076)
@@ -0,0 +1,6 @@
+#ifndef TEST_ROMIO_NONCONTIG_PATTERN2_H
+#define TEST_ROMIO_NONCONTIG_PATTERN2_H
+
+int test_romio_noncontig_pattern2(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs-helper.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs-helper.h	(revision 3250)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs-helper.h	(revision 3250)
@@ -0,0 +1,49 @@
+#ifndef __PVFS_HELPER_H
+#define __PVFS_HELPER_H
+
+#include <unistd.h>
+#include <sys/types.h>
+
+/* pvfs specific includes (from test/client/sysint) */
+#include "client.h"
+#include "pvfs2-util.h"
+
+/* don't change this w/o changing the test_files array */
+#define NUM_TEST_FILES                         10
+#define TEST_FILE_PREFIX                "/tpvfs"
+#define TEST_PVFS_DATA_SIZE             1024*1024
+
+#define debug_printf(format, f...)                              \
+  do {                                                          \
+     fprintf(stderr, "file %s, line %d\n", __FILE__, __LINE__); \
+     fprintf(stderr, format, ##f);                              \
+   } while (0)
+
+typedef struct
+{
+    int initialized;
+    int num_test_files;
+    PVFS_fs_id fs_id;
+} pvfs_helper_t;
+extern pvfs_helper_t pvfs_helper;
+
+/*
+  these are some helper functions that are implemented in pvfs-helper.c
+  they return 0 on success; non-zero otherwise unless specified
+*/
+int create_dir(PVFS_object_ref parent_refn, char *name,
+               PVFS_object_ref *out_refn);
+
+int remove_file(PVFS_object_ref parent_refn, char *name);
+
+int remove_dir(PVFS_object_ref parent_refn, char *name);
+
+int lookup_name(PVFS_object_ref pinode_refn, char *name,
+                PVFS_object_ref *out_refn);
+
+int get_root(PVFS_fs_id fs_id, PVFS_object_ref *pinode_refn);
+
+int initialize_sysint(void);
+int finalize_sysint(void);
+
+#endif /* __PVFS_HELPER_H */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-invalid-files.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-invalid-files.c	(revision 6373)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-invalid-files.c	(revision 6373)
@@ -0,0 +1,692 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/* 
+ * test-invalid-files: tests behavior of all sys-init functions with an invalid file
+ * Author: Michael Speth
+ * Date: 6/25/2003
+ * Tab Size: 3
+ */
+
+#include <time.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/time.h>
+
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs2-util.h"
+#include "pvfs-helper.h"
+#include "null_params.h"
+#include "test-invalid-files.h"
+
+/* Preconditions: none
+ * Parameters: none
+ * Postconditions: returns the error code given by lookup - thats if it doesn't segfault or other catostrophic failure
+ * Hase 1 test cases
+ */
+static int test_lookup(void)
+{
+    int ret;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lookup;
+    char *name;
+
+    ret = -2;
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "name");
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+
+    PVFS_util_gen_credentials(&credentials);
+
+    ret = PVFS_sys_lookup(-1, name, &credentials,
+                          &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: none
+ * Postconditions: returns error from getattr
+ * Has 2 Test Cases
+ */
+static int test_getattr(int testcase)
+{
+    int fs_id, ret;
+    PVFS_credentials credentials;
+    PVFS_object_ref pinode_refn;
+    uint32_t attrmask;
+    PVFS_sysresp_lookup resp_lookup;
+    PVFS_sysresp_getattr resp_getattr;
+    char *name;
+
+    ret = -2;
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "name");
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    PVFS_util_gen_credentials(&credentials);
+
+    if ((ret = PVFS_sys_lookup(
+             fs_id, name, &credentials,
+             &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW)) < 0)
+    {
+	fprintf(stderr, "lookup failed %d\n", ret);
+	return ret;
+    }
+
+    pinode_refn = resp_lookup.ref;
+    attrmask = PVFS_ATTR_SYS_ALL_NOSIZE;
+
+    switch (testcase)
+    {
+    case 0:
+	pinode_refn.handle = -1;
+	ret =
+	    PVFS_sys_getattr(pinode_refn, attrmask, &credentials, &resp_getattr);
+	break;
+    case 1:
+	pinode_refn.fs_id = -1;
+	ret =
+	    PVFS_sys_getattr(pinode_refn, attrmask, &credentials, &resp_getattr);
+	break;
+    default:
+	fprintf(stderr, "error, invlaid test case\n");
+    }
+    return ret;
+}
+
+/* Preconditions: None
+ * Parameters: none
+ * Postconditions:
+ */
+static int test_setattr(void)
+{
+    return -2;
+}
+
+/* Preconditions: None
+ * Parameters: testcase - the test case to be run
+ * Postconditions: returns the error returned by mkdir
+ * Has 2 test cases
+ */
+static int test_mkdir(int testcase)
+{
+    PVFS_object_ref parent_refn;
+    PVFS_sys_attr attr;
+    PVFS_sysresp_mkdir resp_mkdir;
+
+    int ret = -2;
+    int fs_id;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lookup;
+    char *name;
+
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "name");
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    PVFS_util_gen_credentials(&credentials);
+    if ((ret = PVFS_sys_lookup(
+             fs_id, name, &credentials,
+             &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW)) < 0)
+    {
+	fprintf(stderr, "lookup failed %d\n", ret);
+	return -1;
+    }
+
+    parent_refn = resp_lookup.ref;
+    attr.mask = PVFS_ATTR_SYS_ALL_SETABLE;
+    attr.owner = credentials.uid;
+    attr.group = credentials.gid;
+    attr.perms = 1877;
+    attr.atime = attr.mtime = attr.ctime =
+	time(NULL);
+
+    switch (testcase)
+    {
+    case 0:
+	parent_refn.handle = -1;
+	ret = PVFS_sys_mkdir(name, parent_refn, attr, &credentials, &resp_mkdir);
+	break;
+    case 1:
+	parent_refn.fs_id = -1;
+	ret = PVFS_sys_mkdir(name, parent_refn, attr, &credentials, &resp_mkdir);
+	break;
+    default:
+	fprintf(stderr, "Error - no more cases\n");
+    }
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: testcase - the test case to be run
+ * Postconditions: returns error code of readdir
+ * Has 2 Test cases
+ */
+static int test_readdir(int testcase)
+{
+
+    int ret;
+
+    PVFS_object_ref pinode_refn;
+    PVFS_ds_position token;
+    int pvfs_dirent_incount;
+    PVFS_credentials credentials;
+    PVFS_sysresp_readdir resp_readdir;
+
+    int fs_id;
+    PVFS_sysresp_lookup resp_lookup;
+    char *name;
+
+    ret = -2;
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "name");
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    PVFS_util_gen_credentials(&credentials);
+    if ((ret = PVFS_sys_lookup(
+             fs_id, name, &credentials,
+             &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW)) < 0)
+    {
+	fprintf(stderr, "lookup failed %d\n", ret);
+	return -1;
+    }
+
+    pinode_refn = resp_lookup.ref;
+    token = PVFS_READDIR_START;
+    pvfs_dirent_incount = 1;
+
+    switch (testcase)
+    {
+    case 0:
+	pinode_refn.handle = -1;
+	ret =
+	    PVFS_sys_readdir(pinode_refn, token, pvfs_dirent_incount,
+			     &credentials, &resp_readdir);
+	break;
+    case 1:
+	pinode_refn.fs_id = -1;
+	ret =
+	    PVFS_sys_readdir(pinode_refn, token, pvfs_dirent_incount,
+			     &credentials, &resp_readdir);
+	break;
+    }
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: testcase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ * Has 2 test cases
+ */
+static int test_create(int testcase)
+{
+    int ret, fs_id;
+    PVFS_sys_attr attr;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_look;
+    PVFS_sysresp_create resp_create;
+    char *filename;
+
+    ret = -2;
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    PVFS_util_gen_credentials(&credentials);
+
+    attr.mask = PVFS_ATTR_SYS_ALL_SETABLE;
+    attr.owner = credentials.uid;
+    attr.group = credentials.gid;
+    attr.perms = 1877;
+    attr.atime = attr.mtime = attr.ctime =
+	time(NULL);
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    ret = PVFS_sys_lookup(fs_id, "/", &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+	printf("Lookup failed with errcode = %d\n", ret);
+	return (-1);
+    }
+
+    switch (testcase)
+    {
+    case 0:
+	resp_look.ref.handle = -1;
+	ret =
+	    PVFS_sys_create(filename, resp_look.ref, attr, &credentials,
+			    NULL, NULL, &resp_create);
+	break;
+    case 1:
+	resp_look.ref.fs_id = -1;
+	ret =
+	    PVFS_sys_create(filename, resp_look.ref, attr, &credentials,
+			    NULL, NULL, &resp_create);
+	break;
+    default:
+	fprintf(stderr, "Error - incorect case number \n");
+	return -3;
+    }
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: testcase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ * Has 2 tset cases
+ */
+static int test_remove(int testcase)
+{
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_look;
+    char *filename;
+    int ret;
+    int fs_id;
+
+    ret = -2;
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    PVFS_util_gen_credentials(&credentials);
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+	printf("Lookup failed with errcode = %d\n", ret);
+	return (-1);
+    }
+    switch (testcase)
+    {
+    case 0:
+	resp_look.ref.handle = -1;
+	ret = PVFS_sys_remove(filename, resp_look.ref, &credentials);
+	break;
+    case 1:
+	resp_look.ref.fs_id = -1;
+	ret = PVFS_sys_remove(filename, resp_look.ref, &credentials);
+	break;
+    default:
+	fprintf(stderr, "Error: invalid case number \n");
+    }
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: testcase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ */
+static int test_rename(void)
+{
+
+/*      return PVFS_sys_rename(old_name, old_parent_refn, new_name, new_parent_refn, credentials); */
+    return -2;
+}
+
+/* Preconditions: none
+ * Parameters: testcase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ */
+static int test_symlink(void)
+{
+    return -2;
+}
+
+/* Preconditions: none
+ * Parameters: testcase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ */
+static int test_readlink(void)
+{
+    return -2;
+}
+
+/* Preconditions: none
+ * Parameters: testcase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ * Has 2 test cases
+ */
+static int test_read(int testcase)
+{
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lk;
+    PVFS_Request req_io;
+    PVFS_Request req_mem;
+    PVFS_sysresp_io resp_io;
+    char *filename;
+    char io_buffer[100];
+    int fs_id, ret;
+
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    memset(&req_io, 0, sizeof(PVFS_Request));
+    memset(&req_mem, 0, sizeof(PVFS_Request));
+    memset(&resp_io, 0, sizeof(PVFS_sysresp_io));
+
+    PVFS_util_gen_credentials(&credentials);
+    memset(&resp_lk, 0, sizeof(PVFS_sysresp_lookup));
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+	debug_printf("test_pvfs_datatype_hvector: lookup failed "
+		     "on %s\n", filename);
+    }
+
+    switch (testcase)
+    {
+    case 0:
+	resp_lk.ref.handle = -1;
+	ret =
+	    PVFS_sys_read(resp_lk.ref, req_io, 0, io_buffer, req_mem,
+			  &credentials, &resp_io);
+	break;
+    case 1:
+	resp_lk.ref.fs_id = -1;
+	ret =
+	    PVFS_sys_read(resp_lk.ref, req_io, 0, io_buffer, req_mem,
+			  &credentials, &resp_io);
+	break;
+    }
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: testcase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ * Has 2 test cases
+ */
+static int test_write(int testcase)
+{
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lk;
+    PVFS_Request req_io;
+    PVFS_Request req_mem;
+    PVFS_sysresp_io resp_io;
+    char *filename;
+    char io_buffer[100];
+    int fs_id, ret;
+
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    memset(&req_io, 0, sizeof(PVFS_Request));
+    memset(&req_mem, 0, sizeof(PVFS_Request));
+    memset(&resp_io, 0, sizeof(PVFS_sysresp_io));
+
+    PVFS_util_gen_credentials(&credentials);
+    memset(&resp_lk, 0, sizeof(PVFS_sysresp_lookup));
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+	debug_printf("test_pvfs_datatype_hvector: lookup failed "
+		     "on %s\n", filename);
+    }
+
+    switch (testcase)
+    {
+    case 0:
+	resp_lk.ref.handle = -1;
+	ret =
+	    PVFS_sys_write(resp_lk.ref, req_io, 0, io_buffer, req_mem,
+			   &credentials, &resp_io);
+	break;
+    case 1:
+	resp_lk.ref.fs_id = -1;
+	ret =
+	    PVFS_sys_write(resp_lk.ref, req_io, 0, io_buffer, req_mem,
+			   &credentials, &resp_io);
+	break;
+    }
+    return ret;
+}
+
+static int init_file(void)
+{
+    int ret, fs_id;
+    PVFS_sys_attr attr;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_look;
+    PVFS_sysresp_create resp_create;
+    char *filename;
+
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    PVFS_util_gen_credentials(&credentials);
+    attr.mask = PVFS_ATTR_SYS_ALL_SETABLE;
+    attr.owner = credentials.uid;
+    attr.group = credentials.gid;
+    attr.perms = 1877;
+    attr.atime = attr.mtime = attr.ctime =
+	time(NULL);
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    /* get root */
+    ret = PVFS_sys_lookup(fs_id, "/", &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+	printf("Lookup failed with errcode = %d\n", ret);
+	return (-1);
+    }
+
+    return PVFS_sys_create(filename, resp_look.ref, attr, &credentials,
+			   NULL, NULL, &resp_create);
+
+}
+
+/* Preconditions: Parameters must be valid
+ * Parameters: comm - special pts communicator, rank - the rank of the process, buf -  * (not used), rawparams - configuration information to specify which function to test
+ * Postconditions: 0 if no errors and nonzero otherwise
+ */
+int test_invalid_files(MPI_Comm * comm __unused,
+		       int rank,
+		       char *buf __unused,
+		       void *rawparams)
+{
+    int ret = -1;
+    null_params *params;
+
+    params = (null_params *) rawparams;
+    /* right now, the system interface isn't threadsafe, so we just want to run with one process. */
+    if (rank == 0)
+    {
+	if (params->p1 >= 0 && params->p2 >= 0)
+	{
+	    switch (params->p1)
+	    {
+	    case 0:
+		fprintf(stderr, "[test_invalid_files] test_lookup %d\n",
+			params->p2);
+		ret = test_lookup();
+		if(ret >= 0){
+		    PVFS_perror("test_lookup",ret);
+		    return ret;
+		}
+		return 0;
+	    case 1:
+		fprintf(stderr, "[test_invalid_files] test_getattr %d\n",
+			params->p2);
+		ret = test_getattr(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_getattr",ret);
+		    return ret;
+		}
+		return 0;
+	    case 2:
+		fprintf(stderr, "[test_invalid_files] test_setattr %d\n",
+			params->p2);
+		ret = test_setattr();
+		if(ret >= 0){
+		    PVFS_perror("test_setattr",ret);
+		    return ret;
+		}
+		return 0;
+	    case 3:
+		fprintf(stderr, "[test_invalid_files] test_mkdir %d\n",
+			params->p2);
+		ret = test_mkdir(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_mkdir",ret);
+		    return ret;
+		}
+		return 0;
+	    case 4:
+		fprintf(stderr, "[test_invalid_files] test_readdir %d\n",
+			params->p2);
+		ret = test_readdir(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_readdir",ret);
+		    return ret;
+		}
+		return 0;
+	    case 5:
+		fprintf(stderr, "[test_invalid_files] test_create %d\n",
+			params->p2);
+		ret = test_create(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_create",ret);
+		    return ret;
+		}
+		return 0;
+	    case 6:
+		fprintf(stderr, "[test_invalid_files] test_remove %d\n",
+			params->p2);
+		ret = test_remove(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_remove",ret);
+		    return ret;
+		}
+		return 0;
+	    case 7:
+		fprintf(stderr, "[test_invalid_files] test_rename %d\n",
+			params->p2);
+		ret = test_rename();
+		if(ret >= 0){
+		    PVFS_perror("test_rename",ret);
+		    return ret;
+		}
+		return 0;
+	    case 8:
+		fprintf(stderr, "[test_invalid_files] test_symlink %d\n",
+			params->p2);
+		ret = test_symlink();
+		if(ret >= 0){
+		    PVFS_perror("test_symlink",ret);
+		    return ret;
+		}
+		return 0;
+	    case 9:
+		fprintf(stderr, "[test_invalid_files] test_readlink %d\n",
+			params->p2);
+		ret = test_readlink();
+		if(ret >= 0){
+		    PVFS_perror("test_readlink",ret);
+		    return ret;
+		}
+		return 0;
+	    case 10:
+		fprintf(stderr, "[test_invalid_files] test_read %d\n",
+			params->p2);
+		ret = test_read(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_read",ret);
+		    return ret;
+		}
+		return 0;
+	    case 11:
+		fprintf(stderr, "[test_invalid_files] test_write %d\n",
+			params->p2);
+		ret = test_write(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_write",ret);
+		    return ret;
+		}
+		return 0;
+	    case 99:
+		fprintf(stderr, "[test_invalid_files] init_file %d\n",
+			params->p2);
+		return init_file();
+	    default:
+		fprintf(stderr, "Error: invalid param %d\n", params->p1);
+		return -2;
+	    }
+	}
+    }
+    return ret;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-lookup-bench.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-lookup-bench.c	(revision 3784)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-lookup-bench.c	(revision 3784)
@@ -0,0 +1,164 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+#include <sys/time.h>
+#include <stdio.h>
+
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "pvfs2-util.h"
+#include "test-lookup-bench.h"
+
+
+/*
+ * simple helper to lookup a handle given a filename
+ *
+ * returns a handle to the new directory
+ *          -1 if some error happened
+ */
+static PVFS_handle simple_lookup_name(char *name,
+                                      PVFS_fs_id fs_id)
+{
+    int ret = -1;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lookup;
+
+    memset(&resp_lookup, 0, sizeof(resp_lookup));
+
+    PVFS_util_gen_credentials(&credentials);
+
+    ret = PVFS_sys_lookup(fs_id, name, &credentials,
+                          &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+       printf("Lookup failed with errcode = %d\n", ret);
+       return(-1);
+    }
+
+    return (PVFS_handle) resp_lookup.ref.handle;
+}
+
+static int do_create_lookup(PVFS_object_ref parent_refn,
+                     PVFS_fs_id fs_id,
+                     int depth,
+                     int ndirs,
+                     int rank)
+{
+    int i;
+    char name[PVFS_NAME_MAX];
+    char path[PVFS_NAME_MAX]; /*same as name except it has a slash prepending the path*/
+    PVFS_handle dir_handle, lookup_handle;
+    PVFS_object_ref out_refn;
+    double before, after, running_total = 0, max=0.0, min = 10000.0, total = 0, current;
+
+    /* base case: we've gone far enough */
+    if (depth == 0)
+	return 0;
+
+    for (i = 0; i < ndirs; i++)
+    {
+	snprintf(name, PVFS_NAME_MAX, "depth=%d-rank=%d-iter=%d", depth, rank, i);
+	snprintf(path, PVFS_NAME_MAX, "/%s", name);
+	if (create_dir(parent_refn, name, &out_refn) < 0)
+	{
+            printf("creation of %s failed; make sure it doesn't "
+                   "already exist!\n",path);
+            return -1;
+	}
+        dir_handle = out_refn.handle;
+	/* lookup the directory we just created */
+	before = MPI_Wtime();
+	lookup_handle = simple_lookup_name(path, fs_id);
+	after = MPI_Wtime();
+	if (lookup_handle != dir_handle)
+	    return -1;
+	current = after - before;
+	running_total += current;
+	if (max < current)
+	{
+	    max = current;
+	}
+	if (min > current)
+	{
+	    min = current;
+	}
+	total++;
+        if (remove_file(parent_refn,name))
+        {
+            printf("failed to remove %s; test aborting\n",path);
+            return -1;
+        }
+    }
+    printf("ave lookup time: %f seconds\n",(running_total/total));
+    printf("max lookup time: %f seconds\n",max);
+    printf("min lookup time: %f seconds\n",min);
+    return 0;
+}
+
+/*
+ * driver for the test
+ * comm:	special pts communicator
+ * rank:	rank among processes
+ * buf:		stuff data in here ( not used )
+ * rawparams:	our configuration information
+ *
+ * returns: 
+ * 	0:  	all went well
+ * 	nonzero: errors encountered making one or more directories
+ */
+int test_lookup_bench(MPI_Comm * comm __unused,
+		     int rank,
+		     char *buf __unused,
+		     void *rawparams)
+{
+    int ret = -1;
+    PVFS_fs_id fs_id;
+    PVFS_object_ref root_refn;
+    generic_params *myparams = (generic_params *) rawparams;
+    int nerrs = 0;
+
+    /* right now, the system interface isn't threadsafe, so we just want to run with one process. */
+
+    if (rank == 0)
+    {
+
+        if (!pvfs_helper.initialized && initialize_sysint())
+        {
+            debug_printf("test_lookup_bench cannot be initialized!\n");
+            return -1;
+        }
+
+	fs_id = pvfs_helper.fs_id;
+	if (fs_id < 0)
+	{
+	    printf("System initialization error\n");
+	    return (fs_id);
+	}
+
+        ret = get_root(fs_id, &root_refn);
+	if (ret < 0)
+        {
+	    printf("failed to get root pinode refn: errcode = %d\n", ret);
+	    return (-1);
+        }
+
+	/* this will make n directories and look up each */
+	nerrs = do_create_lookup(root_refn, fs_id, myparams->mode,
+                                 myparams->mode, rank);
+    }
+    return -nerrs;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-request-tiled.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-request-tiled.c	(revision 5157)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-request-tiled.c	(revision 5157)
@@ -0,0 +1,147 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/*
+ * Author: Michael Speth, Testing code written & designed by Phil C.
+ * Date: 8/29/2003
+ * Last Updated: 8/29/2003
+ */
+
+#include <time.h>
+#include <sys/time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include<assert.h>
+
+#include <pint-request.h>
+#include <pint-distribution.h>
+#include <pvfs2-debug.h>
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "pvfs2-util.h"
+#include "pvfs2-internal.h"
+#include "test-request-tiled.h"
+#define SEGMAX 16
+#define BYTEMAX (4*1024*1024)
+
+/*
+ * Parameters: none
+ * Returns 0 on success and -1 on failure (ie - the segment offsets
+ * were not calcuated correctly by Request_indexed
+ */
+static int test_req_tiled(void){
+   int i;
+   PINT_Request *r2;
+   PINT_Request_state *rs1;
+   PINT_Request_state *rs2;
+   PINT_request_file_data rf1;
+   PINT_Request_result seg1;
+                                                                                
+   /* PVFS_Process_request arguments */
+   int retval;
+                                                                                
+   /* set up request state */
+   rs1 = PINT_new_request_state(PVFS_BYTE);
+                                                                                
+   /* set up memory request */
+   PVFS_Request_contiguous(4076, PVFS_BYTE, &r2);
+   rs2 = PINT_new_request_state(r2);
+                                                                                
+   /* set up file data for request */
+   rf1.server_nr = 0;
+   rf1.server_ct = 4;
+   rf1.fsize = 6000;
+   rf1.dist = PINT_dist_create("simple_stripe");
+   rf1.extend_flag = 0;
+   PINT_dist_lookup(rf1.dist);
+                                                                                
+   /* set up result struct */
+   seg1.offset_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+   seg1.size_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+   seg1.bytemax = BYTEMAX;
+   seg1.segmax = SEGMAX;
+   seg1.bytes = 0;
+   seg1.segs = 0;
+                                                                                
+   /* skip into the file datatype */
+   PINT_REQUEST_STATE_SET_TARGET(rs1, 20);
+                                                                                
+   /* Turn on debugging */
+/*
+    gossip_enable_stderr();
+    gossip_set_debug_mask(1,REQUEST_DEBUG);
+*/                                                                                
+
+   /* skipping logical bytes */
+/*
+    PINT_REQUEST_STATE_SET_TARGET(rs1,(3 * 1024) + 512);
+    PINT_REQUEST_STATE_SET_FINAL(rs1,(6 * 1024) + 512);
+*/
+                                                                                
+   printf("\n************************************\n");
+   do
+   {
+      seg1.bytes = 0;
+      seg1.segs = 0;
+                                                                                
+      /* process request */
+      retval = PINT_process_request(rs1, rs2, &rf1, &seg1, PINT_CLIENT);
+                                                                                
+      if(retval >= 0)
+      {
+         printf("results of PINT_Process_request():\n");
+         printf("%d segments with %lld bytes\n", seg1.segs, lld(seg1.bytes));
+         for(i=0; i<seg1.segs; i++)
+         {
+            printf("  segment %d: offset: %d size: %d\n",
+               i, (int)seg1.offset_array[i], (int)seg1.size_array[i]);
+         }
+      }
+                                                                                
+   } while(!PINT_REQUEST_DONE(rs1) && retval >= 0);
+                                                                                
+   if(retval < 0)
+    {
+      fprintf(stderr, "Error: PINT_Process_request() failure.\n");
+      return(-1);
+   }
+   if(PINT_REQUEST_DONE(rs1))
+   {
+      printf("**** request done.\n");
+   }
+   return 0;
+}
+                                                                                
+
+/* Preconditions: None
+ * Parameters: comm - special pts communicator, rank - the rank of the process,
+ * buf - not used
+ * Postconditions: 0 if no errors and nonzero otherwise
+ */
+int test_request_tiled(MPI_Comm * comm __unused,
+		     int rank,
+		     char *buf __unused,
+		     void *rawparams __unused)
+{
+    int ret = -1;
+
+    if (rank == 0)
+    {
+	ret = test_req_tiled();
+    }
+    return ret;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-invalid-files.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-invalid-files.h	(revision 2312)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-invalid-files.h	(revision 2312)
@@ -0,0 +1,9 @@
+#ifndef INCLUDE_INVALID_FILES_H
+#define INCLUDE_INVALID_FILES_H
+
+int test_invalid_files(MPI_Comm * comm,
+		       int rank,
+		       char *buf,
+		       void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-lookup-bench.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-lookup-bench.h	(revision 755)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-lookup-bench.h	(revision 755)
@@ -0,0 +1,6 @@
+#ifndef TEST_LOOKUP_BENCH_H
+#define TEST_LOOKUP_BENCH_H
+
+int test_lookup_bench(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-request-tiled.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-request-tiled.h	(revision 2007)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-request-tiled.h	(revision 2007)
@@ -0,0 +1,6 @@
+#ifndef TEST_REQUEST_TILED_H
+#define TEST_REQUEST_TILED_H
+
+int test_request_tiled(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-concurrent-meta.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-concurrent-meta.c	(revision 6373)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-concurrent-meta.c	(revision 6373)
@@ -0,0 +1,401 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/* 
+ * test-invalid-files: tests behavior of all sys-init functions with
+ * an invalid file Author: Michael Speth Date: 6/25/2003 Tab Size: 3
+ */
+#include <sys/time.h>
+#include <time.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs2-util.h"
+#include "pvfs-helper.h"
+#include "null_params.h"
+#include "test-concurrent-meta.h"
+
+/**
+ * Calls lookup.
+ * Preconditions: none
+ * Postconditions: calls lookup on the file specified
+ * @param name the file
+ * @param fs_id the file system id
+ * @returns 0 on success and an error code on failure
+ */
+static int lookup(char *name, int fs_id)
+{
+    int ret;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lookup;
+
+    ret = -2;
+
+    PVFS_util_gen_credentials(&credentials);
+    if ((ret = PVFS_sys_lookup(
+             fs_id, name, &credentials,
+             &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW)) < 0)
+    {
+        fprintf(stderr, "lookup failed %d\n", ret);
+        return ret;
+    }
+    return 0;
+}
+
+/**
+ * Gets the attributes for the file specified by name.
+ * Preconditions: none
+ * Postconditions: gets the attribs of the file
+ * @param name the file
+ * @param fs_id the file system id
+ * @returns 0 on success and an error code on failure
+ */
+static int getattr(char *name, int fs_id)
+{
+    int ret;
+    PVFS_credentials credentials;
+    PVFS_object_ref pinode_refn;
+    PVFS_sysresp_getattr resp_getattr;
+    uint32_t attrmask;
+    PVFS_sysresp_lookup resp_lookup;
+
+    ret = -2;
+
+    PVFS_util_gen_credentials(&credentials);
+    if ((ret = PVFS_sys_lookup(
+             fs_id, name, &credentials,
+             &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW)) < 0)
+    {
+        fprintf(stderr, "lookup failed %d\n", ret);
+        return ret;
+    }
+
+    pinode_refn = resp_lookup.ref;
+    attrmask = PVFS_ATTR_SYS_ALL_NOSIZE;
+
+    ret = PVFS_sys_getattr(pinode_refn, attrmask, &credentials, &resp_getattr);
+
+    return ret;
+}
+
+/**
+ * Removes the file or directory specified. 
+ * Preconditions: none
+ * Postconditions: removes the file or directory specified
+ * @param name the file or directory to be removed
+ * @param fs_id the file system id
+ * @returns 0 on success and an error code on failure
+ */
+static int remove_file_dir(char *name, int fs_id)
+{
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_look;
+    int ret;
+
+    ret = -2;
+
+    PVFS_util_gen_credentials(&credentials);
+
+    ret = PVFS_sys_lookup(fs_id, name, &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+        printf("Lookup failed with errcode = %d\n", ret);
+        return (-1);
+    }
+    ret = PVFS_sys_remove(name, resp_look.ref, &credentials);
+
+    return ret;
+}
+
+/**
+ * Calls the List directory function. <br>
+ * Preconditions: test_dir must be created <br>
+ * Postconditions: gets the directories and files in the directory listed
+ * @param test_dir the directory to list
+ * @param fs_id the file system id
+ * @returns 0 on success and an error code on failure
+ */
+static int list_dir(char *test_dir, int fs_id)
+{
+    int ret;
+
+    PVFS_object_ref pinode_refn;
+    PVFS_ds_position token;
+    PVFS_sysresp_readdir resp_readdir;
+    int pvfs_dirent_incount;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lookup;
+
+    ret = -2;
+
+    PVFS_util_gen_credentials(&credentials);
+
+    if ((ret = PVFS_sys_lookup(
+             fs_id, test_dir, &credentials,
+             &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW)) < 0)
+    {
+        fprintf(stderr, "lookup failed %d\n", ret);
+        return -1;
+    }
+
+    pinode_refn = resp_lookup.ref;
+    token = PVFS_READDIR_START;
+    pvfs_dirent_incount = 1;
+
+    ret = PVFS_sys_readdir(pinode_refn, token, pvfs_dirent_incount,
+                             &credentials, &resp_readdir);
+
+    return ret;
+}
+
+/**
+ * Creates a file with the specified file name in the specified directory. <br>
+ * Preconditions: the directory must be a valid pre-existing directory <br>
+ * Postconditions: creates a file
+ * @param filename the string representation of the file to be created
+ * @param directory the string representation of the directory
+ * @param fs_id the file system id
+ * @returns 0 on success and an error code on failure
+ */
+static int create_file(char *filename, char *directory, int fs_id)
+{
+    int ret;
+    PVFS_sys_attr attr;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_look;
+    PVFS_sysresp_create resp_create;
+
+    ret = -2;
+
+    PVFS_util_gen_credentials(&credentials);
+
+    attr.mask = PVFS_ATTR_SYS_ALL_NOSIZE;
+    attr.owner = credentials.uid;
+    attr.group = credentials.gid;
+    attr.perms = 1877;
+    attr.atime = attr.mtime = attr.ctime = 0xdeadbeef;
+
+    ret = PVFS_sys_lookup(fs_id, directory, &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+        printf("Lookup failed with errcode = %d\n", ret);
+        return (-1);
+    }
+
+    ret = PVFS_sys_create(filename, resp_look.ref,
+                          attr, &credentials, NULL, NULL, &resp_create);
+   return ret;
+}
+
+/**
+ * Creates the directory specified by name.  Note: the root directory is "/".
+ * Preconditions: must have a root directory labled "/" <br>
+ * Postconditions: Creates a directory specified by name 
+ * @param name the directory to be created
+ * @param fs_id the file system id
+ * @returns 0 on succes and error code on failure
+ */
+static int create_dir2(char *name, int fs_id)
+{
+    PVFS_object_ref parent_refn;
+    PVFS_sys_attr attr;
+    PVFS_sysresp_mkdir resp_mkdir;
+
+    int ret = -2;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lookup;
+
+    PVFS_util_gen_credentials(&credentials);
+    if ((ret = PVFS_sys_lookup(
+             fs_id, "/", &credentials,
+             &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW)) < 0)
+    {
+        fprintf(stderr, "lookup failed %d\n", ret);
+        return -1;
+    }
+
+    parent_refn = resp_lookup.ref;
+    attr.mask = PVFS_ATTR_SYS_ALL_SETABLE;
+    attr.owner = credentials.uid;
+    attr.group = credentials.gid;
+    attr.perms = 1877;
+    attr.atime = attr.mtime = attr.ctime =
+	time(NULL);
+
+    ret = PVFS_sys_mkdir(name, parent_refn, attr, &credentials, &resp_mkdir);
+    return ret;
+}
+
+/* Preconditions: Parameters must be valid
+ * Parameters: comm - special pts communicator, rank - the rank of the process, buf -  * (not used), rawparams - configuration information to specify which function to test
+ * Postconditions: 0 if no errors and nonzero otherwise
+ */
+int test_concurrent_meta(MPI_Comm * comm __unused,
+		       int rank,
+		       char *buf __unused,
+		       void *rawparams)
+{
+    int ret = -1;
+    int fs_id, i;
+    null_params *params;
+
+    params = (null_params *) rawparams;
+    if (initialize_sysint() < 0)
+    {
+        debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+        return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    /* right now, the system interface isn't threadsafe, so we just want to run with one process. */
+    if (rank == 0)
+    {
+
+	if (params->p1 >= 0)
+	{
+	    switch (params->p1)
+	    {
+	    case 0:
+		fprintf(stderr, "[test_concurrent_meta] repeatedly listing dirs while anotehr process adds/remove files/dirs %d\n", params->p2);
+		for(i = 0; i < 100; i++)
+		{
+		    ret = list_dir("/test_dir",fs_id);
+		    if(ret >= 0){
+			PVFS_perror("list_dir",ret);
+			/* return ret; */
+		    }
+		}
+		return 0;
+	    case 1:
+		fprintf(stderr,"[test_concurrent_meta] get attribs while removing\n");
+		for(i = 0; i < 100; i++)
+		{
+		    ret = getattr("/test_dir/test_file2",fs_id);
+		    if(ret < 0)
+		    {
+			PVFS_perror("getattr\n",ret);
+			/* return ret; */
+		    }
+		}
+		return 0;
+	    case 2:
+		fprintf(stderr,"[test_concurrent_meta] lookup files when created\n");
+		for(i = 0; i < 100; i++)
+		{
+		    ret = lookup("/test_dir/test_file3",fs_id);
+		    if(ret < 0)
+		    {
+			PVFS_perror("lookup\n",ret);
+			/* return ret; */
+		    }
+		}
+		return 0;
+	    case 3:
+		fprintf(stderr,"[test_concurrent_meta] lookup files when dir destyd\n");
+		for(i = 0; i < 100; i++)
+		{
+		    ret = lookup("/test_dir/test_file3",fs_id);
+		    if(ret < 0)
+		    {
+			PVFS_perror("lookup\n",ret);
+			/* return ret; */
+		    }
+		}
+		return 0;
+	    case 99:
+		fprintf(stderr,"[test_concurrent_meta] setup directory\n");
+		ret = create_dir2("test_dir",fs_id);
+		return ret;
+	    default:
+		fprintf(stderr, "Error: invalid param %d\n", params->p1);
+		return -2;
+	    }
+	}
+    }
+
+    if (rank == 1)
+    {
+	if (params->p1 >= 0)
+	{
+	    switch (params->p1)
+	    {
+	    case 0:
+		fprintf(stderr, "[test_concurrent_meta] repeatedly listing dirs while anotehr process adds/remove files/dirs %d\n", params->p2);
+		for(i = 0; i < 100; i++)
+		{
+		    ret = create_file("test_file","/test_dir",fs_id);
+		    if(ret >= 0){
+		    	PVFS_perror("create_file",ret);
+		    	return ret;
+		    }
+		    ret = remove_file_dir("/test_dir/test_file",fs_id);
+		    if(ret >= 0){
+			PVFS_perror("remove",ret);
+			return ret;
+		    }
+		}
+		return 0;
+	    case 1:
+		fprintf(stderr, "[test_concurrent_meta] repeatedly listing dirs while anotehr process adds/remove files/dirs %d\n", params->p2);
+		for(i = 0; i < 100; i++)
+		{
+		    ret = create_file("test_file2","/test_dir",fs_id);
+		    if(ret >= 0){
+		    	PVFS_perror("create_file",ret);
+		    	return ret;
+		    }
+		    ret = remove_file_dir("/test_dir/test_file2",fs_id);
+		    if(ret >= 0){
+			PVFS_perror("remove",ret);
+			return ret;
+		    }
+		}
+		return 0;
+	    case 2:
+		fprintf(stderr, "[test_concurrent_meta] repeat lookups %d\n", params->p2);
+		for(i = 0; i < 100; i++)
+		{
+		    ret = create_file("test_file3","/test_dir",fs_id);
+		    if(ret >= 0){
+		    	PVFS_perror("create_file",ret);
+		    	return ret;
+		    }
+		    ret = remove_file_dir("/test_dir/test_file3",fs_id);
+		    if(ret >= 0){
+			PVFS_perror("remove",ret);
+			return ret;
+		    }
+		}
+		return 0;
+	    case 3:
+		fprintf(stderr, "[test_concurrent_meta] repeat lookups on dir destyd %d\n", params->p2);
+		ret = remove_file_dir("/test_dir",fs_id);
+		if(ret >= 0){
+		    PVFS_perror("remove",ret);
+		    return ret;
+		}
+		return 0;
+	    }
+	}
+    }
+
+/*     finalize_sysint(); */
+    return ret;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-uninitialized.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-uninitialized.c	(revision 6373)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-uninitialized.c	(revision 6373)
@@ -0,0 +1,527 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/* 
+ * test-invalid-files: tests behavior of all sys-init functions with an invalid file
+ * Author: Michael Speth
+ * Date: 6/25/2003
+ * Tab Size: 3
+ */
+
+#include <time.h>
+#include <sys/time.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "null_params.h"
+#include "test-uninitialized.h"
+
+/* Preconditions: none
+ * Parameters: none
+ * Postconditions: returns the error code given by lookup - thats if it doesn't segfault or other catostrophic failure
+ * Hase 1 test cases
+ */
+static int test_lookup(void)
+{
+    int fs_id, ret;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lookup;
+    char *name;
+
+    ret = -2;
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "name");
+
+    fs_id = 9;
+
+    PVFS_util_gen_credentials(&credentials);
+
+    ret = PVFS_sys_lookup(fs_id, name, &credentials,
+                          &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: none
+ * Postconditions: returns error from getattr
+ * Has 2 Test Cases
+ */
+static int test_getattr(void)
+{
+    int fs_id, ret;
+    PVFS_credentials credentials;
+    PVFS_object_ref pinode_refn;
+    uint32_t attrmask;
+    PVFS_sysresp_lookup resp_lookup;
+    PVFS_sysresp_getattr resp_getattr;
+    char *name;
+
+    ret = -2;
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "name");
+
+    fs_id = 9;
+
+    PVFS_util_gen_credentials(&credentials);
+
+    if ((ret = PVFS_sys_lookup(
+             fs_id, name, &credentials,
+             &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW)) < 0)
+    {
+	fprintf(stderr, "lookup failed %d\n", ret);
+	return ret;
+    }
+
+    pinode_refn = resp_lookup.ref;
+    attrmask = PVFS_ATTR_SYS_ALL_NOSIZE;
+
+    ret = PVFS_sys_getattr(pinode_refn, attrmask, &credentials, &resp_getattr);
+    return ret;
+}
+
+/* Preconditions: None
+ * Parameters: none
+ * Postconditions:
+ */
+static int test_setattr(void)
+{
+    return -2;
+}
+
+/* Preconditions: None
+ * Parameters: testcase - the test case to be run
+ * Postconditions: returns the error returned by mkdir
+ * Has 2 test cases
+ */
+static int test_mkdir(void)
+{
+    PVFS_object_ref parent_refn;
+    PVFS_sys_attr attr;
+    PVFS_sysresp_mkdir resp_mkdir;
+
+    int ret = -2;
+    int fs_id;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lookup;
+    char *name;
+
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "name");
+
+    fs_id = 9;
+
+    PVFS_util_gen_credentials(&credentials);
+    if ((ret = PVFS_sys_lookup(
+             fs_id, name, &credentials,
+             &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW)) < 0)
+    {
+	fprintf(stderr, "lookup failed %d\n", ret);
+	return -1;
+    }
+
+    parent_refn = resp_lookup.ref;
+    attr.mask = PVFS_ATTR_SYS_ALL_SETABLE;
+    attr.owner = credentials.uid;
+    attr.group = credentials.gid;
+    attr.perms = 1877;
+    attr.atime = attr.ctime = attr.mtime = 
+	time(NULL);
+
+    ret = PVFS_sys_mkdir(name, parent_refn, attr, &credentials, &resp_mkdir);
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: testcase - the test case to be run
+ * Postconditions: returns error code of readdir
+ * Has 2 Test cases
+ */
+static int test_readdir(void)
+{
+
+    int ret;
+
+    PVFS_object_ref pinode_refn;
+    PVFS_ds_position token;
+    int pvfs_dirent_incount;
+    PVFS_credentials credentials;
+    PVFS_sysresp_readdir resp_readdir;
+
+    int fs_id;
+    PVFS_sysresp_lookup resp_lookup;
+    char *name;
+
+    ret = -2;
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "name");
+
+    fs_id = 9;
+
+    PVFS_util_gen_credentials(&credentials);
+    if ((ret = PVFS_sys_lookup(
+             fs_id, name, &credentials,
+             &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW)) < 0)
+    {
+	fprintf(stderr, "lookup failed %d\n", ret);
+	return -1;
+    }
+
+    pinode_refn = resp_lookup.ref;
+    token = PVFS_READDIR_START;
+    pvfs_dirent_incount = 1;
+
+    ret =
+	PVFS_sys_readdir(pinode_refn, token, pvfs_dirent_incount, &credentials,
+			 &resp_readdir);
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: testcase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ * Has 2 test cases
+ */
+static int test_create(void)
+{
+    int ret, fs_id;
+    PVFS_sys_attr attr;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_look;
+    PVFS_sysresp_create resp_create;
+    char *filename;
+
+    ret = -2;
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    PVFS_util_gen_credentials(&credentials);
+    attr.owner = credentials.uid;
+    attr.group = credentials.gid;
+    attr.perms = 1877;
+    attr.atime = attr.ctime = attr.mtime = time(NULL);
+
+    fs_id = 9;
+
+    ret = PVFS_sys_lookup(fs_id, "/", &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+	printf("Lookup failed with errcode = %d\n", ret);
+	return (-1);
+    }
+
+    ret =
+	PVFS_sys_create(filename, resp_look.ref, attr, &credentials,
+			NULL, NULL, &resp_create);
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: testcase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ * Has 2 tset cases
+ */
+static int test_remove(void)
+{
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_look;
+    char *filename;
+    int ret;
+    int fs_id;
+
+    ret = -2;
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    PVFS_util_gen_credentials(&credentials);
+
+    fs_id = 9;
+
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+	printf("Lookup failed with errcode = %d\n", ret);
+	return (-1);
+    }
+    ret = PVFS_sys_remove(filename, resp_look.ref, &credentials);
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: testcase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ */
+static int test_rename(void)
+{
+
+/*      return PVFS_sys_rename(old_name, old_parent_refn, new_name, new_parent_refn, credentials); */
+    return -2;
+}
+
+/* Preconditions: none
+ * Parameters: testcase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ */
+static int test_symlink(void)
+{
+    return -2;
+}
+
+/* Preconditions: none
+ * Parameters: testcase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ */
+static int test_readlink(void)
+{
+    return -2;
+}
+
+/* Preconditions: none
+ * Parameters: testcase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ * Has 2 test cases
+ */
+static int test_read(void)
+{
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lk;
+    PVFS_Request req_io;
+    PVFS_sysresp_io resp_io;
+    char *filename;
+    char io_buffer[100];
+    int fs_id, ret;
+
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    memset(&req_io, 0, sizeof(PVFS_Request));
+    memset(&resp_io, 0, sizeof(PVFS_sysresp_io));
+
+    PVFS_util_gen_credentials(&credentials);
+    memset(&resp_lk, 0, sizeof(PVFS_sysresp_lookup));
+
+    fs_id = 9;
+
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+	debug_printf("test_pvfs_datatype_hvector: lookup failed "
+		     "on %s\n", filename);
+    }
+
+    ret =
+	PVFS_sys_read(resp_lk.ref, req_io, 0, io_buffer, NULL, &credentials,
+		      &resp_io);
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: testcase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ * Has 2 test cases
+ */
+static int test_write(void)
+{
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lk;
+    PVFS_Request req_io;
+    PVFS_sysresp_io resp_io;
+    char *filename;
+    char io_buffer[100];
+    int fs_id, ret;
+
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    memset(&req_io, 0, sizeof(PVFS_Request));
+    memset(&resp_io, 0, sizeof(PVFS_sysresp_io));
+
+    PVFS_util_gen_credentials(&credentials);
+    memset(&resp_lk, 0, sizeof(PVFS_sysresp_lookup));
+
+    fs_id = 9;
+
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+	debug_printf("test_pvfs_datatype_hvector: lookup failed "
+		     "on %s\n", filename);
+    }
+
+    ret =
+	PVFS_sys_write(resp_lk.ref, req_io, 0, io_buffer, NULL, &credentials,
+		       &resp_io);
+    return ret;
+}
+
+static int test_finalize(void)
+{
+    int ret = -2;
+    ret = PVFS_sys_finalize();
+    return ret;
+}
+
+/* Preconditions: Parameters must be valid
+ * Parameters: comm - special pts communicator, rank - the rank of the process, buf -  * (not used), rawparams - configuration information to specify which function to test
+ * Postconditions: 0 if no errors and nonzero otherwise
+ */
+int test_uninitialized(MPI_Comm * comm __unused,
+		       int rank,
+		       char *buf __unused,
+		       void *rawparams)
+{
+    int ret = -1;
+    null_params *params;
+
+    params = (null_params *) rawparams;
+    /* right now, the system interface isn't threadsafe, so we just want to run with one process. */
+    if (rank == 0)
+    {
+	if (params->p1 >= 0 && params->p2 >= 0)
+	{
+	    switch (params->p1)
+	    {
+	    case 0:
+		fprintf(stderr, "[test_uninitialized] test_lookup %d\n",
+			params->p2);
+		ret = test_lookup();
+		if(ret >= 0){
+		    PVFS_perror("test_lookup",ret);
+		    return ret;
+		}
+		return 0;
+	    case 1:
+		fprintf(stderr, "[test_uninitialized] test_getattr %d\n",
+			params->p2);
+		ret = test_getattr();
+		if(ret >= 0){
+		    PVFS_perror("test_getattr",ret);
+		    return ret;
+		}
+		return 0;
+	    case 2:
+		fprintf(stderr, "[test_uninitialized] test_setattr %d\n",
+			params->p2);
+		ret = test_setattr();
+		if(ret >= 0){
+		    PVFS_perror("test_setattr",ret);
+		    return ret;
+		}
+		return 0;
+	    case 3:
+		fprintf(stderr, "[test_uninitialized] test_mkdir %d\n",
+			params->p2);
+		ret = test_mkdir();
+		if(ret >= 0){
+		    PVFS_perror("test_",ret);
+		    return ret;
+		}
+		return 0;
+	    case 4:
+		fprintf(stderr, "[test_uninitialized] test_readdir %d\n",
+			params->p2);
+		ret = test_readdir();
+		if(ret >= 0){
+		    PVFS_perror("test_readdir",ret);
+		    return ret;
+		}
+		return 0;
+	    case 5:
+		fprintf(stderr, "[test_uninitialized] test_create %d\n",
+			params->p2);
+		ret = test_create();
+		if(ret >= 0){
+		    PVFS_perror("test_create",ret);
+		    return ret;
+		}
+		return 0;
+	    case 6:
+		fprintf(stderr, "[test_uninitialized] test_remove %d\n",
+			params->p2);
+		ret = test_remove();
+		if(ret >= 0){
+		    PVFS_perror("test_remove",ret);
+		    return ret;
+		}
+		return 0;
+	    case 7:
+		fprintf(stderr, "[test_uninitialized] test_rename %d\n",
+			params->p2);
+		ret = test_rename();
+		if(ret >= 0){
+		    PVFS_perror("test_rename",ret);
+		    return ret;
+		}
+		return 0;
+	    case 8:
+		fprintf(stderr, "[test_uninitialized] test_symlink %d\n",
+			params->p2);
+		ret = test_symlink();
+		if(ret >= 0){
+		    PVFS_perror("test_symlink",ret);
+		    return ret;
+		}
+		return 0;
+	    case 9:
+		fprintf(stderr, "[test_uninitialized] test_readlink %d\n",
+			params->p2);
+		ret = test_readlink();
+		if(ret >= 0){
+		    PVFS_perror("test_readlink",ret);
+		    return ret;
+		}
+		return 0;
+	    case 10:
+		fprintf(stderr, "[test_uninitialized] test_read %d\n",
+			params->p2);
+		ret = test_read();
+		if(ret >= 0){
+		    PVFS_perror("test_read",ret);
+		    return ret;
+		}
+		return 0;
+	    case 11:
+		fprintf(stderr, "[test_uninitialized] test_write %d\n",
+			params->p2);
+		ret = test_write();
+		if(ret >= 0){
+		    PVFS_perror("test_write",ret);
+		    return ret;
+		}
+		return 0;
+	    case 12:
+		fprintf(stderr, "[test_uninitialized] test_finalize %d\n",
+			params->p2);
+		ret = test_finalize();
+		if(ret >= 0){
+		    PVFS_perror("test_finalize",ret);
+		    return ret;
+		}
+		return 0;
+	    default:
+		fprintf(stderr, "Error: invalid param %d\n", params->p1);
+		return -2;
+	    }
+	}
+    }
+    return ret;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-contiguous-datatype.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-contiguous-datatype.c	(revision 5157)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-contiguous-datatype.c	(revision 5157)
@@ -0,0 +1,160 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/*
+ * Author: Michael Speth, Testing code written & designed by Phil C.
+ * Date: 8/29/2003
+ * Last Updated: 8/29/2003
+ */
+
+#include <time.h>
+#include <sys/time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include<assert.h>
+
+#include <pint-request.h>
+#include <pint-distribution.h>
+#include <pint-dist-utils.h>
+#include <pvfs2-debug.h>
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "pvfs2-util.h"
+#include "pvfs2-internal.h"
+#include "test-contiguous-datatype.h"
+#define SEGMAX 16
+#define BYTEMAX (4*1024*1024)
+
+/*
+ * Parameters: none
+ * Returns 0 on success and -1 on failure (ie - the segment offsets
+ * were not calcuated correctly by Request_indexed
+ */
+static int test_cont_datatype(void){
+   int i;
+   PINT_Request *r1;
+   PINT_Request *r2;
+   PINT_Request_state *rs1;
+   PINT_Request_state *rs2;
+   PINT_request_file_data rf1;
+   PINT_Request_result seg1;
+                                                                                
+   /* PVFS_Process_request arguments */
+   int retval;
+                                                                                
+   /* set up request */
+   PVFS_Request_contiguous(266240, PVFS_BYTE, &r1);
+                                                                                
+   /* set up request state */
+   rs1 = PINT_new_request_state(r1);
+                                                                                
+   /* set up memory request */
+   PVFS_Request_contiguous(266240, PVFS_BYTE, &r2);
+   rs2 = PINT_new_request_state(r2);
+                                                                                
+   /* set up file data for request */
+   PINT_dist_initialize(NULL);
+   rf1.server_nr = 0;
+   rf1.server_ct = 4;
+   rf1.fsize = 0;
+   rf1.dist = PINT_dist_create("simple_stripe");
+   rf1.extend_flag = 1;
+   PINT_dist_lookup(rf1.dist);
+                                                                                
+   /* set up result struct */
+   seg1.offset_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+   seg1.size_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+   seg1.bytemax = BYTEMAX;
+   seg1.segmax = SEGMAX;
+   seg1.bytes = 0;
+   seg1.segs = 0;
+                                                                                
+   /* Turn on debugging */
+/*
+    gossip_enable_stderr();
+    gossip_set_debug_mask(1,REQUEST_DEBUG);
+*/
+                                                                                
+   /* skipping logical bytes */
+/*
+    PINT_REQUEST_STATE_SET_TARGET(rs1,(3 * 1024) + 512);
+    PINT_REQUEST_STATE_SET_FINAL(rs1,(6 * 1024) + 512);
+*/
+                                                                                
+   do
+   {
+      seg1.bytes = 0;
+      seg1.segs = 0;
+                                                                                
+      /* process request */
+      retval = PINT_process_request(rs1, rs2, &rf1, &seg1, PINT_CLIENT);
+                                                                                
+      if(retval >= 0)
+      {
+         printf("results of PINT_Process_request():\n");
+         printf("%d segments with %lld bytes\n", seg1.segs, lld(seg1.bytes));
+         for(i=0; i<seg1.segs; i++)
+         {
+	    if(i == 0 && (int)seg1.offset_array[i] != 0){
+		printf("segment %d's offset is %d but should be %d\n",
+			i,(int)seg1.offset_array[i],0);
+		return -1;
+	    }
+	    else if(i == 1 && (int)seg1.offset_array[i] != 262144){
+		printf("segment %d's offset is %d but should be %d\n",
+			i,(int)seg1.offset_array[i],262144);
+		return -1;
+	    }
+	    /* Note, we should be checking the size but I'm not sure what the size values should be */
+         }
+      }
+                                                                                
+   } while(!PINT_REQUEST_DONE(rs1) && retval >= 0);
+   if(retval < 0)
+   {
+      fprintf(stderr, "Error: PINT_Process_request() failure.\n");
+      return(-1);
+   }
+   if(PINT_REQUEST_DONE(rs1))
+   {
+/*
+      printf("**** request done.\n");
+*/
+   }
+                                                                                
+   return 0;
+}
+                                                                                
+
+/* Preconditions: None
+ * Parameters: comm - special pts communicator, rank - the rank of the process,
+ * buf - not used
+ * Postconditions: 0 if no errors and nonzero otherwise
+ */
+int test_contiguous_datatype(MPI_Comm * comm __unused,
+		     int rank,
+		     char *buf __unused,
+		     void *rawparams __unused)
+{
+    int ret = -1;
+
+    if (rank == 0)
+    {
+	ret = test_cont_datatype();
+    }
+    return ret;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-noncontig-pattern.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-noncontig-pattern.c	(revision 4682)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-noncontig-pattern.c	(revision 4682)
@@ -0,0 +1,254 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/* this simulates both the client and server side of a single server I/O
+Â * operation.Â  It simulates one phase of a particular romio test program
+Â * called "noncontig", which happens to use hindexed() calls currently.
+ * Author: Michael Speth, Testing code written & designed by Phil C.
+ * Date: 8/25/2003
+ * Last Updated: 8/25/2003
+ */
+
+#include <time.h>
+#include <sys/time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include<assert.h>
+
+#include <pint-request.h>
+#include <pint-distribution.h>
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "pvfs2-util.h"
+#include "test-noncontig-pattern.h"
+#define SEGMAX 16
+#define BYTEMAX (4*1024*1024)
+
+/*
+ * Parameters: none
+ * Returns 0 on success and -1 on failure (ie - the segment offsets
+ * were not calcuated correctly by Request_indexed
+ */
+static int test_noncontig(void){
+   int i;
+   PINT_Request *file_req;
+   PINT_Request *mem_req;
+   PINT_Request_state *mem_state;
+   PINT_Request_state *file_state;
+   PINT_Request_state *file_state_server;
+   PINT_request_file_data rf1;
+   PINT_Request_result seg1;
+   int32_t* len_arrayS = NULL;
+   int32_t* len_arrayC = NULL;
+   PVFS_offset* off_arrayS = NULL;
+   PVFS_offset* off_arrayC = NULL;
+   PVFS_size total_bytes_client = 0;
+   PVFS_size total_bytes_server = 0;
+                                                                               
+    /* Used for calculating correct offset values */
+    int32_t tmpOff = 0;
+
+   /* PVFS_Process_request arguments */
+   int retval;
+   len_arrayS = (int32_t*)malloc(64*sizeof(int32_t));
+   len_arrayC = (int32_t*)malloc(64*sizeof(int32_t));
+   off_arrayS = (PVFS_offset*)malloc(64*sizeof(PVFS_offset));
+   off_arrayC = (PVFS_offset*)malloc(64*sizeof(PVFS_offset));
+   assert(len_arrayS != NULL && len_arrayC != NULL && off_arrayS != NULL && off_arrayC != NULL);
+                                                                               
+   /* setup file datatype */
+   for(i=0; i<63; i++)
+   {
+       len_arrayS[i] = 4;
+       off_arrayS[i] = 4 + (8*i);
+   }
+   PVFS_Request_hindexed(63, len_arrayS, off_arrayS, PVFS_BYTE, &file_req);
+                                                                               
+   /* setup mem datatype */
+   len_arrayC[0] = 0;
+   off_arrayC[0] = 135295720;
+   for(i=1; i<64; i++)
+   {
+       len_arrayC[i] = 4;
+       off_arrayC[i] = off_arrayC[0] + 4 + ((i-1)*8);
+   }
+   PVFS_Request_hindexed(64, len_arrayC, off_arrayC, PVFS_BYTE, &mem_req);
+                                                                               
+   mem_state = PINT_new_request_state(mem_req);
+   file_state = PINT_new_request_state(file_req);
+   file_state_server = PINT_new_request_state(file_req);
+                                                                               
+   /* set up file data for request */
+   rf1.server_nr = 0;
+   rf1.server_ct = 1;
+   rf1.fsize = 0;
+   rf1.dist = PINT_dist_create("simple_stripe");
+   rf1.extend_flag = 1;
+   PINT_dist_lookup(rf1.dist);
+                                                                               
+   /* set up result struct */
+   seg1.offset_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+   seg1.size_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+   seg1.bytemax = BYTEMAX;
+   seg1.segmax = SEGMAX;
+   seg1.bytes = 0;
+   seg1.segs = 0;
+                                                                               
+                                                                               
+   PINT_REQUEST_STATE_SET_TARGET(file_state, 0);
+   PINT_REQUEST_STATE_SET_FINAL(file_state, PINT_REQUEST_TOTAL_BYTES(mem_req));   PINT_REQUEST_STATE_SET_TARGET(file_state_server, 0);
+   PINT_REQUEST_STATE_SET_FINAL(file_state_server, PINT_REQUEST_TOTAL_BYTES(mem_req));
+                                                                               
+                                                                               
+   /* Turn on debugging */
+/*
+    gossip_enable_stderr();
+    gossip_set_debug_mask(1,REQUEST_DEBUG);
+                                                                               
+   printf("\nCLIENT ************************************\n");
+*/
+   do
+   {
+      seg1.bytes = 0;
+      seg1.segs = 0;
+                                                                               
+      /* process request */
+      retval = PINT_process_request(file_state, mem_state, &rf1, &seg1, PINT_CLIENT);
+                                                                               
+      if(retval >= 0)
+      {
+/*
+         printf("results of PINT_Process_request():\n");
+         printf("%d segments with %lld bytes\n", seg1.segs, seg1.bytes);
+*/
+         total_bytes_client += seg1.bytes;
+         for(i=0; i<seg1.segs; i++, tmpOff++)
+         {
+	    if((int)off_arrayC[tmpOff] != (int)seg1.offset_array[i]){
+		printf("segment %d's offset is %d but should be %d\n",
+		       i,(int)seg1.offset_array[i],(int)off_arrayC[tmpOff]);
+		return -1;
+	    }
+	    else if((int)len_arrayC[tmpOff] != (int)seg1.size_array[i]){
+		printf("segment %d's size is %d but should be %d\n",
+		       i,(int)seg1.size_array[i],(int)len_arrayC[tmpOff]);
+		return -1;
+	    }
+         }
+      }
+                                                                               
+   } while(!PINT_REQUEST_DONE(file_state) && retval >= 0);
+                                                                               
+   if(retval < 0)
+   {
+      fprintf(stderr, "Error: PINT_Process_request() failure.\n");
+      return(-1);
+   }
+   if(PINT_REQUEST_DONE(file_state))
+   {
+/*
+      printf("**** request done.\n");
+*/
+   }
+                                                                               
+/*
+   printf("\nSERVER ************************************\n");
+*/
+    tmpOff = 0;
+   do
+   {
+      seg1.bytes = 0;
+      seg1.segs = 0;
+                                                                               
+      /* process request */
+      retval = PINT_process_request(file_state_server, NULL, &rf1, &seg1, PINT_SERVER);
+                                                                               
+      if(retval >= 0)
+      {
+/*
+         printf("results of PINT_Process_request():\n");
+         printf("%d segments with %lld bytes\n", seg1.segs, seg1.bytes);
+*/
+         total_bytes_server += seg1.bytes;
+         for(i=0; i<seg1.segs; i++,tmpOff++)
+         {
+	    if((int)off_arrayS[tmpOff] != (int)seg1.offset_array[i]){
+		printf("segment %d's offset is %d but should be %d\n",
+		       i,(int)seg1.offset_array[i],(int)off_arrayS[tmpOff]);
+		return -1;
+	    }
+	    else if((int)len_arrayS[tmpOff] != (int)seg1.size_array[i]){
+		printf("segment %d's size is %d but should be %d\n",
+		       i,(int)seg1.size_array[i],(int)len_arrayS[tmpOff]);
+		return -1;
+	    }
+         }
+      }
+                                                                               
+   } while(!PINT_REQUEST_DONE(file_state_server) && retval >= 0);
+                                                                               
+   if(retval < 0)
+   {
+      fprintf(stderr, "Error: PINT_Process_request() failure.\n");
+      return(-1);
+   }
+   if(PINT_REQUEST_DONE(file_state_server))
+   {
+/*
+      printf("**** request done.\n");
+*/
+   }
+                                                                               
+/*
+   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)
+   {
+/*
+       printf("SUCCESS.\n");
+*/
+   }
+   else
+   {
+       printf("FAILURE!!!\n");
+	return -1;
+   }
+                                                                               
+   return 0;
+}
+                                                                                
+
+/* Preconditions: None
+ * Parameters: comm - special pts communicator, rank - the rank of the process,
+ * buf - not used
+ * Postconditions: 0 if no errors and nonzero otherwise
+ */
+int test_noncontig_pattern(MPI_Comm * comm __unused,
+		     int rank,
+		     char *buf __unused,
+		     void *rawparams __unused)
+{
+    int ret = -1;
+
+    if (rank == 0)
+    {
+	ret = test_noncontig();
+    }
+    return ret;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/run-server
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/run-server	(revision 1145)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/run-server	(revision 1145)
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# description: mgr is the PVFS manager daemon
+#
+# chkconfig: 345 35 55
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+#PVFS_PREFIX=`cat /home/software/webwulf-config/pvfs_path`
+#[ -f $PVFS_PREFIX/sbin/mgr ] || exit 0
+
+# See how we were called.
+case "$1" in
+  start)
+   echo -n "Starting PVFS V2 Server: "
+  	../../../src/server/pvfs2-server ../../../src/server/simple.conf ../../../src/server/server.conf &
+   echo
+   touch pvfs2-server
+   ;;
+  stop)
+   echo -n "Stopping PVFS V2 Server: "
+   killproc pvfs2-server
+   #echo
+   #rm -f pvfs2-server
+   ;;
+  status)
+        status pvfs2-server
+   ;;
+  restart)
+   $0 stop
+   $0 start
+   ;;
+  *)
+   echo "Usage: $0 {start|stop|status|restart}"
+   exit 1
+esac
+
+exit 0
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-concurrent-meta.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-concurrent-meta.h	(revision 1250)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-concurrent-meta.h	(revision 1250)
@@ -0,0 +1,6 @@
+#ifndef TEST_CONCURRENT_META_H
+#define TEST_CONCURRENT_META_H
+
+int test_concurrent_meta(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-uninitialized.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-uninitialized.h	(revision 2312)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-uninitialized.h	(revision 2312)
@@ -0,0 +1,9 @@
+#ifndef INCLUDE_UNINITIALIZED_H
+#define INCLUDE_UNINITIALIZED_H
+
+int test_uninitialized(MPI_Comm * comm,
+		       int rank,
+		       char *buf,
+		       void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-contiguous-datatype.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-contiguous-datatype.h	(revision 2007)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-contiguous-datatype.h	(revision 2007)
@@ -0,0 +1,6 @@
+#ifndef TEST_CONTIGUOUS_DATATYPE_H
+#define TEST_CONTIGUOUS_DATATYPE_H
+
+int test_contiguous_datatype(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-noncontig-pattern.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-noncontig-pattern.h	(revision 1948)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-noncontig-pattern.h	(revision 1948)
@@ -0,0 +1,6 @@
+#ifndef TEST_NONCONTIG_PATTERN_H
+#define TEST_NONCONTIG_PATTERN_H
+
+int test_noncontig_pattern(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-dir-torture.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-dir-torture.c	(revision 3784)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-dir-torture.c	(revision 3784)
@@ -0,0 +1,113 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+#include <stdio.h>
+#include <sys/time.h>
+
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "pvfs2-util.h"
+#include "test-dir-torture.h"
+
+/*
+ * handle:  handle of parent directory
+ * fs_id:   our file system
+ * depth:   how many directories to make at this level
+ * rank:    rank in the mpi process group 
+ */
+
+static int recursive_create_dir(PVFS_handle handle,
+			 PVFS_fs_id fs_id,
+			 int depth,
+			 int ndirs,
+			 int rank)
+{
+    int i;
+    char name[PVFS_SEGMENT_MAX];
+    PVFS_object_ref refn;
+    PVFS_object_ref out_refn;
+
+    /* base case: we've gone far enough */
+    if (depth == 0)
+	return 0;
+
+    refn.handle = handle;
+    refn.fs_id = fs_id;
+
+    for (i = 0; i < ndirs; i++)
+    {
+	snprintf(name, PVFS_SEGMENT_MAX, "depth=%d-rank=%d-iter=%d",
+                 depth, rank, i);
+
+	if (create_dir(refn, name, &out_refn) < 0)
+        {
+            fprintf(stderr, "Failed to create dir %s\n",name);
+            return -1;
+        }
+
+        recursive_create_dir(out_refn.handle, out_refn.fs_id,
+                             depth - 1, ndirs, rank);
+
+        if (remove_dir(refn, name) < 0)
+        {
+            fprintf(stderr, "Faild to remove dir %s.  This is a "
+                    "real error.\n",name);
+            return -1;
+        }
+    }
+    return 0;
+}
+
+/*
+ * driver for the test
+ * comm:	special pts communicator
+ * rank:	rank among processes
+ * buf:		stuff data in here ( not used )
+ * rawparams:	our configuration information
+ *
+ * returns: 
+ * 	0:  	all went well
+ * 	nonzero: errors encountered making one or more directories
+ */
+int test_dir_torture(MPI_Comm * comm __unused,
+		     int rank,
+		     char *buf __unused,
+		     void *rawparams)
+{
+    PVFS_fs_id fs_id;
+    PVFS_object_ref root_refn;
+    generic_params *myparams = (generic_params *) rawparams;
+    int nerrs = 0;
+
+    if (!pvfs_helper.initialized && initialize_sysint())
+    {
+        debug_printf("test_dir_torture cannot be initialized!\n");
+        return -1;
+    }
+
+    fs_id = pvfs_helper.fs_id;
+    get_root(fs_id, &root_refn);
+
+    /*
+      this will make n^n directories, so be careful
+      about running the test with mode=100
+    */
+    nerrs = recursive_create_dir(root_refn.handle, root_refn.fs_id,
+                                 myparams->mode, myparams->mode, rank);
+
+    return -nerrs;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-request-contiguous.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-request-contiguous.c	(revision 4457)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-request-contiguous.c	(revision 4457)
@@ -0,0 +1,367 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/* 
+ * test-request_contiguous: simulates request processing on 4 seperate servers 
+ * that eachÂ  hold a portion of the file being accessed, for a contiguous read 
+ * or write.
+ * Author: Michael Speth - testing code written by Phil C.
+ * Date: 8/21/2003
+ * Last Updated: 8/21/2003
+ */
+
+#include <time.h>
+#include <sys/time.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <pint-request.h>
+#include <pint-distribution.h>
+#include <pvfs2-types.h>
+#include <pvfs2-request.h>
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "pvfs2-util.h"
+#include "test-request-contiguous.h"
+#define SEGMAX 16
+#define BYTEMAX (4*1024*1024)
+
+/*
+ * Parameters: none
+ * Returns 0 on success and -1 on failure (ie - the segment offsets
+ * were not calcuated correctly by Request_indexed
+ */
+static int test_request_cont(void){
+    int i;
+    PINT_Request *r;
+    PINT_Request *r_enc;
+    PINT_Request *r_dec;
+    PINT_Request_state *rs1;
+    PINT_Request_state *rs2;
+    PINT_Request_state *rs3;
+    PINT_Request_state *rs4;
+    PINT_request_file_data rf1;
+    PINT_request_file_data rf2;
+    PINT_request_file_data rf3;
+    PINT_request_file_data rf4;
+    PINT_Request_result seg1;
+    int ret = -1;
+    int pack_size = 0;
+    int32_t segSize;
+
+                                                                                
+    /* PVFS_Process_request arguments */
+    int retval;
+
+                                                                                
+    /* the case that we want to test is a write, with 4 servers holding
+     * parts of the file data.  We will setup 4 different request states,
+     * one per server.  The request will be large enough that all 4
+     * servers will be involved
+     */
+                                                                                
+    /* set up one request, we will reuse it for each server scenario */
+    /* we want to read 4M of data, resulting from 1M from each server */
+    PVFS_Request_contiguous((4*1024*1024), PVFS_BYTE, &r);
+
+    /* Used for calculating correct offset values */
+    segSize = 1024*1024;
+                                                                                
+    /* allocate a new request and pack the original one into it */
+    pack_size = PINT_REQUEST_PACK_SIZE(r);
+    r_enc = (PINT_Request*)malloc(pack_size);
+    ret = PINT_request_commit(r_enc, r);
+    if(ret < 0)
+    {
+	fprintf(stderr, "PINT_Request_commit() failure.\n");
+	return(-1);
+    }
+    ret = PINT_request_encode(r_enc);
+    if(ret < 0)
+    {
+	fprintf(stderr, "PINT_Request_encode() failure.\n");
+	return(-1);
+    }
+                                                                                
+                                                                                
+    /* decode the encoded request (hopefully ending up with something
+     * equivalent to the original request)
+     */
+    r_dec = (PINT_Request*)malloc(pack_size);
+    memcpy(r_dec, r_enc, pack_size);
+    free(r_enc);
+    free(r);
+    ret = PINT_request_decode(r_dec);
+    if(ret < 0)
+    {
+       fprintf(stderr, "PINT_Request_decode() failure.\n");
+       return(-1);
+    }
+                                                                                 
+    /* set up four request states */
+    rs1 = PINT_new_request_state(r_dec);
+    rs2 = PINT_new_request_state(r_dec);
+    rs3 = PINT_new_request_state(r_dec);
+    rs4 = PINT_new_request_state(r_dec);
+                                                                                 
+    /* set up file data for each server */
+    rf1.server_nr = 0;
+    rf1.server_ct = 4;
+    rf1.fsize = 0;
+    rf1.dist = PINT_dist_create("simple_stripe");
+    rf1.extend_flag = 1;
+    PINT_dist_lookup(rf1.dist);
+                                                                                 
+    rf2.server_nr = 1;
+    rf2.server_ct = 4;
+    rf2.fsize = 0;
+    rf2.dist = PINT_dist_create("simple_stripe");
+    rf2.extend_flag = 1;
+    PINT_dist_lookup(rf2.dist);
+                                                                                 
+    rf3.server_nr = 2;
+    rf3.server_ct = 4;
+    rf3.fsize = 0;
+    rf3.dist = PINT_dist_create("simple_stripe");
+    rf3.extend_flag = 1;
+    PINT_dist_lookup(rf3.dist);
+                                                                                 
+    rf4.server_nr = 3;
+    rf4.server_ct = 4;
+    rf4.fsize = 0;
+    rf4.dist = PINT_dist_create("simple_stripe");
+    rf4.extend_flag = 1;
+    PINT_dist_lookup(rf4.dist);
+                                                                                 
+    /* set up response for each server */
+    seg1.offset_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+    seg1.size_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+    seg1.segmax = SEGMAX;
+    seg1.bytemax = BYTEMAX;
+    seg1.segs = 0;
+    seg1.bytes = 0;
+                                                                                 
+    /* Turn on debugging */
+    /* gossip_enable_stderr(); */
+    /* gossip_set_debug_mask(1,REQUEST_DEBUG); */
+                                                                                 
+    do
+    {
+       seg1.bytes = 0;
+       seg1.segs = 0;
+                                                                                 
+	/* process request */
+	/* note that bytemax is exactly large enough to hold all of the
+	 * data that I should find here
+         */
+	retval = PINT_process_request(rs1, NULL, &rf1, &seg1, PINT_SERVER);
+	                                                                                 
+	if(!PINT_REQUEST_DONE(rs1))
+	{
+          fprintf(stderr, "IEEE! reporting more work to do when I should really be done...\n");
+	   return -1;
+	}
+	
+	if(retval >= 0)
+	{
+	    if(seg1.segs == 0)
+	    {
+		fprintf(stderr, "  IEEE! no results to report.\n");
+		return -1;
+	    }
+	    for(i=0; i<seg1.segs; i++)
+	    {
+		if( (int)seg1.size_array[i] != segSize){
+		    printf("Error: segment %d size is %d but should be %d\n",i,(int)seg1.size_array[i],segSize);
+		    return -1;
+		}
+	    }
+	}
+                                                                                
+    } while(!PINT_REQUEST_DONE(rs1) && retval >= 0);
+                                                                                
+    if(retval < 0)
+    {
+	fprintf(stderr, "Error: PINT_Process_request() failure.\n");
+	return(-1);
+    }
+    if(PINT_REQUEST_DONE(rs1))
+    {
+	/*printf("**** first request done.\n");
+	*/
+    }
+                                                                                
+    do
+    {
+	seg1.bytes = 0;
+	seg1.segs = 0;
+                                                                                
+	/* process request */
+	/* note that bytemax is exactly large enough to hold all of the
+	 * data that I should find here
+	 */
+	retval = PINT_process_request(rs2, NULL, &rf2, &seg1, PINT_SERVER);
+                                                                                
+	if(!PINT_REQUEST_DONE(rs2))
+	{
+	    fprintf(stderr, "IEEE! reporting more work to do when I should really be done...\n");
+	    return -1;
+	}
+                                                                                
+	if(retval >= 0)
+	{
+	    if(seg1.segs == 0)
+	    {
+		fprintf(stderr, "  IEEE! no results to report.\n");
+		return -1;
+	    }
+	    for(i=0; i<seg1.segs; i++)
+	    {
+		if( (int)seg1.size_array[i] != segSize){
+		    printf("Error: segment %d size is %d but should be %d\n",i,(int)seg1.size_array[i],segSize);
+		    return -1;
+		}
+	    }
+	}
+                                                                                
+    } while(!PINT_REQUEST_DONE(rs2) && retval >= 0);
+                                                                                
+    if(retval < 0)
+    {
+	fprintf(stderr, "Error: PINT_Process_request() failure.\n");
+	return(-1);
+    }
+    if(PINT_REQUEST_DONE(rs2))
+    {
+/*	printf("**** second request done.\n");
+
+*/
+    }
+                                                                                
+    do
+    {
+	seg1.bytes = 0;
+	seg1.segs = 0;
+                                                                                
+	/* process request */
+	/* note that bytemax is exactly large enough to hold all of the
+	* data that I should find here
+	*/
+	retval = PINT_process_request(rs3, NULL, &rf3, &seg1, PINT_SERVER);
+                                                                                
+	if(!PINT_REQUEST_DONE(rs3))
+	{
+	    fprintf(stderr, "IEEE! reporting more work to do when I should really be done...\n");
+	    return -1;
+	}
+                                                                                
+	if(retval >= 0)
+	{
+	    if(seg1.segs == 0)
+	    {
+		fprintf(stderr, "  IEEE! no results to report.\n");
+		return -1;
+	    }
+	    for(i=0; i<seg1.segs; i++)
+	    {
+		if( (int)seg1.size_array[i] != segSize){
+		    printf("Error: segment %d size is %d but should be %d\n",i,(int)seg1.size_array[i],segSize);
+		    return -1;
+		}
+	    }
+	}
+                                                                                
+    } while(!PINT_REQUEST_DONE(rs3) && retval >= 0);
+                                                                                
+    if(retval < 0)
+    {
+	fprintf(stderr, "Error: PINT_Process_request() failure.\n");
+	return(-1);
+    }
+    if(PINT_REQUEST_DONE(rs3))
+    {
+/*      printf("**** third request done.\n");
+*/
+    }
+                                                                                
+    do
+    {
+	seg1.bytes = 0;
+	seg1.segs = 0;
+                                                                                
+	/* process request */
+	/* note that bytemax is exactly large enough to hold all of the
+	 * data that I should find here
+	 */
+	retval = PINT_process_request(rs4, NULL, &rf4, &seg1, PINT_SERVER);
+                                                                                
+	if(!PINT_REQUEST_DONE(rs4))
+	{
+	    fprintf(stderr, "IEEE! reporting more work to do when I should really be done...\n");
+	    return -1;
+	}
+                                                                                
+	if(retval >= 0)
+	{
+	    if(seg1.segs == 0)
+	    {
+		fprintf(stderr, "  IEEE! no results to report.\n");
+		return -1;
+	    }
+	    for(i=0; i<seg1.segs; i++)
+	    {
+		if( (int)seg1.size_array[i] != segSize){
+		    printf("Error: segment %d size is %d but should be %d\n",i,(int)seg1.size_array[i],segSize);
+		    return -1;
+		}
+	    }
+	}
+                                                                                
+    } while(!PINT_REQUEST_DONE(rs4) && retval >= 0);
+                                                                                
+    if(retval < 0)
+    {
+	fprintf(stderr, "Error: PINT_Process_request() failure.\n");
+	return(-1);
+    }
+    if(PINT_REQUEST_DONE(rs4))
+    {
+/*	printf("**** fourth request done.\n");
+*/
+    }
+                                                                                
+    return 0;
+}
+
+/* Preconditions: None
+ * Parameters: comm - special pts communicator, rank - the rank of the process,
+ * buf - not used
+ * Postconditions: 0 if no errors and nonzero otherwise
+ */
+int test_request_contiguous(MPI_Comm * comm __unused,
+		     int rank,
+		     char *buf __unused,
+		     void *rawparams __unused)
+{
+    int ret = -1;
+
+    if (rank == 0)
+    {
+	ret = test_request_cont();
+    }
+    return ret;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-dir-torture.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-dir-torture.h	(revision 728)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-dir-torture.h	(revision 728)
@@ -0,0 +1,6 @@
+#ifndef TEST_DIR_TORTURE_H
+#define TEST_DIR_TORTURE_H
+
+int test_dir_torture(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs-stop-server.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs-stop-server.c	(revision 3784)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs-stop-server.c	(revision 3784)
@@ -0,0 +1,41 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/* 
+ * pvfs-stop-server: calls a script that stops the server
+ * Author: Michael Speth
+ * Date: 6/19/2003
+ */
+
+#include <stdlib.h>
+#include <sys/time.h>
+
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "pvfs-stop-server.h"
+
+/* Preconditions: Parameters must be valid
+ *  * Parameters: comm - special pts communicator, rank - the rank of the process, buf -  * (not used), rawparams - configuration information to specify which function to test * Postconditions: 0 if no errors and nonzero otherwise
+ *   */
+int pvfs_stop_server(MPI_Comm * comm __unused,
+		     int rank __unused,
+		     char *buf __unused,
+		     void *rawparams __unused)
+{
+    system("./run-server stop >& server_stop.log");
+    return 0;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-request-contiguous.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-request-contiguous.h	(revision 1927)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-request-contiguous.h	(revision 1927)
@@ -0,0 +1,6 @@
+#ifndef TEST_REQUEST_CONTIGUOUS_H
+#define TEST_REQUEST_CONTIGUOUS_H
+
+int test_request_contiguous(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-mix.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-mix.c	(revision 5825)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-mix.c	(revision 5825)
@@ -0,0 +1,273 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/*
+ * Author: Michael Speth, Testing code written & designed by Phil C.
+ * Date: 9/3/2003
+ * Last Updated: 9/3/2003
+ */
+
+#include <time.h>
+#include <sys/time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include<assert.h>
+
+#include <pint-request.h>
+#include <pint-distribution.h>
+#include <pvfs2-debug.h>
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "pvfs2-util.h"
+#include "pvfs2-internal.h"
+#include "test-mix.h"
+#define SEGMAX 16
+#define BYTEMAX (4*1024*1024)
+
+/*
+ * Parameters: none
+ * Returns 0 on success and -1 on failure (ie - the segment offsets
+ * were not calcuated correctly by Request_indexed
+ */
+static int test_mx(void){
+   int i, r_size;
+   PINT_Request *r1, *r1a, *r1b, *r_packed;
+   PINT_Request *r2;
+   PINT_Request_state *rs1;
+   PINT_Request_state *rs1p;
+   PINT_Request_state *rs2;
+   PINT_request_file_data rf1;
+   PINT_Request_result seg1;
+                                                                                                                                                       
+   /* PVFS_Process_request arguments */
+   int retval;
+                                                                                                                                                       
+   /* set up request state */
+   PVFS_Request_vector(4, 4, 16, PVFS_DOUBLE, &r1a);
+   PVFS_Request_vector(3, 3, 9, r1a, &r1b);
+   rs1 = PINT_new_request_state(r1b);
+                                                                                                                                                       
+   /* set up memory request */
+   PVFS_Request_contiguous(4076, PVFS_BYTE, &r2);
+   rs2 = PINT_new_request_state(r2);
+                                                                                                                                                       
+   /* pack the request */
+   r_size = PINT_REQUEST_PACK_SIZE(r1b);
+   r_packed = (struct PINT_Request *)malloc(r_size);
+   PINT_request_commit(r_packed, r1b);
+                                                                                                                                                       
+   PINT_request_encode(r_packed);
+                                                                                                                                                       
+   r_size = PINT_REQUEST_PACK_SIZE(r_packed);
+   r1 = (struct PINT_Request *)malloc(r_size);
+   memcpy(r1, r_packed, r_size);
+   PINT_request_decode(r1);
+                                                                                                                                                       
+   rs1p = PINT_new_request_state(r1);
+                                                                                                                                                       
+   /* set up file data for request */
+   rf1.server_nr = 0;
+   rf1.server_ct = 2;
+   rf1.fsize = 6000;
+   rf1.dist = PINT_dist_create("simple_stripe");
+   rf1.extend_flag = 0;
+   PINT_dist_lookup(rf1.dist);
+                                                                                                                                                       
+   /* set up result struct */
+   seg1.offset_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+   seg1.size_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+   seg1.bytemax = BYTEMAX;
+   seg1.segmax = SEGMAX;
+   seg1.bytes = 0;
+   seg1.segs = 0;
+                                                                                                                                                       
+   /* skip into the file datatype */
+   PINT_REQUEST_STATE_SET_TARGET(rs1, 20);
+   PINT_REQUEST_STATE_SET_TARGET(rs1p, 20);
+   PINT_dump_packed_request(r_packed);
+                                                                                                                                                       
+   /* skipping logical bytes */
+   /*  PINT_REQUEST_STATE_SET_TARGET(rs1,(3 * 1024) + 512); */
+   /* PINT_REQUEST_STATE_SET_FINAL(rs1,(6 * 1024) + 512); */
+                                                                                                                                                       
+                                                                                                                                                       
+   printf("\n************************************\n");
+   do
+   {
+      seg1.bytes = 0;
+      seg1.segs = 0;
+ 
+      /* process request */
+      retval = PINT_process_request(rs1, rs2, &rf1, &seg1, PINT_CLIENT);
+                                                                                                                                                       
+      if(retval >= 0)
+      {
+         printf("results of PINT_Process_request():\n");
+         printf("%d segments with %lld bytes\n", seg1.segs, lld(seg1.bytes));
+         for(i=0; i<seg1.segs; i++)
+         {
+            printf("  segment %d: offset: %d size: %d\n",
+               i, (int)seg1.offset_array[i], (int)seg1.size_array[i]);
+         }
+      }
+                                                                                                                                                       
+   } while(!PINT_REQUEST_DONE(rs1) && retval >= 0);
+                                                                                                                                                       
+   if(retval < 0)
+   {
+      fprintf(stderr, "Error: PINT_Process_request() failure.\n");
+      return(-1);
+   }
+   if(PINT_REQUEST_DONE(rs1))
+   {
+      printf("**** request done.\n");
+   }
+                                                                                                                                                       
+   PINT_REQUEST_STATE_RESET(rs2);
+                                                                                                                                                       
+   printf("\n************************************\n");
+   do
+   {
+      seg1.bytes = 0;
+      seg1.segs = 0;
+                                                                                                                                                       
+      /* process request */
+      retval = PINT_process_request(rs1p, rs2, &rf1, &seg1, PINT_CLIENT);
+                                                                                                                                                       
+      if(retval >= 0)
+      {
+         printf("results of PINT_Process_request():\n");
+         printf("%d segments with %lld bytes\n", seg1.segs, lld(seg1.bytes));
+         for(i=0; i<seg1.segs; i++)
+         {
+            printf("  segment %d: offset: %d size: %d\n",
+               i, (int)seg1.offset_array[i], (int)seg1.size_array[i]);
+         }
+      }
+                                                                                                                                                       
+   } while(!PINT_REQUEST_DONE(rs1p) && retval >= 0);
+                                                                                                                                                       
+   if(retval < 0)
+   {
+      fprintf(stderr, "Error: PINT_Process_request() failure.\n");
+      return(-1);
+   }
+   if(PINT_REQUEST_DONE(rs1p))
+   {
+      printf("**** request done.\n");
+   }
+                                                                                                                                                       
+   PINT_REQUEST_STATE_RESET(rs1);
+   PINT_REQUEST_STATE_RESET(rs2);
+                                                                                                                                                       
+   printf("\n************************************\n");
+   do
+   {
+      seg1.bytes = 0;
+      seg1.segs = 0;
+                                                                                                                                                       
+      /* process request */
+      retval = PINT_process_request(rs1, rs2, &rf1, &seg1, PINT_SERVER);
+                                                                                                                                                       
+      if(retval >= 0)
+      {
+         printf("results of PINT_Process_request():\n");
+         printf("%d segments with %lld bytes\n", seg1.segs, lld(seg1.bytes));
+         for(i=0; i<seg1.segs; i++)
+         {
+            printf("  segment %d: offset: %d size: %d\n",
+               i, (int)seg1.offset_array[i], (int)seg1.size_array[i]);
+         }
+      }
+                                                                                                                                                       
+   } while(!PINT_REQUEST_DONE(rs1) && retval >= 0);
+                                                                                                                                                       
+   if(retval < 0)
+   {
+      fprintf(stderr, "Error: PINT_Process_request() failure.\n");
+      return(-1);
+   }
+   if(PINT_REQUEST_DONE(rs1))
+   {
+      printf("**** request done.\n");
+   }
+                                                                                                                                                       
+   PINT_REQUEST_STATE_RESET(rs1p);
+   PINT_REQUEST_STATE_RESET(rs2);
+                                                                                                                                                       
+   printf("\n************************************\n");
+   do
+   {
+      seg1.bytes = 0;
+      seg1.segs = 0;
+                                                                                                                                                       
+      /* process request */
+      retval = PINT_process_request(rs1p, rs2, &rf1, &seg1, PINT_SERVER);
+                                                                                                                                                       
+      if(retval >= 0)
+      {
+         printf("results of PINT_Process_request():\n");
+         printf("%d segments with %lld bytes\n", seg1.segs, lld(seg1.bytes));
+         for(i=0; i<seg1.segs; i++)
+         {
+            printf("  segment %d: offset: %d size: %d\n",
+               i, (int)seg1.offset_array[i], (int)seg1.size_array[i]);
+         }
+      }
+                                                                                                                                                       
+   } while(!PINT_REQUEST_DONE(rs1p) && retval >= 0);
+                                                                                                                                                       
+   if(retval < 0)
+   {
+      fprintf(stderr, "Error: PINT_Process_request() failure.\n");
+      return(-1);
+   }
+   if(PINT_REQUEST_DONE(rs1p))
+   {
+      printf("**** request done.\n");
+   }
+                                                                                                                                                       
+    gossip_enable_stderr();
+    gossip_set_debug_mask(1,GOSSIP_REQUEST_DEBUG);
+                                                                                                                                                       
+   PVFS_Request_free(&r1);
+   PVFS_Request_free(&r1a);
+   PVFS_Request_free(&r1b);
+   PVFS_Request_free(&r2);
+   PVFS_Request_free(&r_packed);
+                                                                                                                                                       
+   return 0;
+}
+
+/* Preconditions: None
+ * Parameters: comm - special pts communicator, rank - the rank of the process,
+ * buf - not used
+ * Postconditions: 0 if no errors and nonzero otherwise
+ */
+int test_mix(MPI_Comm * comm __unused,
+		     int rank,
+		     char *buf __unused,
+		     void *rawparams __unused)
+{
+    int ret = -1;
+
+    if (rank == 0)
+    {
+	ret = test_mx();
+    }
+    return ret;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs-stop-server.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs-stop-server.h	(revision 1146)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs-stop-server.h	(revision 1146)
@@ -0,0 +1,6 @@
+#ifndef PVFS_STOP_SERVER_H
+#define PVFS_STOP_SERVER_H
+
+int pvfs_stop_server(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-mix.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-mix.h	(revision 2076)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-mix.h	(revision 2076)
@@ -0,0 +1,6 @@
+#ifndef TEST_MIX_H
+#define TEST_MIX_H
+
+int test_mix(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-explicit-offset.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-explicit-offset.c	(revision 4457)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-explicit-offset.c	(revision 4457)
@@ -0,0 +1,152 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/*
+ * Author: Michael Speth, Testing code written & designed by Phil C.
+ * Date: 8/29/2003
+ * Last Updated: 8/29/2003
+ */
+
+#include <time.h>
+#include <sys/time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include<assert.h>
+
+#include <pint-request.h>
+#include <pint-distribution.h>
+#include <pint-dist-utils.h>
+#include <pvfs2-debug.h>
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "pvfs2-util.h"
+#include "test-explicit-offset.h"
+#define SEGMAX 16
+#define BYTEMAX (4*1024*1024)
+
+/*
+ * Parameters: none
+ * Returns 0 on success and -1 on failure (ie - the segment offsets
+ * were not calcuated correctly by Request_indexed
+ */
+static int test_exp_offset(void){
+   int i;
+   PINT_Request *r1;
+   PINT_Request *r2;
+   PINT_Request_state *rs1;
+   PINT_Request_state *rs2;
+   PINT_request_file_data rf1;
+   PINT_Request_result seg1;
+                                                                                
+   /* PVFS_Process_request arguments */
+   int retval;
+                                                                                
+   /* set up request */
+   PVFS_Request_contiguous(4096, PVFS_BYTE, &r1);
+                                                                                
+   /* set up request state */
+   rs1 = PINT_new_request_state(r1);
+                                                                                
+   /* set up memory request */
+   PVFS_Request_contiguous(4076, PVFS_BYTE, &r2);
+   rs2 = PINT_new_request_state(r2);
+                                                                                
+   /* set up file data for request */
+   rf1.server_nr = 0;
+   rf1.server_ct = 4;
+   rf1.fsize = 6000;
+   rf1.dist = PINT_dist_create("simple_stripe");
+   rf1.extend_flag = 0;
+   PINT_dist_lookup(rf1.dist);
+                                                                                
+   /* set up result struct */
+   seg1.offset_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+   seg1.size_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+   seg1.bytemax = BYTEMAX;
+   seg1.segmax = SEGMAX;
+   seg1.bytes = 0;
+   seg1.segs = 0;
+                                                                                
+   /* skip into the file datatype */
+   PINT_REQUEST_STATE_SET_TARGET(rs1, 20);
+                                                                                
+   /* Turn on debugging */
+/*
+    gossip_enable_stderr();
+    gossip_set_debug_mask(1,REQUEST_DEBUG);
+*/
+                                                                                
+   /* skipping logical bytes */
+/*
+    PINT_REQUEST_STATE_SET_TARGET(rs1,(3 * 1024) + 512);
+   PINT_REQUEST_STATE_SET_FINAL(rs1,(6 * 1024) + 512);
+*/
+                                                                                
+   do
+   {
+      seg1.bytes = 0;
+      seg1.segs = 0;
+                                                                                
+      /* process request */
+      retval = PINT_process_request(rs1, rs2, &rf1, &seg1, PINT_CLIENT);
+                                                                                
+      if(retval >= 0)
+      {
+         for(i=0; i<seg1.segs; i++)
+         {
+	    if((int)seg1.size_array[i] != 4076){
+		printf("segment %d's size is %d but should be %d\n",
+			i,(int)seg1.size_array[i],4076);
+	    }
+         }
+      }
+                                                                                
+   } while(!PINT_REQUEST_DONE(rs1) && retval >= 0);
+   if(retval < 0)
+   {
+      fprintf(stderr, "Error: PINT_Process_request() failure.\n");
+      return(-1);
+   }
+   if(PINT_REQUEST_DONE(rs1))
+   {
+/*
+      printf("**** request done.\n");
+*/
+   }
+                                                                                
+   return 0;
+}
+                                                                                
+
+/* Preconditions: None
+ * Parameters: comm - special pts communicator, rank - the rank of the process,
+ * buf - not used
+ * Postconditions: 0 if no errors and nonzero otherwise
+ */
+int test_explicit_offset(MPI_Comm * comm __unused,
+		     int rank,
+		     char *buf __unused,
+		     void *rawparams __unused)
+{
+    int ret = -1;
+
+    if (rank == 0)
+    {
+	ret = test_exp_offset();
+    }
+    return ret;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-vector-start-final-offset.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-vector-start-final-offset.c	(revision 4457)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-vector-start-final-offset.c	(revision 4457)
@@ -0,0 +1,162 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/* Simulates Accessing a data type with a specific starting location and ending location
+ * Author: Michael Speth, Testing code written & designed by Phil C.
+ * Date: 9/1/2003
+ * Last Updated: 9/1/2003
+ */
+
+#include <time.h>
+#include <sys/time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include<assert.h>
+
+#include <pint-request.h>
+#include <pint-distribution.h>
+#include <pvfs2-debug.h>
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "pvfs2-util.h"
+#include "test-vector-start-final-offset.h"
+#define SEGMAX 16
+#define BYTEMAX (4*1024*1024)
+
+/*
+ * Parameters: none
+ * Returns 0 on success and -1 on failure (ie - the segment offsets
+ * were not calcuated correctly by Request_indexed
+ */
+static int test_vec_start_final(void){
+    int i;
+    PINT_Request *r1;
+    PINT_Request_state *rs1;
+    PINT_request_file_data rf1;
+    PINT_Request_result seg1;
+                                                                                
+    /* PVFS_Process_request arguments */
+    int retval;
+                                                                                
+    int32_t tmpOff, tmpSize;
+    int segNum;
+
+    /* set up request */
+    PVFS_Request_vector(10, 1024, 10*1024, PVFS_BYTE, &r1);
+
+
+    /* set up request state */
+    rs1 = PINT_new_request_state(r1);
+                                                                                
+    /* set up file data for request */
+    rf1.server_nr = 0;
+    rf1.server_ct = 8;
+    rf1.fsize = 10000000;
+    rf1.dist = PINT_dist_create("simple_stripe");
+    rf1.extend_flag = 1;
+    PINT_dist_lookup(rf1.dist);
+                                                                                
+    /* set up result struct */
+    seg1.offset_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+    seg1.size_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+    seg1.bytemax = BYTEMAX;
+    seg1.segmax = SEGMAX;
+    seg1.bytes = 0;
+    seg1.segs = 0;
+                                                                                
+    /* Turn on debugging */
+    /* gossip_enable_stderr();
+     gossip_set_debug_mask(1,REQUEST_DEBUG); */
+                                                                                
+    /* skipping logical bytes */
+    /*seg1.bytemax = (3 * 1024) + 512;*/
+                                                                                
+    PINT_REQUEST_STATE_SET_TARGET(rs1,(3 * 1024) + 512);
+    PINT_REQUEST_STATE_SET_FINAL(rs1,(6 * 1024) + 512);
+                                                                                
+    /* need to reset bytemax before we contrinue */
+    /*seg1.bytemax = BYTEMAX;*/
+                                                                                
+    do
+    {
+       seg1.bytes = 0;
+       seg1.segs = 0;
+                                                                                
+       /* process request */
+       retval = PINT_process_request(rs1, NULL, &rf1, &seg1, PINT_SERVER);
+                                                                                 
+	if(retval >= 0)
+	{
+	   tmpOff = (3 * 1024)*10 + 512;
+	   tmpSize = 512;
+	    segNum = 3;
+	    for(i=0; i<seg1.segs; i++, tmpOff = segNum*(10*1024))
+	    {
+		if(tmpOff != (int)seg1.offset_array[i]){
+		    printf("segment %d's offset is %d but should be %d\n",
+			    i,(int)seg1.offset_array[i],tmpOff);
+		    return -1;
+		}
+		else if(tmpSize != (int)seg1.size_array[i]){
+		    printf("segment %d's size is %d but should be %d\n",
+			i,(int)seg1.size_array[i],tmpSize);
+		    return -1;
+		}
+		if(seg1.segs  == (i+2)){
+		    tmpSize = 512;
+		}
+		else{
+		    tmpSize = 1024;	
+		}
+		segNum++;
+	    }
+	}
+    } while(!PINT_REQUEST_DONE(rs1) && retval >= 0);
+
+    if(retval < 0)
+    {
+	fprintf(stderr, "Error: PINT_Process_request() failure.\n");
+	return(-1);
+    }
+    if(PINT_REQUEST_DONE(rs1))
+    {
+/*
+      printf("**** request done.\n");
+*/
+    }
+    return 0;
+}
+                                                                                
+
+/* Preconditions: None
+ * Parameters: comm - special pts communicator, rank - the rank of the process,
+ * buf - not used
+ * Postconditions: 0 if no errors and nonzero otherwise
+ */
+int test_vector_start_final_offset(MPI_Comm * comm __unused,
+		     int rank,
+		     char *buf __unused,
+		     void *rawparams __unused)
+{
+    int ret = -1;
+
+    if (rank == 0)
+    {
+	ret = test_vec_start_final();
+    }
+    return ret;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-explicit-offset.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-explicit-offset.h	(revision 2007)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-explicit-offset.h	(revision 2007)
@@ -0,0 +1,6 @@
+#ifndef TEST_EXPLICIT_OFFSET_H
+#define TEST_EXPLICIT_OFFSET_H
+
+int test_explicit_offset(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-vector-start-final-offset.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-vector-start-final-offset.h	(revision 2007)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-vector-start-final-offset.h	(revision 2007)
@@ -0,0 +1,6 @@
+#ifndef TEST_VECTOR_START_FINAL_OFFSET_H
+#define TEST_VECTOR_START_FINAL_OFFSET_H
+
+int test_vector_start_final_offset(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/create.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/create.c	(revision 6373)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/create.c	(revision 6373)
@@ -0,0 +1,194 @@
+/*
+ * (C) 2001 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+#include <client.h>
+#include <sys/time.h>
+#include <stdio.h>
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs2-util.h"
+#include "pvfs-helper.h"
+#include "test-create.h"
+
+static int compare_attribs(PVFS_sys_attr attr1,
+		    PVFS_sys_attr attr2);
+
+/* files, directories, tree of directories */
+static int create_file(PVFS_fs_id fs_id,
+		char *dirname,
+		char *filename)
+{
+    int ret;
+    PVFS_sys_attr attr;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_look;
+    PVFS_sysresp_create resp_create;
+    PVFS_sysresp_getattr resp_getattr;
+
+    PVFS_util_gen_credentials(&credentials);
+
+    ret = PVFS_sys_lookup(fs_id, dirname, &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+	printf("Lookup failed with errcode = %d\n", ret);
+	return (-1);
+    }
+
+    attr.mask = PVFS_ATTR_SYS_ALL_SETABLE;
+    attr.owner = credentials.uid;
+    attr.group = credentials.gid;
+    attr.perms = 1877;
+    attr.atime = attr.mtime = attr.ctime = 0xdeadbeef;
+
+    memset(&resp_create,0,sizeof(resp_create));
+    ret = PVFS_sys_create(filename, resp_look.ref,
+                          attr, &credentials, NULL, NULL, &resp_create);
+    if (ret < 0)
+    {
+	printf("create failed with errcode = %d\n", ret);
+	return (-1);
+    }
+
+    ret = PVFS_sys_getattr(resp_create.ref, attr.mask,
+                           &credentials, &resp_getattr);
+    if (ret < 0)
+    {
+	printf("getattr failed with errcode = %d\n", ret);
+	return (-1);
+    }
+    ret = compare_attribs(attr, resp_getattr.attr);
+    if (ret < 0)
+    {
+	printf("file created has incorrect attributes\n");
+	return -1;
+    }
+    return 0;
+}
+
+/*
+ * compare members of two attributes structures
+ * 	currently reports verbosely what members differ, but perhaps we should
+ * 	do that based on a 'verbose' option 
+ * attr1, attr2:  the PVFS_sys_attr structures to compare
+ * returns:	
+ * 	0 	if equivalent	
+ * 	-1 	if we found a difference
+ */
+static int compare_attribs(PVFS_sys_attr attr1,
+		    PVFS_sys_attr attr2)
+{
+    if (attr1.owner != attr2.owner)
+    {
+	printf("compare_attribs: owner differs\n");
+	return -1;
+    }
+    if (attr1.group != attr2.group)
+    {
+	printf("compare_attribs: group differs\n");
+	return -1;
+    }
+    if (attr1.perms != attr2.perms)
+    {
+	printf("compare_attribs: perms differs\n");
+	return -1;
+    }
+    if (attr1.atime != attr2.atime)
+    {
+	printf("compare_attribs: atime differs\n");
+	return -1;
+    }
+    if (attr1.mtime != attr2.mtime)
+    {
+	printf("compare_attribs: mtime differs\n");
+	return -1;
+    }
+    if (attr1.ctime != attr2.ctime)
+    {
+	printf("compare_attribs: ctime differs\n");
+	return -1;
+    }
+    /* does it make sense to compare  the following attributes? objtype,
+     * for example, doesn't get set by the caller */
+#if 0
+    if (attr1.objtype != attr2.objtype)
+    {
+	printf("compare_attribs: objtype differs\n");
+	return -1;
+    }
+    /* TODO: i know these are going to be metafiles, but if this test is to
+     * be a generic attribute compare, it should switch based on 'objtype'
+     */
+    /* what metafile attributes are worth comparing? */
+    if (attr1.u.meta.dist != attr2.u.meta.dist)
+    {
+	printf("compare_attribs: dist info differs\n");
+	return -1;
+    }
+    if (attr1.u.meta.nr_datafiles != attr2.u.meta.nr_datafiles)
+    {
+	printf("compare_attribs: nr_datafiles differ\n");
+	return -1;
+    }
+    if (attr1.u.meta.dist_size != attr2.u.meta.dist_size)
+    {
+	printf("compare_attribs: dist_size differ\n");
+	return -1;
+    }
+    for (i = 0; i < attr1.u.meta.nr_datafiles; i++)
+    {
+	if (attr1.u.meta.dfh[i] != attr2.u.meta.dfh[i])
+	{
+	    printf("compare_attribs: dfh[%d] differs\n", i);
+	    return -1;
+	}
+    }
+#endif
+    /* TODO: doesn't compare extended attributes */
+    return 0;
+}
+
+int test_create(MPI_Comm * comm __unused,
+		int rank,
+		char *buf __unused,
+		void *params)
+{
+    const PVFS_util_tab* tab;
+    generic_params *myparams = (generic_params *) params;
+    char name[PVFS_NAME_MAX];
+    int i, nerrs = 0;
+
+    /* Parse PVFStab */
+    tab = PVFS_util_parse_pvfstab(NULL);
+    if (!tab)
+    {
+	printf("Parsing error\n");
+	return (-1);
+    }
+
+    if (!pvfs_helper.initialized && initialize_sysint())
+    {
+        printf("System initialization error\n");
+        return (-1);
+    }
+
+    for (i = 0; i < myparams->mode; i++)
+    {
+	snprintf(name, PVFS_NAME_MAX, "%d-%d-testfile", i, rank);
+	nerrs += create_file(pvfs_helper.fs_id,
+                             myparams->path, name);
+    }
+    return (nerrs);
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-vector.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-vector.c	(revision 3534)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-vector.c	(revision 3534)
@@ -0,0 +1,120 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+#include <stdio.h>
+#include "pvfs-helper.h"
+#include "test-pvfs-datatype-vector.h"
+
+int test_pvfs_datatype_vector(
+    MPI_Comm *mycomm __unused,
+    int myid,
+    char *buf __unused,
+    void *params __unused)
+{
+    int ret = -1, i = 0, j = 0, num_ok = 0;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lk;
+    PVFS_Request req_io;
+    PVFS_Request req_mem;
+    PVFS_sysresp_io resp_io;
+    char filename[PVFS_NAME_MAX];
+    char io_buffer[TEST_PVFS_DATA_SIZE];
+
+    debug_printf("test_pvfs_datatype_vector called\n");
+
+    memset(&req_io,0,sizeof(PVFS_Request));
+    memset(&req_mem,0,sizeof(PVFS_Request));
+    memset(&resp_io,0,sizeof(PVFS_sysresp_io));
+
+    if (!pvfs_helper.initialized)
+    {
+        debug_printf("test_pvfs_datatype_config cannot be initialized!\n");
+        return ret;
+    }
+
+    for(i = 0; i < TEST_PVFS_DATA_SIZE; i++)
+    {
+	int ti = (i % 26) + 65;
+        io_buffer[i] = (char) ti;
+    }
+
+    PVFS_util_gen_credentials(&credentials);
+
+    for(i = 0; i < pvfs_helper.num_test_files; i++)
+    {
+        snprintf(filename,PVFS_NAME_MAX,"%s%.5drank%d",
+                 TEST_FILE_PREFIX,i,myid);
+
+        memset(&resp_lk,0,sizeof(PVFS_sysresp_lookup));
+        ret = PVFS_sys_lookup(pvfs_helper.fs_id,
+                              filename, &credentials, &resp_lk,
+                              PVFS2_LOOKUP_LINK_NO_FOLLOW);
+        if (ret < 0)
+        {
+            debug_printf("test_pvfs_datatype_vector: lookup failed "
+                         "on %s\n",filename);
+            break;
+        }
+
+        /* perform vector I/O on the file handle */
+        ret = PVFS_Request_vector(TEST_PVFS_DATA_SIZE,sizeof(char),1,
+                                  PVFS_BYTE,&req_io);
+        if(ret < 0)
+        {
+            debug_printf("Error: PVFS_Request_vector() failure.\n");
+            break;
+        }
+	ret = PVFS_Request_contiguous(TEST_PVFS_DATA_SIZE*sizeof(char),
+	    PVFS_BYTE, &req_mem);
+	if(ret < 0)
+	{
+	    debug_printf("Error: PVFS_Request_contiguous() failure.\n");
+	    break;
+	}
+
+        ret = PVFS_sys_write(resp_lk.ref, req_io, 0, io_buffer,
+                             req_mem, &credentials, &resp_io);
+        if(ret < 0)
+        {
+            debug_printf("Error: PVFS_sys_write() failure.\n");
+            break;
+        }
+
+        debug_printf("test_pvfsdatatype_vector: wrote %d bytes.\n",
+                     (int)resp_io.total_completed);
+
+        /* now try to read the data back */
+        memset(io_buffer,0,TEST_PVFS_DATA_SIZE);
+        ret = PVFS_sys_read(resp_lk.ref, req_io, 0, io_buffer,
+                            req_mem, &credentials, &resp_io);
+        if(ret < 0)
+        {
+            debug_printf("Error: PVFS_sys_read() failure (2).\n");
+            break;
+        }
+
+        debug_printf("test_pvfs_datatype_vector: read %d bytes.\n",
+                     (int)resp_io.total_completed);
+
+        /* finally, verify the data */
+        for(j = 0; j < TEST_PVFS_DATA_SIZE; j++)
+        {
+            if (io_buffer[j] != ((j % 26) + 65))
+            {
+                debug_printf("test_pvfs_datatype_vector: data "
+                             "verification failed\n");
+                break;
+            }
+        }
+        if (j != TEST_PVFS_DATA_SIZE)
+        {
+            break;
+        }
+
+        num_ok++;
+    }
+    return ((num_ok == pvfs_helper.num_test_files) ? 0 : 1);
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs2tab
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs2tab	(revision 2594)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs2tab	(revision 2594)
@@ -0,0 +1,1 @@
+tcp://localhost:3334/pvfs2-fs /mnt/pvfs pvfs2 encoding=le_bfield 0 0 
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/generic-parser.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/generic-parser.c	(revision 1207)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/generic-parser.c	(revision 1207)
@@ -0,0 +1,111 @@
+#include <string.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+/* for getopt_long */
+#include <getopt.h>
+
+#include "generic.h"
+
+/* "stuff" will look something like "--mode 0 --path donkey".  it might look
+ * like "--foo=true --bar=disable "
+ */
+ 
+
+/* this generic_param_parser could be the basis for any other parameter parser.
+ * if one wishes to use the --foo blah --bar=yes style, 
+ * . define a parameter struct and pass that into your param_parser
+ * . change NR_ARGS to at least many arument tokens your string will have
+ * . add the right long_opts for your function
+ * . add the right handlers for each option
+ */
+ 
+/* returns -1 if chokes on parameter list given by "stuff", 
+ * otherwise returns 0 and populates the generic_params structure ( gp )
+ */
+#define NR_ARGS 6  /* generic_params only has a few elements */
+void *generic_param_parser( char * stuff) {
+        generic_params *gp = malloc(sizeof(generic_params));
+	char *args[NR_ARGS];  /* a simulated argv */
+	int argc=1; /* skip over argv[0] when initializing our simulated argv */
+	int c=0,  option_index=0, j;
+	char * buf=NULL, *p=NULL;
+	char  * delim = " \t\n";
+
+	static struct option long_opts[] = {
+		{ "mode", required_argument, NULL, 'm'},
+		{"path", required_argument, NULL, 'p'},
+		{0,0,0,0}
+	};
+
+	bzero(args, sizeof(args));
+	optind=0; /* getopt_long has some statefullness. this helps multiple
+		     uses of the "while ( (c = getopt_long())) { ..} " 
+		     idiom work */
+
+	if ( stuff == NULL ) {
+		/* nothing provided by user, so initialize with defaults */
+	} else  {
+		/* tokenize the way the shell would tokenize */
+		args[0]=strdup("generic_param_parser");
+		buf = strdup(stuff);
+
+		p = strtok(buf, delim);
+		do {
+			args[argc]=strdup(p);
+			argc++;
+		}while( (argc<NR_ARGS) && ((p = strtok(NULL, delim)) != NULL));
+	}
+
+	while ( (c = getopt_long(argc, args, "m:p:", 
+					long_opts, &option_index)) != -1) {
+		switch(c) {
+			case 'm':
+				gp->mode=strtoul(optarg,  NULL, 0);
+				break;
+			case 'p':
+				strncpy(gp->path, optarg, PVFS_NAME_MAX);
+				break;
+			case ':':
+				fprintf(stderr, "missing parameter to argument\n");
+				return(NULL);
+			case '?':
+				fprintf(stderr, "format error\n");
+				return(NULL);
+			default:
+				printf("getopt returned code 0%o\n", c);
+				return(NULL);
+		}
+	}
+	/* memroy management time */
+	free(buf);
+	for ( j = 0; j < argc; j++) {
+		free ( args[j] );
+	}
+
+	return(gp);
+}
+	
+#ifdef STANDALONE
+
+int main(void) {
+	generic_params my_gp;
+	bzero(&my_gp, sizeof(my_gp));
+	generic_param_parser("--mode 111  -p /a/a/a/a/a", &my_gp);
+	printf ("mode: %d path: %s\n", my_gp.mode, my_gp.path);
+	bzero(&my_gp, sizeof(my_gp));
+	generic_param_parser("--mode 99 --path=/b/path/to/a/file/blah", &my_gp);
+	printf ("mode: %d path: %s\n", my_gp.mode, my_gp.path);
+	bzero(&my_gp, sizeof(my_gp));
+	generic_param_parser("--mode=39 --path=/a/deat/to/a/file/blah", &my_gp);
+	printf ("mode: %d path: %s\n", my_gp.mode, my_gp.path);
+	bzero(&my_gp, sizeof(my_gp));
+	generic_param_parser("-m 14 --path=/a/path/fish/heads/blah", &my_gp);
+	printf ("mode: %d path: %s\n", my_gp.mode, my_gp.path);
+	bzero(&my_gp, sizeof(my_gp));
+	generic_param_parser("-m 60 -p /monkey/to/a/file/blah", &my_gp);
+	printf ("mode: %d path: %s\n", my_gp.mode, my_gp.path);
+	return 0;
+}
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-misc.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-misc.c	(revision 6373)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-misc.c	(revision 6373)
@@ -0,0 +1,1132 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/* 
+ * test-misc: These are tests that really don't fall into a good catagory and are not big enough to have their own individual file
+ * Author: Michael Speth
+ * Date: 6/26/2003
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/time.h>
+#include <assert.h>
+
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "pvfs2-util.h"
+#include "null_params.h"
+#include "pvfs2-request.h"
+#include "test-misc.h"
+
+static int test_meta_fields(int testcase){
+    int fs_id, ret;
+    PVFS_credentials credentials;
+    PVFS_object_ref pinode_refn;
+    PVFS_sysresp_lookup resp_lookup;
+    PVFS_sys_attr attr;
+    char *name;
+
+    ret = -2;
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "name");
+
+    if (initialize_sysint() < 0)
+    {
+        debug_printf("ERROR UNABLE TO INIT SYSTEM INTERFACE\n");
+        return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    PVFS_util_gen_credentials(&credentials);
+    if ((ret = PVFS_sys_lookup(
+             fs_id, name, &credentials,
+             &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW)) < 0)
+    {
+        fprintf(stderr, "lookup failed %d\n", ret);
+        return ret;
+    }
+
+    pinode_refn = resp_lookup.ref;
+    attr.mask = PVFS_ATTR_SYS_ALL_NOSIZE;
+    attr.owner = credentials.uid;
+    attr.group = credentials.gid;
+    attr.perms = 1877;
+    attr.atime = attr.mtime = attr.ctime = 0xdeadbeef;
+    attr.objtype = PVFS_TYPE_METAFILE;
+
+    switch(testcase){
+	case 0:
+	    attr.owner = 555;
+	    ret = PVFS_sys_setattr(pinode_refn, attr, &credentials);
+	    break;
+	case 1:
+	    attr.group = 555;
+	    ret = PVFS_sys_setattr(pinode_refn, attr, &credentials);
+	    break;
+	case 2:
+	    attr.perms = 888;
+	    ret = PVFS_sys_setattr(pinode_refn, attr, &credentials);
+	    break;
+	case 3:
+	    attr.atime = 555;
+	    ret = PVFS_sys_setattr(pinode_refn, attr, &credentials);
+	    break;
+	case 4:
+	    attr.mtime = 555;
+	    ret = PVFS_sys_setattr(pinode_refn, attr, &credentials);
+	    break;
+	case 5:
+	    attr.ctime = 555;
+	    ret = PVFS_sys_setattr(pinode_refn, attr, &credentials);
+	    break;
+	case 6:
+	    attr.mask = 2003;
+	    ret = PVFS_sys_setattr(pinode_refn, attr, &credentials);
+	    break;
+    }
+/*     finalize_sysint(); */
+    return ret;
+}
+
+static int test_permissions(int testcase){
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lk;
+    PVFS_Request req_io;
+    PVFS_Request req_mem;
+    PVFS_sysresp_io resp_io;
+    PVFS_offset file_req_offset;
+    char *filename;
+    char io_buffer[100];
+    int fs_id, ret;
+
+    file_req_offset = 0;
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    memset(&req_io, 0, sizeof(PVFS_Request));
+    memset(&req_mem, 0, sizeof(PVFS_Request));
+    memset(&resp_io, 0, sizeof(PVFS_sysresp_io));
+
+    PVFS_util_gen_credentials(&credentials);
+    memset(&resp_lk, 0, sizeof(PVFS_sysresp_lookup));
+
+    if (initialize_sysint() < 0)
+    {
+        debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+        return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+        debug_printf("test_pvfs_datatype_hvector: lookup failed "
+                     "on %s\n", filename);
+    }
+
+    switch (testcase)
+    {
+    case 0:
+	credentials.uid = 555;
+        break;
+    case 1:
+	credentials.gid = 555;
+        break;
+    case 2:
+	ret = PVFS_sys_lookup(
+            fs_id, "invalid_perms", &credentials,
+            &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+	if (ret < 0)
+	{
+	    debug_printf("test_pvfs_datatype_hvector: lookup failed "
+                     "on %s\n", filename);
+	}
+	break;
+    }
+    ret = PVFS_sys_read(resp_lk.ref, req_io, file_req_offset,io_buffer, req_mem,
+                          &credentials, &resp_io);
+/*     finalize_sysint(); */
+    return ret;
+
+}
+static int test_size_after_write(void){
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lk;
+    PVFS_Request req_io;
+    PVFS_Request req_mem;
+    PVFS_sysresp_io resp_io;
+    PVFS_sysresp_getattr resp;
+    PVFS_offset file_req_offset = 0;
+    uint32_t attrmask;
+    char *filename;
+    char io_buffer[100];
+    int fs_id, ret, i;
+    PVFS_size oldsize;
+
+    attrmask = PVFS_ATTR_SYS_ALL_NOSIZE;
+
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    memset(&req_io, 0, sizeof(PVFS_Request));
+    memset(&req_mem, 0, sizeof(PVFS_Request));
+    memset(&resp_io, 0, sizeof(PVFS_sysresp_io));
+
+    PVFS_util_gen_credentials(&credentials);
+    memset(&resp_lk, 0, sizeof(PVFS_sysresp_lookup));
+
+    if (initialize_sysint() < 0)
+    {
+        debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+        return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+        debug_printf("test_pvfs_datatype_hvector: lookup failed "
+                     "on %s\n", filename);
+    }
+    if((ret = PVFS_sys_getattr(resp_lk.ref, attrmask, &credentials, &resp)) < 0)
+	return ret;
+
+    oldsize = resp.attr.size;
+
+    for(i = 0; i < 100; i++)
+    {
+	io_buffer[i] = 'a';
+    }
+
+    ret = PVFS_sys_write(resp_lk.ref, req_io, file_req_offset, io_buffer, req_mem,
+                           &credentials, &resp_io);
+    if(ret < 0){
+        debug_printf("write failed on %s\n", filename);
+    }
+
+    ret = PVFS_sys_getattr(resp_lk.ref, attrmask, &credentials, &resp);
+    if (ret < 0)
+    {
+        debug_printf("getattr failed on %s\n", filename);
+    }
+    if(resp.attr.size != 100 + oldsize){
+	return -1;
+    }
+/*     finalize_sysint(); */
+    return 0;
+}
+
+static int test_sparse_files(void){
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lk;
+    PVFS_Request req_io;
+    PVFS_Request req_mem;
+    PVFS_sysresp_io resp_io;
+    PVFS_sysresp_getattr resp;
+    PVFS_offset file_req_offset = 0;
+    uint32_t attrmask;
+    char *filename;
+    char io_buffer[100];
+    int fs_id, ret, i;
+    PVFS_size oldsize;
+
+    attrmask = PVFS_ATTR_SYS_ALL_NOSIZE;
+
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "sparse");
+
+    memset(&req_io, 0, sizeof(PVFS_Request));
+    memset(&req_mem, 0, sizeof(PVFS_Request));
+    memset(&resp_io, 0, sizeof(PVFS_sysresp_io));
+
+    PVFS_util_gen_credentials(&credentials);
+    memset(&resp_lk, 0, sizeof(PVFS_sysresp_lookup));
+
+    if (initialize_sysint() < 0)
+    {
+        debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+        return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+        debug_printf("test_pvfs_datatype_hvector: lookup failed "
+                     "on %s\n", filename);
+    }
+    if((ret = PVFS_sys_getattr(resp_lk.ref, attrmask, &credentials, &resp)) < 0)
+	return ret;
+
+    oldsize = resp.attr.size;
+
+    assert(0);
+    /* TODO: what is this?  We shouldn't edit these fields directly -Phil */
+#if 0
+    switch(testcase)
+    {
+    case 0:
+	req_io->offset = 78000;
+	break;
+    case 1:
+	req_io->offset = 150000;
+	break;
+    case 2:
+	req_io->offset = 330000;
+	break;
+    }
+#endif
+
+    for(i = 0; i < 100; i++)
+    {
+	io_buffer[i] = 'a';
+    }
+
+    ret = PVFS_sys_write(resp_lk.ref, req_io, file_req_offset, io_buffer, req_mem,
+                           &credentials, &resp_io);
+    if(ret < 0){
+	debug_printf("write failed on %s\n", filename);
+    }
+
+    ret = PVFS_sys_getattr(resp_lk.ref, attrmask, &credentials, &resp);
+    if (ret < 0)
+    {
+        debug_printf("getattr failed on %s\n", filename);
+    }
+    if(resp.attr.size != 100 + oldsize){
+	return -1;
+    }
+/*     finalize_sysint(); */
+    return 0;
+}
+
+static int test_read_sparse_files(void){
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lk;
+    PVFS_Request req_io;
+    PVFS_Request req_mem;
+    PVFS_sysresp_io resp_io;
+    PVFS_sysresp_getattr resp;
+    PVFS_offset file_req_offset = 0;
+    uint32_t attrmask;
+    char *filename;
+    char io_buffer[100];
+    int fs_id, ret, i;
+
+    attrmask = PVFS_ATTR_SYS_ALL_NOSIZE;
+
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "sparse2");
+
+    memset(&req_io, 0, sizeof(PVFS_Request));
+    memset(&req_mem, 0, sizeof(PVFS_Request));
+    memset(&resp_io, 0, sizeof(PVFS_sysresp_io));
+
+    PVFS_util_gen_credentials(&credentials);
+    memset(&resp_lk, 0, sizeof(PVFS_sysresp_lookup));
+
+    if (initialize_sysint() < 0)
+    {
+        debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+        return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+        debug_printf("test_pvfs_datatype_hvector: lookup failed "
+                     "on %s\n", filename);
+    }
+    if((ret = PVFS_sys_getattr(resp_lk.ref, attrmask, &credentials, &resp)) < 0)
+	return ret;
+
+    assert(0);
+    /* TODO: what's this?  we shouldn't edit these fields directly -Phil */
+#if 0
+    switch(testcase)
+    {
+    case 0:
+	req_io->offset = 78000;
+	break;
+    case 1:
+	req_io->offset = 150000;
+	break;
+    case 2:
+	req_io->offset = 330000;
+	break;
+    }
+#endif
+
+    for(i = 0; i < 100; i++)
+    {
+	io_buffer[i] = 'a';
+    }
+    ret = PVFS_sys_write(resp_lk.ref, req_io, file_req_offset, io_buffer, req_mem,
+                           &credentials, &resp_io);
+    if(ret < 0){
+	debug_printf("write failed on %s\n", filename);
+    }
+    ret = PVFS_sys_read(resp_lk.ref, req_io, file_req_offset, io_buffer, req_mem,
+                           &credentials, &resp_io);
+    if(ret < 0){
+	debug_printf("write failed on %s\n", filename);
+    }
+
+/*     finalize_sysint(); */
+    for(i = 0; i < 100; i++)
+    {
+	if(io_buffer[i] != 0){
+	    return -1;
+	}
+    }
+
+    /* check for whats in the buffer */
+    return 0;
+}
+
+static int test_allcat(int testcase)
+{
+    int ret, fs_id;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_look;
+    PVFS_size size = 0, oldsize = 0;
+    PVFS_sysresp_getattr resp;
+    uint32_t attrmask;
+    char *filename;
+
+    attrmask = PVFS_ATTR_SYS_ALL_NOSIZE;
+
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "altrun");
+
+    PVFS_util_gen_credentials(&credentials);
+
+    if (initialize_sysint() < 0)
+    {
+        debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+        return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    /* get file */
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+        printf("Lookup failed with errcode = %d\n", ret);
+        return (-1);
+    }
+    if((ret = PVFS_sys_getattr(resp_look.ref, attrmask, &credentials, &resp)) < 0)
+	return ret;
+
+    oldsize = resp.attr.size;
+    switch(testcase)
+    {
+    case 0:
+	size = 5;
+	/* ret =  PVFS_sys_allocate(resp_look.ref, size ); */
+	break;
+    case 1:
+	size = 100000;
+	/* ret =  PVFS_sys_allocate(resp_look.ref, size ); */
+	break;
+    case 2:
+	size = 1000000;
+	/* ret =  PVFS_sys_allocate(resp_look.ref, size ); */
+	break;
+    }
+    /* get file */
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+        printf("Lookup failed with errcode = %d\n", ret);
+        return (-1);
+    }
+    ret = PVFS_sys_getattr(resp_look.ref, attrmask, &credentials, &resp);
+    if (ret < 0)
+    {
+        debug_printf("getattr failed on %s\n", filename);
+    }
+    if(resp.attr.size != (size + oldsize)){
+	return -1;
+    }
+    return 0;
+}
+
+static int test_truncat(int testcase)
+{
+    int ret, fs_id;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_look;
+    PVFS_size size = 0, oldsize = 0;
+    PVFS_sysresp_getattr resp;
+    uint32_t attrmask;
+    char *filename;
+
+    attrmask = PVFS_ATTR_SYS_ALL_NOSIZE;
+
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "altrun");
+
+    PVFS_util_gen_credentials(&credentials);
+
+    if (initialize_sysint() < 0)
+    {
+        debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+        return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    /* get file */
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+        printf("Lookup failed with errcode = %d\n", ret);
+        return (-1);
+    }
+    if((ret = PVFS_sys_getattr(resp_look.ref, attrmask, &credentials, &resp)) < 0)
+	return ret;
+
+    oldsize = resp.attr.size;
+
+    switch(testcase)
+    {
+    case 0:
+	size = 1000000;
+	ret = PVFS_sys_truncate(resp_look.ref, size, &credentials);
+	break;
+    case 1:
+	size = 100000;
+	ret = PVFS_sys_truncate(resp_look.ref, size, &credentials);
+	break;
+    case 2:
+	size = 5;
+	ret = PVFS_sys_truncate(resp_look.ref, size, &credentials);
+	break;
+    }
+
+    /* get file */
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+        printf("Lookup failed with errcode = %d\n", ret);
+        return (-1);
+    }
+    if((ret = PVFS_sys_getattr(resp_look.ref, attrmask, &credentials, &resp)) < 0)
+	return ret;
+
+    if(resp.attr.size != (oldsize - size))
+    {
+	return -1;
+    }
+    return 0;
+}
+
+static int test_read_beyond(void){
+    PVFS_sysresp_lookup resp_lk;
+    PVFS_Request req_io;
+    PVFS_Request req_mem;
+    PVFS_sysresp_io resp_io;
+    PVFS_credentials credentials;
+    PVFS_offset file_req_offset = 0;
+    char *filename;
+    char *io_buffer;
+    int fs_id, ret;
+    PVFS_sysresp_getattr resp;
+    uint32_t attrmask;
+
+    attrmask = PVFS_ATTR_SYS_ALL_NOSIZE;
+
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    memset(&req_io, 0, sizeof(PVFS_Request));
+    memset(&req_mem, 0, sizeof(PVFS_Request));
+    memset(&resp_io, 0, sizeof(PVFS_sysresp_io));
+
+    memset(&resp_lk, 0, sizeof(PVFS_sysresp_lookup));
+
+    PVFS_util_gen_credentials(&credentials);
+
+    if (initialize_sysint() < 0)
+    {
+        debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+        return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+        debug_printf("test_pvfs_datatype_hvector: lookup failed "
+                     "on %s\n", filename);
+    }
+    if((ret = PVFS_sys_getattr(resp_lk.ref, attrmask, &credentials, &resp)) < 0)
+	return ret;
+    io_buffer = malloc(sizeof(char)*(size_t)resp.attr.size+100);
+
+    ret = PVFS_sys_read(resp_lk.ref, req_io, file_req_offset, io_buffer, req_mem, &credentials, &resp_io);
+    if(ret < 0){
+	debug_printf("write failed on %s\n", filename);
+    }
+
+/*     finalize_sysint(); */
+    return ret;
+}
+
+static int test_write_beyond(void){
+    PVFS_sysresp_lookup resp_lk;
+    PVFS_Request req_io;
+    PVFS_Request req_mem;
+    PVFS_sysresp_io resp_io;
+    PVFS_credentials credentials;
+    char *filename;
+    char *io_buffer;
+    int fs_id, ret, i;
+    PVFS_size oldsize;
+    PVFS_sysresp_getattr resp;
+    PVFS_offset file_req_offset = 0;
+    uint32_t attrmask;
+
+    attrmask = PVFS_ATTR_SYS_ALL_NOSIZE;
+
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    memset(&req_io, 0, sizeof(PVFS_Request));
+    memset(&req_mem, 0, sizeof(PVFS_Request));
+    memset(&resp_io, 0, sizeof(PVFS_sysresp_io));
+
+    memset(&resp_lk, 0, sizeof(PVFS_sysresp_lookup));
+
+    PVFS_util_gen_credentials(&credentials);
+
+    if (initialize_sysint() < 0)
+    {
+        debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+        return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+        debug_printf("test_pvfs_datatype_hvector: lookup failed "
+                     "on %s\n", filename);
+    }
+    if((ret = PVFS_sys_getattr(resp_lk.ref, attrmask, &credentials, &resp)) < 0)
+	return ret;
+    io_buffer = malloc(sizeof(char)*(size_t)resp.attr.size+100);
+
+    /* req_io.size = resp_io.size + 100; */
+    oldsize = resp.attr.size +100;
+    for(i = 0; i < oldsize; i++)
+    {
+	io_buffer[i] = 'a';
+    }
+    ret = PVFS_sys_write(resp_lk.ref, req_io, file_req_offset, io_buffer, req_mem,
+                           &credentials, &resp_io);
+    if(ret < 0){
+	debug_printf("write failed on %s\n", filename);
+    }
+
+/*     finalize_sysint(); */
+    return ret;
+}
+
+static int test_files_as_dirs(int testcase)
+{
+    int ret = 1, fs_id;
+    PVFS_sys_attr attr;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_look;
+    PVFS_sysresp_create resp_create;
+    char *filename;
+
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    PVFS_util_gen_credentials(&credentials);
+
+    attr.mask = PVFS_ATTR_SYS_ALL_NOSIZE;
+    attr.owner = credentials.uid;
+    attr.group = credentials.gid;
+    attr.perms = 1877;
+    attr.atime = attr.mtime = attr.ctime = 0xdeadbeef;
+
+    if (initialize_sysint() < 0)
+    {
+        debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+        return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    switch(testcase)
+    {
+    case 0:
+	/* get root */
+	ret = PVFS_sys_lookup(fs_id, "/", &credentials,
+                              &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+	if (ret < 0)
+	{
+	    printf("Lookup failed with errcode = %d\n", ret);
+	    return (-1);
+	}
+
+	ret = PVFS_sys_create("foo", resp_look.ref, attr, &credentials,
+                           NULL, NULL, &resp_create);
+	/* get root */
+	ret = PVFS_sys_lookup(fs_id, "/foo", &credentials,
+                              &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+	if (ret < 0)
+	{
+	    printf("Lookup failed with errcode = %d\n", ret);
+	    return (-1);
+	}
+
+	ret = PVFS_sys_create("bar", resp_look.ref, attr, &credentials,
+                           NULL, NULL, &resp_create);
+	break;
+    case 1:
+	/* Need to add some more interesting cases */
+	break; 
+    }
+
+    return ret;
+}
+
+static int test_get_set_attr_empty(int testcase)
+{
+    int fs_id, ret;
+    PVFS_credentials credentials;
+    PVFS_object_ref pinode_refn;
+    PVFS_sysresp_lookup resp_lookup;
+    PVFS_sys_attr attr;
+    PVFS_sysresp_getattr resp;
+    uint32_t attrmask;
+    char *name;
+
+    ret = -2;
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "nofileyea");
+
+    if (initialize_sysint() < 0)
+    {
+        debug_printf("ERROR UNABLE TO INIT SYSTEM INTERFACE\n");
+        return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    PVFS_util_gen_credentials(&credentials);
+    if ((ret = PVFS_sys_lookup(
+             fs_id, name, &credentials,
+             &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW)) < 0)
+    {
+        fprintf(stderr, "lookup failed which it should but keep going\n");
+	
+       /* return ret; */
+    }
+
+    pinode_refn = resp_lookup.ref;
+    attr.mask = PVFS_ATTR_SYS_ALL_NOSIZE;
+    attr.owner = credentials.uid;
+    attr.group = credentials.gid;
+    attr.perms = 1877;
+    attr.atime = attr.mtime = attr.ctime = 0xdeadbeef;
+    attr.objtype = PVFS_TYPE_METAFILE;
+
+    attrmask = PVFS_ATTR_SYS_ALL_NOSIZE;
+
+    switch(testcase){
+	case 0:
+	    ret = PVFS_sys_setattr(pinode_refn, attr, &credentials);
+	    break;
+	case 1:
+	    ret = PVFS_sys_getattr(pinode_refn, attrmask, &credentials, &resp);
+	    break;
+    }
+
+    return ret;
+}
+
+static int test_lookup_empty(void)
+{
+    int fs_id, ret;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lookup;
+    char *name;
+
+    ret = -2;
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "nofileyea");
+
+    if (initialize_sysint() < 0)
+    {
+        debug_printf("ERROR UNABLE TO INIT SYSTEM INTERFACE\n");
+        return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    PVFS_util_gen_credentials(&credentials);
+    ret = PVFS_sys_lookup(fs_id, name, &credentials,
+                          &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+
+    return ret;
+}
+
+static int test_io_on_dir(int testcase)
+{
+    int fs_id, ret,i;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lookup;
+    PVFS_Request req_io;
+    PVFS_Request req_mem;
+    PVFS_sysresp_io resp_io;
+    PVFS_offset file_req_offset = 0;
+    char *name;
+    char io_buffer[100];
+
+    ret = -2;
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "/");
+
+    if (initialize_sysint() < 0)
+    {
+        debug_printf("ERROR UNABLE TO INIT SYSTEM INTERFACE\n");
+        return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    PVFS_util_gen_credentials(&credentials);
+    if((ret = PVFS_sys_lookup(
+            fs_id, name, &credentials,
+            &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW)) < 0)
+    {
+	fprintf(stderr,"lookup failed\n");
+	return ret;
+    }
+
+    memset(&req_io, 0, sizeof(req_io));
+    memset(&req_mem, 0, sizeof(req_mem));
+
+    switch(testcase)
+    {
+	case 0:
+	    ret = PVFS_sys_read(resp_lookup.ref, req_io, file_req_offset, io_buffer, req_mem, &credentials, &resp_io);
+	    break;
+	case 1:
+	    for(i = 0; i < 100; i++)
+	    {
+		io_buffer[i] = 'a';
+	    }
+	    ret = PVFS_sys_write(resp_lookup.ref, req_io, file_req_offset, io_buffer, req_mem, &credentials, &resp_io);
+	    break;
+
+    }
+
+/*     finalize_sysint(); */
+    return ret;
+}
+
+static int test_remove_nonempty_dir(int testcase)
+{
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_look;
+    char *filename;
+    int ret; 
+    int fs_id;
+    
+    ret = -2;
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "/");
+    
+    PVFS_util_gen_credentials(&credentials);
+
+    if (initialize_sysint() < 0)
+    {
+        debug_printf("UNABLE TO INIT SYSTEM INTERFACE\n");
+        return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+        printf("Lookup failed with errcode = %d\n", ret);
+        return (-1);
+    }
+    switch (testcase)
+    {
+    case 0:
+        ret = PVFS_sys_remove(NULL, resp_look.ref, &credentials);
+        break;
+    default:
+        fprintf(stderr, "Error: invalid case number \n");
+    }
+    return ret;
+
+}
+
+static int init_files(void)
+{
+    int ret, fs_id;
+    PVFS_sys_attr attr;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_look;
+    PVFS_sysresp_create resp_create;
+    char *filename;
+
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    PVFS_util_gen_credentials(&credentials);
+    attr.mask = PVFS_ATTR_SYS_ALL_NOSIZE;
+    attr.owner = credentials.uid;
+    attr.group = credentials.gid;
+    attr.perms = 1877;
+    attr.atime = attr.mtime = attr.ctime = 0xdeadbeef;
+
+    if (initialize_sysint() < 0)
+    {
+        debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+        return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    /* get root */
+    ret = PVFS_sys_lookup(fs_id, "/", &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+        printf("Lookup failed with errcode = %d\n", ret);
+        return (-1);
+    }
+
+    ret = PVFS_sys_create(filename, resp_look.ref, attr, &credentials,
+                           NULL, NULL, &resp_create);
+
+    /* create sparse file */
+    filename = strcpy(filename, "sparse");
+
+    ret = PVFS_sys_create(filename, resp_look.ref, attr, &credentials,
+                           NULL, NULL, &resp_create);
+
+    /* create a file for testing alocate and truncate*/
+    filename = strcpy(filename, "altrun");
+
+    ret = PVFS_sys_create(filename, resp_look.ref, attr, &credentials,
+                           NULL, NULL, &resp_create);
+
+
+    filename = strcpy(filename, "invalid_perms");
+
+    credentials.uid = 444;
+    credentials.gid = 444;
+
+    if (initialize_sysint() < 0)
+    {
+        debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+        return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    /* get root */
+    ret = PVFS_sys_lookup(fs_id, "/", &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+        printf("Lookup failed with errcode = %d\n", ret);
+        return (-1);
+    }
+
+    return PVFS_sys_create(filename, resp_look.ref, attr, &credentials,
+                           NULL, NULL, &resp_create);
+}   
+
+
+/* Preconditions: Parameters must be valid
+ * Parameters: comm - special pts communicator, rank - the rank of the process, buf -  * (not used), rawparams - configuration information to specify which function to test
+ * Postconditions: 0 if no errors and nonzero otherwise
+ */
+int test_misc(MPI_Comm * comm __unused,
+		   int rank,
+		   char *buf __unused,
+		   void *rawparams)
+{
+    int ret = -1;
+    null_params *params;
+
+    params = (null_params *) rawparams;
+    /* right now, the system interface isn't threadsafe, so we just want to run with one process. */
+    if (rank == 0)
+    {
+	if (params->p1 >= 0 && params->p2 >= 0)
+	{
+	    switch (params->p1)
+	    {
+	    case 0:
+		fprintf(stderr, "[test_misc] test_meta_fields %d\n",
+			params->p2);
+		ret = test_meta_fields(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_meta_fields",ret);
+		    return ret;
+		}
+		return 0;
+	    case 1:
+		fprintf(stderr, "[test_misc] test_permissions %d\n",
+			params->p2);
+		ret = test_permissions(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_permissions",ret);
+		    return ret;
+		}
+		return 0;
+	    case 2:
+		fprintf(stderr, "[test_misc] test_size_after_write %d\n",
+			params->p2);
+		ret = test_size_after_write();
+		if(ret >= 0){
+		    PVFS_perror("test_size_after_write",ret);
+		    return ret;
+		}
+		return 0;
+	    case 3:
+		fprintf(stderr, "[test_misc] test_sparse_files %d\n", params->p2);
+		ret = test_sparse_files();
+		if(ret >= 0){
+		    PVFS_perror("test_mkdir",ret);
+		    return ret;
+		}
+		return 0;
+	    case 4:
+		fprintf(stderr, "[test_misc] test_read_sparse_files %d\n",
+			params->p2);
+		ret = test_read_sparse_files();
+		if(ret >= 0){
+		    PVFS_perror("test_read_sparse_files",ret);
+		    return ret;
+		}
+		return 0;
+	    case 5:
+		fprintf(stderr, "[test_misc] test_allcat %d\n",
+			params->p2);
+		ret = test_allcat(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_allcat",ret);
+		    return ret;
+		}
+		return 0;
+	    case 6:
+		fprintf(stderr, "[test_misc] test_truncat %d\n",
+			params->p2);
+		ret = test_truncat(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_truncat",ret);
+		    return ret;
+		}
+		return 0;
+	    case 7:
+		fprintf(stderr, "[test_misc] test_read_beyond %d\n",
+			params->p2);
+		ret = test_read_beyond();
+		if(ret >= 0){
+		    PVFS_perror("test_read_beyond",ret);
+		    return ret;
+		}
+		return 0;
+	    case 8:
+		fprintf(stderr, "[test_misc] test_write_beyond %d\n",
+			params->p2);
+		ret = test_write_beyond();
+		if(ret >= 0){
+		    PVFS_perror("test_symlink",ret);
+		    return ret;
+		}
+		return 0;
+	    case 9:
+		fprintf(stderr, "[test_misc] test_files_as_dirs %d\n",
+			params->p2);
+		ret = test_files_as_dirs(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_files_as_dirs",ret);
+		    return ret;
+		}
+		return 0;
+	    case 10:
+		fprintf(stderr, "[test_misc] test_get_set_attr_emtpy %d\n", params->p2);
+		ret = test_get_set_attr_empty(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_get_set_attr_empty",ret);
+		    return ret;
+		}
+		return 0;
+	    case 11:
+		fprintf(stderr, "[test_misc] test_lookup_empty %d\n", params->p2);
+		ret = test_lookup_empty();
+		if(ret >= 0){
+		    PVFS_perror("test_lookup_empty",ret);
+		    return ret;
+		}
+		return 0;
+	    case 12:
+		fprintf(stderr, "[test_misc] test_io_on_dir %d\n",
+			params->p2);
+		ret = test_io_on_dir(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_io_on_dir",ret);
+		    return ret;
+		}
+		return 0;
+	    case 13:
+		fprintf(stderr, "[test_misc] test_remove_nonempty_dir %d\n",
+			params->p2);
+		ret = test_remove_nonempty_dir(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_remove_nonempty_dir",ret);
+		    return ret;
+		}
+		return 0;
+	    case 99:
+		fprintf(stderr, "[test_misc] init_files %d\n",
+			params->p2);
+		ret = init_files();
+		if(ret >= 0){
+		    PVFS_perror("init_files",ret);
+		    return ret;
+		}
+		return 0;
+	    default:
+		fprintf(stderr, "Error: invalid param %d\n", params->p1);
+		return -2;
+	    }
+	}
+    }
+    return ret;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-protos.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-protos.h	(revision 5825)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-protos.h	(revision 5825)
@@ -0,0 +1,156 @@
+#ifndef INCLUDE_TESTPROTOS_H
+#define INCLUDE_TESTPROTOS_H
+
+#include <stdio.h>
+#include <pts.h>
+#include <generic.h>
+#include <string.h>
+
+/* include all test specific header files */
+#include "test-create.h"
+#include "test-dir-torture.h"
+#include "test-dir-operations.h"
+#include "test-lookup-bench.h"
+#include "test-pvfs-datatype-init.h"
+#include "test-pvfs-datatype-contig.h"
+#include "test-pvfs-datatype-vector.h"
+#include "test-pvfs-datatype-hvector.h"
+#include "test-null-params.h"
+#include "pvfs-restart-server.h"
+#include "pvfs-stop-server.h"
+#include "null_params.h"
+#include "test-invalid-files.h"
+#include "test-uninitialized.h"
+#include "test-finalized.h"
+#include "test-misc.h"
+#include "test-concurrent-meta.h"
+#include "test-request-indexed.h"
+#include "test-request-contiguous.h"
+#include "test-encode-basic.h"
+#include "test-noncontig-pattern.h"
+#include "test-write-eof.h"
+#include "test-vector-offset.h"
+#include "test-vector-start-final-offset.h"
+#include "test-contiguous-datatype.h"
+#include "test-explicit-offset.h"
+#include "test-request-tiled.h"
+#include "test-mix.h"
+#include "test-romio-noncontig-pattern2.h"
+#include "test-path-lookup.h"
+
+enum test_types
+{
+    TEST_CREATE,
+    TEST_PVFSDATATYPE_INIT,
+    TEST_PVFSDATATYPE_CONTIG,
+    TEST_PVFSDATATYPE_VECTOR,
+    TEST_PVFSDATATYPE_HVECTOR,
+    TEST_DIR_TORTURE,
+    TEST_DIR_OPERATIONS,
+    TEST_LOOKUP_BENCH,
+    TEST_NULL_PARAMS,
+    PVFS_RESTART_SERVER,
+    PVFS_STOP_SERVER,
+    TEST_INVALID_FILES,
+    TEST_UNINITIALIZED,
+    TEST_FINALIZED,
+    TEST_MISC,
+    TEST_CONCURRENT_META,
+    TEST_REQUEST_INDEXED,
+    TEST_REQUEST_CONTIGUOUS,
+    TEST_ENCODE_BASIC,
+    TEST_NONCONTIG_PATTERN,
+    TEST_WRITE_EOF,
+    TEST_VECTOR_OFFSET,
+    TEST_VECTOR_START_FINAL_OFFSET,
+    TEST_CONTIGUOUS_DATATYPE,
+    TEST_EXPLICIT_OFFSET,
+    TEST_REQUEST_TILED,
+    TEST_MIX,
+    TEST_ROMIO_NONCONTIG_PATTERN2,
+    TEST_PATH_LOOKUP
+};
+
+static void setup_ptstests(config *myconfig) {
+
+   /* 
+     example test setup, must define the three following values (pointers):
+     1.) test_func, must be setwhich is a function that does all of the actual work
+     2.) test_param_init, optionally set function that parses arguments on --long
+     format
+     3.) test_name, must be set to a distinct test name string
+   */
+   myconfig->testpool[TEST_CREATE].test_func = test_create;
+   myconfig->testpool[TEST_CREATE].test_name = str_malloc("test_create");
+   myconfig->testpool[TEST_PVFSDATATYPE_INIT].test_func = test_pvfs_datatype_init;
+   myconfig->testpool[TEST_PVFSDATATYPE_INIT].test_name = str_malloc("test_pvfs_datatype_init");
+
+   myconfig->testpool[TEST_PVFSDATATYPE_CONTIG].test_func = test_pvfs_datatype_contig;
+   myconfig->testpool[TEST_PVFSDATATYPE_CONTIG].test_name = str_malloc("test_pvfs_datatype_contig");
+
+   myconfig->testpool[TEST_PVFSDATATYPE_VECTOR].test_func = test_pvfs_datatype_vector;
+   myconfig->testpool[TEST_PVFSDATATYPE_VECTOR].test_name = str_malloc("test_pvfs_datatype_vector");
+
+   myconfig->testpool[TEST_PVFSDATATYPE_HVECTOR].test_func = test_pvfs_datatype_hvector;
+   myconfig->testpool[TEST_PVFSDATATYPE_HVECTOR].test_name = str_malloc("test_pvfs_datatype_hvector");
+   myconfig->testpool[TEST_DIR_TORTURE].test_func = test_dir_torture;
+   myconfig->testpool[TEST_DIR_TORTURE].test_name = str_malloc("test_dir_torture");
+   myconfig->testpool[TEST_DIR_OPERATIONS].test_func = test_dir_operations;
+   myconfig->testpool[TEST_DIR_OPERATIONS].test_name = str_malloc("test_dir_operations");
+
+   myconfig->testpool[TEST_LOOKUP_BENCH].test_func = test_lookup_bench;
+   myconfig->testpool[TEST_LOOKUP_BENCH].test_name = str_malloc("test_lookup_bench");
+   myconfig->testpool[TEST_NULL_PARAMS].test_func = test_null_params;
+   myconfig->testpool[TEST_NULL_PARAMS].test_param_init = null_params_parser;
+   myconfig->testpool[TEST_NULL_PARAMS].test_name = str_malloc("test_null_params");
+   myconfig->testpool[PVFS_RESTART_SERVER].test_func = pvfs_restart_server;
+   myconfig->testpool[PVFS_RESTART_SERVER].test_name = str_malloc("pvfs_restart_server");
+   myconfig->testpool[PVFS_STOP_SERVER].test_func = pvfs_stop_server;
+   myconfig->testpool[PVFS_STOP_SERVER].test_name = str_malloc("pvfs_stop_server");
+   myconfig->testpool[TEST_INVALID_FILES].test_func = test_invalid_files;
+   myconfig->testpool[TEST_INVALID_FILES].test_param_init = null_params_parser;
+   myconfig->testpool[TEST_INVALID_FILES].test_name = str_malloc("test_invalid_files");
+   myconfig->testpool[TEST_UNINITIALIZED].test_func = test_uninitialized;
+   myconfig->testpool[TEST_UNINITIALIZED].test_param_init = null_params_parser;
+   myconfig->testpool[TEST_UNINITIALIZED].test_name = str_malloc("test_uninitialized");
+   myconfig->testpool[TEST_FINALIZED].test_func = test_finalized;
+   myconfig->testpool[TEST_FINALIZED].test_param_init = null_params_parser;
+   myconfig->testpool[TEST_FINALIZED].test_name = str_malloc("test_finalized");
+   myconfig->testpool[TEST_MISC].test_func = test_misc;
+   myconfig->testpool[TEST_MISC].test_param_init = null_params_parser;
+   myconfig->testpool[TEST_MISC].test_name = str_malloc("test_misc");
+   myconfig->testpool[TEST_CONCURRENT_META].test_func = test_concurrent_meta;
+   myconfig->testpool[TEST_CONCURRENT_META].test_param_init = null_params_parser;
+   myconfig->testpool[TEST_CONCURRENT_META].test_name = str_malloc("test_concurrent_meta");
+   myconfig->testpool[TEST_REQUEST_INDEXED].test_func = test_request_indexed;
+   myconfig->testpool[TEST_REQUEST_INDEXED].test_name = str_malloc("test_request_indexed");
+   myconfig->testpool[TEST_REQUEST_CONTIGUOUS].test_func = test_request_contiguous;
+   myconfig->testpool[TEST_REQUEST_CONTIGUOUS].test_name = str_malloc("test_request_contiguous");
+   myconfig->testpool[TEST_ENCODE_BASIC].test_func = test_encode_basic;
+   myconfig->testpool[TEST_ENCODE_BASIC].test_name = str_malloc("test_encode_basic");
+   myconfig->testpool[TEST_NONCONTIG_PATTERN].test_func = test_noncontig_pattern;
+   myconfig->testpool[TEST_NONCONTIG_PATTERN].test_name = str_malloc("test_noncontig_pattern");
+   myconfig->testpool[TEST_WRITE_EOF].test_func = test_write_eof;
+   myconfig->testpool[TEST_WRITE_EOF].test_name = str_malloc("test_write_eof");
+   myconfig->testpool[TEST_VECTOR_OFFSET].test_func = test_vector_offset;
+   myconfig->testpool[TEST_VECTOR_OFFSET].test_name = str_malloc("test_vector_offset");
+   myconfig->testpool[TEST_VECTOR_START_FINAL_OFFSET].test_func = test_vector_start_final_offset;
+   myconfig->testpool[TEST_VECTOR_START_FINAL_OFFSET].test_name = str_malloc("test_vector_start_final_offset");
+   myconfig->testpool[TEST_CONTIGUOUS_DATATYPE].test_func = test_contiguous_datatype;
+   myconfig->testpool[TEST_CONTIGUOUS_DATATYPE].test_name = str_malloc("test_contiguous_datatype");
+   myconfig->testpool[TEST_EXPLICIT_OFFSET].test_func = test_explicit_offset;
+   myconfig->testpool[TEST_EXPLICIT_OFFSET].test_name = str_malloc("test_explicit_offset");
+   myconfig->testpool[TEST_REQUEST_TILED].test_func = test_request_tiled;
+   myconfig->testpool[TEST_REQUEST_TILED].test_name = str_malloc("test_request_tiled");
+   myconfig->testpool[TEST_MIX].test_func = test_mix;
+   myconfig->testpool[TEST_MIX].test_name = str_malloc("test_mix");
+
+   myconfig->testpool[TEST_ROMIO_NONCONTIG_PATTERN2].test_func = test_romio_noncontig_pattern2;
+   myconfig->testpool[TEST_ROMIO_NONCONTIG_PATTERN2].test_name = str_malloc("test_romio_noncontig_pattern2");
+
+   myconfig->testpool[TEST_PATH_LOOKUP].test_func = test_path_lookup;
+   myconfig->testpool[TEST_PATH_LOOKUP].test_name =
+       strdup("test_path_lookup");
+}
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-vector.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-vector.h	(revision 728)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-vector.h	(revision 728)
@@ -0,0 +1,9 @@
+#ifndef INCLUDE_TESTPVFSDATATYPEVECTOR_H
+#define INCLUDE_TESTPVFSDATATYPEVECTOR_H
+
+#include <mpi.h>
+#include <pts.h>
+
+int test_pvfs_datatype_vector(MPI_Comm *mycomm, int myid, char *buf, void *params);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-dir-operations.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-dir-operations.c	(revision 4697)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-dir-operations.c	(revision 4697)
@@ -0,0 +1,243 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/time.h>
+
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs2-util.h"
+#include "pvfs-helper.h"
+#include "test-dir-operations.h"
+#include "pvfs2-internal.h"
+
+/*
+ * parent_refn:  pinode_refn of parent directory
+ * depth:   how many directories to make at this level
+ * rank:    rank in the mpi process group 
+ */
+
+static int remove_dirs(PVFS_object_ref parent_refn,
+                       int ndirs,
+                       int rank)
+{
+    int i, ret = -1;
+    char name[PVFS_SEGMENT_MAX];
+
+    for (i = 0; i < ndirs; i++)
+    {
+	snprintf(name, PVFS_SEGMENT_MAX, "rank%d-iter%d", rank, i);
+	ret = remove_dir(parent_refn, name);
+	if (ret < 0)
+	{
+	    return -1;
+	}
+    }
+    return 0;
+}
+
+static int read_dirs(PVFS_object_ref refn,
+                     int ndirs,
+                     int rank)
+{
+    int i, iter, ret;
+    PVFS_credentials credentials;
+    PVFS_sysresp_readdir resp_readdir;
+
+    memset(&resp_readdir,0,sizeof(PVFS_sysresp_readdir));
+
+    PVFS_util_gen_credentials(&credentials);
+
+    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);
+    if (ret < 0)
+    {
+	printf("readdir failed with errcode = %d\n", ret);
+	return(-1);
+    }
+
+    /* examine the results */
+
+    if (resp_readdir.pvfs_dirent_outcount != ndirs)
+    {
+	debug_printf("we were expecting %d directories, and recieved %d\n",
+                     ndirs, resp_readdir.pvfs_dirent_outcount);
+
+	free(resp_readdir.dirent_array);
+	return -1;
+    }
+
+    /* check each of our directories to ensure that they have sane names */
+
+    for (i = 0; i < ndirs; i++)
+    {
+	if (0 > sscanf(resp_readdir.dirent_array[i].d_name,
+                       "rank%d-iter%d", &rank, &iter))
+	{
+	    debug_printf("unable to read directory name iter: %d\n",i);
+	    free(resp_readdir.dirent_array);
+	    return -1;
+	}
+
+	if ((iter > ndirs) || (iter < 0))
+	{
+	    debug_printf("invalid directory name %s\n",
+                         resp_readdir.dirent_array[i].d_name);
+	    free(resp_readdir.dirent_array);
+	    return -1;
+	}
+    }
+
+    free(resp_readdir.dirent_array);
+    return 0;
+}
+
+static int create_dirs(PVFS_object_ref refn,
+                       int ndirs,
+                       int rank)
+{
+    int i;
+    char name[PVFS_SEGMENT_MAX];
+    PVFS_object_ref out_refn;
+
+    for (i = 0; i < ndirs; i++)
+    {
+	snprintf(name, PVFS_SEGMENT_MAX, "rank%d-iter%d", rank, i);
+	if (create_dir(refn, name, &out_refn) < 0)
+	{
+            printf("failed to mkdir %s ... skipping.\n",name);
+	}
+    }
+    return 0;
+}
+
+/*
+ * driver for the test
+ * comm:	special pts communicator
+ * rank:	rank among processes
+ * buf:		stuff data in here ( not used )
+ * rawparams:	our configuration information
+ *
+ * returns: 
+ * 	0:  	all went well
+ * 	nonzero: errors encountered making reading, or removing directories
+ */
+int test_dir_operations(MPI_Comm * comm,
+                        int rank,
+                        char *buf __unused,
+                        void *rawparams)
+{
+    int ret = -1;
+    int nerrs = 0;
+    char name[PVFS_SEGMENT_MAX];
+    PVFS_fs_id fs_id = 0;
+    PVFS_object_ref root_refn, out_refn;
+    generic_params *myparams = (generic_params *) rawparams;
+
+    if (rank == 0)
+    {
+	if (!pvfs_helper.initialized && initialize_sysint())
+	{
+	    printf("System initialization error\n");
+	    return (-1);
+	}
+	fs_id = pvfs_helper.fs_id;
+	printf("fs_id: %d\n", fs_id);
+    }
+
+    MPI_Bcast(&fs_id, 1, MPI_LONG_INT, 0, *comm );
+    printf("rank: %d  fs_id: %d\n", rank, fs_id );
+
+    get_root(fs_id, &root_refn);
+    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)
+     *
+     */
+    memset(name,0,PVFS_SEGMENT_MAX);
+    snprintf(name, PVFS_SEGMENT_MAX, "dir_op_test");
+    if (rank == 0)
+    {
+	if (create_dir(root_refn, name, &out_refn) < 0)
+	{
+	    return -1;
+	}
+        else
+        {
+            printf("created directory %s (handle is %lld)\n",name, lld(out_refn.handle));
+        }
+    }
+    MPI_Barrier(*comm);
+    if (rank != 0)
+    {
+	/* for everyone that didn't create the dir entry, we should get the 
+	 * handle via lookup */
+	if (lookup_name(root_refn, name, &out_refn) < 0)
+	{
+	    return -1;
+	}
+        else
+        {
+            printf("directory %s has handle %lld\n",name, lld(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)
+    {
+	printf("creating directories failed with errcode = %d\n", ret);
+	return (-1);
+    }
+
+    ret = read_dirs(out_refn, myparams->mode, rank);
+    if (ret < 0)
+    {
+	printf("reading directories failed with errcode = %d\n", ret);
+	return (-1);
+    }
+
+    ret = remove_dirs(out_refn, myparams->mode, rank);
+    if (ret < 0)
+    {
+	printf("removing directories failed with errcode = %d\n", ret);
+	return (-1);
+    }
+
+    if (rank == 0)
+    {
+	/* remove the test directory */
+	ret = remove_dir(root_refn, name);
+	if (ret < 0)
+	{
+	    return -1;
+	}
+    }
+
+/*     ret = finalize_sysint(); */
+/*     if (ret < 0) */
+/*     { */
+/* 	printf("finalizing sysint failed with errcode = %d\n", ret); */
+/* 	return (-1); */
+/*     } */
+
+    return -nerrs;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/request_tests.conf
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/request_tests.conf	(revision 3521)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/request_tests.conf	(revision 3521)
@@ -0,0 +1,23 @@
+# pvfs related tests
+test_request_indexed:--path=/tmp/pvfs_datatype_contig
+test_request_contiguous:--path=/tmp/pvfs_datatype_contig
+test_encode_basic:--path=/tmp/pvfs_datatype_contig
+test_noncontig_pattern:--path=/tmp/pvfs_datatype_contig
+
+# -- need to check results on this one --
+test_write_eof:--path=/tmp/pvfs_datatype_contig
+
+test_vector_offset:--path=/tmp/pvfs_datatype_contig
+test_vector_start_final_offset:--path=/tmp/pvfs_datatype_contig
+
+#-- need to check results
+test_contiguous_datatype:--path=/tmp/pvfs_datatype_contig
+
+test_explicit_offset:--path=/tmp/pvfs_datatype_contig
+
+#-- need to check results
+test_request_tiled:--path=/tmp/pvfs_datatype_contig
+
+#-- need to check results
+test_mix:--path=/tmp/pvfs_datatype_contig
+test_romio_noncontig_pattern2:--path=/tmp/pvfs_datatype_contig
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-misc.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-misc.h	(revision 1238)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-misc.h	(revision 1238)
@@ -0,0 +1,6 @@
+#ifndef TEST_MISC_H
+#define TEST_MISC_H
+
+int test_misc(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-write-eof.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-write-eof.c	(revision 4457)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-write-eof.c	(revision 4457)
@@ -0,0 +1,201 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/* Simulates request processing on both the client and server side for two
+ * I/O operations to the same server that write beyond EOF.
+ * Author: Michael Speth, Testing code written & designed by Phil C.
+ * Date: 8/26/2003
+ * Last Updated: 8/26/2003
+ */
+
+#include <time.h>
+#include <sys/time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include<assert.h>
+
+#include <pint-request.h>
+#include <pint-distribution.h>
+#include <pvfs2-debug.h>
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "pvfs2-util.h"
+#include "test-write-eof.h"
+#define SEGMAX 16
+#define BYTEMAX (4*1024*1024)
+
+/*
+ * Parameters: none
+ * Returns 0 on success and -1 on failure (ie - the segment offsets
+ * were not calcuated correctly by Request_indexed
+ */
+static int test_write(void){
+   int i;
+   PINT_Request *r1;
+   PINT_Request *r2;
+   PINT_Request_state *rs1;
+   PINT_Request_state *rs2;
+   PINT_request_file_data rf1;
+   PINT_request_file_data rf2;
+   PINT_Request_result seg1;
+                                                                                
+   /* PVFS_Process_request arguments */
+   int retval;
+                                                                                
+   int32_t blocklength = 10*1024*1024; /* 10M */
+
+    /* Used for calculating correct offset values */
+    int32_t tmpOff = 0;
+    int32_t stripesize = 65536;
+ 
+   /* set up two requests, both at offset 0 */
+   PVFS_size displacement = 0;  /* first at offset zero */
+   PVFS_Request_indexed(1, &blocklength, &displacement, PVFS_BYTE, &r1);
+   PVFS_Request_indexed(1, &blocklength, &displacement, PVFS_BYTE, &r2);
+                                                                                
+   /* set up two request states */
+   rs1 = PINT_new_request_state(r1);
+   rs2 = PINT_new_request_state(r2);
+   /* set up file data for first request */
+   rf1.server_nr = 0;
+   rf1.server_ct = 3;
+   rf1.fsize = 8454144;
+   rf1.dist = PINT_dist_create("simple_stripe");
+   rf1.extend_flag = 0;
+   PINT_dist_lookup(rf1.dist);
+                                                                                
+   /* file data for second request is the same, except the file
+    * will have grown by 10M
+    */
+   rf2.server_nr = 0;
+   rf2.server_ct = 3;
+   rf2.fsize = 8454144;
+   rf2.dist = PINT_dist_create("simple_stripe");
+   rf2.extend_flag = 0;
+   PINT_dist_lookup(rf2.dist);
+                                                                                
+   /* set up result struct */
+   seg1.offset_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+   seg1.size_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+   seg1.bytemax = BYTEMAX;
+   seg1.segmax = SEGMAX;
+   seg1.bytes = 0;
+   seg1.segs = 0;
+                                                                                
+   /* Turn on debugging 
+    gossip_enable_stderr();
+    gossip_set_debug_mask(1,REQUEST_DEBUG);
+*/
+                                                                                
+   do
+   {
+      seg1.bytes = 0;
+      seg1.segs = 0;
+                                                                                
+      /* process request */
+      retval = PINT_process_request(rs1, NULL, &rf1, &seg1, PINT_SERVER);
+                                                                                
+      if(retval >= 0)
+      {
+/*
+         printf("results of PINT_Process_request(PINT_SERVER):\n");
+         printf("%d segments with %lld bytes\n", seg1.segs, seg1.bytes);
+*/
+         for(i=0; i<seg1.segs; i++)
+         {
+	    if( (blocklength/3) != (int)seg1.size_array[i]){
+		printf("segment %d size is %d but should be %d\n",
+			i, (int)seg1.size_array[i],blocklength/3);
+	    }
+         }
+      }
+                                                                                
+   } while(!PINT_REQUEST_DONE(rs1) && retval >= 0);
+                                                                                
+   if(retval < 0)
+   {
+      fprintf(stderr, "Error: PINT_Process_request() failure.\n");
+      return(-1);
+   }
+   if(PINT_REQUEST_DONE(rs1))
+   {
+/*
+      printf("**** first request done.\n");
+*/
+   }
+                                                                                
+    tmpOff = 0;
+    do
+    {
+	seg1.bytes = 0;
+	seg1.segs = 0;
+                                                                                
+	/* process request */
+	retval = PINT_process_request(rs2, NULL, &rf2, &seg1, PINT_CLIENT);
+                                                                                
+	if(retval >= 0)
+	{
+	    for(i=0; i<seg1.segs; i++, (tmpOff += stripesize*3))
+	    {
+		if(stripesize != (int)seg1.size_array[i]){
+		    printf("segment %d's size is %d but should be %d\n",
+			    i,(int)seg1.size_array[i],stripesize);
+		    return -1;
+		}
+		else if(tmpOff != (int)seg1.offset_array[i]){
+		    printf("segment %d's offset is %d but should be %d\n",
+			    i,(int)seg1.offset_array[i],tmpOff);
+		    return -1;
+		}
+	    }
+	}
+                                                                                
+   } while(!PINT_REQUEST_DONE(rs2) && retval >= 0);
+                                                                                
+   if(retval < 0)
+   {
+      fprintf(stderr, "Error: PINT_Process_request() failure.\n");
+      return(-1);
+   }
+   if(PINT_REQUEST_DONE(rs2))
+   {
+/*
+      printf("**** second request done.\n");
+*/
+    }
+   return 0;
+}
+                                                                                
+
+/* Preconditions: None
+ * Parameters: comm - special pts communicator, rank - the rank of the process,
+ * buf - not used
+ * Postconditions: 0 if no errors and nonzero otherwise
+ */
+int test_write_eof(MPI_Comm * comm __unused,
+		     int rank,
+		     char *buf __unused,
+		     void *rawparams __unused)
+{
+    int ret = -1;
+
+    if (rank == 0)
+    {
+	ret = test_write();
+    }
+    return ret;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-path-lookup.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-path-lookup.c	(revision 5338)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-path-lookup.c	(revision 5338)
@@ -0,0 +1,510 @@
+/*
+ * (C) 2001 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "pvfs2-util.h"
+#include "test-path-lookup.h"
+#include "pvfs2-req-proto.h"
+#include "pvfs2-internal.h"
+
+#define GENERATE_FILENAME(fname, max_len, f, i, r, slash) \
+do {                                                      \
+snprintf(fname, max_len, (slash ? "/%s%dr%d" : "%s%dr%d"),\
+          f, i, r);                                       \
+} while (0);
+
+#define RELATIVE_SYMLINK_NAME "rl"
+#define ABSOLUTE_SYMLINK_NAME "al"
+
+static int build_nested_path(
+    int levels, char *format, int rank, int test_symlinks)
+{
+    int ret = -1, i = 0, stored_error = 0;
+    char cur_filename[64] = {0}, tmp_buf[PVFS_NAME_MAX] = {0};
+    PVFS_fs_id cur_fs_id = 0;
+    PVFS_sys_attr attr;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup lookup_resp;
+    PVFS_sysresp_mkdir mkdir_resp;
+    PVFS_sysresp_symlink symlink_resp;
+    char PATH_LOOKUP_BASE_DIR[64] = {0};
+    PVFS_object_ref root_refn = {0,0}, parent_refn = {0,0}, base_refn = {0,0};
+    PVFS_object_ref *newdir_refns = NULL;
+    PVFS_object_ref *lookup_refns = NULL;
+    PVFS_object_ref *rsymlink_refns = NULL;
+    PVFS_object_ref *asymlink_refns = NULL;
+    char **absolute_paths = NULL;
+
+    PVFS_util_gen_credentials(&credentials);
+
+    if (levels && format)
+    {
+        snprintf(PATH_LOOKUP_BASE_DIR, 64, "d%sr%d",
+                 format, rank);
+
+        cur_fs_id = pvfs_helper.fs_id;
+
+        /* look up the root handle */
+        ret = PVFS_sys_lookup(
+            cur_fs_id, "/", &credentials, &lookup_resp,
+            PVFS2_LOOKUP_LINK_NO_FOLLOW);
+        if (ret < 0)
+        {
+            fprintf(stderr," *** lookup failed on root directory\n");
+            return ret;
+        }
+
+        root_refn = lookup_resp.ref;
+        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;
+        attr.group = credentials.gid;
+        attr.perms = 1877;
+        attr.atime = attr.ctime = attr.mtime = time(NULL);
+
+        /* make the top-level base directory */
+        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);
+        if (ret < 0)
+        {
+            fprintf(stderr," PVFS_sys_mkdir failed to create "
+                    "base directory %s\n", PATH_LOOKUP_BASE_DIR);
+            goto cleanup;
+        }
+        base_refn = mkdir_resp.ref;
+
+        newdir_refns = (PVFS_object_ref *)malloc(
+            (levels * sizeof(PVFS_object_ref)));
+        lookup_refns = (PVFS_object_ref *)malloc(
+            (levels * sizeof(PVFS_object_ref)));
+        absolute_paths = (char **)malloc(
+            (levels * PVFS_NAME_MAX * sizeof(char)));
+        if (!newdir_refns || !lookup_refns | !absolute_paths)
+        {
+            fprintf(stderr," failed to allocate reference arrays\n");
+            goto cleanup;
+        }
+
+        for(i = 0; i < levels; i++)
+        {
+            parent_refn = mkdir_resp.ref;
+
+            GENERATE_FILENAME(cur_filename, 64, format, i, rank, 0);
+            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,
+                                 &credentials, &mkdir_resp);
+            if (ret < 0)
+            {
+                fprintf(stderr," PVFS_sys_mkdir failed to create "
+                        "the directory %s\n", cur_filename);
+                goto cleanup;
+            }
+            fprintf(stderr, "Got handle %llu\n",
+                    llu(mkdir_resp.ref.handle));
+
+            /* grab refn of newly created directory */
+            newdir_refns[i] = mkdir_resp.ref;
+        }
+
+        /* generate the absolute path names */
+        snprintf(tmp_buf, PVFS_NAME_MAX, "/%s", PATH_LOOKUP_BASE_DIR);
+        for(i = 0; i < levels; i++)
+        {
+            GENERATE_FILENAME(cur_filename, 64, format, i, rank, 1);
+            strncat(tmp_buf, cur_filename, PVFS_NAME_MAX);
+            absolute_paths[i] = strdup(tmp_buf);
+            if (strlen(absolute_paths[i]) > PVFS_NAME_MAX)
+            {
+                fprintf(stderr," Generated pathname is too long to "
+                        "be a valid PVFS2 path name\n");
+                fprintf(stderr,"%s", absolute_paths[i]);
+                goto cleanup;
+            }
+        }
+
+        /* for each directory just created, do a lookup on them */
+        parent_refn = base_refn;
+        for(i = 0; i < levels; i++)
+        {
+            GENERATE_FILENAME(cur_filename, 64, format, i, rank, 0);
+            fprintf(stderr,"Looking up path %d [RELATIVE] \t\t... ", i);
+#if 0
+            fprintf(stderr,
+                    " - 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 */
+            ret = PVFS_sys_ref_lookup(
+                parent_refn.fs_id, cur_filename,
+                parent_refn, &credentials,
+                &lookup_resp, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+            if (ret < 0)
+            {
+                fprintf(stderr,"\nPVFS_sys_ref_lookup failed\n");
+                goto cleanup;
+            }
+            else
+            {
+                fprintf(stderr,"OK\n");
+            }
+
+            /* grab refn of looked up directory */
+            lookup_refns[i] = lookup_resp.ref;
+
+            /* then do an absolute path lookup */
+            fprintf(stderr,"Looking up path %d [ABSOLUTE] \t\t... ", i);
+#if 0
+            fprintf(stderr," - Looking up absolute path:\n%s\n",
+                    absolute_paths[i]);
+#endif
+            ret = PVFS_sys_lookup(cur_fs_id, absolute_paths[i],
+                                  &credentials, &lookup_resp,
+                                  PVFS2_LOOKUP_LINK_NO_FOLLOW);
+            if (ret < 0)
+            {
+                fprintf(stderr,"\nPVFS_sys_lookup failed\n");
+                goto cleanup;
+            }
+            else
+            {
+                fprintf(stderr,"OK\n");
+            }
+
+            /*
+              assert that the ref lookup and the absolute
+              lookup yielded the same result
+            */
+            if ((lookup_refns[i].fs_id !=
+                 lookup_resp.ref.fs_id) ||
+                (lookup_refns[i].handle !=
+                 lookup_resp.ref.handle))
+            {
+                fprintf(stderr,"! PVFS_sys_ref_lookup and "
+                        "PVFS_sys_lookup returned different results\n"
+                        "\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;
+        }
+        ret = 0;
+    }
+
+    if (!test_symlinks)
+    {
+        goto cleanup;
+    }
+
+    /*
+      generate both relative and absolute symlinks for
+      most of the nested directories created
+    */
+    rsymlink_refns = (PVFS_object_ref *)malloc(
+        (levels * sizeof(PVFS_object_ref)));
+    asymlink_refns = (PVFS_object_ref *)malloc(
+        (levels * sizeof(PVFS_object_ref)));
+    for(i = 0; i < levels; i++)
+    {
+        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 %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,
+            attr, &credentials, &symlink_resp);
+        if (ret < 0)
+        {
+            PVFS_perror("Failed to create symlink ", ret);
+            goto symlink_cleanup;
+        }
+        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 %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],
+            attr, &credentials, &symlink_resp);
+        if (ret < 0)
+        {
+            PVFS_perror("Failed to create symlink ", ret);
+            goto symlink_cleanup;
+        }
+        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;
+    }
+
+    for(i = 0; i < levels; i++)
+    {
+        /*
+          do absolute path lookups with simple symlink substitutions
+          that should resolve to known targets at this point
+        */
+        if (i > 0)
+        {
+            snprintf(tmp_buf, PVFS_NAME_MAX, "%s/%s",
+                     absolute_paths[i - 1], RELATIVE_SYMLINK_NAME);
+            /*
+              a lookup on tmp_buf should resolve exactly
+              to rsymlink_refns[i] if not followed, and
+              lookup_refns[i] if followed.  make sure!
+            */
+            fprintf(stderr,"Looking up rsymlink %d [UNFOLLOWED] "
+                    "\t\t... ", i);
+            ret = PVFS_sys_lookup(cur_fs_id, tmp_buf,
+                                  &credentials, &lookup_resp,
+                                  PVFS2_LOOKUP_LINK_NO_FOLLOW);
+            if (ret < 0)
+            {
+                fprintf(stderr,"\nPVFS_sys_lookup failed\n");
+                goto symlink_cleanup;
+            }
+
+            if ((lookup_resp.ref.handle !=
+                 rsymlink_refns[i].handle) ||
+                (lookup_resp.ref.fs_id !=
+                 rsymlink_refns[i].fs_id))
+            {
+                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
+            {
+                fprintf(stderr,"OK\n");
+            }
+
+            fprintf(stderr,"Looking up rsymlink %d [  FOLLOWED] "
+                    "\t\t... ", i);
+            ret = PVFS_sys_lookup(cur_fs_id, tmp_buf,
+                                  &credentials, &lookup_resp,
+                                  PVFS2_LOOKUP_LINK_FOLLOW);
+            if (ret < 0)
+            {
+                fprintf(stderr,"\nPVFS_sys_lookup failed\n");
+                goto symlink_cleanup;
+            }
+
+            if ((lookup_resp.ref.handle !=
+                 lookup_refns[i].handle) ||
+                (lookup_resp.ref.fs_id !=
+                 lookup_refns[i].fs_id))
+            {
+                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
+            {
+                fprintf(stderr,"OK\n");
+            }
+
+            snprintf(tmp_buf, PVFS_NAME_MAX, "%s/%s",
+                     absolute_paths[i - 1], ABSOLUTE_SYMLINK_NAME);
+            /*
+              a lookup on tmp_buf should resolve exactly
+              to asymlink_refns[i] if not followed, and
+              lookup_refns[i] if followed.  make sure!
+            */
+            fprintf(stderr,"Looking up asymlink %d [UNFOLLOWED] "
+                    "\t\t... ", i);
+            ret = PVFS_sys_lookup(cur_fs_id, tmp_buf,
+                                  &credentials, &lookup_resp,
+                                  PVFS2_LOOKUP_LINK_NO_FOLLOW);
+            if (ret < 0)
+            {
+                fprintf(stderr,"\nPVFS_sys_lookup failed\n");
+                goto symlink_cleanup;
+            }
+
+            if ((lookup_resp.ref.handle !=
+                 asymlink_refns[i].handle) ||
+                (lookup_resp.ref.fs_id !=
+                 asymlink_refns[i].fs_id))
+            {
+                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
+            {
+                fprintf(stderr,"OK\n");
+            }
+
+            fprintf(stderr,"Looking up asymlink %d [  FOLLOWED] "
+                    "\t\t... ", i);
+            ret = PVFS_sys_lookup(cur_fs_id, tmp_buf,
+                                  &credentials, &lookup_resp,
+                                  PVFS2_LOOKUP_LINK_FOLLOW);
+            if (ret < 0)
+            {
+                fprintf(stderr,"\nPVFS_sys_lookup failed\n");
+                goto symlink_cleanup;
+            }
+
+            if ((lookup_resp.ref.handle !=
+                 lookup_refns[i].handle) ||
+                (lookup_resp.ref.fs_id !=
+                 lookup_refns[i].fs_id))
+            {
+                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
+            {
+                fprintf(stderr,"OK\n");
+            }
+        }
+    }
+
+  symlink_cleanup:
+    if (rsymlink_refns)
+    {
+        free(rsymlink_refns);
+    }
+    if (asymlink_refns)
+    {
+        free(asymlink_refns);
+    }
+
+  cleanup:
+    stored_error = ret;
+
+    if (absolute_paths)
+    {
+        for(i = (levels - 1); i > -1; i--)
+        {
+            parent_refn = ((i == 0) ? base_refn : lookup_refns[i - 1]);
+            if (parent_refn.handle == PVFS_HANDLE_NULL)
+            {
+                fprintf(stderr, "Error performing clean up. "
+                        "Sorry, we're busted ... aborting\n");
+                break;
+            }
+            GENERATE_FILENAME(cur_filename, 64, format, i, rank, 0);
+            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"));
+            if (ret)
+            {
+                PVFS_perror("\nPath removal status: ", ret);
+            }
+
+            if (test_symlinks)
+            {
+                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);
+                fprintf(stderr, "%s\n", ((ret < 0) ? "FAILED" : "DONE"));
+                if (ret)
+                {
+                    PVFS_perror("\nPath removal status: ", ret);
+                }
+
+                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);
+                fprintf(stderr, "%s\n", ((ret < 0) ? "FAILED" : "DONE"));
+                if (ret)
+                {
+                    PVFS_perror("\nPath removal status: ", ret);
+                }
+            }
+        }
+        free(absolute_paths);
+    }
+    ret = PVFS_sys_remove(PATH_LOOKUP_BASE_DIR, root_refn, &credentials);
+    if (ret)
+    {
+        PVFS_perror("Top-level Path removal error ", ret);
+    }
+    if (newdir_refns)
+    {
+        free(newdir_refns);
+    }
+    if (lookup_refns)
+    {
+        free(lookup_refns);
+    }
+    return stored_error;
+}
+
+int test_path_lookup(MPI_Comm *comm __unused, int rank, char *buf __unused, void *params __unused)
+{
+    int ret = -1;
+    char *format_prefix1 = "pt-0";
+    char *format_prefix2 = "st0";
+
+    if (!pvfs_helper.initialized && initialize_sysint())
+    {
+        fprintf(stderr, "initialize_sysint failed\n");
+        return ret;
+    }
+
+    ret = build_nested_path(5, format_prefix1, rank, 0);
+    if (ret)
+    {
+        fprintf(stderr,"(1) Failed to build nested path\n");
+        goto error_exit;
+    }
+
+    ret = build_nested_path(13, format_prefix2, rank, 1);
+    if (ret)
+    {
+        fprintf(stderr,"(2) Failed to build nested path\n");
+        goto error_exit;
+    }
+
+  error_exit:
+    return ret;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-dir-operations.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-dir-operations.h	(revision 1019)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-dir-operations.h	(revision 1019)
@@ -0,0 +1,6 @@
+#ifndef TEST_DIR_OPERATIONS_H
+#define TEST_DIR_OPERATIONS_H
+
+int test_dir_operations(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/generic.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/generic.h	(revision 1207)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/generic.h	(revision 1207)
@@ -0,0 +1,15 @@
+#ifndef INCLUDE_GENERIC_H
+#define INCLUDE_GENERIC_H
+#include <sys/param.h>
+
+#include "pvfs2-types.h"
+
+typedef struct generic_params{
+	int mode;
+	char path[PVFS_NAME_MAX];
+} generic_params;
+
+
+void *generic_param_parser( char * stuff);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-write-eof.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-write-eof.h	(revision 2007)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-write-eof.h	(revision 2007)
@@ -0,0 +1,6 @@
+#ifndef TEST_WRITE_EOF_H
+#define TEST_WRITE_EOF_H
+
+int test_write_eof(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-request-indexed.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-request-indexed.c	(revision 4457)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-request-indexed.c	(revision 4457)
@@ -0,0 +1,231 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/* 
+ * test-request_indexed: Checks PVFS_Request_indexed for correct segmentation 
+ * of the request.  For instance, If the segment size is to be 4M and there 
+ * are 3 segments that are allocated to a 10M chunk, then the offsets for
+ * those segments should be 
+ * 0 (first segment with 4M of space) 
+ * 4M (second segment with 4M of space)
+ * 8M (third segment with 2M of space)
+ * Author: Michael Speth, Testing code written & designed by Phil C.
+ * Date: 8/14/2003
+ * Last Updated: 8/21/2003
+ */
+
+#include <time.h>
+#include <sys/time.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <pint-request.h>
+#include <pint-distribution.h>
+#include "pint-dist-utils.h"
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "pvfs2-util.h"
+#include "test-request-indexed.h"
+#define SEGMAX 16
+#define BYTEMAX (4*1024*1024)
+
+/* Checks for valid segmentation on 2 request types for PVFS_Request_indexed
+ * Parameters: none
+ * Returns 0 on success and -1 on failure (ie - the segment offsets
+ * were not calcuated correctly by Request_indexed
+ */
+static int test_request(void){
+    int i;
+    PINT_Request *r1;
+    PINT_Request *r2;
+    PINT_Request_state *rs1;
+    PINT_Request_state *rs2;
+    PINT_request_file_data rf1;
+    PINT_request_file_data rf2;
+    PINT_Request_result seg1;
+    PINT_Request_result seg2;
+
+
+    /* PVFS_Process_request arguments */
+    int retval;
+
+    int32_t blocklength = 10*1024*1024; /* 10M */
+
+    /* Used for calculating correct offset values */
+    int32_t tmpSize;
+    PVFS_size tmpOff;
+    int32_t segSize;
+                                                                                
+    /* set up two requests */
+    PVFS_size displacement1 = 0;  /* first at offset zero */
+    PVFS_size displacement2 = 10*1024*1024;  /* next at 10M offset */
+    PVFS_Request_indexed(1, &blocklength, &displacement1, PVFS_BYTE, &r1);
+                                                                                
+    PVFS_Request_indexed(1, &blocklength, &displacement2, PVFS_BYTE, &r2);
+    /* set up two request states */
+    rs1 = PINT_new_request_state(r1);
+    rs2 = PINT_new_request_state(r2);
+                                                                                
+    /* set up file data for first request */
+    PINT_dist_initialize(NULL);
+    rf1.server_nr = 0;
+    rf1.server_ct = 1;
+    rf1.fsize = 0;
+    rf1.dist = PINT_dist_create("simple_stripe");
+    rf1.extend_flag = 1;
+    PINT_dist_lookup(rf1.dist);
+                                                                                
+    /* file data for second request is the same, except the file
+     * will have grown by 10M
+     */
+    rf2.server_nr = 0;
+    rf2.server_ct = 1;
+    rf2.fsize = 10*1024*1024;
+    rf2.dist = PINT_dist_create("simple_stripe");
+    rf2.extend_flag = 1;
+    PINT_dist_lookup(rf2.dist);
+                                                                                 
+    /* set up result structures */
+    seg1.offset_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+    seg1.size_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+    seg1.segmax = SEGMAX;
+    seg1.bytemax = BYTEMAX;
+    seg1.segs = 0;
+    seg1.bytes = 0;
+                                                                                 
+    seg2.offset_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+    seg2.size_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+    seg2.segmax = SEGMAX;
+    seg2.bytemax = BYTEMAX;
+    seg2.segs = 0;
+    seg2.bytes = 0;
+                                                                                 
+    /* Turn on debugging */
+    /* gossip_enable_stderr();
+    gossip_set_debug_mask(1,REQUEST_DEBUG); */
+                                                                                
+    tmpSize = blocklength;
+    tmpOff = displacement1;
+    segSize = BYTEMAX;
+    
+    do
+    {
+	seg1.bytes = 0;
+	seg1.segs = 0;
+	/* process request */
+	retval = PINT_process_request(rs1, NULL, &rf1, &seg1, PINT_SERVER);
+                                                                                
+	if(retval >= 0)
+	{
+	    for(i = 0; i < seg1.segs; i++)
+	    {
+		if(tmpOff != ((int)seg1.offset_array[i])){
+		    printf("Error:  segment %d offset is %d but should be %d\n",i,(int)seg1.offset_array[i],(int)tmpOff);
+		    return -1;
+		}
+		if(segSize != ((int)seg1.size_array[i])){
+		    printf("Error:  segment %d size is %d but should be %d\n",i,(int)seg1.size_array[i],segSize);
+		    return -1;
+		}
+
+		if( (tmpSize - BYTEMAX) < BYTEMAX){
+		    segSize = tmpSize - BYTEMAX;
+		}
+		else{   
+		    segSize = BYTEMAX;
+		}
+		tmpSize -= BYTEMAX;
+		tmpOff += BYTEMAX;
+	    }
+	}
+    } while(!PINT_REQUEST_DONE(rs1) && retval >= 0);
+    if(retval < 0)
+    {
+      fprintf(stderr, "Error: PINT_Process_request() failure.\n");      return(-1);
+   }
+   if(PINT_REQUEST_DONE(rs1))
+   {
+/*      printf("**** first request done.\n");
+*/
+   }
+    tmpOff = displacement2;
+    tmpSize = blocklength;
+    segSize = BYTEMAX;
+   do
+   {
+      seg2.bytes = 0;
+      seg2.segs = 0;
+      /* process request */
+      retval = PINT_process_request(rs2, NULL, &rf2, &seg2, PINT_SERVER);
+                                                                                
+      if(retval >= 0)
+      {
+         for(i=0; i < seg2.segs; i++)
+         {
+		if(tmpOff != ((int)seg2.offset_array[i])){
+		    printf("Error:  segment %d offset is %d but should be %d\n",i,(int)seg2.offset_array[i],(int)tmpOff);
+		    return -1;
+		}
+		if(segSize != ((int)seg2.size_array[i])){
+		    printf("Error:  segment %d size is %d but should be %d\n",i,(int)seg2.size_array[i],segSize);
+		    return -1;
+		}
+
+		if( (tmpSize - BYTEMAX) < BYTEMAX){
+		    segSize = tmpSize - BYTEMAX;
+		}
+		else{   
+		    segSize = BYTEMAX;
+		}
+		tmpSize -= BYTEMAX;
+		tmpOff += BYTEMAX;
+         }
+      }
+                                                                                
+   } while(!PINT_REQUEST_DONE(rs2) && retval >= 0);
+                                                                                
+   if(retval < 0)
+   {
+      fprintf(stderr, "Error: PINT_Process_request() failure.\n");
+      return(-1);
+   }
+   if(PINT_REQUEST_DONE(rs2))
+   {
+ /*     printf("**** second request done.\n"); */
+   }
+                                                                                
+   return 0;
+}
+
+/* Preconditions: None
+ * Parameters: comm - special pts communicator, rank - the rank of the process,
+ * buf - not used
+ * Postconditions: 0 if no errors and nonzero otherwise
+ */
+int test_request_indexed(MPI_Comm * comm __unused,
+		     int rank,
+		     char *buf __unused,
+		     void *rawparams __unused)
+{
+    int ret = -1;
+
+    if (rank == 0)
+    {
+	ret = test_request();
+    }
+    return ret;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-create.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-create.h	(revision 728)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-create.h	(revision 728)
@@ -0,0 +1,7 @@
+#ifndef _TEST_CREATE_H
+#define _TEST_CREATE_H
+
+#include "pvfs2-types.h"
+int test_create(MPI_Comm *comm, int rank, char *buf, void *params);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/null-params-parser.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/null-params-parser.c	(revision 1152)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/null-params-parser.c	(revision 1152)
@@ -0,0 +1,13 @@
+#include <string.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "null_params.h"
+
+void *null_params_parser(char *paramstr){
+	null_params *myparams = malloc(sizeof(null_params));
+	sscanf(paramstr,"%d %d\n",&myparams->p1,&myparams->p2);
+
+	return myparams;
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-path-lookup.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-path-lookup.h	(revision 3784)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-path-lookup.h	(revision 3784)
@@ -0,0 +1,24 @@
+/*
+ * (C) 2001 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+#ifndef __TEST_PATH_LOOKUP_H
+#define __TEST_PATH_LOOKUP_H
+
+#include "pvfs2-types.h"
+
+int test_path_lookup(MPI_Comm *comm, int rank, char *buf, void *params);
+
+#endif /* __TEST_PATH_LOOKUP_H */
+
+/*
+ * Local variables:
+ *  mode: c
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ft=c ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-request-indexed.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-request-indexed.h	(revision 1916)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-request-indexed.h	(revision 1916)
@@ -0,0 +1,6 @@
+#ifndef TEST_REQUEST_INDEXED_H
+#define TEST_REQUEST_INDEXED_H
+
+int test_request_indexed(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-encode-basic.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-encode-basic.c	(revision 5825)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-encode-basic.c	(revision 5825)
@@ -0,0 +1,150 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/* Simulates Network Encoding of a trivial datatypes
+ * Author: Michael Speth, Testing code written & designed by Phil C.
+ * Date: 8/22/2003
+ * Last Updated: 8/22/2003
+ */
+
+#include <time.h>
+#include <sys/time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include<assert.h>
+
+#include <pint-request.h>
+#include <pint-distribution.h>
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "pvfs2-util.h"
+#include "test-encode-basic.h"
+#define SEGMAX 16
+#define BYTEMAX (1024*1024)
+
+/* PROTO-TYPES */
+/* static void Dump_request(PVFS_Request); */
+
+/*
+ * Parameters: none
+ * Returns 0 on success and -1 on failure (ie - the segment offsets
+ * were not calcuated correctly by Request_indexed
+ */
+static int test_encode(void){
+    /* Used for calculating correct offset values */
+
+   PINT_Request *r;
+   PINT_Request *r_enc;
+   PINT_Request *r_dec;
+   int ret = -1;
+   int pack_size = 0;
+                                                                                
+   r = PVFS_BYTE;
+/*
+   Dump_request(r);
+*/
+                                                                                
+   /* allocate a new request and pack the original one into it */
+   pack_size = PINT_REQUEST_PACK_SIZE(r);
+/*
+   fprintf(stderr, "pack size is %d\n",pack_size);
+*/
+   r_enc = (PINT_Request*)malloc(pack_size);
+   assert(r_enc != NULL);
+                                                                                
+   ret = PINT_request_commit(r_enc, r);
+   if(ret < 0)
+   {
+      fprintf(stderr, "PINT_Request_commit() failure.\n");
+      return(-1);
+   }
+/*
+   fprintf(stderr, "commit returns %d\n", ret);
+   Dump_request(r_enc);
+*/
+   ret = PINT_request_encode(r_enc);
+   if(ret < 0)
+   {
+      fprintf(stderr, "PINT_Request_encode() failure.\n");
+      return(-1);
+   }
+/*
+   fprintf(stderr, "encode returns %d\n", ret);
+   Dump_request(r_enc); */
+                                                                                
+                                                                                
+   /* decode the encoded request (hopefully ending up with something
+    * equivalent to the original request)
+    */
+   r_dec = (PINT_Request*)malloc(pack_size);
+   memcpy(r_dec, r_enc, pack_size);
+   free(r_enc);
+   /*  free(r); */
+   ret = PINT_request_decode(r_dec);
+   if(ret < 0)
+   {
+      fprintf(stderr, "PINT_Request_decode() failure.\n");
+      return(-1);
+   }
+/*
+   fprintf(stderr, "decode returns %d\n", ret);
+*/
+                                                                                
+   return 0;
+}
+                                                                                
+#if 0
+void Dump_request(PVFS_Request req)
+{
+   fprintf(stderr,"**********************\n");
+   fprintf(stderr,"address:\t%x\n",(unsigned int)req);
+   fprintf(stderr,"offset:\t\t%d\n",(int)req->offset);
+   fprintf(stderr,"num_ereqs:\t%d\n",(int)req->num_ereqs);
+   fprintf(stderr,"num_blocks:\t%d\n",(int)req->num_blocks);
+   fprintf(stderr,"stride:\t\t%d\n",(int)req->stride);
+   fprintf(stderr,"ub:\t\t%d\n",(int)req->ub);
+   fprintf(stderr,"lb:\t\t%d\n",(int)req->lb);
+   fprintf(stderr,"agg_size:\t%d\n",(int)req->aggregate_size);
+   fprintf(stderr,"num_chunk:\t%d\n",(int)req->num_contig_chunks);
+   fprintf(stderr,"depth:\t\t%d\n",(int)req->depth);
+   fprintf(stderr,"num_nest:\t%d\n",(int)req->num_nested_req);
+   fprintf(stderr,"commit:\t\t%d\n",(int)req->committed);
+   fprintf(stderr,"refcount:\t\t%d\n",(int)req->refcount);
+   fprintf(stderr,"ereq:\t\t%x\n",(int)req->ereq);
+   fprintf(stderr,"sreq:\t\t%x\n",(int)req->sreq);
+   fprintf(stderr,"**********************\n");
+}
+#endif
+
+/* Preconditions: None
+ * Parameters: comm - special pts communicator, rank - the rank of the process,
+ * buf - not used
+ * Postconditions: 0 if no errors and nonzero otherwise
+ */
+int test_encode_basic(MPI_Comm * comm __unused,
+		     int rank,
+		     char *buf __unused,
+		     void *rawparams __unused)
+{
+    int ret = -1;
+
+    if (rank == 0)
+    {
+	ret = test_encode();
+    }
+    return ret;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pathological_tests.conf
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pathological_tests.conf	(revision 1238)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pathological_tests.conf	(revision 1238)
@@ -0,0 +1,255 @@
+# pvfs related tests
+
+pvfs_restart_server:--path=bla --mode=0
+test_misc:0 0
+pvfs_restart_server:--path=bla --mode=0
+test_misc:0 1
+
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:99 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:0 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:0 1
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:0 2
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:1 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:1 1
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:1 2
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:1 3
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:1 4
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:1 5
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:2 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:2 1
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:2 2
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:2 3
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:2 4
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:2 5
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:2 6
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:3 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:4 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:4 1
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:4 2
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:4 3
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:4 4
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:4 5
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:4 6
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:4 7
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:4 8
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:4 9
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:5 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:5 1
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:5 2
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:5 3
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:5 4
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:5 5
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:5 6
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:5 7
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:6 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:6 1
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:6 2
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:6 3
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:6 4
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:6 5
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:6 6
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:6 7
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:6 8
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:6 9
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:6 10
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:6 11
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:7 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:7 1
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:7 2
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:7 3
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:7 4
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:7 5
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:8 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:9 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:10 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:11 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:11 1
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:11 2
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:11 3
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:11 4
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:11 5
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:11 6
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:11 7
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:11 8
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:12 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:12 1
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:12 2
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:12 3
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:12 4
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:12 5
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:12 6
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:12 7
+#pvfs_restart_server:--path=bla --mode=0
+#test_null_params:12 8
+#pvfs_stop_server:--path=bla --mode=0
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:0 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:1 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:1 1
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:2 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:2 1
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:3 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:3 1
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:4 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:4 1
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:5 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:5 1
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:6 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:6 1
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:7 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:7 1
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:8 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:9 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:9 1
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:10 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:10 1
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:11 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_invalid_files:11 1
+#pvfs_restart_server:--path=bla --mode=0
+#test_uninitialized:0 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_uninitialized:1 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_uninitialized:2 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_uninitialized:3 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_uninitialized:4 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_uninitialized:5 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_uninitialized:6 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_uninitialized:7 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_uninitialized:8 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_uninitialized:9 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_uninitialized:10 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_uninitialized:11 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_uninitialized:12 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_finalized:0 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_finalized:1 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_finalized:2 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_finalized:3 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_finalized:4 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_finalized:5 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_finalized:6 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_finalized:7 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_finalized:8 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_finalized:9 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_finalized:10 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_finalized:11 0
+#pvfs_restart_server:--path=bla --mode=0
+#test_finalized:12 0
+pvfs_stop_server:--path=bla --mode=0
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-encode-basic.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-encode-basic.h	(revision 1937)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-encode-basic.h	(revision 1937)
@@ -0,0 +1,6 @@
+#ifndef TEST_ENCODE_BASIC_H
+#define TEST_ENCODE_BASIC_H
+
+int test_encode_basic(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-vector-offset.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-vector-offset.c	(revision 4457)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-vector-offset.c	(revision 4457)
@@ -0,0 +1,155 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/* Simulates Accessing a data type with a specific starting location
+ * Author: Michael Speth, Testing code written & designed by Phil C.
+ * Date: 8/26/2003
+ * Last Updated: 8/26/2003
+ */
+
+#include <time.h>
+#include <sys/time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include<assert.h>
+
+#include <pint-request.h>
+#include <pint-distribution.h>
+#include <pvfs2-debug.h>
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "pvfs2-util.h"
+#include "test-vector-offset.h"
+#define SEGMAX 16
+#define BYTEMAX (4*1024*1024)
+
+/*
+ * Parameters: none
+ * Returns 0 on success and -1 on failure (ie - the segment offsets
+ * were not calcuated correctly by Request_indexed
+ */
+static int test_vec_offset(void){
+    int i;
+    PINT_Request *r1;
+    PINT_Request_state *rs1;
+    PINT_request_file_data rf1;
+    PINT_Request_result seg1;
+                                                                                
+    /* PVFS_Process_request arguments */
+    int retval;
+                                                                                
+    int32_t tmpOff, tmpSize;
+    int segNum;
+
+    /* set up request */
+    PVFS_Request_vector(10, 1024, 10*1024, PVFS_BYTE, &r1);
+
+    /* set up request state */
+    rs1 = PINT_new_request_state(r1);
+                                                                                
+    /* set up file data for request */
+    rf1.server_nr = 0;
+    rf1.server_ct = 8;
+    rf1.fsize = 10000000;
+    rf1.dist = PINT_dist_create("simple_stripe");
+    rf1.extend_flag = 1;
+    PINT_dist_lookup(rf1.dist);
+                                                                                
+    /* set up result struct */
+    seg1.offset_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+    seg1.size_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+    seg1.bytemax = BYTEMAX;
+    seg1.segmax = SEGMAX;
+    seg1.bytes = 0;
+    seg1.segs = 0;
+                                                                                
+    /* Turn on debugging */
+    /* gossip_enable_stderr();
+     gossip_set_debug_mask(1,REQUEST_DEBUG); */
+                                                                                
+    /* skipping logical bytes */
+    /*seg1.bytemax = (3 * 1024) + 512;*/
+                                                                                
+    PINT_REQUEST_STATE_SET_TARGET(rs1,(3 * 1024) + 512);
+                                                                                
+    /* need to reset bytemax before we contrinue */
+    /*seg1.bytemax = BYTEMAX;*/
+                                                                                
+    do
+    {
+       seg1.bytes = 0;
+       seg1.segs = 0;
+                                                                                
+       /* process request */
+       retval = PINT_process_request(rs1, NULL, &rf1, &seg1, PINT_SERVER);
+                                                                                 
+	if(retval >= 0)
+	{
+	   tmpOff = (3 * 1024)*10 + 512;
+	   tmpSize = 512;
+	    segNum = 3;
+	    for(i=0; i<seg1.segs; i++, tmpOff = segNum*(10*1024))
+	    {
+		if(tmpOff != (int)seg1.offset_array[i]){
+		    printf("segment %d's offset is %d but should be %d\n",
+			    i,(int)seg1.offset_array[i],tmpOff);
+		    return -1;
+		}
+		else if(tmpSize != (int)seg1.size_array[i]){
+		    printf("segment %d's size is %d but should be %d\n",
+			i,(int)seg1.size_array[i],tmpSize);
+		    return -1;
+		}
+		tmpSize = 1024;	
+		segNum++;
+	    }
+	}
+    } while(!PINT_REQUEST_DONE(rs1) && retval >= 0);
+
+    if(retval < 0)
+    {
+	fprintf(stderr, "Error: PINT_process_request() failure.\n");
+	return(-1);
+    }
+    if(PINT_REQUEST_DONE(rs1))
+    {
+/*
+      printf("**** request done.\n");
+*/
+    }
+    return 0;
+}
+                                                                                
+
+/* Preconditions: None
+ * Parameters: comm - special pts communicator, rank - the rank of the process,
+ * buf - not used
+ * Postconditions: 0 if no errors and nonzero otherwise
+ */
+int test_vector_offset(MPI_Comm * comm __unused,
+		     int rank,
+		     char *buf __unused,
+		     void *rawparams __unused)
+{
+    int ret = -1;
+
+    if (rank == 0)
+    {
+	ret = test_vec_offset();
+    }
+    return ret;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs-restart-server.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs-restart-server.c	(revision 3784)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs-restart-server.c	(revision 3784)
@@ -0,0 +1,44 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/* 
+ * pvfs-restart-server: calls a script that restarts the server
+ * Author: Michael Speth
+ * Date: 6/19/2003
+ */
+
+#include <unistd.h>
+#include <sys/time.h>
+#include <stdlib.h>
+
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "pvfs-restart-server.h"
+
+/* Preconditions: Parameters must be valid
+ *  * Parameters: comm - special pts communicator, rank - the rank of the process, buf -  * (not used), rawparams - configuration information to specify which function to test * Postconditions: 0 if no errors and nonzero otherwise
+ *   */
+int pvfs_restart_server(MPI_Comm * comm __unused,
+			int rank __unused,
+			char *buf __unused,
+			void *rawparams __unused)
+{
+    system("./run-server restart >& server_restart.log");
+    /* sleep in seconds to let the server fully start */
+    sleep(2);
+    return 0;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-init.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-init.c	(revision 6373)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-init.c	(revision 6373)
@@ -0,0 +1,108 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+#include <time.h>
+#include <stdio.h>
+#include "pvfs-helper.h"
+#include "test-pvfs-datatype-init.h"
+#include "pvfs2-internal.h"
+
+/*
+  initialize the sysint and create files to be used by subsequent
+  tests.
+*/
+int test_pvfs_datatype_init(
+    MPI_Comm *mycomm __unused,
+    int myid,
+    char *buf __unused,
+    void *params)
+{
+    int ret = -1, i = 0, num_test_files_ok = 0;
+    PVFS_sys_attr attr;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lk;
+    PVFS_sysresp_create resp_cr;
+    generic_params *args = (generic_params *)params;
+    char filename[PVFS_NAME_MAX];
+
+    debug_printf("test_pvfs_datatype_init called\n");
+
+    if (!pvfs_helper.initialized && initialize_sysint())
+    {
+        debug_printf("initialize_sysint failed\n");
+        return ret;
+    }
+    if (args && args->mode)
+    {
+        pvfs_helper.num_test_files = args->mode;
+        debug_printf("test_pvfs_datatype_init mode is %d\n",
+                     args->mode);
+    }
+
+    PVFS_util_gen_credentials(&credentials);
+
+    /*
+      verify that all test files exist.  it's okay if they
+      don't exist as we'll try to create them.
+
+      FIXME -- lookup failure
+        SHOULD ADJUST THIS AS DISCUSSED WITH PHIL
+
+      this test fails in the following cases:
+      - lookup fails for *any* reason
+      - create fails
+    */
+    for(i = 0; i < pvfs_helper.num_test_files; i++)
+    {
+        snprintf(filename,PVFS_NAME_MAX,"%s%.5drank%d",
+                 TEST_FILE_PREFIX,i,myid);
+
+        ret = PVFS_sys_lookup(pvfs_helper.fs_id,
+                              filename, &credentials, &resp_lk,
+                              PVFS2_LOOKUP_LINK_NO_FOLLOW);
+        if (ret < 0)
+        {
+            debug_printf("init: lookup failed.  creating new file.\n");
+
+            /* get root handle */
+            ret = PVFS_sys_lookup(pvfs_helper.fs_id,
+                                  "/", &credentials, &resp_lk,
+                                  PVFS2_LOOKUP_LINK_NO_FOLLOW);
+            if ((ret < 0) || (!resp_lk.ref.handle))
+            {
+                debug_printf("Error: PVFS_sys_lookup() failed to find "
+                             "root handle.\n");
+                break;
+            }
+
+
+            attr.mask = PVFS_ATTR_SYS_ALL_SETABLE;
+            attr.owner = credentials.uid;
+            attr.group = credentials.gid;
+            attr.perms = 1877;
+	    attr.atime = attr.mtime = attr.ctime = 
+		time(NULL);
+
+            ret = PVFS_sys_create(&(filename[1]),resp_lk.ref,
+                                  attr, &credentials, NULL, NULL, &resp_cr);
+            if ((ret < 0) || (!resp_cr.ref.handle))
+            {
+                debug_printf("Error: PVFS_sys_create() failure.\n");
+                break;
+            }
+            debug_printf("Created file %s\n",&(filename[1]));
+            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 %lld.\n", lld(resp_lk.ref.handle));
+            num_test_files_ok++;
+        }
+    }
+    return ((num_test_files_ok == pvfs_helper.num_test_files) ? 0 : 1);
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pts.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pts.c	(revision 5825)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pts.c	(revision 5825)
@@ -0,0 +1,363 @@
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <dirent.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include <getopt.h>
+#include <mpi.h>
+#include "pts.h"
+#include <generic.h>
+#include "gossip.h"
+
+/*pvfs2 functions we're calling (mostly gossip args)*/
+#include "pvfs2-debug.h"
+#include "pint-util.h"
+
+/* this is where all of the individual test prototypes are */
+#include "test-protos.h"
+
+/* yeah yeah, only one global...stores all config data (debug flag, mpi_id, etc */
+static config pts_config;
+
+int main(int argc, char **argv) {
+  
+  int numprocs, myid, rc, status;
+  PINT_time_marker marker1, marker2;
+  double wtime, stime, utime;
+
+  MPI_Init(&argc,&argv);
+  MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
+  MPI_Comm_rank(MPI_COMM_WORLD, &myid);
+  
+  /* initialize the config structure, this initializes most global config info, and sets up the array of test function pointers that we can draw from later when setting up the testqueue[] */
+  rc = init_config(&pts_config);
+  if (rc) {
+    MPI_Finalize();
+    exit(1);
+  }
+  
+  /* status variable, used to communicate exit or not, 0 means all is well*/
+  status = 0;
+  
+  /* process 0 stuff */
+  if (myid == 0) {
+    /* parse cmdline, should prolly use getopt ... */
+    rc = parse_cmdline(argc, argv, &pts_config);
+    if (rc) {
+      status = 1;
+    }
+    
+    /* parse config file, set up pts_config.testqueue[] pretty much */
+    rc = parse_configfile(&pts_config);
+    if (rc) {
+      status = 1;
+    }
+  }
+
+
+  /* check to make sure all is still OK to continue */
+  MPI_Bcast(&status, 1, MPI_INT, 0, MPI_COMM_WORLD);
+  if (status > 0) {
+    printf("%d: error status recieved, exiting\n", myid);
+    MPI_Finalize();
+    exit(1);
+  }
+  
+  /*  printf("%d: here\n", myid); */
+  pts_config.myid = myid;
+  pts_config.numprocs = numprocs;
+  rc = sync_config(&pts_config);
+  
+  /* get the config out to everybody ... don't know how to bcast a whole
+     struct */
+  MPI_Bcast(&pts_config.debug, 1, MPI_INT, 0, MPI_COMM_WORLD);
+  pts_config.myid = myid;
+  
+  /* need to learn how to dup communicators ... should do that here*/
+  
+  PINT_time_mark(&marker1);
+  rc = run_tests(&pts_config);
+  PINT_time_mark(&marker2);
+  
+  fprintf(stderr, "%d: DONE RUNNING TESTS!\n", myid);
+  /*   MPI_Barrier(MPI_COMM_WORLD); */
+  if(numprocs == 1)
+  {
+    PINT_time_diff(marker1, marker2, &wtime, &utime, &stime);
+    fprintf(stderr, "Elapsed time:\n");
+    fprintf(stderr, "----------------------\n");
+    fprintf(stderr, "   wall: %f\n", wtime);
+    fprintf(stderr, "   user: %f\n", utime);
+    fprintf(stderr, "   system: %f\n", stime);
+  }
+  MPI_Finalize();
+
+  exit(0);
+}
+
+
+/* gets the data from proc 0's testqueue array out to all nodes, kinda messy */
+int sync_config(config *myconfig) {
+  int i, pindex, myid;
+  char *rawparams = NULL;
+  
+  myid = myconfig->myid;
+  
+  for (i=0; i<MAX_RUN_TESTS; i++) {
+    MPI_Barrier(MPI_COMM_WORLD);
+    
+    /* proc 0 gets info from queue about which test from test pool is queued*/
+    if (myid == 0) {
+      if ( pts_config.testqueue[i].test_func != NULL) {	
+	pindex = pts_config.testqueue[i].test_index;
+	rawparams = pts_config.testqueue[i].test_params;
+      } else {
+	/* if we've reached the last test, set pindex = -1 indicating stop */
+	pindex = -1;
+      }
+    } else {
+      /* all non proc 0 nodes gobble up some space */
+      rawparams = malloc(4096);
+      memset(rawparams, 0, 4096);
+    }
+
+    /* bcast send out the new pindex */
+    MPI_Bcast(&pindex, 1, MPI_INT, 0, MPI_COMM_WORLD);
+
+    if (pindex == -1) {
+      /* no more test, set i to boundry */
+      i = MAX_RUN_TESTS;
+    } else {
+      /* broadcast the rawparams assiciated with this specific test */
+      MPI_Bcast(rawparams, 4096, MPI_CHAR, 0, MPI_COMM_WORLD);
+      
+      if (myid != 0) {
+	/* all non proc 0 nodes now have enough info to add a test to their
+	   queues */
+	pts_config.testqueue[i] = pts_config.testpool[pindex];
+	pts_config.testqueue[i].test_params = rawparams;
+      }
+    }
+  }
+
+  return(0);
+}
+
+int run_tests(config *myconfig) {
+  int index, rc, errcode, *allerrcodes, i;
+  char *buf = malloc(4096);
+  void *params = NULL;
+  MPI_Comm newcomm;
+
+  MPI_Comm_dup(MPI_COMM_WORLD, &newcomm);
+
+  index = 0;
+  while(myconfig->testqueue[index].test_func != NULL) {
+    MPI_Barrier(MPI_COMM_WORLD);
+    
+    if (myconfig->myid == 0) {
+      fprintf(stderr, "PTS: Running test %s\n",
+	      myconfig->testqueue[index].test_name);
+      fprintf(stderr, "PTS: -------------------------------------------\n");
+    }
+    if (myconfig->testqueue[index].test_param_init != NULL) {
+      params = run_param(myconfig->testqueue[index].test_param_init, myconfig->testqueue[index].test_params);
+      if (params == NULL) {
+	printf("ERROR: cannot setup params\n");
+      }
+    }
+
+    if (myconfig->testqueue[index].test_func != NULL) {
+
+      rc = run_test(myconfig->testqueue[index].test_func, &newcomm,
+		    myconfig->myid, buf, params);
+      free(params);
+    } else {
+      fprintf(stderr, "PTS: test %s not set up properly, no function to run\n",
+	      myconfig->testqueue[index].test_name);
+      rc = 1;
+    }
+    
+    errcode = rc;
+    fflush(stdout);
+    MPI_Barrier(MPI_COMM_WORLD);
+
+    allerrcodes = malloc(sizeof(int[myconfig->numprocs]));
+    memset(allerrcodes, 0, sizeof(int[myconfig->numprocs]));
+    MPI_Gather(&errcode, 1, MPI_INT, allerrcodes, 1, MPI_INT, 0, MPI_COMM_WORLD);
+
+    if (myconfig->myid == 0) {
+      for (i=0; i<myconfig->numprocs; i++) {
+	if (allerrcodes[i]) {
+	  fprintf(stderr, "PTS: node %d, test %s -> FAILED\n", i, myconfig->testqueue[index].test_name);
+	} else {
+	  fprintf(stderr, "PTS: node %d, test %s -> PASSED\n", i, myconfig->testqueue[index].test_name);
+	}
+      }
+    }
+    free(allerrcodes);
+
+    if (myconfig->myid == 0) {
+      fprintf(stderr, "\n\n");
+    }
+    index++;
+    memset(buf, 0, 4096);
+  }
+  free(buf);
+  
+  MPI_Comm_free(&newcomm);
+  return(0);
+}
+
+int run_test(int(*test)(MPI_Comm *comm, int rank, char *buf, void *params),
+  MPI_Comm *mycomm, int myid, char *buf, void *params) {
+  return(test(mycomm, myid, buf, params));
+}
+
+void *run_param(void *(*param)(char *), char *buf) {
+  return(param(buf));
+}
+
+char *str_malloc(const char *instr) {
+  char *tmpstr = malloc(strlen(instr)+1);
+  strncpy(tmpstr, instr, strlen(instr)+1);
+  return(tmpstr);
+}
+
+int init_config(config *myconfig) {
+  int i;
+
+  memset(myconfig, 0, sizeof(*myconfig));
+
+  myconfig->debug = 0;
+  myconfig->configfile = NULL;
+
+  /* the test_param_init should point to generic_param_init */
+  for (i=0; i<MAX_DISTINCT_TESTS; i++) {
+    myconfig->testpool[i].test_func = NULL;
+    myconfig->testpool[i].test_param_init = generic_param_parser;
+    myconfig->testpool[i].test_name = NULL;
+    myconfig->testpool[i].test_params = NULL;
+    myconfig->testpool[i].test_index = i;
+  }
+
+  for (i=0; i<MAX_RUN_TESTS; i++) {
+    myconfig->testqueue[i].test_func = NULL;
+    myconfig->testqueue[i].test_param_init = NULL;
+    myconfig->testqueue[i].test_name = NULL;
+    myconfig->testqueue[i].test_params = NULL;
+    myconfig->testqueue[i].test_index = 0;
+  }
+
+  /* set up function vector to point at all tests in testpool*/
+  setup_ptstests(myconfig);
+
+  return(0);
+}
+
+int parse_cmdline(int argc, char **argv, config *myconfig) {
+  int c, index;
+
+  static struct option long_opts[] = {
+	  { "debug", required_argument, NULL, 'd' },
+	  { "conf", required_argument, NULL, 'c' },
+	  { 0, 0, 0, 0}
+  };
+  while ( ( c = getopt_long(argc, argv, "d:c:",
+				  long_opts, &index)) != -1 ) {
+	  switch(c) {
+		  case 'd':
+			  myconfig->debug = (int)strtoul(optarg, NULL, 0);
+			  break;
+		  case 'c':
+			  myconfig->configfile = str_malloc(optarg);
+			  break;
+		  case '?':
+		  case ':':
+		  default:
+			  usage();
+			  return 1;
+	  }
+
+  }
+#if 0
+  if ( optind == argc ) {
+	  usage();
+	  return 1;
+  }
+#endif
+
+  return 0;
+}
+
+int parse_configfile(config *myconfig) {
+  int qindex, pindex;
+  char *linebuf = malloc(4096);
+  char *strindex, *rawparams;
+  FILE *fh;
+
+  fh = fopen(myconfig->configfile, "r");
+  if (fh == NULL) {
+    return(1);
+  }
+
+  qindex = 0;
+  while(fgets(linebuf, 4096, fh) != NULL) {
+    if (linebuf[0] != '#') {
+      strindex = strchr(linebuf, ':');
+      if (strindex != NULL) {
+	*strindex = '\0';
+	pindex = lookup_test(myconfig, linebuf);
+	/*	printf("pindex %d\n", pindex); */
+	strindex++;
+	rawparams = (char *)strdup(strindex);
+	
+	if (pindex < 0) {
+	  fprintf(stderr, "parse error, test '%s' not found internally\n", linebuf);
+	} else {
+	  myconfig->testqueue[qindex] = myconfig->testpool[pindex];
+	  myconfig->testqueue[qindex].test_params = rawparams;
+	  qindex++;
+	}
+
+      }
+    }
+  }
+  fclose(fh);
+  free(linebuf);
+
+  return(0);
+}
+
+int lookup_test(config *myconfig, char *test_name) {
+  int i;
+  for (i=0; i<MAX_DISTINCT_TESTS; i++) {
+    if (myconfig->testpool[i].test_name != NULL) {
+      if (!strcmp(test_name, myconfig->testpool[i].test_name)) {
+	return(i);
+      }
+    }
+  }
+  return(-1);
+}
+
+void usage(void) {
+  printf("USAGE: pts <options>\nOPTIONS:\n\t--debug <debug_level>\n\t--conf </path/to/configfile>\n");
+}
+
+void pts_debug(char *format_str, ...) {
+  if (pts_config.debug) {
+    va_list arguments;
+    va_start(arguments, format_str);
+
+    vprintf(format_str, arguments);
+    
+    va_end(arguments);
+  }
+}
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-function.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-function.h	(revision 728)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-function.h	(revision 728)
@@ -0,0 +1,6 @@
+#ifndef INCLUDE_TESTFUNCTION_H
+#define INCLUDE_TESTFUNCTION_H
+
+int test_function(MPI_Comm *, int, char *buf, void *);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-vector-offset.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-vector-offset.h	(revision 2007)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-vector-offset.h	(revision 2007)
@@ -0,0 +1,6 @@
+#ifndef TEST_VECTOR_OFFSET_H
+#define TEST_VECTOR_OFFSET_H
+
+int test_vector_offset(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-null-params.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-null-params.c	(revision 6373)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-null-params.c	(revision 6373)
@@ -0,0 +1,714 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/* 
+ * test-null-params: tests behavior of all sys-init functions will paramater
+ * values set to null.
+ * Author: Michael Speth
+ * Date: 5/27/2003
+ * Last Updated: 6/26/2003
+ */
+
+#include <time.h>
+#include <sys/time.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "null_params.h"
+#include "pvfs2-util.h"
+#include "test-null-params.h"
+
+/* 
+ * Preconditions: none
+ * Postconditions: returs error code of sys initialize; however, I'm not sure what will happen if null params are passed into sys_init so this might seg-fault.
+ * Hase 1 test cases
+ */
+static int test_system_init(void)
+{
+    int ret = -1;
+
+    memset(&pvfs_helper, 0, sizeof(pvfs_helper));
+
+    ret = PVFS_util_init_defaults();
+    if(ret < 0)
+    {
+	PVFS_perror("PVFS_util_init_defaults", ret);
+	return(ret);
+    }
+
+    ret = PVFS_util_get_default_fsid(&pvfs_helper.fs_id);
+    if(ret < 0)
+    {
+	PVFS_perror("PVFS_util_get_default_fsid", ret);
+	return(ret);
+    }
+
+    pvfs_helper.initialized = 1;
+    pvfs_helper.num_test_files = NUM_TEST_FILES;
+
+    return 0;
+}
+
+/* Preconditions: none
+ * Parameters: nullCase - the test case that is checked for this function
+ * Postconditions: returns the error code given by lookup - thats if it doesn't segfault or other catostrophic failure
+ * Has 2 test cases
+ */
+static int test_lookup(int nullCase)
+{
+    int fs_id, ret;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lookup;
+    char *name;
+
+    ret = -2;
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "name");
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    PVFS_util_gen_credentials(&credentials);
+
+    switch (nullCase)
+    {
+    case 0:
+	ret = PVFS_sys_lookup(fs_id, NULL, &credentials,
+                              &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+	break;
+    case 1:
+	ret = PVFS_sys_lookup(fs_id, name, &credentials,
+                              NULL, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+	break;
+    default:
+	fprintf(stderr, "Error - not a case\n");
+    }
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: nullCase - the test case that is checked for this function
+ * Postconditions: returns error from getattr
+ * Has 1 Test Cases
+ */
+static int test_getattr(int nullCase)
+{
+    int fs_id, ret;
+    PVFS_credentials credentials;
+    PVFS_object_ref pinode_refn;
+    uint32_t attrmask;
+    PVFS_sysresp_lookup resp_lookup;
+    char *name;
+
+    ret = -2;
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "name");
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("ERROR UNABLE TO INIT SYSTEM INTERFACE\n");
+	return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    PVFS_util_gen_credentials(&credentials);
+
+    if ((ret = PVFS_sys_lookup(
+             fs_id, name, &credentials,
+             &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW)) < 0)
+    {
+	fprintf(stderr, "lookup failed %d\n", ret);
+	return ret;
+    }
+
+    pinode_refn = resp_lookup.ref;
+    attrmask = PVFS_ATTR_SYS_ALL_NOSIZE;
+
+    switch (nullCase)
+    {
+    case 0:
+	ret = PVFS_sys_getattr(pinode_refn, attrmask, &credentials, NULL);
+	break;
+    }
+    return ret;
+}
+
+/* Preconditions: None
+ * Parameters: nullCase - the test case that is checked for this function
+ * Postconditions:
+ */
+static int test_setattr(void)
+{
+    return -2;
+}
+
+/* Preconditions: None
+ * Parameters: nullCase - the test case that is checked for this function
+ * Postconditions: returns the error returned by mkdir
+ * Has 2 test cases
+ */
+static int test_mkdir(int nullCase)
+{
+    PVFS_object_ref parent_refn;
+    PVFS_sys_attr attr;
+    PVFS_sysresp_mkdir resp_mkdir;
+
+    int ret = -2;
+    int fs_id;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lookup;
+    char *name;
+
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "name");
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    PVFS_util_gen_credentials(&credentials);
+    if ((ret = PVFS_sys_lookup(
+             fs_id, name, &credentials, &resp_lookup,
+             PVFS2_LOOKUP_LINK_NO_FOLLOW)) < 0)
+    {
+	fprintf(stderr, "lookup failed %d\n", ret);
+	return -1;
+    }
+
+    parent_refn = resp_lookup.ref;
+    attr.owner = credentials.uid;
+    attr.group = credentials.gid;
+    attr.perms = 1877;
+    attr.atime = attr.mtime = attr.ctime = 
+	time(NULL);
+
+    switch (nullCase)
+    {
+    case 0:
+	ret = PVFS_sys_mkdir(NULL, parent_refn, attr, &credentials, &resp_mkdir);
+	break;
+    case 1:
+	ret = PVFS_sys_mkdir(name, parent_refn, attr, &credentials, NULL);
+	break;
+    default:
+	fprintf(stderr, "Error - no more cases\n");
+    }
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: nullCase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ * Has 1 Test cases
+ */
+static int test_readdir(int nullCase)
+{
+
+    int ret;
+
+    PVFS_object_ref pinode_refn;
+    PVFS_ds_position token;
+    int pvfs_dirent_incount;
+    PVFS_credentials credentials;
+
+    int fs_id;
+    PVFS_sysresp_lookup resp_lookup;
+    char *name;
+
+    ret = -2;
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "name");
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    PVFS_util_gen_credentials(&credentials);
+    if ((ret = PVFS_sys_lookup(
+             fs_id, name, &credentials,
+             &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW)) < 0)
+    {
+	fprintf(stderr, "lookup failed %d\n", ret);
+	return -1;
+    }
+
+    pinode_refn = resp_lookup.ref;
+    token = PVFS_READDIR_START;
+    pvfs_dirent_incount = 1;
+
+    switch (nullCase)
+    {
+    case 0:
+	ret =
+	    PVFS_sys_readdir(pinode_refn, token, pvfs_dirent_incount,
+			     &credentials, NULL);
+	break;
+    }
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: nullCase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ * Has 2 test cases
+ */
+static int test_create(int nullCase)
+{
+    int ret, fs_id;
+    PVFS_sys_attr attr;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_look;
+    PVFS_sysresp_create resp_create;
+    char *filename;
+
+    ret = -2;
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    PVFS_util_gen_credentials(&credentials);
+    attr.owner = credentials.uid;
+    attr.group = credentials.gid;
+    attr.perms = 1877;
+    attr.atime = attr.mtime = attr.ctime = time(NULL);
+
+    if (initialize_sysint())
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    ret = PVFS_sys_lookup(fs_id, "/", &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+	printf("Lookup failed with errcode = %d\n", ret);
+	return (-1);
+    }
+
+    switch (nullCase)
+    {
+    case 0:
+	ret =
+	    PVFS_sys_create(NULL, resp_look.ref, attr, &credentials,
+			    NULL, NULL, &resp_create);
+	break;
+    case 1:
+	ret =
+	    PVFS_sys_create(filename, resp_look.ref, attr, &credentials,
+			    NULL, NULL, NULL);
+	break;
+    default:
+	fprintf(stderr, "Error - incorect case number \n");
+	return -3;
+    }
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: nullCase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ * Has 1 test case
+ */
+static int test_remove(int nullCase)
+{
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_look;
+    char *filename;
+    int ret;
+    int fs_id;
+
+    ret = -2;
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    PVFS_util_gen_credentials(&credentials);
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT SYSTEM INTERFACE\n");
+	return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+	printf("Lookup failed with errcode = %d\n", ret);
+	return (-1);
+    }
+    switch (nullCase)
+    {
+    case 0:
+	ret = PVFS_sys_remove(NULL, resp_look.ref, &credentials);
+	break;
+    default:
+	fprintf(stderr, "Error: invalid case number \n");
+    }
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: nullCase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ */
+static int test_rename(void)
+{
+
+/*      return PVFS_sys_rename(old_name, old_parent_refn, new_name, new_parent_refn, credentials); */
+    return -2;
+}
+
+/* Preconditions: none
+ * Parameters: nullCase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ */
+static int test_symlink(void)
+{
+    return -2;
+}
+
+/* Preconditions: none
+ * Parameters: nullCase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ */
+static int test_readlink(void)
+{
+    return -2;
+}
+
+/* Preconditions: none
+ * Parameters: nullCase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ * Has 3 test cases
+ */
+static int test_read(int nullCase)
+{
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lk;
+    PVFS_Request req_io;
+    PVFS_sysresp_io resp_io;
+    char *filename;
+    char io_buffer[100];
+    int fs_id, ret;
+
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    memset(&req_io, 0, sizeof(PVFS_Request));
+    memset(&resp_io, 0, sizeof(PVFS_sysresp_io));
+
+    PVFS_util_gen_credentials(&credentials);
+    memset(&resp_lk, 0, sizeof(PVFS_sysresp_lookup));
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+	debug_printf("test_pvfs_datatype_hvector: lookup failed "
+		     "on %s\n", filename);
+    }
+
+    switch (nullCase)
+    {
+    case 0:
+	ret =
+	    PVFS_sys_read(resp_lk.ref, NULL, 0, io_buffer, NULL,
+			  &credentials, &resp_io);
+	break;
+    case 1:
+	ret =
+	    PVFS_sys_read(resp_lk.ref, req_io, 0, NULL, NULL, &credentials,
+			  &resp_io);
+	break;
+    case 2:
+	ret =
+	    PVFS_sys_read(resp_lk.ref, req_io, 0, io_buffer, NULL,
+			  &credentials, NULL);
+	break;
+    }
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: nullCase - the test case that is checked for this function
+ * Postconditions: returns error code of readdir
+ * Has 3 test cases
+ */
+static int test_write(int nullCase)
+{
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lk;
+    PVFS_Request req_io;
+    PVFS_sysresp_io resp_io;
+    char *filename;
+    char io_buffer[100];
+    int fs_id, ret;
+
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    memset(&req_io, 0, sizeof(PVFS_Request));
+    memset(&resp_io, 0, sizeof(PVFS_sysresp_io));
+
+    PVFS_util_gen_credentials(&credentials);
+    memset(&resp_lk, 0, sizeof(PVFS_sysresp_lookup));
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+	debug_printf("test_pvfs_datatype_hvector: lookup failed "
+		     "on %s\n", filename);
+    }
+
+    switch (nullCase)
+    {
+    case 0:
+	ret =
+	    PVFS_sys_write(resp_lk.ref, NULL, 0, io_buffer, NULL,
+			   &credentials, &resp_io);
+	break;
+    case 1:
+	ret =
+	    PVFS_sys_write(resp_lk.ref, req_io, 0, NULL, NULL, &credentials,
+			   &resp_io);
+	break;
+    case 2:
+	ret =
+	    PVFS_sys_write(resp_lk.ref, req_io, 0, io_buffer, NULL,
+			   &credentials, NULL);
+	break;
+    }
+    return ret;
+}
+
+static int init_file(void)
+{
+    int ret, fs_id;
+    PVFS_sys_attr attr;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_look;
+    PVFS_sysresp_create resp_create;
+    char *filename;
+
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    PVFS_util_gen_credentials(&credentials);
+    attr.owner = credentials.uid;
+    attr.group = credentials.gid;
+    attr.perms = 1877;
+    attr.atime = attr.mtime = attr.ctime = time(NULL);
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    fs_id = pvfs_helper.fs_id;
+
+    /* get root */
+    ret = PVFS_sys_lookup(fs_id, "/", &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+	printf("Lookup failed with errcode = %d\n", ret);
+	return (-1);
+    }
+
+    return PVFS_sys_create(filename, resp_look.ref, attr, &credentials,
+			   NULL, NULL, &resp_create);
+
+}
+
+/* Preconditions: Parameters must be valid
+ * Parameters: comm - special pts communicator, rank - the rank of the process, buf -  * (not used), rawparams - configuration information to specify which function to test
+ * Postconditions: 0 if no errors and nonzero otherwise
+ */
+int test_null_params(MPI_Comm * comm __unused,
+		     int rank,
+		     char *buf __unused,
+		     void *rawparams)
+{
+    int ret = -1;
+    null_params *params;
+
+    params = (null_params *) rawparams;
+    /* right now, the system interface isn't threadsafe, so we just want to run with one process. */
+    if (rank == 0)
+    {
+	if (params->p1 >= 0 && params->p2 >= 0)
+	{
+	    switch (params->p1)
+	    {
+	    case 0:
+		fprintf(stderr, "[test_null_params] test_system_init %d\n",
+			params->p2);
+		ret = test_system_init();
+		if(ret >= 0){
+		    PVFS_perror("test_system_init",ret);
+		    return ret;
+		}
+		return 0;
+	    case 1:
+		fprintf(stderr, "[test_null_params] test_lookup %d\n",
+			params->p2);
+		ret = test_lookup(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_lookup",ret);
+		    return ret;
+		}
+		return 0;
+	    case 2:
+		fprintf(stderr, "[test_null_params] test_getattr %d\n",
+			params->p2);
+		ret = test_getattr(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_getattr",ret);
+		    return ret;
+		}
+		return 0;
+	    case 3:
+		fprintf(stderr, "[test_null_params] test_setattr %d\n",
+			params->p2);
+		ret = test_setattr();
+		if(ret >= 0){
+		    PVFS_perror("test_setattr",ret);
+		    return ret;
+		}
+		return 0;
+	    case 4:
+		fprintf(stderr, "[test_null_params] test_mkdir %d\n",
+			params->p2);
+		ret = test_mkdir(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_mkdir",ret);
+		    return ret;
+		}
+		return 0;
+	    case 5:
+		fprintf(stderr, "[test_null_params] test_readdir %d\n",
+			params->p2);
+		ret = test_readdir(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_readdir",ret);
+		    return ret;
+		}
+		return 0;
+	    case 6:
+		fprintf(stderr, "[test_null_params] test_create %d\n",
+			params->p2);
+		ret = test_create(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_create",ret);
+		    return ret;
+		}
+		return 0;
+	    case 7:
+		fprintf(stderr, "[test_null_params] test_remove %d\n",
+			params->p2);
+		ret = test_remove(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_remove",ret);
+		    return ret;
+		}
+		return 0;
+	    case 8:
+		fprintf(stderr, "[test_null_params] test_rename %d\n",
+			params->p2);
+		ret = test_rename();
+		if(ret >= 0){
+		    PVFS_perror("test_rename",ret);
+		    return ret;
+		}
+		return 0;
+	    case 9:
+		fprintf(stderr, "[test_null_params] test_symlink %d\n",
+			params->p2);
+		ret = test_symlink();
+		if(ret >= 0){
+		    PVFS_perror("test_symlink",ret);
+		    return ret;
+		}
+		return 0;
+	    case 10:
+		fprintf(stderr, "[test_null_params] test_readlink %d\n",
+			params->p2);
+		ret = test_readlink();
+		if(ret >= 0){
+		    PVFS_perror("test_readlink",ret);
+		    return ret;
+		}
+		return 0;
+	    case 11:
+		fprintf(stderr, "[test_null_params] test_read %d\n",
+			params->p2);
+		ret = test_read(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_read",ret);
+		    return ret;
+		}
+		return 0;
+	    case 12:
+		fprintf(stderr, "[test_null_params] test_write %d\n",
+			params->p2);
+		ret = test_write(params->p2);
+		if(ret >= 0){
+		    PVFS_perror("test_write",ret);
+		    return ret;
+		}
+		return 0;
+	    case 99:
+		fprintf(stderr, "[test_null_params] init_file %d\n",
+			params->p2);
+		return init_file();
+	    default:
+		fprintf(stderr, "Error: invalid param\n");
+		return -2;
+	    }
+	}
+    }
+    return ret;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs-restart-server.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs-restart-server.h	(revision 1145)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs-restart-server.h	(revision 1145)
@@ -0,0 +1,6 @@
+#ifndef PVFS_RESTART_SERVER_H
+#define PVFS_RESTART_SERVER_H
+
+int pvfs_restart_server(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-init.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-init.h	(revision 728)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-init.h	(revision 728)
@@ -0,0 +1,9 @@
+#ifndef INCLUDE_TESTPVFSDATATYPEINIT_H
+#define INCLUDE_TESTPVFSDATATYPEINIT_H
+
+#include <mpi.h>
+#include <pts.h>
+
+int test_pvfs_datatype_init(MPI_Comm *mycomm, int myid, char *buf, void *params);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pts.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pts.h	(revision 3188)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pts.h	(revision 3188)
@@ -0,0 +1,51 @@
+#ifndef INCLUDE_PTS_H
+#define INCLUDE_PTS_H
+
+#include <mpi.h>
+#include <generic.h>
+
+#ifdef __GNUC__
+#  define __unused __attribute__((unused))
+#else
+#  define __unused
+#endif
+
+#define MAX_DISTINCT_TESTS 256
+#define MAX_RUN_TESTS 8192
+
+/* pts.c structs */
+typedef struct pts_test_t {
+  int (*test_func)(MPI_Comm *comm, int rank, char *buf, void *params);
+  void *(*test_param_init)(char *);
+  char *test_name;
+  char *test_params;
+  int test_index;
+} pts_test;
+
+typedef struct config_t {
+  int debug;
+  char *configfile;
+  pts_test testpool[MAX_DISTINCT_TESTS];
+  pts_test testqueue[MAX_RUN_TESTS];
+  int myid;
+  int numprocs;
+} config;
+
+
+
+/* pts.c prototypes */
+int init_config(config *);
+int parse_cmdline(int, char **, config *);
+int parse_configfile(config *);
+void usage(void);
+void pts_debug(char *, ...);
+int run_tests(config *);
+int run_test(int(*test)(MPI_Comm *comm, int rank, char *buf, void *params),
+  MPI_Comm *, int, char *, void *);
+void *run_param(void *(*param)(char *), char *);
+char *str_malloc(const char *);
+
+int sync_config(config *myconfig);
+int lookup_test(config *myconfig, char *test_name);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/README
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/README	(revision 2312)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/README	(revision 2312)
@@ -0,0 +1,148 @@
+# PVFS Testing Suite: PTS
+
+# Test harness structure
+
+PTS is an MPI program that is responsible for running a suite of tests
+based on a user supplied config file.  The system is also designed
+with the intention of making it trivial to add new tests.  This README
+outlines how to set up PTS and a PTS config file, as well as how to
+design/include your own tests.
+
+# Setting up PTS
+
+PTS only requires that you have a functional MPI devel/execution
+environment.  The system was designed and tested using mpich-1.2.3
+from ftp://ftp.mcs.anl.gov/mpi/mpich-1.2.3.tar.gz.
+
+After untarring the PTS tarball, inspect the Makefile to adjust the
+mpicc path and any other site specific options that are necessary for
+your site.  Run 'make'. The binary created is called 'pts' and is the
+only relevant binary in the entire system.  All tests are compiled
+into this binary.  Once compiled, one must create a config file with
+the following form:
+
+<test name>:<args>
+
+See the file 'sample.conf' for a sample config file that runs a few
+included tests.  Once all is set up, a command resembling the following will execute the test suite:
+
+mpirun -np 2 -machinefile <somemachines> ./pts -conf sample.conf
+
+If you are only running tests that execute on one host, you can run pts
+without mpirun.
+
+
+# Writing a PTS Test
+
+The PTS test environment gives the test programmer a lot of
+flexibility.  All tests must be written in C.  Each test must have a
+prototype that takes the following form:
+
+int function_name(MPI_Comm *mycomm, int myid, char *buf, void *rawparams);
+
+The 'mycomm' variable is set to an MPI_Comm allocated specifically for
+this test so as not to impact the harness communicator.  The 'myid' is
+of course the MPI id of the process running the function.  The 'buf'
+variable is space for storing text output from the test.  Finally the
+'rawparams' variable is a pointer to a structure containing parameter
+information about this specific test.
+
+As a test programmer, one can take two routes:
+
+a.) write a test function and use the generic parameter structure
+
+b.) define a custom parameter struct, write a parameter struct parser,
+and write a test function.
+
+For a.), all one must do is write a test function and rely on the
+generic parameter structure, which currently contains a member 'path'
+and a member 'mode', the values of which are specified in the pts
+config file.  For instance, a sample test function follows:
+
+int test_function(MPI_Comm *mycomm, int myid, char *buf, void *params) {
+  generic_params *myparams = (generic_params *)params;
+
+  fprintf(stderr, "%d: Trying to barrier on mycomm...\n", myid);
+  MPI_Barrier(*mycomm);
+
+  fprintf(stderr, "%d: here are my params: mode %d path %s\n",myid, 
+          myparams->mode, myparams->path);
+
+  return(0);
+}
+
+You must #include 'mpi.h' and 'pts.h' to get your test to compile
+correctly.
+
+If you decide to write your own parameter parser/parameter structure,
+you must handle the parsing yourself.  The parameter parser function
+will be called with in the following form:
+
+void *test_simple_mkdir_param_init(char *);
+
+The function will take a string (defined in the config file) and must
+return a pointer to your parameter struct.  An example of a parameter
+structure, parameter parser, and test function follows:
+
+/* Paramter struct */
+typedef struct test_simple_mkdir_params_t {
+  int mode;
+  char *path;
+  int myvalue;
+} test_simple_mkdir_params;
+
+/* Parameter parser */
+void *test_simple_mkdir_param_init(char *paramstr) {
+  test_simple_mkdir_params *myparams = malloc(sizeof(test_simple_mkdir_params));
+  char *tmpbuf = malloc(4096);
+  
+  sscanf(paramstr, "%d %s %d\n", &myparams->mode, tmpbuf, &myparams->myvalue);
+  myparams->path = (char *)str_malloc(tmpbuf);
+
+  free(tmpbuf);
+  return(myparams);
+
+}
+
+/* Test function itself */
+int test_simple_mkdir(MPI_Comm *mycomm, int myid, char *buf, void *params) {
+  test_simple_mkdir_params *myparams = (test_simple_mkdir_params *)params;
+  
+  printf("%d: my params %d %s %d\n", myid, myparams->mode, myparams->path, myparams->value);
+  return(0);
+}
+
+
+
+# Adding a Test
+
+Once your test code is written, it is trivial to add it to the PTS
+test harness.  Just follow the two steps below:
+
+1.) add the test code to the Makefile.  This is done by simply adding
+a 'test_function.o' line to the 'TESTS' variable at the top of the
+Makefile.
+
+2.) add a member to the test_types enum to represent your test (it's 
+going to be an index into the testpool array
+
+3.) add a pointer to the test function/param parser to test_protos.h.
+You will see a function 'setup_ptstests()' defined in test_protos.h,
+simply add an 'entry' for your new test.  Following is how we would
+add the test_simple_mkdir test from above:
+
+
+  myconfig->testpool[TEST_SIMPLE_MKDIR].test_func = test_simple_mkdir;	
+  myconfig->testpool[TEST_SIMPLE_MKDIR].test_param_init = test_simple_mkdir_param_init;
+  myconfig->testpool[TEST_SIMPLE_MKDIR].test_name = str_malloc("test_simple_mkdir");
+
+'test_name' should be the 'test name' part of your config file entry
+
+If your test does not require a custom parameter parser, simply leave
+out the line defining what test_param_init points to (you will get the
+default param parser).
+
+Have Fun!
+
+
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-hvector.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-hvector.c	(revision 3534)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-hvector.c	(revision 3534)
@@ -0,0 +1,120 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+#include <stdio.h>
+#include "pvfs-helper.h"
+#include "test-pvfs-datatype-hvector.h"
+
+int test_pvfs_datatype_hvector(
+    MPI_Comm *mycomm __unused,
+    int myid,
+    char *buf __unused,
+    void *params __unused)
+{
+    int ret = -1, i = 0, j = 0, num_ok = 0;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lk;
+    PVFS_Request req_io;
+    PVFS_Request req_mem;
+    PVFS_sysresp_io resp_io;
+    char filename[PVFS_NAME_MAX];
+    char io_buffer[TEST_PVFS_DATA_SIZE];
+
+    debug_printf("test_pvfs_datatype_hvector called\n");
+
+    memset(&req_io,0,sizeof(PVFS_Request));
+    memset(&req_mem,0,sizeof(PVFS_Request));
+    memset(&resp_io,0,sizeof(PVFS_sysresp_io));
+
+    if (!pvfs_helper.initialized)
+    {
+        debug_printf("test_pvfs_datatype_config cannot be initialized!\n");
+        return ret;
+    }
+
+    for(i = 0; i < TEST_PVFS_DATA_SIZE; i++)
+    {
+	int ti = (i % 26) + 65;
+        io_buffer[i] = (char) ti;
+    }
+
+    PVFS_util_gen_credentials(&credentials);
+
+    for(i = 0; i < pvfs_helper.num_test_files; i++)
+    {
+        snprintf(filename,PVFS_NAME_MAX,"%s%.5drank%d",
+                 TEST_FILE_PREFIX,i,myid);
+
+        memset(&resp_lk,0,sizeof(PVFS_sysresp_lookup));
+        ret = PVFS_sys_lookup(pvfs_helper.fs_id,
+                              filename, &credentials, &resp_lk,
+                              PVFS2_LOOKUP_LINK_NO_FOLLOW);
+        if (ret < 0)
+        {
+            debug_printf("test_pvfs_datatype_hvector: lookup failed "
+                         "on %s\n",filename);
+            break;
+        }
+
+        /* perform hvector I/O on the file handle */
+        ret = PVFS_Request_hvector(TEST_PVFS_DATA_SIZE,sizeof(char),1,
+                                   PVFS_BYTE, &req_io);
+        if(ret < 0)
+        {
+            debug_printf("Error: PVFS_Request_hvector() failure.\n");
+            break;
+        }
+	ret = PVFS_Request_contiguous(TEST_PVFS_DATA_SIZE*sizeof(char), 
+	    PVFS_BYTE, &req_mem);
+	if(ret < 0)
+	{
+	    debug_printf("Error: PVFS_Request_contiguous() failure.\n");
+	    break;
+	}
+
+        ret = PVFS_sys_write(resp_lk.ref, req_io, 0, io_buffer,
+                             req_mem, &credentials, &resp_io);
+        if(ret < 0)
+        {
+            debug_printf("Error: PVFS_sys_write() failure.\n");
+            break;
+        }
+
+        debug_printf("test_pvfsdatatype_hvector: wrote %d bytes.\n",
+                     (int)resp_io.total_completed);
+
+        /* now try to read the data back */
+        memset(io_buffer,0,TEST_PVFS_DATA_SIZE);
+        ret = PVFS_sys_read(resp_lk.ref, req_io, 0, io_buffer,
+                            req_mem, &credentials, &resp_io);
+        if(ret < 0)
+        {
+            debug_printf("Error: PVFS_sys_write() failure (2).\n");
+            break;
+        }
+
+        debug_printf("test_pvfs_datatype_hvector: read %d bytes.\n",
+                     (int)resp_io.total_completed);
+
+        /* finally, verify the data */
+        for(j = 0; j < TEST_PVFS_DATA_SIZE; j++)
+        {
+            if (io_buffer[j] != ((j % 26) + 65))
+            {
+                debug_printf("test_pvfs_datatype_hvector: data "
+                             "verification failed\n");
+                break;
+            }
+        }
+        if (j != TEST_PVFS_DATA_SIZE)
+        {
+            break;
+        }
+
+        num_ok++;
+    }
+    return ((num_ok == pvfs_helper.num_test_files) ? 0 : 1);
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-null-params.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-null-params.h	(revision 1145)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-null-params.h	(revision 1145)
@@ -0,0 +1,6 @@
+#ifndef TEST_NULL_PARAMS_H
+#define TEST_NULL_PARAMS_H
+
+int test_null_params(MPI_Comm *comm, int rank,  char *buf, void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/module.mk.in
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/module.mk.in	(revision 5663)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/module.mk.in	(revision 5663)
@@ -0,0 +1,51 @@
+DIR := correctness/pts
+
+TEST_PTS_SRC := $(DIR)/pts.c
+
+TEST_PTS_MISC := \
+	$(DIR)/create.c \
+	$(DIR)/generic-parser.c \
+	$(DIR)/pvfs-helper.c \
+	$(DIR)/test-pvfs-datatype-init.c \
+	$(DIR)/test-pvfs-datatype-contig.c \
+	$(DIR)/test-pvfs-datatype-vector.c \
+	$(DIR)/test-pvfs-datatype-hvector.c \
+	$(DIR)/test-path-lookup.c \
+	$(DIR)/test-lookup-bench.c \
+	$(DIR)/test-dir-operations.c \
+	$(DIR)/test-dir-torture.c \
+	$(DIR)/test-null-params.c \
+	$(DIR)/pvfs-restart-server.c \
+	$(DIR)/pvfs-stop-server.c \
+	$(DIR)/null-params-parser.c \
+	$(DIR)/test-invalid-files.c \
+	$(DIR)/test-uninitialized.c \
+	$(DIR)/test-finalized.c \
+	$(DIR)/test-misc.c \
+	$(DIR)/test-concurrent-meta.c \
+	$(DIR)/test-request-indexed.c \
+	$(DIR)/test-request-contiguous.c \
+	$(DIR)/test-encode-basic.c \
+	$(DIR)/test-noncontig-pattern.c \
+	$(DIR)/test-write-eof.c \
+	$(DIR)/test-vector-offset.c\
+	$(DIR)/test-vector-start-final-offset.c\
+	$(DIR)/test-contiguous-datatype.c \
+	$(DIR)/test-explicit-offset.c \
+	$(DIR)/test-request-tiled.c\
+	$(DIR)/test-mix.c \
+	$(DIR)/test-romio-noncontig-pattern2.c
+
+MPIMISCSRC += $(TEST_PTS_MISC)
+
+MPITESTSRC += $(TEST_PTS_SRC)
+
+# need client interface for all tests
+MODCFLAGS_$(DIR) = -I$(srcdir)/client/sysint
+
+#LOCALMPITESTS := $(patsubst %.c,%, $(TEST_PTS_SRC))
+#LOCALMPIOBJS := $(patsubst %.c,%.o, $(TEST_PTS_MISC))
+#$(LOCALMPITESTS): %: %.o $(LOCALMPIOBJS) lib/libpvfs2.a
+#	$(Q) "  MPILD		$@"
+#	$(E)$(MPICC) $^ $(LDFLAGS) $(LIBS) -o $@
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-hvector.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-hvector.h	(revision 728)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-hvector.h	(revision 728)
@@ -0,0 +1,9 @@
+#ifndef INCLUDE_TESTPVFSDATATYPEHVECTOR_H
+#define INCLUDE_TESTPVFSDATATYPEHVECTOR_H
+
+#include <mpi.h>
+#include <pts.h>
+
+int test_pvfs_datatype_hvector(MPI_Comm *mycomm, int myid, char *buf, void *params);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-finalized.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-finalized.c	(revision 6373)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-finalized.c	(revision 6373)
@@ -0,0 +1,580 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/* 
+ * test-finalized: the system is initialized and imediatly after
+ * finalize is called, then all other functions are tested thereafter
+ * Author: Michael Speth Date: 6/26/2003 Tab Size: 3
+ */
+
+#include <time.h>
+#include <sys/time.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "pvfs2-util.h"
+#include "null_params.h"
+#include "test-finalized.h"
+
+/* Preconditions: none
+ * Parameters: none
+ * Postconditions: returns the error code given by lookup - thats if it doesn't segfault or other catostrophic failure
+ * Hase 1 test cases
+ */
+static int test_lookup(void)
+{
+    int ret;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lookup;
+    char *name;
+
+    ret = -2;
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "name");
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    PVFS_sys_finalize();
+
+    PVFS_util_gen_credentials(&credentials);
+
+    ret = PVFS_sys_lookup(-1, name, &credentials,
+                          &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: none
+ * Postconditions: returns error from getattr
+ * Has 2 Test Cases
+ */
+static int test_getattr(void)
+{
+    int fs_id, ret;
+    PVFS_credentials credentials;
+    PVFS_object_ref pinode_refn;
+    uint32_t attrmask;
+    PVFS_sysresp_lookup resp_lookup;
+    PVFS_sysresp_getattr resp_getattr;
+    char *name;
+
+    ret = -2;
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "name");
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    PVFS_sys_finalize();
+    fs_id = pvfs_helper.fs_id;
+
+    PVFS_util_gen_credentials(&credentials);
+
+    if ((ret = PVFS_sys_lookup(
+             fs_id, name, &credentials,
+             &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW)) < 0)
+    {
+	fprintf(stderr, "lookup failed %d\n", ret);
+	return ret;
+    }
+
+    pinode_refn = resp_lookup.ref;
+    attrmask = PVFS_ATTR_SYS_ALL_NOSIZE;
+
+    ret = PVFS_sys_getattr(pinode_refn, attrmask, &credentials, &resp_getattr);
+    return ret;
+}
+
+/* Preconditions: None
+ * Parameters: none
+ * Postconditions:
+ */
+static int test_setattr(void)
+{
+    return -2;
+}
+
+/* Preconditions: None
+ * Parameters: none
+ * Postconditions: returns the error returned by mkdir
+ * Has 2 test cases
+ */
+static int test_mkdir(void)
+{
+    PVFS_object_ref parent_refn;
+    PVFS_sys_attr attr;
+    PVFS_sysresp_mkdir resp_mkdir;
+
+    int ret = -2;
+    int fs_id;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lookup;
+    char *name;
+
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "name");
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    PVFS_sys_finalize();
+    fs_id = pvfs_helper.fs_id;
+
+    PVFS_util_gen_credentials(&credentials);
+    if ((ret = PVFS_sys_lookup(
+             fs_id, name, &credentials,
+             &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW)) < 0)
+    {
+	fprintf(stderr, "lookup failed %d\n", ret);
+	return -1;
+    }
+
+    parent_refn = resp_lookup.ref;
+    attr.mask = PVFS_ATTR_SYS_ALL_SETABLE;
+    attr.owner = credentials.uid;
+    attr.group = credentials.gid;
+    attr.perms = 1877;
+    attr.atime = attr.mtime = attr.ctime = 
+	time(NULL);
+
+    ret = PVFS_sys_mkdir(name, parent_refn, attr, &credentials, &resp_mkdir);
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: none
+ * Postconditions: returns error code of readdir
+ * Has 2 Test cases
+ */
+static int test_readdir(void)
+{
+
+    int ret;
+
+    PVFS_object_ref pinode_refn;
+    PVFS_ds_position token;
+    int pvfs_dirent_incount;
+    PVFS_credentials credentials;
+    PVFS_sysresp_readdir resp_readdir;
+
+    int fs_id;
+    PVFS_sysresp_lookup resp_lookup;
+    char *name;
+
+    ret = -2;
+    name = (char *) malloc(sizeof(char) * 100);
+    name = strcpy(name, "name");
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    PVFS_sys_finalize();
+    fs_id = pvfs_helper.fs_id;
+
+    PVFS_util_gen_credentials(&credentials);
+    if ((ret = PVFS_sys_lookup(
+             fs_id, name, &credentials,
+             &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW)) < 0)
+    {
+	fprintf(stderr, "lookup failed %d\n", ret);
+	return -1;
+    }
+
+    pinode_refn = resp_lookup.ref;
+    token = PVFS_READDIR_START;
+    pvfs_dirent_incount = 1;
+
+    ret =
+	PVFS_sys_readdir(pinode_refn, token, pvfs_dirent_incount, &credentials,
+			 &resp_readdir);
+    return ret;
+}
+
+static int test_finalize(void)
+{
+    int ret = -2;
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    PVFS_sys_finalize();
+    ret = PVFS_sys_finalize();
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: none
+ * Postconditions: returns error code of readdir
+ * Has 2 test cases
+ */
+static int test_create(void)
+{
+    int ret, fs_id;
+    PVFS_sys_attr attr;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_look;
+    PVFS_sysresp_create resp_create;
+    char *filename;
+
+    ret = -2;
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    PVFS_util_gen_credentials(&credentials);
+    attr.owner = credentials.uid;
+    attr.group = credentials.gid;
+    attr.perms = 1877;
+    attr.atime = attr.mtime = attr.ctime = time(NULL);
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    PVFS_sys_finalize();
+    fs_id = pvfs_helper.fs_id;
+
+    ret = PVFS_sys_lookup(fs_id, "/", &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+	printf("Lookup failed with errcode = %d\n", ret);
+	return (-1);
+    }
+
+    ret =
+	PVFS_sys_create(filename, resp_look.ref, attr, &credentials,
+			NULL, NULL, &resp_create);
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: nnoe
+ * Postconditions: returns error code of readdir
+ * Has 2 tset cases
+ */
+static int test_remove(void)
+{
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_look;
+    char *filename;
+    int ret;
+    int fs_id;
+
+    ret = -2;
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    PVFS_util_gen_credentials(&credentials);
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    PVFS_sys_finalize();
+    fs_id = pvfs_helper.fs_id;
+
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+	printf("Lookup failed with errcode = %d\n", ret);
+	return (-1);
+    }
+    ret = PVFS_sys_remove(filename, resp_look.ref, &credentials);
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: none
+ * Postconditions: returns error code of readdir
+ */
+static int test_rename(void)
+{
+
+/*      return PVFS_sys_rename(old_name, old_parent_refn, new_name, new_parent_refn, credentials); */
+    return -2;
+}
+
+/* Preconditions: none
+ * Parameters: none
+ * Postconditions: returns error code of readdir
+ */
+static int test_symlink(void)
+{
+    return -2;
+}
+
+/* Preconditions: none
+ * Parameters: none
+ * Postconditions: returns error code of readdir
+ */
+static int test_readlink(void)
+{
+    return -2;
+}
+
+/* Preconditions: none
+ * Parameters: none
+ * Postconditions: returns error code of readdir
+ * Has 2 test cases
+ */
+static int test_read(void)
+{
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lk;
+    PVFS_Request req_io;
+    PVFS_Request req_mem;
+    PVFS_sysresp_io resp_io;
+    char *filename;
+    char io_buffer[100];
+    int fs_id, ret;
+
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    memset(&req_io, 0, sizeof(PVFS_Request));
+    memset(&req_mem, 0, sizeof(PVFS_Request));
+    memset(&resp_io, 0, sizeof(PVFS_sysresp_io));
+
+    PVFS_util_gen_credentials(&credentials);
+    memset(&resp_lk, 0, sizeof(PVFS_sysresp_lookup));
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    PVFS_sys_finalize();
+    fs_id = pvfs_helper.fs_id;
+
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+	debug_printf("test_pvfs_datatype_hvector: lookup failed "
+		     "on %s\n", filename);
+    }
+
+    ret =
+	PVFS_sys_read(resp_lk.ref, req_io, 0, io_buffer, req_mem, &credentials,
+		      &resp_io);
+    return ret;
+}
+
+/* Preconditions: none
+ * Parameters: none
+ * Postconditions: returns error code of readdir
+ * Has 2 test cases
+ */
+static int test_write(void)
+{
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lk;
+    PVFS_Request req_io;
+    PVFS_Request req_mem;
+    PVFS_sysresp_io resp_io;
+    char *filename;
+    char io_buffer[100];
+    int fs_id, ret;
+
+    filename = (char *) malloc(sizeof(char) * 100);
+    filename = strcpy(filename, "name");
+
+    memset(&req_io, 0, sizeof(PVFS_Request));
+    memset(&req_mem, 0, sizeof(PVFS_Request));
+    memset(&resp_io, 0, sizeof(PVFS_sysresp_io));
+
+    PVFS_util_gen_credentials(&credentials);
+    memset(&resp_lk, 0, sizeof(PVFS_sysresp_lookup));
+
+    if (initialize_sysint() < 0)
+    {
+	debug_printf("UNABLE TO INIT THE SYSTEM INTERFACE\n");
+	return -1;
+    }
+    PVFS_sys_finalize();
+    fs_id = pvfs_helper.fs_id;
+
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
+                          &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+	debug_printf("test_pvfs_datatype_hvector: lookup failed "
+		     "on %s\n", filename);
+    }
+
+    ret =
+	PVFS_sys_write(resp_lk.ref, req_io, 0, io_buffer, req_mem, &credentials,
+		       &resp_io);
+    return ret;
+}
+
+/* Preconditions: Parameters must be valid
+ * Parameters: comm - special pts communicator, rank - the rank of the process, buf -  * (not used), rawparams - configuration information to specify which function to test
+ * Postconditions: 0 if no errors and nonzero otherwise
+ */
+int test_finalized(MPI_Comm * comm __unused,
+		   int rank,
+		   char *buf __unused,
+		   void *rawparams)
+{
+    int ret = -1;
+    null_params *params;
+
+    params = (null_params *) rawparams;
+    /* right now, the system interface isn't threadsafe, so we just want to run with one process. */
+    if (rank == 0)
+    {
+	if (params->p1 >= 0 && params->p2 >= 0)
+	{
+	    switch (params->p1)
+	    {
+	    case 0:
+		fprintf(stderr, "[test_finalized] test_lookup %d\n",
+			params->p2);
+		ret = test_lookup();
+		if(ret >= 0){
+		    PVFS_perror("test_lookup",ret);
+		    return ret;
+		}
+		return 0;
+	    case 1:
+		fprintf(stderr, "[test_finalized] test_getattr %d\n",
+			params->p2);
+		ret = test_getattr();
+		if(ret >= 0){
+		    PVFS_perror("test_getattr",ret);
+		    return ret;
+		}
+		return 0;
+	    case 2:
+		fprintf(stderr, "[test_finalized] test_setattr %d\n",
+			params->p2);
+		ret = test_setattr();
+		if(ret >= 0){
+		    PVFS_perror("test_setattr",ret);
+		    return ret;
+		}
+		return 0;
+	    case 3:
+		fprintf(stderr, "[test_finalized] test_mkdir %d\n", params->p2);
+		ret = test_mkdir();
+		if(ret >= 0){
+		    PVFS_perror("test_mkdir",ret);
+		    return ret;
+		}
+		return 0;
+	    case 4:
+		fprintf(stderr, "[test_finalized] test_readdir %d\n",
+			params->p2);
+		ret = test_readdir();
+		if(ret >= 0){
+		    PVFS_perror("test_readdir",ret);
+		    return ret;
+		}
+		return 0;
+	    case 5:
+		fprintf(stderr, "[test_finalized] test_create %d\n",
+			params->p2);
+		ret = test_create();
+		if(ret >= 0){
+		    PVFS_perror("test_create",ret);
+		    return ret;
+		}
+		return 0;
+	    case 6:
+		fprintf(stderr, "[test_finalized] test_remove %d\n",
+			params->p2);
+		ret = test_remove();
+		if(ret >= 0){
+		    PVFS_perror("test_remove",ret);
+		    return ret;
+		}
+		return 0;
+	    case 7:
+		fprintf(stderr, "[test_finalized] test_rename %d\n",
+			params->p2);
+		ret = test_rename();
+		if(ret >= 0){
+		    PVFS_perror("test_rename",ret);
+		    return ret;
+		}
+		return 0;
+	    case 8:
+		fprintf(stderr, "[test_finalized] test_symlink %d\n",
+			params->p2);
+		ret = test_symlink();
+		if(ret >= 0){
+		    PVFS_perror("test_symlink",ret);
+		    return ret;
+		}
+		return 0;
+	    case 9:
+		fprintf(stderr, "[test_finalized] test_readlink %d\n",
+			params->p2);
+		ret = test_readlink();
+		if(ret >= 0){
+		    PVFS_perror("test_readlink",ret);
+		    return ret;
+		}
+		return 0;
+	    case 10:
+		fprintf(stderr, "[test_finalized] test_read %d\n", params->p2);
+		ret = test_read();
+		if(ret >= 0){
+		    PVFS_perror("test_read",ret);
+		    return ret;
+		}
+		return 0;
+	    case 11:
+		fprintf(stderr, "[test_finalized] test_write %d\n", params->p2);
+		ret = test_write();
+		if(ret >= 0){
+		    PVFS_perror("test_write",ret);
+		    return ret;
+		}
+		return 0;
+	    case 12:
+		fprintf(stderr, "[test_finalized] test_finalize %d\n",
+			params->p2);
+		ret = test_finalize();
+		if(ret >= 0){
+		    PVFS_perror("test_finalize",ret);
+		    return ret;
+		}
+		return 0;
+	    default:
+		fprintf(stderr, "Error: invalid param %d\n", params->p1);
+		return -2;
+	    }
+	}
+    }
+    return ret;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/null_params.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/null_params.h	(revision 1152)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/null_params.h	(revision 1152)
@@ -0,0 +1,12 @@
+#ifndef INCLUDE_NULL_PARAMS_H
+#define INCLUDE_NULL_PARAMS_H
+#include <sys/param.h>
+
+typedef struct null_params_t{
+	int p1;
+	int p2;
+} null_params;
+
+void *null_params_parser(char * stuff);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/sample.conf
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/sample.conf	(revision 2727)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/sample.conf	(revision 2727)
@@ -0,0 +1,12 @@
+# pvfs related tests
+
+test_create:--path=/ --mode=0
+test_pvfs_datatype_init:--path=/tmp/pvfs_datatype_init --mode=10
+test_pvfs_datatype_contig:--path=/tmp/pvfs_datatype_contig
+test_pvfs_datatype_vector:--path=/tmp/pvfs_datatype_vector
+test_pvfs_datatype_hvector:--path=/tmp/pvfs_datatype_hvector
+test_dir_torture:--path=/ --mode=2
+test_lookup_bench:--path=/ --mode=10
+test_dir_operations:--path=/dir_ops/ --mode=10
+test_path_lookup:--path=/ --mode=0
+
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-contig.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-contig.c	(revision 3534)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-contig.c	(revision 3534)
@@ -0,0 +1,120 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+#include <stdio.h>
+#include "pvfs-helper.h"
+#include "test-pvfs-datatype-contig.h"
+
+int test_pvfs_datatype_contig(
+    MPI_Comm *mycomm __unused,
+    int myid,
+    char *buf __unused,
+    void *params __unused)
+{
+    int ret = -1, i = 0, j = 0, num_ok = 0;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lk;
+    PVFS_sysresp_io resp_io;
+    PVFS_Request req_io;
+    PVFS_Request req_mem;
+    char filename[PVFS_NAME_MAX];
+    char io_buffer[TEST_PVFS_DATA_SIZE];
+
+    debug_printf("test_pvfs_datatype_contig called\n");
+
+    memset(&req_io,0,sizeof(PVFS_Request));
+    memset(&req_mem,0,sizeof(PVFS_Request));
+    memset(&resp_io,0,sizeof(PVFS_sysresp_io));
+
+    if (!pvfs_helper.initialized)
+    {
+        debug_printf("test_pvfs_datatype_config cannot be initialized!\n");
+        return ret;
+    }
+
+    for(i = 0; i < TEST_PVFS_DATA_SIZE; i++)
+    {
+	int ti = (i % 26) + 65;
+        io_buffer[i] = (char) ti;
+    }
+
+    PVFS_util_gen_credentials(&credentials);
+
+    for(i = 0; i < pvfs_helper.num_test_files; i++)
+    {
+        snprintf(filename,PVFS_NAME_MAX,"%s%.5drank%d",
+                 TEST_FILE_PREFIX,i,myid);
+
+        memset(&resp_lk,0,sizeof(PVFS_sysresp_lookup));
+        ret = PVFS_sys_lookup(pvfs_helper.fs_id,
+                              filename, &credentials, &resp_lk,
+                              PVFS2_LOOKUP_LINK_NO_FOLLOW);
+        if (ret < 0)
+        {
+            debug_printf("test_pvfs_datatype_contig: lookup failed "
+                         "on %s\n",filename);
+            break;
+        }
+
+        /* perform contig I/O on the file handle */
+        ret = PVFS_Request_contiguous(TEST_PVFS_DATA_SIZE,
+                                      PVFS_BYTE, &req_io);
+        if(ret < 0)
+        {
+            debug_printf("Error: PVFS_Request_contiguous() failure.\n");
+            break;
+        }
+	ret = PVFS_Request_contiguous(TEST_PVFS_DATA_SIZE,
+                                      PVFS_BYTE, &req_mem);
+        if(ret < 0)
+        {
+            debug_printf("Error: PVFS_Request_contiguous() failure.\n");
+            break;
+        }
+
+        ret = PVFS_sys_write(resp_lk.ref, req_io, 0, io_buffer,
+                             req_mem, &credentials, &resp_io);
+        if(ret < 0)
+        {
+            debug_printf("Error: PVFS_sys_write() failure.\n");
+            break;
+        }
+
+        debug_printf("test_pvfsdatatype_contig: wrote %d bytes.\n",
+                     (int)resp_io.total_completed);
+
+        /* now try to read the data back */
+        memset(io_buffer,0,TEST_PVFS_DATA_SIZE);
+        ret = PVFS_sys_read(resp_lk.ref, req_io, 0, io_buffer,
+                            req_mem, &credentials, &resp_io);
+        if(ret < 0)
+        {
+            debug_printf("Error: PVFS_sys_read() failure (2).\n");
+            break;
+        }
+
+        debug_printf("test_pvfs_datatype_contig: read %d bytes.\n",
+                     (int)resp_io.total_completed);
+
+        /* finally, verify the data */
+        for(j = 0; j < TEST_PVFS_DATA_SIZE; j++)
+        {
+            if (io_buffer[j] != ((j % 26) + 65))
+            {
+                debug_printf("test_pvfs_datatype_contig: data "
+                             "verification failed\n");
+                break;
+            }
+        }
+        if (j != TEST_PVFS_DATA_SIZE)
+        {
+            break;
+        }
+
+        num_ok++;
+    }
+    return ((num_ok == pvfs_helper.num_test_files) ? 0 : 1);
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-finalized.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-finalized.h	(revision 2312)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-finalized.h	(revision 2312)
@@ -0,0 +1,9 @@
+#ifndef INCLUDE_FINALIZED_H
+#define INCLUDE_FINALIZED_H
+
+int test_finalized(MPI_Comm * comm,
+		   int rank,
+		   char *buf,
+		   void *rawparams);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-contig.h
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-contig.h	(revision 728)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-pvfs-datatype-contig.h	(revision 728)
@@ -0,0 +1,9 @@
+#ifndef INCLUDE_TESTPVFSDATATYPECONTIG_H
+#define INCLUDE_TESTPVFSDATATYPECONTIG_H
+
+#include <mpi.h>
+#include <pts.h>
+
+int test_pvfs_datatype_contig(MPI_Comm *mycomm, int myid, char *buf, void *params);
+
+#endif
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs-helper.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs-helper.c	(revision 3543)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/pvfs-helper.c	(revision 3543)
@@ -0,0 +1,176 @@
+#include <time.h>
+
+#include "pint-sysint-utils.h"
+#include "pvfs-helper.h"
+#include "pvfs2-util.h"
+
+pvfs_helper_t pvfs_helper;
+
+int initialize_sysint(void)
+{
+    int ret = -1;
+
+    memset(&pvfs_helper,0,sizeof(pvfs_helper));
+
+    ret = PVFS_util_init_defaults();
+    if(ret < 0)
+    {
+	PVFS_perror("PVFS_util_init_defaults", ret);
+	return(ret);
+    }
+
+    ret = PVFS_util_get_default_fsid(&pvfs_helper.fs_id);
+    if(ret < 0)
+    {
+	PVFS_perror("PVFS_util_get_default_fsid", ret);
+	return(ret);
+    }
+
+    pvfs_helper.initialized = 1;
+    pvfs_helper.num_test_files = NUM_TEST_FILES;
+
+    gossip_debug(GOSSIP_CLIENT_DEBUG,"sysint intialized\n");
+    return 0;
+}
+
+int finalize_sysint(void)
+{
+    int ret = PVFS_sys_finalize();
+    pvfs_helper.initialized = 0;
+    return ret;
+}
+
+/*
+ * helper function to fill in the root pinode_refn
+ * fs_id:   fsid of our file system
+ *
+ * returns:  0 on success; 
+ *      -1 if a problem
+ */
+int get_root(PVFS_fs_id fs_id, PVFS_object_ref *pinode_refn)
+{
+    int ret = -1;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_look;
+    char *root = "/";
+
+    if (pinode_refn)
+    {
+        memset(&resp_look, 0, sizeof(resp_look));
+
+        PVFS_util_gen_credentials(&credentials);
+
+        printf("looking up the root handle for fsid = %d\n", fs_id);
+        ret = PVFS_sys_lookup(fs_id, root, &credentials,
+                              &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
+        if (ret < 0)
+        {
+            printf("Lookup failed with errcode = %d\n", ret);
+        }
+        memcpy(pinode_refn, &resp_look.ref,
+               sizeof(PVFS_object_ref));
+    }
+    return ret;
+}
+
+int create_dir(PVFS_object_ref parent_refn, char *name,
+               PVFS_object_ref *out_refn)
+{
+    int ret = -1;
+    PVFS_sys_attr attr;
+    PVFS_credentials credentials;
+    PVFS_sysresp_mkdir resp_mkdir;
+
+    memset(&attr, 0, sizeof(PVFS_sys_attr));
+    memset(&resp_mkdir, 0, sizeof(resp_mkdir));
+
+    PVFS_util_gen_credentials(&credentials);
+
+    attr.owner = credentials.uid;
+    attr.group = credentials.gid;
+    attr.atime = attr.mtime = attr.ctime = 
+	time(NULL);
+    attr.perms = (PVFS_U_WRITE | PVFS_U_READ);
+    attr.mask = PVFS_ATTR_SYS_ALL_SETABLE;
+
+    ret = PVFS_sys_mkdir(name, parent_refn,
+                         attr, &credentials, &resp_mkdir);
+    if (ret < 0)
+    {
+        printf("mkdir failed\n");
+        return (-1);
+    }
+    if (out_refn)
+    {
+        memset(out_refn, 0, sizeof(PVFS_object_ref));
+        memcpy(out_refn, &resp_mkdir.ref,
+               sizeof(PVFS_object_ref));
+    }
+    return 0;
+}
+
+/*
+ * simple helper to remove a pvfs2 file
+ *
+ * returns 0 on success.
+ *          -1 if some error happened.
+ */
+int remove_file(PVFS_object_ref parent_refn, char *name)
+{
+    int ret = -1;
+    PVFS_credentials credentials;
+
+    PVFS_util_gen_credentials(&credentials);
+
+    ret = PVFS_sys_remove(name, parent_refn, &credentials);
+    if (ret < 0)
+    {
+        printf("remove failed\n");
+        return ret;
+    }
+    return 0;
+}
+
+/*
+ * simple helper to remove a pvfs2 dir
+ *
+ * returns 0 on success.
+ *          -1 if some error happened.
+ */
+int remove_dir(PVFS_object_ref parent_refn, char *name)
+{
+    return remove_file(parent_refn, name);
+}
+
+/*
+ * simple helper to lookup a handle given a filename
+ *
+ * returns a handle to the new directory
+ *          -1 if some error happened
+ */
+int lookup_name(PVFS_object_ref pinode_refn, char *name,
+                PVFS_object_ref *out_refn)
+{
+    int ret = -1;
+    PVFS_credentials credentials;
+    PVFS_sysresp_lookup resp_lookup;
+
+    memset(&resp_lookup, 0, sizeof(resp_lookup));
+
+    PVFS_util_gen_credentials(&credentials);
+
+    ret = PVFS_sys_lookup(pinode_refn.fs_id, name,
+                          &credentials, &resp_lookup,
+                          PVFS2_LOOKUP_LINK_NO_FOLLOW);
+    if (ret < 0)
+    {
+       printf("Lookup failed with errcode = %d\n", ret);
+       return(-1);
+    }
+    if (out_refn)
+    {
+        memcpy(out_refn, &resp_lookup.ref,
+               sizeof(PVFS_object_ref));
+    }
+    return 0;
+}
Index: /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-romio-noncontig-pattern2.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-romio-noncontig-pattern2.c	(revision 5825)
+++ /tags/B2O-Blue-Sync-Temp-End/test/correctness/pts/test-romio-noncontig-pattern2.c	(revision 5825)
@@ -0,0 +1,224 @@
+/*
+ * (C) 2002 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+
+/*
+ * Author: Michael Speth, Testing code written & designed by Phil C.
+ * Date: 9/3/2003
+ * Last Updated: 9/3/2003
+ */
+
+#include <time.h>
+#include <sys/time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include<assert.h>
+
+#include <pint-request.h>
+#include <pint-distribution.h>
+#include <pvfs2-debug.h>
+#include "client.h"
+#include "mpi.h"
+#include "pts.h"
+#include "pvfs-helper.h"
+#include "pvfs2-util.h"
+#include "test-romio-noncontig-pattern2.h"
+#define SEGMAX 16
+#define BYTEMAX (4*1024*1024)
+
+/*
+ * Parameters: none
+ * Returns 0 on success and -1 on failure (ie - the segment offsets
+ * were not calcuated correctly by Request_indexed
+ */
+static int test_romio_noncontig2(void){
+   int i;
+   PINT_Request *file_req;
+   PINT_Request *mem_req;
+   PINT_Request_state *mem_state;
+   PINT_Request_state *file_state;
+   PINT_Request_state *file_state_server;
+   PINT_request_file_data rf1;
+   PINT_Request_result seg1;
+   int32_t* len_array = NULL;
+   PVFS_offset* off_array = NULL;
+   PVFS_size total_bytes_client = 0;
+   PVFS_size total_bytes_server = 0;
+    int totalsize = 0;
+    int j;
+                                                                                                                                                       
+   /* PVFS_Process_request arguments */
+   int retval;
+                                                                                                                                                       
+   len_array = (int32_t*)malloc(64*sizeof(int32_t));
+   off_array = (PVFS_offset*)malloc(64*sizeof(PVFS_offset));
+   assert(len_array != NULL && off_array != NULL);
+                                                                                                                                                       
+   /* setup file datatype */
+   PVFS_Request_contiguous(256, PVFS_BYTE, &file_req);
+                                                                                                                                                       
+   /* setup mem datatype */
+   len_array[0] = 0;
+   off_array[0] = 135295720;
+   for(i=0; i<64; i++)
+   {
+       len_array[i] = 4;
+       off_array[i] = 135313976 + i*8;
+	totalsize += 4;
+   }
+   PVFS_Request_hindexed(64, len_array, off_array, PVFS_BYTE, &mem_req);
+                                                                                                                                                       
+   mem_state = PINT_new_request_state(mem_req);
+   file_state = PINT_new_request_state(file_req);
+   file_state_server = PINT_new_request_state(file_req);
+                                                                                                                                                       
+   /* set up file data for request */
+   rf1.server_nr = 0;
+   rf1.server_ct = 1;
+   rf1.fsize = 0;
+   rf1.dist = PINT_dist_create("simple_stripe");
+   rf1.extend_flag = 1;
+   PINT_dist_lookup(rf1.dist);
+                                                                                                                                                       
+   /* set up result struct */
+   seg1.offset_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+   seg1.size_array = (int64_t *)malloc(SEGMAX * sizeof(int64_t));
+   seg1.bytemax = BYTEMAX;
+   seg1.segmax = SEGMAX;
+   seg1.bytes = 0;
+   seg1.segs = 0;
+                                                                                                                                                       
+                                                                                                                                                       
+   PINT_REQUEST_STATE_SET_TARGET(file_state, 0);
+   PINT_REQUEST_STATE_SET_FINAL(file_state, PINT_REQUEST_TOTAL_BYTES(mem_req));
+   PINT_REQUEST_STATE_SET_TARGET(file_state_server, 0);
+   PINT_REQUEST_STATE_SET_FINAL(file_state_server, PINT_REQUEST_TOTAL_BYTES(mem_req));
+                                                                                                                                                       
+                                                                                                                                                       
+   /* Turn on debugging */
+   /* gossip_enable_stderr(); */
+   /* gossip_set_debug_mask(1,REQUEST_DEBUG); */
+                                                                                                                                                       
+    j = 0;
+   do
+   {
+      seg1.bytes = 0;
+      seg1.segs = 0;
+                                                                                                                                                       
+      /* process request */
+      retval = PINT_process_request(file_state, mem_state, &rf1, &seg1, PINT_CLIENT);
+                                                                                                                                                       
+      if(retval >= 0)
+      {
+         total_bytes_client += seg1.bytes;
+         for(i=0; i<seg1.segs; i++,j++)
+         {
+	    if((int)seg1.offset_array[i] != off_array[j]){
+		printf("Error: segment %d offset is %d but should be %d\n",i,(int)seg1.offset_array[i],(int)off_array[j]);
+		return -1;
+	    }
+	    else if((int)seg1.size_array[i] != len_array[j]){
+		printf("Error: segment %d size is %d but should be %d\n",i,(int)seg1.size_array[i],len_array[j]);
+		return -1;
+	    }
+         }
+      }
+   } while(!PINT_REQUEST_DONE(file_state) && retval >= 0);
+                                                                                                                                                       
+   if(retval < 0)
+   {
+      fprintf(stderr, "Error: PINT_Process_request() failure.\n");
+      return(-1);
+   }
+   if(PINT_REQUEST_DONE(file_state))
+   {
+/*      printf("**** request done.\n");
+*/
+   }
+                                                                                                                                                       
+/*   printf("\nSERVER ************************************\n");
+*/
+   do
+   {
+      seg1.bytes = 0;
+      seg1.segs = 0;
+                                                                                                                                                       
+      /* process request */
+      retval = PINT_process_request(file_state_server, NULL, &rf1, &seg1, PINT_SERVER);
+                                                                                                                                                       
+      if(retval >= 0)
+      {
+         total_bytes_server += seg1.bytes;
+         for(i=0; i<seg1.segs; i++)
+         {
+	    if(totalsize != (int)seg1.size_array[i]){
+		printf("Error: total size for server %d is %d but should be %d\n",i,(int)seg1.size_array[i],totalsize);
+		return -1;
+	    }
+         }
+      }
+                                                                                                                                                       
+   } while(!PINT_REQUEST_DONE(file_state_server) && retval >= 0);
+                                                                                                                                                       
+   if(retval < 0)
+   {
+      fprintf(stderr, "Error: PINT_Process_request() failure.\n");
+      return(-1);
+   }
+   if(PINT_REQUEST_DONE(file_state_server))
+   {
+/*
+      printf("**** request done.\n");
+*/
+   }
+                                                                                                                                                       
+/*
+   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)
+   {
+/*
+       printf("SUCCESS.\n");
+*/
+	return 0;
+   }
+   else
+   {
+/*
+       printf("FAILURE!!!\n");
+*/
+	return -1;
+   }
+}
+
+/* Preconditions: None
+ * Parameters: comm - special pts communicator, rank - the rank of the process,
+ * buf - not used
+ * Postconditions: 0 if no errors and nonzero otherwise
+ */
+int test_romio_noncontig_pattern2(MPI_Comm * comm __unused,
+		     int rank,
+		     char *buf __unused,
+		     void *rawparams __unused)
+{
+    int ret = -1;
+
+    if (rank == 0)
+    {
+	ret = test_romio_noncontig2();
+    }
+    return ret;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Index: /tags/B2O-Blue-Sync-Temp-End/test/prepare
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/prepare	(revision 6209)
+++ /tags/B2O-Blue-Sync-Temp-End/test/prepare	(revision 6209)
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if aclocal -I ../maint/config && autoheader && autoconf ; then
+	echo "configure script successfully regenerated"
+else
+	echo "some part of configure regeneration failed"
+fi
Index: /tags/B2O-Blue-Sync-Temp-End/test/posix/xio_test.c
===================================================================
--- /tags/B2O-Blue-Sync-Temp-End/test/posix/xio_test.c	(revision 5901)
+++ /tags/B2O-Blue-Sync-Temp-End/test/posix/xio_test.c	(revision 5901)
@@ -0,0 +1,306 @@
+/*
+ * (C) 2001 Clemson University and The University of Chicago
+ *
+ * See COPYING in top-level directory.
+ */
+#undef _FILE_OFFSET_BITS
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/uio.h>
+#include <assert.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <time.h>
+#include <linux/unistd.h>
+
+#if defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__)
+#define __NR_readx  321
+#define __NR_writex 322
+#elif defined (x86_64) || defined (__x86_64__)
+#define __NR_readx  280
+#define __NR_writex 281
+#endif
+#define BUFSIZE 65536
+
+static int bufsize = BUFSIZE;
+
+struct xtvec {
+	off_t xtv_off;
+	size_t xtv_len;
+};
+
+
+/* the _syscallXX apprroach is not portable. instead, we'll use syscall and
+ * sadly forego any type checking.  For reference, here are the prototypes for
+ * the system calls       
+static ssize_t readx(unsigned long fd,
+		const struct iovec * iov, unsigned long iovlen, 
+		const struct xtvec * xtv, unsigned long xtvlen);
+static ssize_t writex(unsigned long fd, 
+		const struct iovec * iov, unsigned long iovlen,
+		const struct xtvec * xtv, unsigned long xtvlen);
+*/
+
+#ifndef min
+#define min(a, b) (a) < (b) ? (a) : (b)
+#endif
+
+#ifndef max
+#define max(a, b) (a) > (b) ? (a) : (b)
+#endif
+
+#ifndef Ld
+#define Ld(x) (x)
+#endif
+
+#ifndef FNAME
+#define FNAME "/tmp/test.out"
+#endif
+
+static int mem_ct = 25, str_ct = 25;
+static double Wtime(void);
+static char *fname = FNAME;
+
+static void parse(int argc, char *argv[])
+{
+	int c;
+	while ((c = getopt(argc, argv, "f:b:m:s:")) != EOF) {
+		switch (c) {
+			case 'f':
+				fname = optarg;
+				break;
+			case 'b':
+				bufsize = atoi(optarg);
+				break;
+			case 'm':
+				mem_ct = atoi(optarg);
+				break;
+			case 's':
+				str_ct = atoi(optarg);
+				break;
+			default:
+				fprintf(stderr, "Usage: %s -f <filename> -m <mem count max> -s <stream count max> -b <buffer size>\n", argv[0]);
+				exit(1);
+		}
+	}
+	if (mem_ct <= 0 || str_ct <= 0 || bufsize <= 0)
+	{
+		fprintf(stderr, "Usage: %s -f <filename> -m <mem count max> -s <stream count max> -b <buffer size>\n", argv[0]);
+		exit(1);
+	}
+	return;
+}
+
+static ssize_t do_writex(struct iovec *iov, unsigned long ivlen, struct xtvec *xtv, unsigned long xtvlen)
+{
+	int fd;
+	ssize_t ret;
+	double time1, time2;
+	fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, 0700);
+	time1 = Wtime();
+	ret = syscall(__NR_writex, fd, iov, ivlen, xtv, xtvlen);
+	time2 = Wtime();
+	if (ret < 0)
+	{
+		perror("writex:");
+		exit(1);
+	}
+	close(fd);
+	printf("writex: %ld bytes in %g sec: %g MB/sec\n", (long) ret, (time2 - time1), ret * 1e-06/(time2 - time1));
+	return ret;
+}
+
+static ssize_t do_readx(struct iovec *iov, unsigned long ivlen, struct xtvec *xtv, unsigned long xtvlen)
+{
+	int fd;
+	ssize_t ret;
+	double time1, time2;
+	fd = open(fname, O_RDONLY);
+	time1 = Wtime();
+	ret = syscall(__NR_readx, fd, iov, ivlen, xtv, xtvlen);
+	time2 = Wtime();
+	if (ret < 0)
+	{
+		perror("readx:");
+		exit(1);
+	}
+	close(fd);
+	printf("readx: %ld bytes in %g sec: %g MB/sec\n", (long) ret, (time2 - time1), ret * 1e-06/(time2 - time1));
+	return ret;
+}
+
+
+static void fillup_buffers(char ***ptr, int nr_segs, int fill)
+{
+	int i;
+	*ptr = (char **) malloc(nr_segs * sizeof(char *));
+	for (i = 0; i < nr_segs; i++) 
+	{
+		char *p;
+		p = (*ptr)[i] = (char *) calloc(1, bufsize);
+		if (fill)
+		{
+			int j;
+			for (j = 0; j < bufsize; j++) {
+				*((char *) p + j) = 'a' + j % 26;
+			}
+		}
+	}
+	return;
+}
+
+static void free_buffers(char **ptr, int nr_segs)
+{
+	int i;
+	for (i = 0; i < nr_segs; i++) {
+		if (ptr[i])
+			free(ptr[i]);
+	}
+	free(ptr);
+}
+
+static int compare_buffers(struct iovec *iov1, struct iovec *iov2, int count)
+{
+	int i, j;
+	for (i = 0; i < count; i++) 
+	{
+		if (iov1[i].iov_len != iov2[i].iov_len)
+		{
+			fprintf(stderr, "length mismatch\n");
+			break;
+		}
+		for (j = 0; j < iov1[i].iov_len; j++)
+		{
+			if (*((char *)iov1[i].iov_base + j) != *((char *) iov2[i].iov_base + j))
+			{
+				fprintf(stderr, "index %d, char %d in streamsize %ld\n",
+						i, j, (long) iov1[i].iov_len);
+				break;
+			}
+		}
+		if (j != iov1[i].iov_len)
+			break;
+		/*
+		if (memcmp(iov1[i].iov_base, iov2[i].iov_base, iov1[i].iov_len) == 0)
+		