Index: trunk/psLib/test/collections/tst_psList.c
===================================================================
--- trunk/psLib/test/collections/tst_psList.c	(revision 1190)
+++ trunk/psLib/test/collections/tst_psList.c	(revision 1193)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-06-29 23:18:00 $
+ *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-08 01:05:01 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -28,20 +28,20 @@
 
 testDescription tests[] = {
-                              {testListAlloc,"487-testListAlloc",0},
-                              {testListAdd,"488-testListAdd",0},
-                              {testListGet,"489-testListGet",0},
-                              {testListRemove,"490-testListRemove",0},
-                              {testListConvert,"491-testListConvert",0},
-                              {testListIterator,"494-testListIterator",0},
-                              {testListFree,"627-testListFree",0},
-                              {testListSort,"624-testListSort",0},
+                              {testListAlloc,487,"psListAlloc",0,false},
+                              {testListAdd,488,"psListAdd",0,false},
+                              {testListGet,489,"psListGet",0,false},
+                              {testListRemove,490,"psListRemove",0,false},
+                              {testListConvert,491,"psListConvert",0,false},
+                              {testListIterator,494,"psListIterator",0,false},
+                              {testListFree,627,"psListFree",0,false},
+                              {testListSort,624,"psListSort",0,false},
                               {NULL}
                           };
 
-int main()
+int main(int argc, char* argv[])
 {
     psLogSetLevel(PS_LOG_INFO);
 
-    if (! runTestSuite(stderr,"psList",tests)) {
+    if (! runTestSuite(stderr,"psList",tests,argc,argv) ) {
         psError(__FILE__,"One or more tests failed");
         return 1;
@@ -138,12 +138,9 @@
 
     //  1. list is NULL (error)
-    list = psListAdd(NULL,data,PS_LIST_HEAD);
-
-    if (list != NULL) {
-        psError(__func__,"psListAdd was given a NULL list, but returned a non-NULL list.");
-        return 1;
-    }
-
-    //  2. data is NULL (error, list should not grow)
+    if (psListAdd(NULL,data,PS_LIST_HEAD)) {
+        psError(__func__,"psListAdd was given a NULL list, but returned a true/success.");
+        return 1;
+    }
+
     list = psListAlloc(data);
     psFree(data);
@@ -153,8 +150,11 @@
     }
 
-    list = psListAdd(list, NULL,PS_LIST_HEAD);
-
-    if (list->size != 1) {
-        psError(__func__,"psListAdd with a NULL data element changed the list size.");
+    //  2. data is NULL (error, list should not grow)
+    if (psListAdd(list, NULL,PS_LIST_HEAD)) {
+        psError(__func__,"psListAdd successfully added a NULL data item?");
+        return 40;
+    }
+    if ( list->size != 1) {
+        psError(__func__,"psListAdd with a NULL data element changed the list size or returned success.");
         return 3;
     }
@@ -163,5 +163,9 @@
     data = psAlloc(sizeof(int));
     *data = 2;
-    list = psListAdd(list,data,PS_LIST_HEAD);
+    if ( ! psListAdd(list,data,PS_LIST_HEAD) ) {
+        psError(__func__,"psListAdd failed to add a data item to head.");
+        return 21;
+    }
+
     if (psMemGetRefCounter(data) != 2) {
         psError(__func__,"psListAdd didn't increment the data reference count.");
@@ -169,4 +173,5 @@
     }
     psFree(data);
+
     // verify that the size incremented
     if (list->size != 2) {
@@ -183,8 +188,12 @@
     data = psAlloc(sizeof(int));
     *data = 3;
-    list = psListAdd(list,data,PS_LIST_TAIL);
+    if ( ! psListAdd(list,data,PS_LIST_TAIL) ) {
+        psError(__func__,"psListAdd failed to add a data item to tail.");
+        return 21;
+    }
+
     if (psMemGetRefCounter(data) != 2) {
         psError(__func__,"psListAdd didn't increment the data reference count.");
-        return 20;
+        return 22;
     }
     psFree(data);
@@ -211,13 +220,17 @@
     data = psAlloc(sizeof(int));
     *data = 4;
-    psLogMsg(__func__,PS_LOG_INFO,"Following should warn with invalid insert location");
-    list = psListAdd(list,data,-10);
-    if (psMemGetRefCounter(data) != 2) {
-        psError(__func__,"psListAdd didn't increment the data reference count.");
-        return 20;
-    }
-    psFree(data);
-    // verify that the size incremented
-    if (list->size != 4 || *(int*)list->head->data != 4) {
+    psLogMsg(__func__,PS_LOG_INFO,"Following should error with invalid insert location");
+
+    if ( psListAdd(list,data,-10) ) {
+        psError(__func__,"psListAdd successfully added data to a -10 position?");
+        return 30;
+    }
+    if (psMemGetRefCounter(data) != 1) {
+        psError(__func__,"psListAdd incremented the data reference count.");
+        return 24;
+    }
+    psFree(data);
+    // verify that the size wasn't incremented
+    if (list->size != 3) {
         printListInt(list);
         psError(__func__,"psListAdd didn't insert to head when where was invalid.");
@@ -228,45 +241,56 @@
     data = psAlloc(sizeof(int));
     *data = 5;
-    list = psListAdd(list,data,1);
+
+    if ( ! psListAdd(list,data,1) ) {
+        psError(__func__,"psListAdd failed to add data to 1 position.");
+        return 30;
+    }
+
     if (psMemGetRefCounter(data) != 2) {
         psError(__func__,"psListAdd didn't increment the data reference count.");
-        return 20;
+        return 25;
     }
     psFree(data);
     // verify that the size incremented
-    if (list->size != 5 || *(int*)list->head->next->data != 5) {
+    if (list->size != 4 || *(int*)list->head->next->data != 5) {
         printListInt(list);
         psError(__func__,"psListAdd didn't insert to position #1.");
-        return 9;
+        return 10;
     }
 
     data = psAlloc(sizeof(int));
     *data = 6;
-    list = psListAdd(list,data,4);
+    if ( ! psListAdd(list,data,3) ) {
+        psError(__func__,"psListAdd failed to add data to 4 position.");
+        return 31;
+    }
     if (psMemGetRefCounter(data) != 2) {
         psError(__func__,"psListAdd didn't increment the data reference count.");
-        return 20;
+        return 26;
     }
     psFree(data);
     // verify that the size incremented
-    if (list->size != 6  || *(int *)list->head->next->next->next->next->data != 6) {
+    if (list->size != 5  || *(int *)list->head->next->next->next->data != 6) {
         printListInt(list);
         psError(__func__,"psListAdd didn't insert to position #4.");
-        return 9;
+        return 50;
     }
 
     data = psAlloc(sizeof(int));
     *data = 7;
-    list = psListAdd(list,data,2);
+    if ( ! psListAdd(list,data,2) ) {
+        psError(__func__,"psListAdd failed to add data to 2 position.");
+        return 32;
+    }
     if (psMemGetRefCounter(data) != 2) {
         psError(__func__,"psListAdd didn't increment the data reference count.");
-        return 20;
+        return 28;
     }
     psFree(data);
     // verify that the size incremented
-    if (list->size != 7  || *(int *)list->head->next->next->data != 7) {
+    if (list->size != 6  || *(int *)list->head->next->next->data != 7) {
         printListInt(list);
         psError(__func__,"psListAdd didn't insert to position #2.");
-        return 9;
+        return 11;
     }
 
@@ -274,15 +298,22 @@
     *data = 7;
     psLogMsg(__func__,PS_LOG_INFO,"Following should be a warning.");
-    list = psListAdd(list,data,9);
+
+    if ( ! psListAdd(list,data,9) ) {
+        psError(__func__,"psListAdd failed to add data to a 9 position?");
+        return 30;
+    }
+
     if (psMemGetRefCounter(data) != 2) {
         psError(__func__,"psListAdd didn't increment the data reference count.");
-        return 20;
-    }
-    psFree(data);
+        return 29;
+    }
+
+    psFree(data);
+
     // verify that the size incremented
-    if (list->size != 8) {
+    if (list->size != 7) {
         printListInt(list);
         psError(__func__,"psListAdd didn't insert to position #9.");
-        return 9;
+        return 12;
     }
 
@@ -347,15 +378,15 @@
     data = psAlloc(sizeof(int));
     *data = 1;
-    list = psListAdd(list,data,PS_LIST_TAIL);
+    psListAdd(list,data,PS_LIST_TAIL);
     psFree(data);
 
     data = psAlloc(sizeof(int));
     *data = 2;
-    list = psListAdd(list,data,PS_LIST_TAIL);
+    psListAdd(list,data,PS_LIST_TAIL);
     psFree(data);
 
     data = psAlloc(sizeof(int));
     *data = 3;
-    list = psListAdd(list,data,PS_LIST_TAIL);
+    psListAdd(list,data,PS_LIST_TAIL);
     psFree(data);
 
@@ -452,5 +483,5 @@
         data = psAlloc(sizeof(int));
         *data = lcv;
-        list = psListAdd(list,data,PS_LIST_TAIL);
+        psListAdd(list,data,PS_LIST_TAIL);
         psMemDecrRefCounter(data);
     }
@@ -671,5 +702,5 @@
         data = psAlloc(sizeof(int));
         *data = lcv;
-        list = psListAdd(list,data,PS_LIST_TAIL);
+        psListAdd(list,data,PS_LIST_TAIL);
         psMemDecrRefCounter(data);
     }
@@ -809,5 +840,5 @@
         data = psAlloc(sizeof(int));
         *data = lcv;
-        list = psListAdd(list,data,PS_LIST_TAIL);
+        psListAdd(list,data,PS_LIST_TAIL);
         psFree(data);
     }
@@ -926,5 +957,5 @@
         data[lcv] = psAlloc(sizeof(int));
         *data[lcv] = lcv;
-        list = psListAdd(list,data[lcv],PS_LIST_TAIL);
+        psListAdd(list,data[lcv],PS_LIST_TAIL);
         if (psMemGetRefCounter(data[lcv]) != 2) {
             psError(__func__,"Reference counter for data was not incremented");
@@ -980,5 +1011,5 @@
             *data = lcv*2-12;
         }
-        list = psListAdd(list,data,PS_LIST_TAIL);
+        psListAdd(list,data,PS_LIST_TAIL);
         psFree(data);
 
@@ -1046,5 +1077,5 @@
             *data = lcv*2-12;
         }
-        list = psListAdd(list,data,PS_LIST_TAIL);
+        psListAdd(list,data,PS_LIST_TAIL);
         psFree(data);
 
Index: trunk/psLib/test/dataManip/builddir/tst_psImageFFT.d
===================================================================
--- trunk/psLib/test/dataManip/builddir/tst_psImageFFT.d	(revision 1190)
+++ trunk/psLib/test/dataManip/builddir/tst_psImageFFT.d	(revision 1193)
@@ -3,6 +3,6 @@
   ../../include/psTrace.h ../../include/psAbort.h ../../include/psError.h \
   ../../include/psString.h ../../include/psType.h ../../include/psList.h \
-  ../../include/psVector.h ../../include/psHash.h \
-  ../../include/psScalar.h ../../include/psImage.h \
+  ../../include/psCompare.h ../../include/psVector.h \
+  ../../include/psHash.h ../../include/psScalar.h ../../include/psImage.h \
   ../../include/psBitSet.h ../../include/psSort.h ../../include/psStats.h \
   ../../include/psMatrix.h ../../include/psMatrixVectorArithmetic.h \
Index: trunk/psLib/test/dataManip/builddir/tst_psImageIO.d
===================================================================
--- trunk/psLib/test/dataManip/builddir/tst_psImageIO.d	(revision 1190)
+++ trunk/psLib/test/dataManip/builddir/tst_psImageIO.d	(revision 1193)
@@ -3,6 +3,6 @@
   ../../include/psTrace.h ../../include/psAbort.h ../../include/psError.h \
   ../../include/psString.h ../../include/psType.h ../../include/psList.h \
-  ../../include/psVector.h ../../include/psHash.h \
-  ../../include/psScalar.h ../../include/psImage.h \
+  ../../include/psCompare.h ../../include/psVector.h \
+  ../../include/psHash.h ../../include/psScalar.h ../../include/psImage.h \
   ../../include/psBitSet.h ../../include/psSort.h ../../include/psStats.h \
   ../../include/psMatrix.h ../../include/psMatrixVectorArithmetic.h \
Index: trunk/psLib/test/dataManip/builddir/tst_psVectorFFT.d
===================================================================
--- trunk/psLib/test/dataManip/builddir/tst_psVectorFFT.d	(revision 1190)
+++ trunk/psLib/test/dataManip/builddir/tst_psVectorFFT.d	(revision 1193)
@@ -3,6 +3,6 @@
   ../../include/psTrace.h ../../include/psAbort.h ../../include/psError.h \
   ../../include/psString.h ../../include/psType.h ../../include/psList.h \
-  ../../include/psVector.h ../../include/psHash.h \
-  ../../include/psScalar.h ../../include/psImage.h \
+  ../../include/psCompare.h ../../include/psVector.h \
+  ../../include/psHash.h ../../include/psScalar.h ../../include/psImage.h \
   ../../include/psBitSet.h ../../include/psSort.h ../../include/psStats.h \
   ../../include/psMatrix.h ../../include/psMatrixVectorArithmetic.h \
Index: trunk/psLib/test/dataManip/tst_psVectorFFT.c
===================================================================
--- trunk/psLib/test/dataManip/tst_psVectorFFT.c	(revision 1190)
+++ trunk/psLib/test/dataManip/tst_psVectorFFT.c	(revision 1193)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-06-23 23:00:17 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-08 01:05:01 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -34,17 +34,17 @@
 
 testDescription tests[] = {
-                              {testVectorFFT,"600-testVectorFFT",0},
-                              {testVectorRealImaginary,"601-testVectorRealImaginary",0},
-                              {testVectorComplex,"602-testVectorComplex",0},
-                              {testVectorConjugate,"603-testVectorConjugate",0},
-                              {testVectorPowerSpectrum,"604-testVectorPowerSpectrum",0},
+                              {testVectorFFT,600,"psVectorFFT",0,false},
+                              {testVectorRealImaginary,601,"psVectorRealImaginary",0,false},
+                              {testVectorComplex,602,"psVectorComplex",0,false},
+                              {testVectorConjugate,603,"psVectorConjugate",0,false},
+                              {testVectorPowerSpectrum,604,"psVectorPowerSpectrum",0,false},
                               {NULL}
                           };
 
-int main()
+int main(int argc, char* argv[])
 {
     psLogSetLevel(PS_LOG_INFO);
 
-    if (! runTestSuite(stderr,"psFFT",tests)) {
+    if (! runTestSuite(stderr,"psFFT",tests,argc,argv) ) {
         psAbort(__FILE__,"One or more tests failed");
     }
Index: trunk/psLib/test/image/tst_psImage.c
===================================================================
--- trunk/psLib/test/image/tst_psImage.c	(revision 1190)
+++ trunk/psLib/test/image/tst_psImage.c	(revision 1193)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-06-23 23:00:15 $
+ *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-08 01:05:01 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -29,18 +29,20 @@
 
 testDescription tests[] = {
-                              {testImageAlloc,"546/548-testImageAlloc/Free",0},
-                              {testImageSubset,"547/550-testImageSubset",0},
-                              {testImageCopy,"551-testImageCopy",0},
-                              {testImageClip,"571-testImageClip",0},
-                              {testImageClipNAN,"572-testImageClipNAN",0},
-                              {testImageOverlay,"573-testImageOverlay",0},
+                              {testImageAlloc,546,"psImageAlloc",0,false},
+                              {testImageAlloc,548,"psImageFree",0,true},
+                              {testImageSubset,547,"psImageSubset",0,false},
+                              {testImageSubset,550,"psImageSubset",0,true},
+                              {testImageCopy,551,"psImageCopy",0,false},
+                              {testImageClip,571,"psImageClip",0,false},
+                              {testImageClipNAN,572,"psImageClipNAN",0,false},
+                              {testImageOverlay,573,"psImageOverlay",0,false},
                               {NULL}
                           };
 
-int main()
+int main(int argc, char* argv[])
 {
     psLogSetLevel(PS_LOG_INFO);
-    testImageOverlay();
-    if (! runTestSuite(stderr,"psImage",tests)) {
+
+    if (! runTestSuite(stderr,"psImage",tests,argc,argv)) {
         psError(__FILE__,"One or more tests failed");
         return 1;
@@ -572,20 +574,36 @@
 
     #define testImageCopyTypes(IN) \
+    printf("to psF32\n"); \
+    testImageCopyType(IN,F32);\
+    printf("to psF64\n"); \
+    testImageCopyType(IN,F64); \
+    printf("to psU8\n"); \
     testImageCopyType(IN,U8); \
+    printf("to psU16\n"); \
     testImageCopyType(IN,U16); \
+    printf("to psU32\n"); \
     testImageCopyType(IN,U32); \
+    printf("to psS8\n"); \
     testImageCopyType(IN,S8);\
+    printf("to psS16\n"); \
     testImageCopyType(IN,S16);\
-    testImageCopyType(IN,S32);\
-    testImageCopyType(IN,F32);\
-    testImageCopyType(IN,F64);
-
+    printf("to psS32\n"); \
+    testImageCopyType(IN,S32);
+
+    psLogMsg(__func__,PS_LOG_INFO,"Image Copy Test for psU8");
     testImageCopyTypes(U8);
+    psLogMsg(__func__,PS_LOG_INFO,"Image Copy Test for psU16");
     testImageCopyTypes(U16);
+    psLogMsg(__func__,PS_LOG_INFO,"Image Copy Test for psU32");
     testImageCopyTypes(U32);
+    psLogMsg(__func__,PS_LOG_INFO,"Image Copy Test for psS8");
     testImageCopyTypes(S8);
+    psLogMsg(__func__,PS_LOG_INFO,"Image Copy Test for psS16");
     testImageCopyTypes(S16);
+    psLogMsg(__func__,PS_LOG_INFO,"Image Copy Test for psS32");
     testImageCopyTypes(S32);
+    psLogMsg(__func__,PS_LOG_INFO,"Image Copy Test for psF32");
     testImageCopyTypes(F32);
+    psLogMsg(__func__,PS_LOG_INFO,"Image Copy Test for psF64");
     testImageCopyTypes(F64);
 
Index: trunk/psLib/test/image/tst_psImageFFT.c
===================================================================
--- trunk/psLib/test/image/tst_psImageFFT.c	(revision 1190)
+++ trunk/psLib/test/image/tst_psImageFFT.c	(revision 1193)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-06-23 23:00:17 $
+ *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-08 01:05:01 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -34,17 +34,17 @@
 
 testDescription tests[] = {
-                              {testImageFFT,"600-testImageFFT",0},
-                              {testImageRealImaginary,"601-testImageRealImaginary",0},
-                              {testImageComplex,"602-testImageComplex",0},
-                              {testImageConjugate,"603-testImageConjugate",0},
-                              {testImagePowerSpectrum,"604-testImagePowerSpectrum",0},
+                              {testImageFFT,600,"psImageFFT",0,false},
+                              {testImageRealImaginary,601,"psImageRealImaginary",0,false},
+                              {testImageComplex,602,"psImageComplex",0,false},
+                              {testImageConjugate,603,"psImageConjugate",0,false},
+                              {testImagePowerSpectrum,604,"psImagePowerSpectrum",0,false},
                               {NULL}
                           };
 
-int main()
+int main(int argc, char* argv[])
 {
     psLogSetLevel(PS_LOG_INFO);
 
-    if (! runTestSuite(stderr,"psFFT",tests)) {
+    if (! runTestSuite(stderr,"psFFT",tests,argc,argv) ) {
         psAbort(__FILE__,"One or more tests failed");
     }
Index: trunk/psLib/test/image/tst_psImageIO.c
===================================================================
--- trunk/psLib/test/image/tst_psImageIO.c	(revision 1190)
+++ trunk/psLib/test/image/tst_psImageIO.c	(revision 1193)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-06-23 23:00:17 $
+ *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-08 01:05:01 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -35,16 +35,14 @@
 
 testDescription tests[] = {
-                              {testImageRead,"567-testImageRead",0},
-                              {testImageWrite,"569-testImageWrite",0},
+                              {testImageRead,567,"psImageReadSection",0,false},
+                              {testImageWrite,569,"psImageWriteSection",0,false},
                               {NULL}
                           };
 
-int main()
+int main(int argc, char* argv[])
 {
     psLogSetLevel(PS_LOG_INFO);
 
-    testImageRead();
-
-    if (! runTestSuite(stderr,"psImage",tests)) {
+    if (! runTestSuite(stderr,"psImage",tests,argc,argv)) {
         psAbort(__FILE__,"One or more tests failed");
     }
Index: trunk/psLib/test/psTest.c
===================================================================
--- trunk/psLib/test/psTest.c	(revision 1190)
+++ trunk/psLib/test/psTest.c	(revision 1193)
@@ -15,4 +15,6 @@
 #include <unistd.h>
 #include <sys/wait.h>
+#include <stdbool.h>
+#include <string.h>
 
 #include "psTest.h"
@@ -25,11 +27,103 @@
 #define HEADER_BOTTOM "\\**********************************************************************************/\n\n"
 
-bool p_runTestSuite(FILE *fp, const char* testPointFile, const char* packageName, testDescription tests[])
+bool p_runTestSuite(FILE *fp, const char* testPointFile, const char* packageName,
+                    testDescription tests[], int argc, char * const argv[])
 {
     bool success = true;
-
-    for (int index=0; tests[index].fcn != NULL; index++) {
-        success = p_runTest(fp,testPointFile,packageName,tests[index].testPointName,
-                            tests[index].fcn,tests[index].expectedReturn) && success;
+    bool runAll = true;
+    bool useFork = true;
+    bool found;
+    int c;
+    int n;
+    extern char *optarg;
+
+    if (argc > 0) {
+        while ( (c=getopt(argc,argv,"lhn:dt:")) != -1) {
+            switch (c) {
+            case 'h':
+                printf("Usage: %s [-l] [-d] [-h] [-n=Testpoint#] [-t=TestpointName]\n"
+                       "    where:\n"
+                       "           -l  : lists the testpoints contained in this test driver executable\n"
+                       "           -d  : turns on debugger-friendly mode (no forking, aborts/signals are not handled)\n"
+                       "           -h  : prints this help\n"
+                       "           -n  : specifies a particular testpoint by number to run\n"
+                       "           -t  : specifies a particular testpoint by name to run\n"
+                       "    (if no -l, -n or -t options are given, all testpoints are run)\n",
+                       argv[0]);
+                runAll = false;
+                break;
+            case 'd':
+                useFork = false;
+                break;
+            case 'l':
+                printf("Test Driver:  %s\n",testPointFile);
+                printf("Package Name: %s\n",packageName);
+                printf("Testpoints:\n");
+                runAll = false;
+                for (int index=0; tests[index].fcn != NULL; index++) {
+                    printf("    %6d - %s \n",tests[index].testPointNumber,
+                           tests[index].testPointName);
+                }
+                printf("\n");
+                break;
+            case 't':
+                runAll = false;
+                for (int index=0; tests[index].fcn != NULL; index++) {
+                    if (strcmp(optarg,tests[index].testPointName) == 0) {
+                        success = p_runTest(fp,
+                                            testPointFile,
+                                            packageName,
+                                            tests[index].testPointName,
+                                            tests[index].fcn,
+                                            tests[index].expectedReturn,
+                                            useFork) && success;
+                    }
+                }
+                break;
+            case 'n':
+                runAll = false;
+                if (sscanf(optarg,"%i",&n) != 1) {
+                    psError(__func__,"Failed to parse the testpoint number (%s).",
+                            optarg);
+                    break;
+                }
+                found = false;
+                for (int index=0; tests[index].fcn != NULL; index++) {
+                    if (n==tests[index].testPointNumber) {
+                        found = true;
+                        success = p_runTest(fp,
+                                            testPointFile,
+                                            packageName,
+                                            tests[index].testPointName,
+                                            tests[index].fcn,
+                                            tests[index].expectedReturn,
+                                            useFork) && success;
+                    }
+                }
+                if (! found) {
+                    psError(__func__,"The specified testpoint number (%d) doesn't exist in this test driver.",
+                            n);
+                    break;
+                }
+                break;
+            case '?':
+                psError(__func__,"Option %s is not recognized and is ignored.",optarg);
+                break;
+            }
+        }
+    }
+
+    if (runAll) {
+        for (int index=0; tests[index].fcn != NULL; index++) {
+            if (! tests[index].isDuplicateEntry) {
+                success = p_runTest(fp,
+                                    testPointFile,
+                                    packageName,
+                                    tests[index].testPointName,
+                                    tests[index].fcn,
+                                    tests[index].expectedReturn,
+                                    useFork) && success;
+            }
+        }
     }
     return success;
@@ -37,5 +131,5 @@
 
 bool p_runTest(FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName,
-               testFcn fcn, int expectedReturn)
+               testFcn fcn, int expectedReturn, bool useFork)
 {
     int childReturn = 0;
@@ -44,28 +138,41 @@
     p_printPositiveTestHeader(fp,testPointFile,packageName,testPointName);
 
-    child = fork();
-    if (child == 0) {                   // I am the child process, run the test
+    if (useFork) {
+        child = fork();
+        if (child == 0) {                   // I am the child process, run the test
+            int currentId = psMemGetId();
+            int retVal = fcn();
+            if (retVal == 0) { // only bother checking memory if test executed to end.
+                if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
+                    psError(__func__,"Memory Leaks Detected");
+                    retVal = 64;
+                }
+                psMemCheckCorruption(1);
+            }
+            exit(retVal);
+        } else if (child < 0) {
+            fprintf(fp,"Couldn't fork a process to run a negative test (%s|%s)",
+                    packageName, testPointName);
+            abort();
+        }
+
+        waitpid(child,&childReturn,0);
+        if (WIFSIGNALED(childReturn)) {
+            childReturn =  -WTERMSIG(childReturn);
+        } else {
+            childReturn = WEXITSTATUS(childReturn);
+        }
+    } else {
         int currentId = psMemGetId();
-        int retVal = fcn();
-        if (retVal == 0) { // only bother checking memory if test executed to end.
+        childReturn = fcn();
+        if (childReturn == 0) { // only bother checking memory if test executed to end.
             if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
                 psError(__func__,"Memory Leaks Detected");
-                retVal = 64;
+                childReturn = 64;
             }
             psMemCheckCorruption(1);
         }
-        exit(retVal);
-    } else if (child < 0) {
-        fprintf(fp,"Couldn't fork a process to run a negative test (%s|%s)",
-                packageName, testPointName);
-        abort();
-    }
-
-    waitpid(child,&childReturn,0);
-    if (WIFSIGNALED(childReturn)) {
-        childReturn =  -WTERMSIG(childReturn);
-    } else {
-        childReturn = WEXITSTATUS(childReturn);
-    }
+    }
+
 
     if (childReturn != expectedReturn) {
Index: trunk/psLib/test/psTest.h
===================================================================
--- trunk/psLib/test/psTest.h	(revision 1190)
+++ trunk/psLib/test/psTest.h	(revision 1193)
@@ -20,31 +20,62 @@
 {
     testFcn     fcn;
+    int         testPointNumber;
     const char* testPointName;
     int         expectedReturn;
+    bool        isDuplicateEntry;
 }
 testDescription;
 
-#define runTest(filePtr, packageName, testPointName, fcn, expectedReturn) \
-p_runTest(filePtr, __FILE__, packageName, testPointName, fcn, expectedReturn)
+#define runTest(filePtr, packageName, testPointName, fcn, expectedReturn, useFork) \
+p_runTest(filePtr, __FILE__, packageName, testPointName, fcn, expectedReturn, useFork)
 
-#define runTestSuite(filePtr, packageName, tests) \
-p_runTestSuite(filePtr, __FILE__, packageName, tests)
+#define runTestSuite(filePtr, packageName, tests, argc, argv) \
+p_runTestSuite(filePtr, __FILE__, packageName, tests, argc, argv)
 
 
 /////////////////////////// PRIVATE FUNCTIONS //////////////////////////////
 
-bool p_runTest(FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName,
-               testFcn fcn, int expectedReturn);
+bool p_runTest(
+    FILE *fp,
+    const char* testPointFile,
+    const char* packageName,
+    const char* testPointName,
+    testFcn fcn,
+    int expectedReturn,
+    bool useFork
+);
 
-bool p_runTestSuite(FILE *fp, const char* testPointFile, const char* packageName, testDescription tests[]);
+bool p_runTestSuite(
+    FILE *fp,
+    const char* testPointFile,
+    const char* packageName,
+    testDescription tests[],
+    int argc,
+    char * const argv[]
+);
 
-void p_printPositiveTestHeader(FILE *fp, const char* testPointFile, const char* packageName,
-                               const char* testPointName);
+void p_printPositiveTestHeader(
+    FILE *fp,
+    const char* testPointFile,
+    const char* packageName,
+    const char* testPointName
+);
 
-void p_printNegativeTestHeader(FILE *fp, const char* testPointFile, const char* packageName,
-                               const char* testPointName,const char* expectedError, int exitValue);
+void p_printNegativeTestHeader(
+    FILE *fp,
+    const char* testPointFile,
+    const char* packageName,
+    const char* testPointName,
+    const char* expectedError,
+    int exitValue
+);
 
-void p_printFooter(FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName,
-                   bool success);
+void p_printFooter(
+    FILE *fp,
+    const char* testPointFile,
+    const char* packageName,
+    const char* testPointName,
+    bool success
+);
 
 #endif
Index: trunk/psLib/test/sysUtils/builddir/tst_psMemory.d
===================================================================
--- trunk/psLib/test/sysUtils/builddir/tst_psMemory.d	(revision 1190)
+++ trunk/psLib/test/sysUtils/builddir/tst_psMemory.d	(revision 1193)
@@ -3,6 +3,6 @@
   ../../include/psTrace.h ../../include/psAbort.h ../../include/psError.h \
   ../../include/psString.h ../../include/psType.h ../../include/psList.h \
-  ../../include/psVector.h ../../include/psHash.h \
-  ../../include/psScalar.h ../../include/psImage.h \
+  ../../include/psCompare.h ../../include/psVector.h \
+  ../../include/psHash.h ../../include/psScalar.h ../../include/psImage.h \
   ../../include/psBitSet.h ../../include/psSort.h ../../include/psStats.h \
   ../../include/psMatrix.h ../../include/psMatrixVectorArithmetic.h \
Index: trunk/psLib/test/sysUtils/tst_psMemory.c
===================================================================
--- trunk/psLib/test/sysUtils/tst_psMemory.c	(revision 1190)
+++ trunk/psLib/test/sysUtils/tst_psMemory.c	(revision 1193)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-06-25 21:51:46 $
+ *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-08 01:05:01 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -45,20 +45,21 @@
 
 testDescription tests[] = {
-                              {TPCheckBufferPositive,"449-TPCheckBufferPositive",0},
-                              {TPOutOfMemory,"450-TPOutOfMemory",-6},
-                              {TPReallocOutOfMemory,"562-TPReallocOutOfMemory",-6},
-                              {TPrealloc,"451-TPrealloc",0},
-                              {TPallocCallback,"452/453-TPallocCallback",0},
-                              {TPcheckLeaks,"454-TPcheckLeaks",0},
-                              {TPmemCorruption,"455-TPmemCorruption",0},
-                              {TPFreeReferencedMemory,"456-TPFreeReferencedMemory",0},
+                              {TPCheckBufferPositive,449,"checkBufferPositive",0,false},
+                              {TPOutOfMemory,450,"outOfMemory",-6,false},
+                              {TPReallocOutOfMemory,562,"reallocOutOfMemory",-6,false},
+                              {TPrealloc,451,"psRealloc",0,false},
+                              {TPallocCallback,452,"allocCallback",0,false},
+                              {TPallocCallback,453,"allocCallback2",0,true},
+                              {TPcheckLeaks,454,"checkLeaks",0,false},
+                              {TPmemCorruption,455,"psMemCorruption",0,false},
+                              {TPFreeReferencedMemory,456,"freeReferencedMemory",0,false},
                               {NULL}
                           };
 
-int main()
+int main(int argc, char* argv[])
 {
     psLogSetLevel(PS_LOG_INFO);
 
-    if (! runTestSuite(stderr,"psMemory",tests)) {
+    if (! runTestSuite(stderr,"psMemory",tests,argc,argv) ) {
         psError(__FILE__,"One or more tests failed");
         return 1;
