Index: trunk/psLib/test/sys/tap_psError.c
===================================================================
--- trunk/psLib/test/sys/tap_psError.c	(revision 24023)
+++ trunk/psLib/test/sys/tap_psError.c	(revision 41171)
@@ -324,38 +324,25 @@
 
         for (psS32 i = 0; i < numErr; i++) {
-            const char* desc = psErrorCodeString(PS_ERR_N_ERR_CLASSES+1+i);
-            ok(desc != NULL,
-                "psErrorCode didn't find registered error code.");
-
-            ok(strcmp(desc,errDesc[i].description) == 0,
-                "psErrorCode didn't return the proper description.  Got '%s', expected '%s'.", desc,errDesc[i].description);
-        }
-
-        /*
-            2. invoke psErrorCodeString with a static/builtin psLib error code. Verify:
+            const char *desc = psErrorCodeString(PS_ERR_N_ERR_CLASSES+1+i);
+            ok(desc, "psErrorCode found registered error code.");
+            ok(!strcmp(desc,errDesc[i].description), "psErrorCode returned the proper description.  Got '%s', expected '%s'.", desc, errDesc[i].description);
+        }
+
+        /* 2. invoke psErrorCodeString with a static/builtin psLib error code. Verify:
                 a. the result is correct.
         */
-        const char* desc = psErrorCodeString(PS_ERR_N_ERR_CLASSES);
-        ok(desc != NULL, "psErrorCode didn't find static error code.");
-        ok(strcmp(desc,"error classes end marker") == 0,
-            "psErrorCode didn't return the proper description.  Got '%s', expected '%s'.",
-            desc,"error classes end marker");
+        const char *desc = psErrorCodeString(PS_ERR_N_ERR_CLASSES);
+        ok(desc, "psErrorCode found static error code.");
+        ok(!strcmp(desc, "error classes end marker"), "psErrorCode returned the proper description.  Got '%s', expected '%s'.", desc, "error classes end marker");
 
         desc = psErrorCodeString(PS_ERR_NONE);
-        ok(desc != NULL,
-            "psErrorCode didn't find static error code.");
-        ok(strcmp(desc,"not an error") == 0,
-            "psErrorCode didn't return the proper description.  Got '%s', expected '%s'.",
-            desc,"not an error");
+        ok(desc, "psErrorCode found static error code.");
+        ok(!strcmp(desc,"not an error"), "psErrorCode returned the proper description.  Got '%s', expected '%s'.", desc, "not an error");
     
-        /*
-            3. invoke psErrorCodeString with an invalid code. Verify a NULL is returned.
-        */
+        /* 3. invoke psErrorCodeString with an invalid code. Verify a NULL is returned. */
         desc = psErrorCodeString(PS_ERR_N_ERR_CLASSES+numErr+1);
-        ok(desc == NULL,
-            "psErrorCode didn't return a NULL with a bogus input code.");
-
-        /*
-            4. invoke psErrorRegister with a NULL psErrorDescription. Verify that:
+        ok(!desc, "psErrorCode returns a NULL with a bogus input code.");
+
+        /* 4. invoke psErrorRegister with a NULL psErrorDescription. Verify that:
                 a. the execution does not cease.
                 b. an appropriate error is generated.
@@ -366,5 +353,5 @@
         psErr* err = psErrorLast();
         ok(err->code == PS_ERR_BAD_PARAMETER_NULL,
-        "psErrorCode didn't generate proper error code for NULL input.");
+        "psErrorCode generated proper error code for NULL input.");
 
         psFree(err);
@@ -377,5 +364,5 @@
         err = psErrorLast();
         ok(err->code == PS_ERR_NONE,
-            "psErrorCode generated an error for nErrors = 0.");
+            "psErrorCode did not generate an error for nErrors = 0.");
         psFree(err);
     }
Index: trunk/psLib/test/sys/tap_psLine.c
===================================================================
--- trunk/psLib/test/sys/tap_psLine.c	(revision 24023)
+++ trunk/psLib/test/sys/tap_psLine.c	(revision 41171)
@@ -23,14 +23,13 @@
     psLogSetLevel(PS_LOG_INFO);
 
-    //testLineAlloc()
+    // testLineAlloc()
     {
         psMemId id = psMemGetId();
         psLine *lineline = NULL;
         lineline = psLineAlloc(20);
-        ok(lineline->NLINE==20, "psLine set NLINE parameter during Allocation");
-        ok(lineline->Nline == 0, "psLine set Nline parameter during Allocation");
+        ok(lineline->NLINE == 20, "psLine set NLINE parameter during Allocation");
+        ok(lineline->Nline ==  0, "psLine set Nline parameter during Allocation");
         strncpy(lineline->line, "Hello World", 20);
-        ok(!strncmp(lineline->line, "Hello World", 20),
-            "psLine was stored a simple string!");
+        ok(!strncmp(lineline->line, "Hello World", 20), "psLine was stored a simple string!");
         psFree(lineline);
         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
@@ -41,8 +40,8 @@
         psMemId id = psMemGetId();
         psLine *line = NULL;
-        //Return false for NULL input
+        // Return false for NULL input
         int okay = !psLineInit(line);
         ok(okay, "psLineInit.  Expected false for NULL psLine input");
-        //Allocate a line and return true on Init
+        // Allocate a line and return true on Init
         line = psLineAlloc(1);
         okay = psLineInit(line);
@@ -65,8 +64,6 @@
         int okay = psLineAdd(line, "Hello %s", "World");
         ok( okay, "psLineAdd.  Expected true for valid psLine input");
-        ok(line->NLINE == 20 && line->Nline == 11,
-            "psLineAdd failed to return the correct line parameters");
-        ok(!strncmp(line->line, "Hello World", 20),
-            "psLineAdd failed to store the correct line string.");
+        ok(line->NLINE == 20 && line->Nline == 11, "psLineAdd failed to return the correct line parameters");
+        ok(!strncmp(line->line, "Hello World", 20), "psLineAdd failed to store the correct line string.");
         psFree(line);
         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
@@ -79,9 +76,7 @@
         psLine *line = NULL;
         //Return false for Null input line
-        ok(!psMemCheckLine(line),
-            "psMemCheckLine return false for NULL line input");
+        ok(!psMemCheckLine(line), "psMemCheckLine return false for NULL line input");
         line = psLineAlloc(1);
-        ok(psMemCheckLine(line),
-            "psMemCheckLine return true for valid line input");
+        ok(psMemCheckLine(line), "psMemCheckLine return true for valid line input");
         psFree(line);
         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
Index: trunk/psLib/test/sys/tap_psMemory.c
===================================================================
--- trunk/psLib/test/sys/tap_psMemory.c	(revision 24023)
+++ trunk/psLib/test/sys/tap_psMemory.c	(revision 41171)
@@ -41,5 +41,5 @@
     psLogSetFormat("HLNM");
     psLogSetLevel(PS_LOG_INFO);
-    plan_tests(46);
+    plan_tests(54);
 
     // TPFreeReferencedMemory()
@@ -79,5 +79,6 @@
     // the psMemExhaustedCallback.
     // XXXX: Skipping TPOutOfMemory() because of test abort failure
-    if (0) {
+    skip_start (1, 2, "Skipping TPOutOfMemory() because of test abort failure");
+    {
         psMemId id = psMemGetId();
         psS32 *mem[ 100 ];
@@ -88,5 +89,5 @@
         exhaustedCallbackCalled = 0;
         cb = psMemExhaustedCallbackSet( TPOutOfMemoryExhaustedCallback );
-        #ifdef COMMENTED_OUT
+        // #ifdef COMMENTED_OUT
         // Don't include since intentionally aborts
         for ( psS32 lcv = 0; lcv < 100; lcv++ ) {
@@ -99,8 +100,8 @@
             psFree( mem[ lcv ] );
         }
-        #endif
-        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
-    }
-
+	// #endif
+        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
+    }
+    skip_end();
 
 
@@ -108,5 +109,6 @@
     // psRealloc shall call the psMemExhaustedCallback.
     // XXXX: Skipping TPReallocOutOfMemory() because of test abort failure
-    if (0) {
+    skip_start (1, 2, "Skipping TPReallocOutOfMemory() because of test abort failure");
+    {
         psMemId id = psMemGetId();
         psS32 *mem[ 100 ];
@@ -131,5 +133,5 @@
         ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
     }
-
+    skip_end();
 
     // psAlloc shall allocate memory blocks writeable by caller.
@@ -236,5 +238,6 @@
     // TPcheckLeaks()
     // XXXX: Skipping TPcheckLeaks() because of test abort failure
-    if (0) {
+    skip_start (1, 6, "Skipping TPcheckLeaks() because of test abort failure");
+    {
         const psS32 numBuffers = 5;
         psS32* buffers[ 5 ];
@@ -288,4 +291,5 @@
         psFree(buffers[3]);
     }
+    skip_end();
 
 
@@ -304,26 +308,24 @@
         psArray *array = psArrayAlloc(100);
         int okay = psMemCheckType(PS_DATA_ARRAY,array);
-        if (!okay) {
-            psFree(array);
-        }
-        ok(okay, "psMemCheckArray in memCheckType");
-
-        ok(!psMemCheckType(PS_DATA_ARRAY, neg), "psMemCheckType with metadata input");
+        if (!okay) psFree(array);
+        ok(okay, "psMemCheckType PS_DATA_ARRAY in memCheckType");
+
+        ok(!psMemCheckType(PS_DATA_ARRAY, neg), "psMemCheckType PS_DATA_ARRAY with metadata input");
         psFree(array);
 
-        psBitSet *bits;
-        bits = psBitSetAlloc(100);
-        okay = psMemCheckType(PS_DATA_BITSET, bits);
-        if (!okay )
-            psFree(bits);
-        ok(okay, "psMemCheckBitSet in memCheckType");
-        ok(!psMemCheckType(PS_DATA_BITSET, negative), "psMemCheckType on psArray");
-        psFree(bits);
+	// XXX EAM 2019.11.08 : this data type no longer exists
+        // psBitSet *bits;
+        // bits = psBitSetAlloc(100);
+        // okay = psMemCheckType(PS_DATA_BITSET, bits);
+        // if (!okay ) psFree(bits);
+	// 
+        // ok(okay, "psMemCheckBitSet in memCheckType");
+        // ok(!psMemCheckType(PS_DATA_BITSET, negative), "psMemCheckType on psArray");
+        // psFree(bits);
 
         psCube *cube;
         cube = psCubeAlloc();
         okay = psMemCheckType(PS_DATA_CUBE, cube);
-        if (!okay )
-            psFree(cube);
+        if (!okay ) psFree(cube);
         ok(okay, "psMemCheckCube in memCheckType");
         psFree(cube);
@@ -335,6 +337,5 @@
         psFree(img);
         okay = psMemCheckType(PS_DATA_FITS, fits);
-        if (!okay )
-            psFree(fits);
+        if (!okay ) psFree(fits);
         ok(okay, "psMemCheckFits in memCheckType");
         psFitsClose(fits);
@@ -343,6 +344,5 @@
         hash = psHashAlloc(100);
         okay = psMemCheckType(PS_DATA_HASH, hash);
-        if (!okay )
-            psFree(hash);
+        if (!okay ) psFree(hash);
         ok(okay, "psMemCheckHash in memCheckType");
         psFree(hash);
@@ -351,6 +351,5 @@
         histogram = psHistogramAlloc(1.1, 2.2, 2);
         okay = psMemCheckType(PS_DATA_HISTOGRAM, histogram);
-        if (!okay )
-            psFree(histogram);
+        if (!okay ) psFree(histogram);
         ok(okay, "psMemCheckHistogram in memCheckType");
         psFree(histogram);
@@ -359,6 +358,5 @@
         image = psImageAlloc(5, 5, PS_TYPE_F32);
         okay = psMemCheckType(PS_DATA_IMAGE, image);
-        if (!okay )
-            psFree(image);
+        if (!okay ) psFree(image);
         ok(okay, "psMemCheckImage in memCheckType");
         psFree(image);
@@ -367,6 +365,5 @@
         kernel = psKernelAlloc(0, 1, 0, 1);
         okay = psMemCheckType(PS_DATA_KERNEL, kernel);
-        if (!okay )
-            psFree(kernel);
+        if (!okay ) psFree(kernel);
         ok(okay, "psMemCheckKernel in memCheckType");
         psFree(kernel);
@@ -375,6 +372,5 @@
         list = psListAlloc(NULL);
         okay = psMemCheckType(PS_DATA_LIST, list);
-        if (!okay )
-            psFree(list);
+        if (!okay ) psFree(list);
         ok(okay, "psMemCheckList in memCheckType");
         psFree(list);
@@ -385,6 +381,5 @@
         lookup = psLookupTableAlloc(file, format, 10);
         okay = psMemCheckType(PS_DATA_LOOKUPTABLE, lookup);
-        if (!okay )
-            psFree(lookup);
+        if (!okay ) psFree(lookup);
         ok(okay, "psMemCheckLookupTable in memCheckType");
         psFree(lookup);
@@ -393,6 +388,5 @@
         metadata = psMetadataAlloc();
         okay = psMemCheckType(PS_DATA_METADATA, metadata);
-        if (!okay )
-            psFree(metadata);
+        if (!okay ) psFree(metadata);
         ok(okay, "psMemCheckMetadata in memCheckType");
         psFree(metadata);
@@ -401,14 +395,12 @@
         metaItem = psMetadataItemAlloc("name", PS_DATA_S32, "COMMENT", 1);
         okay = psMemCheckType(PS_DATA_METADATAITEM, metaItem);
-        if (!okay )
-            psFree(metaItem);
+        if (!okay ) psFree(metaItem);
         ok(okay, "psMemCheckMetadataItem in memCheckType");
         psFree(metaItem);
 
         psMinimization *min;
-        min = psMinimizationAlloc(3, 0.1);
+        min = psMinimizationAlloc(3, 0.1, 1.0);
         okay = psMemCheckType(PS_DATA_MINIMIZATION, min);
-        if (!okay )
-            psFree(min);
+        if (!okay ) psFree(min);
         ok(okay, "psMemCheckMinimization in memCheckType");
         psFree(min);
@@ -417,6 +409,5 @@
         pixels = psPixelsAlloc(100);
         okay = psMemCheckType(PS_DATA_PIXELS, pixels);
-        if (!okay )
-            psFree(pixels);
+        if (!okay ) psFree(pixels);
         ok(okay, "psMemCheckPixels in memCheckType");
         psFree(pixels);
@@ -425,6 +416,5 @@
         plane = psPlaneAlloc();
         okay = psMemCheckType(PS_DATA_PLANE, plane);
-        if (!okay )
-            psFree(plane);
+        if (!okay ) psFree(plane);
         ok(okay, "psMemCheckPlane in memCheckType.");
         psFree(plane);
@@ -433,6 +423,5 @@
         planeDistort = psPlaneDistortAlloc(1, 1, 1, 1);
         okay =  psMemCheckType(PS_DATA_PLANEDISTORT, planeDistort);
-        if (!okay )
-            psFree(planeDistort);
+        if (!okay ) psFree(planeDistort);
         ok(okay, "psMemCheckPlaneDistort in memCheckType.");
         psFree(planeDistort);
@@ -441,6 +430,5 @@
         planeTransform = psPlaneTransformAlloc(1, 1);
         okay = psMemCheckType(PS_DATA_PLANETRANSFORM, planeTransform);
-        if (!okay )
-            psFree(planeTransform);
+        if (!okay ) psFree(planeTransform);
         ok(okay, "psMemCheckPlaneTransform in memCheckType");
         psFree(planeTransform);
@@ -449,6 +437,5 @@
         poly1 = psPolynomial1DAlloc(PS_POLYNOMIAL_ORD, 2);
         okay = psMemCheckType(PS_DATA_POLYNOMIAL1D, poly1);
-        if (!okay )
-            psFree(poly1);
+        if (!okay ) psFree(poly1);
         ok(okay, "psMemCheckPolynomial1D in memCheckType");
         psFree(poly1);
@@ -457,6 +444,5 @@
         poly2 = psPolynomial2DAlloc(PS_POLYNOMIAL_ORD, 2, 1);
         okay = psMemCheckType(PS_DATA_POLYNOMIAL2D, poly2);
-        if (!okay )
-            psFree(poly2);
+        if (!okay ) psFree(poly2);
         ok(okay, "psMemCheckPolynomial2D in memCheckType");
         psFree(poly2);
@@ -465,6 +451,5 @@
         poly3 = psPolynomial3DAlloc(PS_POLYNOMIAL_ORD, 2, 1, 1);
         okay = psMemCheckType(PS_DATA_POLYNOMIAL3D, poly3);
-        if (!okay )
-            psFree(poly3);
+        if (!okay ) psFree(poly3);
         ok(okay, "psMemCheckPolynomial3D in memCheckType");
         psFree(poly3);
@@ -473,6 +458,5 @@
         poly4 = psPolynomial4DAlloc(PS_POLYNOMIAL_ORD, 2, 1, 2, 1);
         okay = psMemCheckType(PS_DATA_POLYNOMIAL4D, poly4);
-        if (!okay )
-            psFree(poly4);
+        if (!okay ) psFree(poly4);
         ok(okay, "psMemCheckPolynomial4D in memCheckType");
         psFree(poly4);
@@ -481,6 +465,5 @@
         proj = psProjectionAlloc(1, 1, 2.1, 2.1, PS_PROJ_TAN);
         okay = psMemCheckType(PS_DATA_PROJECTION, proj);
-        if (!okay )
-            psFree(proj);
+        if (!okay ) psFree(proj);
         ok(okay, "psMemCheckProjection in memCheckType.");
         psFree(proj);
@@ -490,6 +473,5 @@
         scalar = psScalarAlloc(f64, PS_TYPE_F64);
         okay = psMemCheckType(PS_DATA_SCALAR, scalar);
-        if (!okay )
-            psFree(scalar);
+        if (!okay ) psFree(scalar);
         ok(okay, "psMemCheckScalar in memCheckType");
         psFree(scalar);
@@ -498,6 +480,5 @@
         sphere = psSphereAlloc();
         okay = psMemCheckType(PS_DATA_SPHERE, sphere);
-        if (!okay )
-            psFree(sphere);
+        if (!okay ) psFree(sphere);
         ok(okay, "psMemCheckSphere in memCheckType");
         psFree(sphere);
@@ -506,6 +487,5 @@
         sphereRot = psSphereRotAlloc(0, 0, 20);
         okay = psMemCheckType(PS_DATA_SPHEREROT, sphereRot);
-        if (!okay )
-            psFree(sphereRot);
+        if (!okay ) psFree(sphereRot);
         ok(okay, "psMemCheckSphereRot in memCheckType");
         psFree(sphereRot);
@@ -516,6 +496,5 @@
         spline = psSpline1DAlloc();
         okay = psMemCheckType(PS_DATA_SPLINE1D, spline);
-        if (!okay )
-            psFree(spline);
+        if (!okay ) psFree(spline);
         ok(okay, "psMemCheckSpline1D in memCheckType");
         psFree(spline);
@@ -524,6 +503,5 @@
         stats = psStatsAlloc(PS_STAT_MAX);
         okay = psMemCheckType(PS_DATA_STATS, stats);
-        if (!okay )
-            psFree(stats);
+        if (!okay ) psFree(stats);
         ok(okay, "psMemCheckStats in memCheckType");
         psFree(stats);
@@ -532,6 +510,5 @@
         time = psTimeAlloc(PS_TIME_UT1);
         okay = psMemCheckType(PS_DATA_TIME, time);
-        if (!okay )
-            psFree(time);
+        if (!okay ) psFree(time);
         ok(okay, "psMemCheckTime in memCheckType");
         psFree(time);
@@ -548,5 +525,4 @@
 }
 
-
 #if 0
 void TPmemCorruption( void )
Index: trunk/psLib/test/sys/tap_psString.c
===================================================================
--- trunk/psLib/test/sys/tap_psString.c	(revision 24023)
+++ trunk/psLib/test/sys/tap_psString.c	(revision 41171)
@@ -111,16 +111,16 @@
     {
         psMemId id = psMemGetId();
-        psS32   result = 0;
-        psS32   result1 = 0;
-        char  *strResult;
         char  *stringvalnocopy = "F A I L";
 
         // Test point #4 Verify empty string copy with length - psStringNCopy
-        strResult = psStringNCopy(stringvalnocopy, 0);
-        // Perform string compare and get sting length
-        result = strcmp(strResult, stringvalnocopy);
-        result1 = strlen(strResult);
-        ok(result != 0,
-             "test point #4 strcmp result = %d didn't expected %d",result,0);
+        char *strResult = psStringNCopy(stringvalnocopy, 0);
+
+        // Perform string compare and get string length
+        int result = strcmp(strResult, stringvalnocopy);
+        ok(result != 0, "test point #4 strcmp result = %d, expected %d", result, 4);
+
+        int resultLen = strlen(strResult);
+        ok(resultLen == 0, "test point #4 strcmp result = %d, expected %d", resultLen, 0);
+
         psFree(strResult);
         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
@@ -149,25 +149,24 @@
     }
 
-// XXX This test needs to be modified to check for maximum size
-//     This will require a mod to psStringNCopy source to check for maximum size
-//
-//psS32 testStringCopy05()
-//{
-//    char  *strResult;
-//    char  stringval[20] = "E R R O R";
-//    psS32   negativeSize = -5;
-//
-//    // Test point #6 Copy string with negative size - psStringNCopy
-//    strResult = psStringNCopy(stringval, negativeSize);
-//    if ( strResult != NULL ) {
-//        fprintf(stderr,"Failed test point #6 return value = %p expected NULL\n",
-//                strResult);
-//        return 1;
-//    }
-//    // Memory should not have been allocated
-//
-//    return 0;
-//}
-
+    // XXX This test needs to be modified to check for maximum size
+    // This will require a mod to psStringNCopy source to check for maximum size
+
+    // psS32 testStringCopy05()
+    skip_start (1, 6, "Skipping psSTringNCopy() because of failure to test max value");
+    {
+      char  *strResult;
+      char  stringval[20] = "E R R O R";
+      psS32   negativeSize = -5;
+
+      // Test point #6 Copy string with negative size - psStringNCopy
+      strResult = psStringNCopy(stringval, negativeSize);
+      if ( strResult != NULL ) {
+        fprintf(stderr,"Failed test point #6 return value = %p expected NULL\n",
+                strResult);
+        return 1;
+      }
+      // Memory should not have been allocated
+    }
+    skip_end();
 
     // testStringCopy06()
@@ -200,17 +199,15 @@
     }
 
-#if 0
     // testStrAppend01()
     {
         psMemId id = psMemGetId();
-        char *str=NULL;
+        char *str = NULL;
         // test nonsensical invocations ...
         ssize_t sz = psStringAppend(NULL, NULL);
-        ok(sz == 0, "Failed test point");
+        ok(!sz, "append NULL string to NULL string");
         sz = psStringAppend(&str, NULL);
-        ok(sz == 0, "Failed test point");
-        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
-    }
-#endif
+        ok(!sz, "append NULL string to NULL string");
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
+    }
 
     // testStrAppend02()
@@ -251,5 +248,4 @@
     }
 
-#if 0
     // testStrPrepend01()
     {
@@ -263,5 +259,4 @@
         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     }
-#endif
 
     // testStrPrepend02()
Index: trunk/psLib/test/sys/tap_psTrace.c
===================================================================
--- trunk/psLib/test/sys/tap_psTrace.c	(revision 24023)
+++ trunk/psLib/test/sys/tap_psTrace.c	(revision 41171)
@@ -2,7 +2,9 @@
     This code will test whether trace levels can be set successfully.
  
-    XXX: For the last two testpoints, must verify that the results are
-    correct, and put that verification in the test as well.
- *****************************************************************************/
+  XXX : various tests result in text sent to stdout -- these should go to a file 
+        or buffer and be validated against a truth set.
+
+  XXX : some of the error messages have the wrong sense (they report a negative result even if the test is successful)
+*****************************************************************************/
 #include <stdio.h>
 #include <fcntl.h>
@@ -20,5 +22,5 @@
 
 # define DEBUG 1
-# if (DEBUG)
+# if (!DEBUG)
     FILE *output = fopen ("/dev/null", "w");
     int outFD = fileno (output);
@@ -30,33 +32,27 @@
     {
         psMemId id = psMemGetId();
-        psS32 lev = 0;
-        (void)psTraceSetDestination(outFD);
-        for (int i=0;i<10;i++) {
-            (void)psTraceSetLevel(".", i);
-            lev = psTraceGetLevel(".");
-            ok(lev == i, "trace level was %d, actual was %d", i, lev);
-        }
-
-        (void)psTraceSetLevel(".", 3);
-        for (int i=5;i<10;i++) {
-            (void)psTraceSetLevel(".NODE00", i);
-            lev = psTraceGetLevel(".NODE00");
-            ok (lev == i,"(.NODE00) expected trace level was %d, actual was %d",
-                i, lev);
+        psTraceSetDestination(outFD);
+        for (int i = 0; i < 10; i++) {
+            psTraceSetLevel(".", i);
+            int lev = psTraceGetLevel(".");
+            ok (lev == i, "trace level was %d, actual was %d", i, lev);
+        }
+
+        psTraceSetLevel(".", 3);
+        for (int i = 5; i < 10;i++) {
+            psTraceSetLevel(".NODE00", i);
+            int lev1 = psTraceGetLevel(".NODE00");
+            ok (lev1 == i,"(.NODE00) expected trace level was %d, actual was %d", i, lev1);
     
-            lev = psTraceGetLevel(".");
-            ok (lev == 3,
-                "expected trace level was %d, actual was %d", i, 3);
+            int lev2 = psTraceGetLevel(".");
+            ok (lev2 == 3, "expected trace level was %d, actual was %d", 3, lev2);
         }
     
-        (void)psTraceSetLevel(".NODE00.NODE01", 4);
-        for (int i=0;i<10;i++) {
-            (void)psTraceSetLevel(".NODE00.NODE01", i);
-            lev = psTraceGetLevel(".NODE00.NODE01");
-            ok (lev == i,
-                "(.NODE00.NODE01) expected trace level was %d, actual was %d",
-                i, lev);
-        }
-
+        psTraceSetLevel(".NODE00.NODE01", 4);
+        for (int i = 0; i < 10; i++) {
+            psTraceSetLevel(".NODE00.NODE01", i);
+            int lev = psTraceGetLevel(".NODE00.NODE01");
+            ok (lev == i, "(.NODE00.NODE01) expected trace level was %d, actual was %d", i, lev);
+        }
         ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
     }
@@ -64,15 +60,15 @@
 
     // testTrace01()
-    {
-        psMemId id = psMemGetId();
-        (void)psTraceSetDestination(outFD);
-        (void)psTraceSetLevel(".A.B.C.D.E", 5);
-        psTrace(".A.C.D.C",1,"You should not see this");
-        psTrace(".A.B.C.D.E",2,"You should see this");
-        psTrace(".A.B.C.D.E.F",3,"You should see this too");
-        psTracePrintLevels();
-        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
-    }
-
+    // XXX need to check the output on these as part of the test
+    {
+        psMemId id = psMemGetId();
+        psTraceSetDestination(outFD);
+        psTraceSetLevel(".A.B.C.D.E", 5);
+        psTrace(".A.C.D.C",     1, "You should not see this");
+        psTrace(".A.B.C.D.E",   2, "You should see this");
+        psTrace(".A.B.C.D.E.F", 3, "You should see this too");
+        psTracePrintLevels();
+        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
+    }
 
     // testTrace02()
@@ -80,59 +76,45 @@
         psMemId id = psMemGetId();
         psTraceReset();
-        (void)psTraceSetDestination(outFD);
-        (void)psTraceSetLevel(".A.B", 2);
-        (void)psTraceSetLevel(".A.B.C.D.E", 5);
-        psTracePrintLevels();
-        (void)psTraceSetLevel(".A.B", 10);
-        psTracePrintLevels();
-
-        ok (10 == psTraceGetLevel(".A.B.C"),
-            ".A.B.C did not dynamically inherit a trace level (%d)",
-            psTraceGetLevel(".A.B.C"));
-
-        ok (10 == psTraceGetLevel(".A.B.C.D"),
-            ".A.B.C.D did not dynamically inherit a trace level (%d)",
-            psTraceGetLevel(".A.B.C.D"));
-
-        ok (5 == psTraceGetLevel(".A.B.C.D.E"),
-            ".A.B.C.D.E did dynamically inherit a trace level (%d)",
-            psTraceGetLevel(".A.B.C.D.E"));
-        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
-    }
-
+        psTraceSetDestination(outFD);
+        psTraceSetLevel(".A.B", 2);
+        psTraceSetLevel(".A.B.C.D.E", 5);
+        psTracePrintLevels();
+        psTraceSetLevel(".A.B", 10);
+        psTracePrintLevels();
+
+        ok (10 == psTraceGetLevel(".A.B.C"),     ".A.B.C did not dynamically inherit a trace level (%d)", psTraceGetLevel(".A.B.C"));
+        ok (10 == psTraceGetLevel(".A.B.C.D"),   ".A.B.C.D did not dynamically inherit a trace level (%d)", psTraceGetLevel(".A.B.C.D"));
+        ok ( 5 == psTraceGetLevel(".A.B.C.D.E"), ".A.B.C.D.E did dynamically inherit a trace level (%d)", psTraceGetLevel(".A.B.C.D.E"));
+        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
+    }
 
     // testTrace03()
     {
         psMemId id = psMemGetId();
-        (void)psTraceSetDestination(outFD);
-
-        for (int i=0;i<10;i++) {
-            (void)psTraceSetLevel(".", i);
+        psTraceSetDestination(outFD);
+
+        for (int i = 0; i < 10; i++) {
+            psTraceSetLevel(".", i);
             psTraceReset();
             int lev = psTraceGetLevel(".");
-            ok (lev == PS_UNKNOWN_TRACE_LEVEL,
-                "expected trace level was %d, actual was %d",
-                PS_UNKNOWN_TRACE_LEVEL, lev);
-        }
-
-        (void)psTraceSetLevel(".", 5);
-        (void)psTraceSetLevel(".a", 4);
-        (void)psTraceSetLevel(".a.b", 3);
-        (void)psTraceSetLevel(".a.b.c", 2);
-        ok (!((5 != psTraceGetLevel(".")) ||
-              (4 != psTraceGetLevel(".a")) ||
-              (3 != psTraceGetLevel(".a.b")) ||
-              (2 != psTraceGetLevel(".a.b.c"))),
-            "trace successFlag = false;levels were not settable?");
-
-        psTraceReset();
-        ok (!((PS_UNKNOWN_TRACE_LEVEL != psTraceGetLevel(".")) ||
-              (PS_UNKNOWN_TRACE_LEVEL != psTraceGetLevel(".a")) ||
-              (PS_UNKNOWN_TRACE_LEVEL != psTraceGetLevel(".a.b")) ||
-              (PS_UNKNOWN_TRACE_LEVEL != psTraceGetLevel(".a.b.c"))),
-            "trace levels were not reset properly");
-        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
-    }
-
+            ok (lev == PS_UNKNOWN_TRACE_LEVEL, "expected trace level was %d, actual was %d", PS_UNKNOWN_TRACE_LEVEL, lev);
+        }
+
+        psTraceSetLevel(".", 5);
+        psTraceSetLevel(".a", 4);
+        psTraceSetLevel(".a.b", 3);
+        psTraceSetLevel(".a.b.c", 2);
+        ok (5 == psTraceGetLevel("."), "level 0");
+	ok (4 == psTraceGetLevel(".a"), "level 1");
+	ok (3 == psTraceGetLevel(".a.b"), "level 2");
+	ok (2 == psTraceGetLevel(".a.b.c"), "level 3");
+
+        psTraceReset();
+        ok (PS_UNKNOWN_TRACE_LEVEL == psTraceGetLevel("."), "trace levels were not reset properly");
+	ok (PS_UNKNOWN_TRACE_LEVEL == psTraceGetLevel(".a"), "trace levels were not reset properly");
+	ok (PS_UNKNOWN_TRACE_LEVEL == psTraceGetLevel(".a.b"), "trace levels were not reset properly");
+	ok (PS_UNKNOWN_TRACE_LEVEL == psTraceGetLevel(".a.b.c"), "trace levels were not reset properly");
+        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
+    }
 
     // testTrace04()
@@ -140,37 +122,27 @@
         psMemId id = psMemGetId();
         int FD = creat("tst_psTrace02_OUT", 0666);
-        for (int nb = 0 ; nb<4;nb++) {
-            if (nb == 0)
-                (void)psTraceSetDestination(((outFD == 2) ? 1 : outFD));
-            if (nb == 1)
-                (void)psTraceSetDestination(((outFD == 2) ? 2 : outFD));
-            if (nb == 2)
-                (void)psTraceSetDestination(((outFD == 2) ? 0 : outFD));
-            if (nb == 3)
-                (void)psTraceSetDestination(FD);
-
-            (void)psTraceSetLevel(".", 4);
-            psTrace(".", 5, "(0) This message should not be displayed (%x)",
-                    0xbeefface);
-            (void)psTraceSetLevel(".", 7);
-            psTrace(".", 5, "(0) This message should be displayed (%x)",
-                    0xbeefface);
-
-            (void)psTraceSetLevel(".a", 4);
-            psTrace(".a", 5, "(1) This message should not be displayed (%x)",
-                    0xbeefface);
-            (void)psTraceSetLevel(".a", 7);
-            psTrace(".a", 5, "(1) This message should be displayed (%x)",
-                    0xbeefface);
-
-            (void)psTraceSetLevel(".a.b", 4);
-            psTrace(".a.b", 5, "(2) This message should not be displayed (%x)",
-                    0xbeefface);
-            (void)psTraceSetLevel(".a.b", 7);
-            psTrace(".a.b", 5, "(2) This message should be displayed (%x)",
-                    0xbeefface);
-            (void)psTraceSetLevel(".a.b.c", 12);
-            psTrace(".a.b.c", 11, "(3) This message should be displayed (%x)",
-                    0xbeefface);
+        for (int nb = 0; nb < 4; nb++) {
+            if (nb == 0) psTraceSetDestination(((outFD == 2) ? 1 : outFD));
+            if (nb == 1) psTraceSetDestination(((outFD == 2) ? 2 : outFD));
+            if (nb == 2) psTraceSetDestination(((outFD == 2) ? 0 : outFD));
+            if (nb == 3) psTraceSetDestination(FD);
+
+            psTraceSetLevel(".", 4);
+            psTrace(".", 5, "(0) This message should not be displayed (%x)", 0xbeefface);
+            psTraceSetLevel(".", 7);
+            psTrace(".", 5, "(0) This message should be displayed (%x)", 0xbeefface);
+
+            psTraceSetLevel(".a", 4);
+            psTrace(".a", 5, "(1) This message should not be displayed (%x)", 0xbeefface);
+            psTraceSetLevel(".a", 7);
+            psTrace(".a", 5, "(1) This message should be displayed (%x)", 0xbeefface);
+
+            psTraceSetLevel(".a.b", 4);
+            psTrace(".a.b", 5, "(2) This message should not be displayed (%x)", 0xbeefface);
+            psTraceSetLevel(".a.b", 7);
+            psTrace(".a.b", 5, "(2) This message should be displayed (%x)", 0xbeefface);
+
+            psTraceSetLevel(".a.b.c", 12);
+            psTrace(".a.b.c", 11, "(3) This message should be displayed (%x)", 0xbeefface);
         }
         close(FD);
@@ -182,16 +154,16 @@
     {
         psMemId id = psMemGetId();
-        (void)psTraceSetDestination(outFD);
-        (void)psTraceSetLevel(".", 9);
-        (void)psTraceSetLevel(".a", 8);
-        (void)psTraceSetLevel(".b", 7);
-        (void)psTraceSetLevel(".c", 5);
-        (void)psTraceSetLevel(".a.a", 4);
-        (void)psTraceSetLevel(".a.b", 3);
-        (void)psTraceSetLevel(".b.a", 2);
-        (void)psTraceSetLevel(".b.b", 1);
-        (void)psTraceSetLevel(".c.a", 0);
-        (void)psTraceSetLevel(".c.b", 3);
-        (void)psTraceSetLevel(".c.c", 5);
+        psTraceSetDestination(outFD);
+        psTraceSetLevel(".", 9);
+        psTraceSetLevel(".a", 8);
+        psTraceSetLevel(".b", 7);
+        psTraceSetLevel(".c", 5);
+        psTraceSetLevel(".a.a", 4);
+        psTraceSetLevel(".a.b", 3);
+        psTraceSetLevel(".b.a", 2);
+        psTraceSetLevel(".b.b", 1);
+        psTraceSetLevel(".c.a", 0);
+        psTraceSetLevel(".c.b", 3);
+        psTraceSetLevel(".c.c", 5);
         psTracePrintLevels();
         ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
@@ -202,15 +174,15 @@
     {
         psMemId id = psMemGetId();
-        (void)psTraceSetLevel(".", 9);
-        (void)psTraceSetLevel("a", 8);
-        (void)psTraceSetLevel("b", 7);
-        (void)psTraceSetLevel("c", 5);
-        (void)psTraceSetLevel("a.a", 4);
-        (void)psTraceSetLevel("a.b", 3);
-        (void)psTraceSetLevel("b.a", 2);
-        (void)psTraceSetLevel("b.b", 1);
-        (void)psTraceSetLevel("c.a", 0);
-        (void)psTraceSetLevel("c.b", 3);
-        (void)psTraceSetLevel("c.c", 5);
+        psTraceSetLevel(".", 9);
+        psTraceSetLevel("a", 8);
+        psTraceSetLevel("b", 7);
+        psTraceSetLevel("c", 5);
+        psTraceSetLevel("a.a", 4);
+        psTraceSetLevel("a.b", 3);
+        psTraceSetLevel("b.a", 2);
+        psTraceSetLevel("b.b", 1);
+        psTraceSetLevel("c.a", 0);
+        psTraceSetLevel("c.b", 3);
+        psTraceSetLevel("c.c", 5);
         psTracePrintLevels();
         ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
@@ -221,34 +193,33 @@
     {
         psMemId id = psMemGetId();
-        (void)psTraceSetDestination(outFD);
-        (void)psTraceSetLevel(".", 9);
-        (void)psTraceSetLevel(".a", 8);
-        (void)psTraceSetLevel(".b", 7);
-        (void)psTraceSetLevel(".c", 5);
-        (void)psTraceSetLevel(".a.a", 4);
-        (void)psTraceSetLevel(".a.b", 3);
-        (void)psTraceSetLevel(".b.a", 2);
-        (void)psTraceSetLevel(".b.b", 1);
-        (void)psTraceSetLevel(".c.a", 0);
-        (void)psTraceSetLevel(".c.b", 3);
-        (void)psTraceSetLevel(".c.c", 5);
-        psTraceReset();
-
-        if ((psTraceGetLevel(".")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".a")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".b")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".c")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".a.a")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".a.b")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".b.a")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".b.b")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".c.a")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".c.b")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".c.c")!=PS_UNKNOWN_TRACE_LEVEL)) {
-            return 1;
-        }
-        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
-    }
-
+        psTraceSetDestination(outFD);
+        psTraceSetLevel(".", 9);
+        psTraceSetLevel(".a", 8);
+        psTraceSetLevel(".b", 7);
+        psTraceSetLevel(".c", 5);
+        psTraceSetLevel(".a.a", 4);
+        psTraceSetLevel(".a.b", 3);
+        psTraceSetLevel(".b.a", 2);
+        psTraceSetLevel(".b.b", 1);
+        psTraceSetLevel(".c.a", 0);
+        psTraceSetLevel(".c.b", 3);
+        psTraceSetLevel(".c.c", 5);
+        psTraceReset();
+
+	// the reset should clear all of the levels above
+	ok (psTraceGetLevel(".")    == PS_UNKNOWN_TRACE_LEVEL, "valid trace level");
+	ok (psTraceGetLevel(".a")   == PS_UNKNOWN_TRACE_LEVEL, "valid trace level");
+	ok (psTraceGetLevel(".b")   == PS_UNKNOWN_TRACE_LEVEL, "valid trace level");
+	ok (psTraceGetLevel(".c")   == PS_UNKNOWN_TRACE_LEVEL, "valid trace level");
+	ok (psTraceGetLevel(".a.a") == PS_UNKNOWN_TRACE_LEVEL, "valid trace level");
+	ok (psTraceGetLevel(".a.b") == PS_UNKNOWN_TRACE_LEVEL, "valid trace level");
+	ok (psTraceGetLevel(".b.a") == PS_UNKNOWN_TRACE_LEVEL, "valid trace level");
+	ok (psTraceGetLevel(".b.b") == PS_UNKNOWN_TRACE_LEVEL, "valid trace level");
+	ok (psTraceGetLevel(".c.a") == PS_UNKNOWN_TRACE_LEVEL, "valid trace level");
+	ok (psTraceGetLevel(".c.b") == PS_UNKNOWN_TRACE_LEVEL, "valid trace level");
+	ok (psTraceGetLevel(".c.c") == PS_UNKNOWN_TRACE_LEVEL, "valid trace level");
+
+        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
+    }
 
     // Ensure that the leading dot in the component names are optional.
@@ -257,40 +228,29 @@
         psMemId id = psMemGetId();
         psTraceReset();
-        (void)psTraceSetLevel(".", 9);
-        (void)psTraceSetLevel(".a", 8);
-        (void)psTraceSetLevel(".b", 7);
-        (void)psTraceSetLevel(".c", 5);
-        (void)psTraceSetLevel(".a.a", 4);
-        (void)psTraceSetLevel(".a.b", 3);
-        (void)psTraceSetLevel(".b.a", 2);
-        (void)psTraceSetLevel(".b.b", 1);
-        (void)psTraceSetLevel(".c.a", 0);
-        (void)psTraceSetLevel(".c.b", 3);
-        (void)psTraceSetLevel(".c.c", 5);
-        psTracePrintLevels();
-        if ((psTraceGetLevel(".")!=9) ||
-            (psTraceGetLevel("a")!=8) ||
-            (psTraceGetLevel("b")!=7) ||
-            (psTraceGetLevel("c")!=5) ||
-            (psTraceGetLevel("a.a")!=4) ||
-            (psTraceGetLevel("a.b")!=3) ||
-            (psTraceGetLevel("b.a")!=2) ||
-            (psTraceGetLevel("b.b")!=1) ||
-            (psTraceGetLevel("c.a")!=0) ||
-            (psTraceGetLevel("c.b")!=3) ||
-            (psTraceGetLevel("c.c")!=5)) {
-            printf("psTraceGetLevel(.) is %d", psTraceGetLevel("."));
-            printf("psTraceGetLevel(a) is %d", psTraceGetLevel("a"));
-            printf("psTraceGetLevel(b) is %d", psTraceGetLevel("b"));
-            printf("psTraceGetLevel(c) is %d", psTraceGetLevel("c"));
-            printf("psTraceGetLevel(a.a) is %d", psTraceGetLevel("a.a"));
-            printf("psTraceGetLevel(a.b) is %d", psTraceGetLevel("a.b"));
-            printf("psTraceGetLevel(b.a) is %d", psTraceGetLevel("b.a"));
-            printf("psTraceGetLevel(b.b) is %d", psTraceGetLevel("b.b"));
-            printf("psTraceGetLevel(c.a) is %d", psTraceGetLevel("c.a"));
-            printf("psTraceGetLevel(c.b) is %d", psTraceGetLevel("c.b"));
-            printf("psTraceGetLevel(c.c) is %d", psTraceGetLevel("c.c"));
-            return 1;
-        }
+        psTraceSetLevel(".", 9);
+        psTraceSetLevel(".a", 8);
+        psTraceSetLevel(".b", 7);
+        psTraceSetLevel(".c", 5);
+        psTraceSetLevel(".a.a", 4);
+        psTraceSetLevel(".a.b", 3);
+        psTraceSetLevel(".b.a", 2);
+        psTraceSetLevel(".b.b", 1);
+        psTraceSetLevel(".c.a", 0);
+        psTraceSetLevel(".c.b", 3);
+        psTraceSetLevel(".c.c", 5);
+        psTracePrintLevels();
+
+        ok(psTraceGetLevel(".")   == 9, "level is valid without first dot");
+        ok(psTraceGetLevel("a")   == 8, "level is valid without first dot");
+        ok(psTraceGetLevel("b")   == 7, "level is valid without first dot");
+        ok(psTraceGetLevel("c")   == 5, "level is valid without first dot");
+        ok(psTraceGetLevel("a.a") == 4, "level is valid without first dot");
+        ok(psTraceGetLevel("a.b") == 3, "level is valid without first dot");
+        ok(psTraceGetLevel("b.a") == 2, "level is valid without first dot");
+        ok(psTraceGetLevel("b.b") == 1, "level is valid without first dot");
+        ok(psTraceGetLevel("c.a") == 0, "level is valid without first dot");
+        ok(psTraceGetLevel("c.b") == 3, "level is valid without first dot");
+        ok(psTraceGetLevel("c.c") == 5, "level is valid without first dot");
+
         ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
     }
Index: trunk/psLib/test/sys/tst_psConfigure.c
===================================================================
--- trunk/psLib/test/sys/tst_psConfigure.c	(revision 24023)
+++ 	(revision )
@@ -1,52 +1,0 @@
-/** @file  tst_psConfigure.c
- *
- *  @brief Test driver for psconfigure functions
- *
- *  This test driver contains the following test points for psConfigure
- *  functions.
- *    1) Return current psLib version
- *
- *  Return:   Number of test points which failed
- *
- *  @author  Ross Harman, MHPCC
- *
- *  @version $Revision: 1.1 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2005-07-13 02:47:01 $
- *
- *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
- *
- */
-
-#include "pslib_strict.h"
-#include "psTest.h"
-
-
-static psS32 psLibVersion00(void);
-
-
-testDescription tests[] = {
-                              {psLibVersion00, 0, "Return current psLib version", 0, false},
-                              {NULL}
-                          };
-
-
-psS32 main(psS32 argc, char* argv[])
-{
-    psLogSetLevel(PS_LOG_INFO);
-
-    return(!runTestSuite( stderr, "psConfigure", tests, argc, argv));
-}
-
-
-static psS32 psLibVersion00(void)
-{
-    char *stringVal = NULL;
-
-    stringVal = psLibVersion();
-    psLogMsg(__func__,PS_LOG_INFO,"Current psLib version is: %s", stringVal);
-    psFree(stringVal);
-
-
-    return 0;
-}
-
Index: trunk/psLib/test/sys/tst_psError.c
===================================================================
--- trunk/psLib/test/sys/tst_psError.c	(revision 24023)
+++ 	(revision )
@@ -1,394 +1,0 @@
-/** @file  tst_psError.c
- *
- *  @brief Test driver for psError function
- *
- *  This test driver contains the following test points for psError
- *     testError00 - psError()                          (Testpoint #486)
- *     testError01 - psErrorMsg(), psErrorStackPrint()  (Testpoint #725)
- *     testError02 - psErrorStackPrintV()               (Testpoint #726)
- *     testError03 - psErrorGet(), psErrorLast()        (Testpoint #727)
- *     testError04 - psErrorClear()                     (Testpoint #728)
- *     testError05 - psErrorCodeString()                (Testpoint #729)
- *
- *  @author  Eric Van Alst, MHPCC
- *
- *  @version $Revision: 1.2 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2007-02-27 23:56:12 $
- *
- *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "pslib_strict.h"
-#include "psTest.h"
-
-static psS32 testError00(void);
-static psS32 testError01(void);
-static psS32 testError02(void);
-static psS32 testError03(void);
-static psS32 testError04(void);
-static psS32 testError05(void);
-static psS32 testErrorRegister(void);
-
-// Function used in testError02 to verify the psErrorStackPrintV function
-static void myErrorStackPrint(FILE *fd,
-                              const char *fmt,
-                              ...)
-{
-    va_list ap;
-
-    // Test whether psErrorStackPrintV() accept a va_list for output variables
-    va_start(ap, fmt);
-    psErrorStackPrintV(fd, fmt, ap);
-    va_end(ap);
-}
-
-testDescription tests[] = {
-                              {testError00, 486, "psError()", 0, false},
-                              {testError01, 725, "psErrorMsg(),psErrorStackPrint()", 0, false},
-                              {testError02, 726, "psErrorStackPrintV()", 0, false},
-                              {testError03, 727, "psErrorGet(),psErrorLast()", 0, false},
-                              {testError04, 728, "psErrorClear()", 0, false},
-                              {testError05, 729, "psErrorCodeString()", 0, false},
-                              {testErrorRegister, 751, "psErrorRegister()", 0, false},
-                              {NULL}
-                          };
-
-psS32 main( psS32 argc, char* argv[] )
-{
-    psLogSetLevel( PS_LOG_INFO );
-
-//    return ( !runTestSuite(stderr, "psError", tests, argc, argv) );
-    testError03();
-}
-
-static psS32 testError05(void)
-{
-    psErrorCode code = PS_ERR_BAD_PARAMETER_VALUE;
-
-    // Verify the return value of psErrorCodeString
-    psLogMsg("tst_psError05", PS_LOG_INFO, psErrorCodeString(code));
-
-    // Verify the return value of psErrorCodeString if code is negative
-    if( psErrorCodeString(-1) != NULL) {
-        psLogMsg("tst_psError05", PS_LOG_INFO, "Failed error string with neg. code");
-        return 40;
-    }
-
-    return 0;
-}
-
-static psS32 testError04(void)
-{
-    psErrorCode code = PS_ERR_BAD_PARAMETER_VALUE;
-    psErr *last = NULL;
-    psErr *lastAfterClear = NULL;
-
-    // With an attemp error stack call psErrorClear
-    psErrorClear();
-
-    // Get the last error message and verify PS_ERR_NONE (empty stack)
-    lastAfterClear = psErrorLast();
-    if(lastAfterClear->code != PS_ERR_NONE) {
-        psLogMsg("tst_psError05", PS_LOG_ERROR, "psErrorLast did not return expected.");
-        return 30;
-    }
-    psFree(lastAfterClear);
-
-    // Generate three error messages to have messages on error stack
-    if (psError(code, true, "Error code = %d", code) !=  code) {
-        psLogMsg("tst_psError04", PS_LOG_ERROR, "Failed return value verify.");
-        return 31;
-    }
-    if (psError((code+1), false, "Error code = %d", (code+1)) != (code+1)) {
-        psLogMsg("tst_psError04", PS_LOG_ERROR, "Failed return value verify.");
-        return 32;
-    }
-    if (psError((code+2), false, "Error code = %d", (code+2)) != (code+2)) {
-        psLogMsg("tst_psError04", PS_LOG_ERROR, "Failed return value verify.");
-        return 33;
-    }
-
-    // Get the last error message and verify it has the expected code
-    last = psErrorLast();
-    if(last->code != (code+2)) {
-        psLogMsg("tst_psError04", PS_LOG_ERROR, "psErrorLast did not return expected.");
-        return 34;
-    }
-    psFree(last);
-
-    // Clear the error stack
-    psErrorClear();
-
-    // Get the last error message after clear and verify is has PS_ERR_NONE code
-    lastAfterClear = psErrorLast();
-    if(lastAfterClear->code != PS_ERR_NONE) {
-        psLogMsg("tst_psError05", PS_LOG_ERROR, "psErrorLast did not return expected.");
-        return 35;
-    }
-    psFree(lastAfterClear);
-
-    return 0;
-}
-
-static psS32 testError03(void)
-{
-    psErrorCode code = PS_ERR_BAD_PARAMETER_VALUE;
-    psErr *last = NULL;
-    psErr *getErr = NULL;
-
-    // Attempt to get last error message with an empty stack verify psErr with code PS_ERR_NONE
-    last = psErrorLast();
-    if(last->code != PS_ERR_NONE) {
-        psLogMsg("tst_psError03", PS_LOG_ERROR, "psErrorLast did return PS_ERR_NONE for empty stack");
-        return 20;
-    }
-    psFree(last);
-
-    // Attempt to get specific error message with empty stack verify psErr with code PS_ERR_NONE
-    getErr= psErrorGet(2);
-    if(getErr->code != PS_ERR_NONE) {
-        psLogMsg("tst_psError03", PS_LOG_ERROR, "psErrorGet did not return PS_ERR_NONE  for empty stack");
-        return 21;
-    }
-    psFree(getErr);
-
-    // Attempt to get error message with invalid index and an empty stack
-    getErr= psErrorGet(-1);
-    if(getErr->code != PS_ERR_NONE) {
-        psLogMsg("tst_psError03", PS_LOG_ERROR, "psErrorGet with invalid index/empty stack");
-        return 22;
-    }
-    psFree(getErr);
-
-    // Generate three error messages
-    if (psError(code, true, "Error code = %d", code) !=  code) {
-        psLogMsg("tst_psError03", PS_LOG_ERROR, "Failed return value verify.");
-        return 23;
-    }
-    if (psError((code+1), false, "Error code = %d", (code+1)) != (code+1)) {
-        psLogMsg("tst_psError03", PS_LOG_ERROR, "Failed return value verify.");
-        return 24;
-    }
-    if (psError((code+2), false, "Error code = %d", (code+2)) != (code+2)) {
-        psLogMsg("tst_psError03", PS_LOG_ERROR, "Failed return value verify.");
-        return 25;
-    }
-
-    last = psErrorLast();
-    getErr= psErrorGet(0);
-
-    // Check that last and get with 0 index are equal
-    if(last != getErr) {
-        psLogMsg("tst_psError03", PS_LOG_ERROR, "psErrorGet(0) not equal to psErrorLast");
-        return 26;
-    }
-    psFree(last);
-
-    // Verify the last error message was returned
-    if ( getErr->code != (code+2) ) {
-        psLogMsg("tst_psError03", PS_LOG_ERROR, "psErrorLast() did not retrieve last error");
-        return 27;
-    }
-    psFree(getErr);
-
-    // Verify the middle error message can be retrieved
-    getErr= psErrorGet(1);
-    if ( getErr->code != (code+1)) {
-        psLogMsg("tst_psError03", PS_LOG_ERROR, "psErrorGet() did not retrieve proper error");
-        return 28;
-    }
-    psFree(getErr);
-
-    // Verify the psErrorGet returns NULL if an invalid index is given
-    getErr= psErrorGet(-1);
-    if ( getErr->code != PS_ERR_NONE ) {
-        psLogMsg("tst_psError03", PS_LOG_ERROR, "psErrorGet() did not return PS_ERR_NONE w/ invalid arg");
-        return 29;
-    }
-    psFree(getErr);
-
-    return 0;
-}
-
-static psS32 testError02(void)
-{
-    psErrorCode code = PS_ERR_BAD_PARAMETER_VALUE;
-
-    // Generate error message and verify return value
-    if (psError(code, true, "Error code = %d", code) != code ) {
-        psLogMsg("tst_psError02", PS_LOG_ERROR, "Failed return value verify.");
-        return 10;
-    }
-    myErrorStackPrint(stderr,"ERROR STACK PRINT Test%dA",2);
-
-    return 0;
-}
-
-static psS32 testError01(void)
-{
-    psErrorCode code=PS_ERR_BAD_PARAMETER_VALUE;
-
-    // Verify the return value of psErrorMsg is the psErrorCode passed
-    if ( psError(code, true, "Error code = %d", code) != code) {
-        psLogMsg("tst_psError01", PS_LOG_ERROR, "Failed return value verify.");
-        return 1;
-    }
-    psErrorStackPrint(stderr,"ERROR STACK PRINT Test1A");
-
-    // test1B empty string in for name argument
-    if ( psError(code+1, true, "Error code = %d", code+1) != code+1) {
-        psLogMsg("tst_psError01", PS_LOG_ERROR, "Failed return with empty string.");
-        return 2;
-    }
-    psErrorStackPrint(stderr,"ERROR STACK PRINT Test1B");
-
-    // test1D undefined code
-    if ( psError(-1, true, "Error code = %d", -1) != -1) {
-        psLogMsg("test_psError01", PS_LOG_ERROR, "Failed return with undefined code.");
-        return 4;
-    }
-    psErrorStackPrint(stderr,"ERROR STACK PRINT Test1D");
-
-    // test1E set psErrorMsg argument to false
-    if( psError(code, false, "Error code = %d", code) != code) {
-        psLogMsg("test_psError01", PS_LOG_ERROR, "Failed return with false new arg.");
-        return 5;
-    }
-    psErrorStackPrint(stderr,"ERROR STACK PRINT Test1E");
-
-    // test1F psErrorMsg with a error code less then PS_ERR_BASE(256)
-    if( psError(9, true, "Errno code = %d", 9) != 9) {
-        psLogMsg("test_psError01", PS_LOG_ERROR, "Failed return with errno code.");
-        return 6;
-    }
-    psErrorStackPrint(stderr,"ERROR STACK PRINT Test1F");
-
-    return 0;
-}
-
-static psS32 testError00(void)
-{
-
-    psS32  intval=1;
-    psS64 longval = 2;
-    float floatval = 3.01;
-    char  charval = 'E';
-    char *stringval = "E R R O R";
-
-    // Test point #1 Multiple type values placed in the error string
-    psError(PS_ERR_UNKNOWN, true,
-            "ALL TYPES intval = %d longval = %lld floatval = %f charval = %c strval = %s",
-            intval,longval,floatval,charval,stringval);
-
-    // Test point #2 String values in error message
-    psError(PS_ERR_UNKNOWN, true, "NO VALUES");
-
-    // Test point #3 Empty strings in error message
-    psError(PS_ERR_UNKNOWN, true, "");
-
-    return 0;
-}
-
-static psS32 testErrorRegister(void)
-{
-
-    psS32 numErr = 4;
-    psErrorDescription errDesc[] = { {PS_ERR_N_ERR_CLASSES+1,"first"},
-                                     {PS_ERR_N_ERR_CLASSES+2,"second"},
-                                     {PS_ERR_N_ERR_CLASSES+3,"third"},
-                                     {PS_ERR_N_ERR_CLASSES+4,"fourth"} };
-    /*
-        1. invoke psErrorRegister with a n>1 array of psErrorDescriptions. Verify that:
-            a. Each error description given is retrievable with psErrorCodeString.
-    */
-    psErrorRegister(errDesc,numErr);
-
-    for (psS32 i = 0; i < numErr; i++) {
-        const char* desc = psErrorCodeString(PS_ERR_N_ERR_CLASSES+1+i);
-        if (desc == NULL) {
-            psLogMsg(__func__,PS_LOG_ERROR,
-                     "psErrorCode didn't find registered error code.");
-            return 1+i*10;
-        }
-        if (strcmp(desc,errDesc[i].description) != 0) {
-            psLogMsg(__func__,PS_LOG_ERROR,
-                     "psErrorCode didn't return the proper description.  Got '%s', expected '%s'.",
-                     desc,errDesc[i].description);
-            return 2+i*10;
-        }
-    }
-
-    /*
-        2. invoke psErrorCodeString with a static/builtin psLib error code. Verify:
-            a. the result is correct.
-    */
-    const char* desc = psErrorCodeString(PS_ERR_N_ERR_CLASSES);
-    if (desc == NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psErrorCode didn't find static error code.");
-        return 40;
-    }
-    if (strcmp(desc,"error classes end marker") != 0) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psErrorCode didn't return the proper description.  Got '%s', expected '%s'.",
-                 desc,"error classes end marker");
-        return 41;
-    }
-
-    desc = psErrorCodeString(PS_ERR_NONE);
-    if (desc == NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psErrorCode didn't find static error code.");
-        return 42;
-    }
-    if (strcmp(desc,"not an error") != 0) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psErrorCode didn't return the proper description.  Got '%s', expected '%s'.",
-                 desc,"not an error");
-        return 43;
-    }
-
-    /*
-        3. invoke psErrorCodeString with an invalid code. Verify a NULL is returned.
-    */
-    desc = psErrorCodeString(PS_ERR_N_ERR_CLASSES+numErr+1);
-    if (desc != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psErrorCode didn't return a NULL with a bogus input code.");
-        return 44;
-    }
-
-    /*
-        4. invoke psErrorRegister with a NULL psErrorDescription. Verify that:
-            a. the execution does not cease.
-            b. an appropriate error is generated.
-    */
-    psLogMsg(__func__,PS_LOG_INFO,"Following should be an error.");
-    psErrorClear();
-    psErrorRegister(NULL,1);
-    psErr* err = psErrorLast();
-    if (err->code != PS_ERR_BAD_PARAMETER_NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psErrorCode didn't generate proper error code for NULL input.");
-        return 45;
-    }
-    psFree(err);
-
-    /*
-        5. invoke psErrorRegister with nerror=0. Verify that no error occurs.
-    */
-    psErrorClear();
-    psErrorRegister(errDesc,0);
-    err = psErrorLast();
-    if (err->code != PS_ERR_NONE) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psErrorCode generated an error for nErrors = 0.");
-        return 46;
-    }
-    psFree(err);
-    return 0;
-}
Index: trunk/psLib/test/sys/tst_psLine.c
===================================================================
--- trunk/psLib/test/sys/tst_psLine.c	(revision 24023)
+++ 	(revision )
@@ -1,142 +1,0 @@
-/** @file  tst_psLine.c
- *
- *  @brief Test driver for psLine functions
- *
- *  @author  dRob, MHPCC
- *
- *  @version $Revision: 1.1 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2006-07-14 02:26:25 $
- *
- *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
- *
- */
-
-#include "pslib_strict.h"
-#include "psTest.h"
-
-static psS32 testLineAlloc(void);
-static psS32 testLineInit(void);
-static psS32 testLineAdd(void);
-static psS32 testLineChk(void);
-
-testDescription tests[] = {
-                              {testLineAlloc, 0, "Verify Line Alloc/Free", 0, false},
-                              {testLineInit, 1, "Verify Line Init", 0, false},
-                              {testLineAdd, 2, "Verify Line Add", 0, false},
-                              {testLineChk, 3, "Verify Line MemCheck", 0, false},
-                              {NULL}
-                          };
-
-psS32 main( psS32 argc, char* argv[] )
-{
-    psLogSetLevel( PS_LOG_INFO );
-
-    return ( ! runTestSuite( stderr, "psLine", tests, argc, argv ) );
-}
-
-psS32 testLineAlloc(void)
-{
-    psLine *lineline = NULL;
-    lineline = psLineAlloc(20);
-
-    if (lineline->NLINE != 20) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                "psLine set NLINE parameter incorrectly during Allocation!\n");
-        return 2;
-    }
-    if (lineline->Nline != 0) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                "psLine set Nline parameter incorrectly during Allocation!\n");
-        return 2;
-    }
-    strncpy(lineline->line, "Hello World", 20);
-    if (strncmp(lineline->line, "Hello World", 20)) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                "psLine was unable to store a simple string!\n");
-        return 3;
-    }
-
-    psFree(lineline);
-
-    return 0;
-}
-
-psS32 testLineInit(void)
-{
-    psLine *line = NULL;
-    //Return false for NULL input
-    if (psLineInit(line) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                "psLineInit failed.  Expected false for NULL psLine input.\n");
-        return 1;
-    }
-    //Allocate a line and return true on Init
-    line = psLineAlloc(1);
-    if(!psLineInit(line) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                "psLineInit failed.  Expected true for valid psLine input.\n");
-        return 2;
-    }
-    if (line->NLINE != 1 || line->Nline != 0) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                "psLineInit failed to return the correct line parameters.\n");
-        return 3;
-    }
-
-    psFree(line);
-
-    return 0;
-}
-
-psS32 testLineAdd(void)
-{
-    psLine *line = NULL;
-    //Return false for NULL input
-    if (psLineAdd(line, "Hello World") ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                "psLineAdd failed.  Expected false for NULL psLine input.\n");
-        return 1;
-    }
-    //Allocate and return true for valid input.
-    line = psLineAlloc(20);
-    if (!psLineAdd(line, "Hello %s", "World") ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                "psLineAdd failed.  Expected true for valid psLine input.\n");
-        return 2;
-    }
-    if (line->NLINE != 20 || line->Nline != 11) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                "psLineAdd failed to return the correct line parameters.\n");
-        return 3;
-    }
-    if (strncmp(line->line, "Hello World", 20)) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                "psLineAdd failed to store the correct line string.\n");
-        printf("\n  %s\n", line->line);
-        return 4;
-    }
-
-    psFree(line);
-
-    return 0;
-}
-
-psS32 testLineChk(void)
-{
-    psLine *line = NULL;
-    //Return false for Null input line
-    if (psMemCheckLine(line)) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                "psMemCheckLine failed to return false for NULL line input.\n");
-        return 1;
-    }
-    line = psLineAlloc(1);
-    if (!psMemCheckLine(line)) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                "psMemCheckLine failed to return true for valid line input.\n");
-        return 2;
-    }
-    psFree(line);
-
-    return 0;
-}
Index: trunk/psLib/test/sys/tst_psMemory.c
===================================================================
--- trunk/psLib/test/sys/tst_psMemory.c	(revision 24023)
+++ 	(revision )
@@ -1,827 +1,0 @@
-/** @file  tst_psMemory.c
-*
-*  @brief Contains the tests for psMemory.[ch]
-*
-*
-*  @author Robert DeSonia, MHPCC
-*
-*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-04-04 19:52:55 $
-*
-*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
-*/
-
-#include <unistd.h>
-#include <sys/wait.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <limits.h>
-#include <stdlib.h>
-
-
-#include "psTest.h"
-#include "pslib.h" // need to allow malloc for callback use
-
-static psS32 TPFreeReferencedMemory( void );
-static psS32 TPOutOfMemory( void );
-static psS32 TPReallocOutOfMemory( void );
-static psPtr TPOutOfMemoryExhaustedCallback( size_t size );
-static psS32 TPCheckBufferPositive( void );
-static psS32 TPrealloc( void );
-static psS32 TPallocCallback( void );
-static psMemId memAllocCallback( const psMemBlock *ptr );
-static psMemId memFreeCallback( const psMemBlock *ptr );
-static psS32 TPcheckLeaks( void );
-static psS32 TPmemCorruption( void );
-static psS32 TPmultipleFree( void );
-static psS32 memCheckTypes( void );
-void memProblemCallback( psMemBlock *ptr, const char *filename, unsigned int lineno );
-
-static psS32 problemCallbackCalled = 0;
-static psS32 allocCallbackCalled = 0;
-static psS32 freeCallbackCalled = 0;
-static psS32 exhaustedCallbackCalled = 0;
-
-testDescription tests[] = {
-                              {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},
-                              {TPmultipleFree, 699, "multipleFree", -6, false},
-                              {memCheckTypes, 700, "psMemCheckType", 0, false},
-                              {NULL}
-                          };
-
-psS32 main(psS32 argc, char* argv[])
-{
-    psLogSetFormat("HLNM");
-    psLogSetLevel( PS_LOG_INFO );
-
-    return ( ! runTestSuite( stderr, "psMemory", tests, argc, argv ) );
-}
-
-// Testpoint #449, psAlloc shall allocate memory blocks writeable by caller.
-psS32 TPCheckBufferPositive( void )
-{
-    psS32 * mem;
-    const psS32 size = 100;
-    psS32 failed = 0;
-
-    psLogMsg( __func__, PS_LOG_INFO, "psAlloc shall allocate memory blocks writeable by caller.\n" );
-
-    mem = ( psS32* ) psAlloc( size * sizeof( psS32 ) );
-    if ( mem == NULL ) {
-        psError(PS_ERR_UNKNOWN, true, "psAlloc returned a NULL value in %s!", __func__ );
-        return 1;
-    }
-
-    for ( psS32 index = 0;index < size;index++ ) {
-        mem[ index ] = index;
-    }
-
-    for ( psS32 index = 0;index < size;index++ ) {
-        if ( mem[ index ] != index ) {
-            failed++;
-        }
-    }
-
-    psFree( mem );
-
-    return failed;
-}
-
-psS32 TPFreeReferencedMemory( void )
-{
-    // create memory
-    psS32 * mem;
-    psS32 ref = 0;
-
-    psLogMsg( __func__, PS_LOG_INFO, "memory reference count shall be incrementable/decrementable" );
-
-    mem = ( psS32* ) psAlloc( 100 * sizeof( psS32 ) );
-
-    ref = psMemGetRefCounter( mem );
-    if ( ref != 1 ) {
-        psError(PS_ERR_UNKNOWN, true, "Expected to buffer reference count to be initially 1, but it was %d.", ref );
-        return 1;
-    }
-
-    psMemIncrRefCounter( mem );
-    psMemIncrRefCounter( mem );
-    psMemIncrRefCounter( mem );
-
-    ref = psMemGetRefCounter( mem );
-    if ( ref != 4 ) {
-        psError(PS_ERR_UNKNOWN, true, "Expected to find buffer reference count to be 4, but it was %d.", ref );
-        return 1;
-    }
-
-    psMemDecrRefCounter( mem );
-    psMemDecrRefCounter( mem );
-
-    ref = psMemGetRefCounter( mem );
-    if ( ref != 2 ) {
-        psError(PS_ERR_UNKNOWN, true, "Expected to find buffer reference count to be 2, but it was %d.", ref );
-        return 1;
-    }
-
-    psLogMsg( __func__, PS_LOG_INFO, "psFree shall be just decrement a multiple refererenced pointer." );
-
-    psMemDecrRefCounter( mem );
-
-    ref = psMemGetRefCounter( mem );
-    if ( ref != 1 ) {
-        psError(PS_ERR_UNKNOWN, true, "Expected to find buffer reference count to be 1, but it was %d.", ref );
-        return 1;
-    }
-
-    psFree( mem );
-
-    return 0;
-}
-
-// Bug/Task #562 regression test.  Upon requesting more memory than is available, psRealloc shall call
-// the psMemExhaustedCallback.
-psS32 TPReallocOutOfMemory( void )
-{
-    psS32 * mem[ 100 ];
-    psMemExhaustedCallback cb;
-
-    for ( psS32 lcv = 0; lcv < 100; lcv++ ) {
-        mem[ lcv ] = NULL;
-    }
-
-    psLogMsg( __func__, PS_LOG_INFO, "Upon requesting more memory than is available, psRealloc shall call "
-              "the psMemExhaustedCallback.\n" );
-
-    exhaustedCallbackCalled = 0;
-
-    cb = psMemExhaustedCallbackSet( TPOutOfMemoryExhaustedCallback );
-
-    for ( psS32 lcv = 0; lcv < 100; lcv++ ) {
-        mem[ lcv ] = ( psS32* ) psAlloc( 10 );
-    }
-
-    for ( psS32 lcv = 0; lcv < 100; lcv++ ) {
-        mem[ lcv ] = ( psS32* ) psRealloc( mem[ lcv ], SIZE_MAX/2 - 1000 );
-    }
-
-    psMemExhaustedCallbackSet( cb );
-
-    if ( exhaustedCallbackCalled == 0 ) {
-        psError(PS_ERR_UNKNOWN,true, "Called psRealloc with HUGE memory requirement and survived in %s!", __func__ );
-        return 1;
-    }
-
-    for ( psS32 lcv = 0; lcv < 100; lcv++ ) {
-        psFree( mem[ lcv ] );
-    }
-
-    return 0;
-}
-// Testpoint #450,  Upon requesting more memory than is available, psalloc shall call
-// the psMemExhaustedCallback.
-psS32 TPOutOfMemory( void )
-{
-    psS32 * mem[ 100 ];
-    psMemExhaustedCallback cb;
-
-    for ( psS32 lcv = 0; lcv < 100; lcv++ ) {
-        mem[ lcv ] = NULL;
-    }
-
-    psLogMsg( __func__, PS_LOG_INFO, "Upon requesting more memory than is available, psalloc shall call "
-              "the psMemExhaustedCallback.\n" );
-
-    exhaustedCallbackCalled = 0;
-
-    cb = psMemExhaustedCallbackSet( TPOutOfMemoryExhaustedCallback );
-
-    for ( psS32 lcv = 0; lcv < 100; lcv++ ) {
-        mem[ lcv ] = ( psS32* ) psAlloc( SIZE_MAX/2 - 1000 );
-    }
-
-    psMemExhaustedCallbackSet( cb );
-
-    if ( exhaustedCallbackCalled == 0 ) {
-        psError(PS_ERR_UNKNOWN,true, "Called psAlloc with HUGE memory requirement and survived in %s!", __func__ );
-        return 1;
-    }
-
-    for ( psS32 lcv = 0; lcv < 100; lcv++ ) {
-        psFree( mem[ lcv ] );
-    }
-
-    return 0;
-}
-
-// Testpoint #451,  psRealloc shall increase/decrease memory buffer while preserving contents
-psS32 TPrealloc( void )
-{
-    psS32 * mem1;
-    psS32* mem2;
-    psS32* mem3;
-    const psS32 initialSize = 100;
-
-    psLogMsg( __func__, PS_LOG_INFO, "psRealloc shall increase/decrease memory buffer while "
-              "preserving contents" );
-
-    // allocate buffer with known values.
-    mem1 = ( psS32* ) psAlloc( initialSize * sizeof( psS32 ) );
-    mem2 = ( psS32* ) psAlloc( initialSize * sizeof( psS32 ) );
-    mem3 = ( psS32* ) psAlloc( initialSize * sizeof( psS32 ) );
-    for ( psS32 lcv = 0;lcv < initialSize;lcv++ ) {
-        mem1[ lcv ] = mem2[ lcv ] = mem3[ lcv ] = lcv;
-    }
-
-    psMemCheckCorruption( 1 );
-    psLogMsg( __func__, PS_LOG_INFO, "Expanding memory buffer." );
-
-    // realloc to 2x
-    mem1 = ( psS32* ) psRealloc( mem1, 2 * initialSize * sizeof( psS32 ) );
-    mem2 = ( psS32* ) psRealloc( mem2, 2 * initialSize * sizeof( psS32 ) );
-    mem3 = ( psS32* ) psRealloc( mem3, 2 * initialSize * sizeof( psS32 ) );
-
-    // check values of initial block
-    for ( psS32 i = 0;i < initialSize;i++ ) {
-        if ( mem1[ i ] != i || mem2[ i ] != i || mem3[ i ] != i ) {
-            psError(PS_ERR_UNKNOWN,true, "Realloc didn't preserve the contents with expanding buffer in %s.",
-                    __func__ );
-            break;
-        }
-    }
-
-    psMemCheckCorruption( 1 );
-    psLogMsg( __func__, PS_LOG_INFO, "Shrinking memory buffer." );
-
-    // realloc to 1/2 initial value.
-    mem1 = ( psS32* ) psRealloc( mem1, ( initialSize / 2 ) * sizeof( psS32 ) );
-    mem2 = ( psS32* ) psRealloc( mem2, ( initialSize / 2 ) * sizeof( psS32 ) );
-    mem3 = ( psS32* ) psRealloc( mem3, ( initialSize / 2 ) * sizeof( psS32 ) );
-
-    // check values of initial block
-    for ( psS32 i = 0;i < initialSize / 2;i++ ) {
-        if ( mem1[ i ] != i || mem2[ i ] != i || mem3[ i ] != i ) {
-            psError(PS_ERR_UNKNOWN,true, "Realloc didn't preserve the contents with shrinking buffer in %s.",
-                    __func__ );
-            break;
-        }
-    }
-
-    psFree( mem1 );
-    psFree( mem2 );
-    psFree( mem3 );
-
-    return 0;
-}
-
-psS32 TPallocCallback( void )
-{
-    psS32 * mem1;
-    psS32* mem2;
-    psS32* mem3;
-    psS32 currentId = psMemGetId();
-    const psS32 initialSize = 100;
-    psS32 mark;
-
-    allocCallbackCalled = 0;
-    freeCallbackCalled = 0;
-    psMemAllocCallbackSet( memAllocCallback );
-    psMemFreeCallbackSet( memFreeCallback );
-
-    psMemAllocCallbackSetID( currentId + 1 );
-    psMemFreeCallbackSetID( currentId + 1 );
-
-    psLogMsg( __func__, PS_LOG_INFO, "call to psAlloc/psRealloc shall generate a callback if specified "
-              "memory ID is allocated." );
-
-    // allocate buffer with known values.
-    mem1 = ( psS32* ) psAlloc( initialSize * sizeof( psS32 ) );
-    mem2 = ( psS32* ) psAlloc( initialSize * sizeof( psS32 ) );
-    mem3 = ( psS32* ) psAlloc( initialSize * sizeof( psS32 ) );
-
-    psFree( mem1 );
-    psFree( mem2 );
-    psFree( mem3 );
-
-    if ( allocCallbackCalled != 2 || freeCallbackCalled != 2 ) {
-        psError(PS_ERR_UNKNOWN,true, "alloc/free callbacks were not called the proper number of times in %s",
-                __func__ );
-        return 1;
-    }
-
-    allocCallbackCalled = 0;
-    freeCallbackCalled = 0;
-
-    mark = psMemGetId();
-
-    mem1 = ( psS32* ) psAlloc( initialSize * sizeof( psS32 ) );
-
-    psMemAllocCallbackSetID( mark );
-
-    mem1 = ( psS32* ) psRealloc( mem1, initialSize * 2 * sizeof( psS32 ) );
-
-    psFree( mem1 );
-
-    if ( allocCallbackCalled != 2 ) {
-        psError(PS_ERR_UNKNOWN,true, "realloc callbacks were not called the proper number of times in %s",
-                __func__ );
-        return 1;
-    }
-
-    return 0;
-
-}
-
-psS32 TPcheckLeaks( void )
-{
-    const psS32 numBuffers = 5;
-    psS32* buffers[ 5 ];
-    psS32 lcv;
-    psS32 currentId = psMemGetId();
-    psMemBlock** blks;
-    psS32 nLeaks = 0;
-    psS32 lineMark = 0;
-
-    psLogMsg( __func__, PS_LOG_INFO, "psMemCheckLeaks shall return the number of blocks above an ID "
-              "that are still allocated" );
-
-    for ( lcv = 0;lcv < numBuffers;lcv++ ) {
-        lineMark = __LINE__ + 1;
-        buffers[ lcv ] = psAlloc( sizeof( psS32 ) );
-    }
-
-    for ( lcv = 1;lcv < numBuffers;lcv++ ) {
-        psFree( buffers[ lcv ] );
-    }
-
-    psLogMsg( __func__, PS_LOG_INFO, "following psMemCheckLeaks call should produce one instance." );
-
-    nLeaks = psMemCheckLeaks( currentId, &blks, stderr, false );
-
-    if ( nLeaks != 1 ) {
-        psError(PS_ERR_UNKNOWN,true, "psMemCheckLeaks should have found 1 leak, but found %d in %s.", nLeaks, __func__ );
-        return 1;
-    }
-
-    if ( blks[ 0 ] ->lineno != lineMark ) {
-        psError(PS_ERR_UNKNOWN,true, "psMemCheckLeaks found a leak other than the expected one (line %d vs %d) in %s.",
-                lineMark, blks[ 0 ] ->lineno, __func__ );
-        return 1;
-    }
-
-    psFree( buffers[ 0 ] );
-    psFree( blks );
-
-    psLogMsg( __func__, PS_LOG_INFO, "Testing psMemCheckLeaks again with a different leak location" );
-    psMemCheckLeaks(currentId,NULL,stderr, false);
-
-    for ( lcv = 0;lcv < numBuffers;lcv++ ) {
-        lineMark = __LINE__ + 1;
-        buffers[ lcv ] = psAlloc( sizeof( psS32 ) );
-    }
-
-    for ( lcv = 0;lcv < numBuffers - 1;lcv++ ) {
-        psFree( buffers[ lcv ] );
-    }
-
-    psLogMsg( __func__, PS_LOG_INFO, "following psMemCheckLeaks call should produce one error." );
-
-    nLeaks = psMemCheckLeaks( currentId, &blks, stderr, false );
-
-    if ( nLeaks != 1 ) {
-        psError(PS_ERR_UNKNOWN,true, "psMemCheckLeaks should have found 1 leak, but found %d in %s.", nLeaks, __func__ );
-        return 1;
-    }
-
-    if ( blks[ 0 ] ->lineno != lineMark ) {
-        psError(PS_ERR_UNKNOWN,true, "psMemCheckLeaks found a leak other than the expected one in %s.", __func__ );
-        return 1;
-    }
-
-    psFree( buffers[ 4 ] );
-    psFree( blks );
-
-    psLogMsg( __func__, PS_LOG_INFO, "Testing psMemCheckLeaks again with multiple leak locations." );
-
-    for ( lcv = 0;lcv < numBuffers;lcv++ ) {
-        lineMark = __LINE__ + 1;
-        buffers[ lcv ] = psAlloc( sizeof( psS32 ) );
-    }
-
-    for ( lcv = 0;lcv < numBuffers;lcv++ ) {
-        if ( lcv % 2 == 0 ) {
-            psFree( buffers[ lcv ] );
-        }
-    }
-
-    psLogMsg( __func__, PS_LOG_INFO, "following psMemCheckLeaks call should produce two errors." );
-
-    nLeaks = psMemCheckLeaks( currentId, &blks, stderr, false );
-
-    if ( nLeaks != 2 ) {
-        psError(PS_ERR_UNKNOWN,true, "psMemCheckLeaks should have found 1 leak, but found %d in %s.", nLeaks, __func__ );
-        return 1;
-    }
-
-    if ( blks[ 0 ] ->lineno != lineMark ) {
-        psError(PS_ERR_UNKNOWN,true, "psMemCheckLeaks found a leak other than the expected one in %s.", __func__ );
-        return 1;
-    }
-
-    psFree( blks );
-    psFree( buffers[ 1 ] );
-    psFree( buffers[ 3 ] );
-
-    return 0;
-}
-
-psS32 TPmemCorruption( void )
-{
-    psS32 * buffer = NULL;
-    psS32 oldValue = 0;
-    psS32 corruptions = 0;
-    psMemProblemCallback cb;
-
-    psLogMsg( __func__, PS_LOG_INFO, "psMemCheckCorruption shall detect memory corruptions" );
-
-    buffer = psAlloc( sizeof( psS32 ) );
-
-    // cause memory corruption via buffer underflow
-    *buffer = 1;
-    buffer--;
-    oldValue = *buffer;
-    *buffer = 2;
-
-    problemCallbackCalled = 0;
-    cb = psMemProblemCallbackSet( memProblemCallback );
-
-    psLogMsg( __func__, PS_LOG_INFO, "psMemCheckCorruption should output an error message and "
-              "memProblemCallback callback should be called." );
-
-    corruptions = psMemCheckCorruption( 0 );
-
-    // restore the memory problem callback
-    psMemProblemCallbackSet( cb );
-
-    // restore the value, 'uncorrupting' the buffer
-    *buffer = oldValue;
-    buffer++;
-
-    psFree( buffer );
-
-    if ( corruptions != 1 ) {
-        psError(PS_ERR_UNKNOWN,true, "Expected one memory corruption but found %d in %s.",
-                corruptions, __func__ );
-        return 1;
-    }
-
-    if ( problemCallbackCalled != 1 ) {
-        psError(PS_ERR_UNKNOWN,true, "The memProblemCallback was not invoked but should have been in %s",
-                __func__ );
-        return 1;
-    }
-
-    return 0;
-
-}
-
-void memProblemCallback( psMemBlock *ptr, const char *file, unsigned int lineno )
-{
-    psLogMsg( __func__, PS_LOG_INFO, "memory callback called for id %lu (%s:%d).",
-              ptr->id, file, lineno );
-    problemCallbackCalled++;
-    return ;
-}
-
-psMemId memAllocCallback( const psMemBlock *ptr )
-{
-    psLogMsg( __func__, PS_LOG_INFO, "block %lu was (re)allocated", ptr->id );
-    allocCallbackCalled++;
-    return 1;
-}
-
-psMemId memFreeCallback( const psMemBlock *ptr )
-{
-    psLogMsg( __func__, PS_LOG_INFO, "block %lu was freed", ptr->id );
-    freeCallbackCalled++;
-    return 1;
-}
-
-psPtr TPOutOfMemoryExhaustedCallback( size_t size )
-{
-    psLogMsg( __func__, PS_LOG_INFO, "Custom MemExhaustedCallback was invoked." );
-    exhaustedCallbackCalled++;
-    return NULL;
-}
-
-psS32 TPmultipleFree( void )
-{
-
-    psPtr buffer = psAlloc( 1024 );
-    psPtr buffer2 = buffer;
-
-    psFree( buffer );
-
-    psLogMsg( __func__, PS_LOG_INFO, "Next should abort due to multiple freeing." );
-    psFree( buffer2 );
-
-    psError(PS_ERR_UNKNOWN,true,
-            "Multiple psFree call survived");
-
-    return 0;
-}
-
-static psS32 memCheckTypes( void )
-{
-    psArray *negative;
-    negative = psArrayAlloc(2);
-    psMetadata *neg;
-    neg = psMetadataAlloc();
-
-    psArray *array;
-    array = psArrayAlloc(100);
-    if ( !psMemCheckType(PS_DATA_ARRAY, array) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckArray failed in memCheckType. \n");
-        psFree(array);
-        return 1;
-    }
-    psLogMsg( __func__, PS_LOG_INFO, "Next should error from invalid datatype." );
-    if ( !psMemCheckType(PS_DATA_ARRAY, neg) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckArray failed in memCheckType. \n");
-    }
-    psFree(array);
-
-    psBitSet *bits;
-    bits = psBitSetAlloc(100);
-    if ( !psMemCheckType(PS_DATA_BITSET, bits) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckBitSet failed in memCheckType. \n");
-        psFree(bits);
-        return 1;
-    }
-    psLogMsg( __func__, PS_LOG_INFO, "Next should error from invalid datatype." );
-    if ( !psMemCheckType(PS_DATA_BITSET, negative) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckBitSet failed in memCheckType. \n");
-    }
-    psFree(bits);
-
-    psCube *cube;
-    cube = psCubeAlloc();
-    if ( !psMemCheckType(PS_DATA_CUBE, cube) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckCube failed in memCheckType. \n");
-        psFree(cube);
-        return 1;
-    }
-    psFree(cube);
-
-    psFits *fits;
-    fits = psFitsOpen("test.fits","w");
-    psImage* img = psImageAlloc(16,16,PS_TYPE_F32);
-    psFitsWriteImage(fits,NULL,img,1,NULL);
-    psFree(img);
-    if ( !psMemCheckType(PS_DATA_FITS, fits) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckFits failed in memCheckType. \n");
-        psFree(fits);
-        return 1;
-    }
-    psFitsClose(fits);
-
-    psHash *hash;
-    hash = psHashAlloc(100);
-    if ( !psMemCheckType(PS_DATA_HASH, hash) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckHash failed in memCheckType. \n");
-        psFree(hash);
-        return 1;
-    }
-    psFree(hash);
-
-    psHistogram *histogram;
-    histogram = psHistogramAlloc(1.1, 2.2, 2);
-    if ( !psMemCheckType(PS_DATA_HISTOGRAM, histogram) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckHistogram failed in memCheckType. \n");
-        psFree(histogram);
-        return 1;
-    }
-    psFree(histogram);
-
-    psImage *image;
-    image = psImageAlloc(5, 5, PS_TYPE_F32);
-    if ( !psMemCheckType(PS_DATA_IMAGE, image) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckImage failed in memCheckType. \n");
-        psFree(image);
-        return 1;
-    }
-    psFree(image);
-
-    psKernel *kernel;
-    kernel = psKernelAlloc(0, 1, 0, 1);
-    if ( !psMemCheckType(PS_DATA_KERNEL, kernel) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckKernel failed in memCheckType. \n");
-        psFree(kernel);
-        return 1;
-    }
-    psFree(kernel);
-
-    psList *list;
-    list = psListAlloc(NULL);
-    if ( !psMemCheckType(PS_DATA_LIST, list) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckList failed in memCheckType. \n");
-        psFree(list);
-        return 1;
-    }
-    psFree(list);
-
-    psLookupTable *lookup;
-    char *file = "tableF32.dat";
-    char *format = "\%f \%lf \%d \%ld";
-    lookup = psLookupTableAlloc(file, format, 10);
-    if ( !psMemCheckType(PS_DATA_LOOKUPTABLE, lookup) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckLookupTable failed in memCheckType. \n");
-        psFree(lookup);
-        return 1;
-    }
-    psFree(lookup);
-
-    psMetadata *metadata;
-    metadata = psMetadataAlloc();
-    if ( !psMemCheckType(PS_DATA_METADATA, metadata) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckMetadata failed in memCheckType. \n");
-        psFree(metadata);
-        return 1;
-    }
-    psFree(metadata);
-
-    psMetadataItem *metaItem;
-    metaItem = psMetadataItemAlloc("name", PS_DATA_S32, "COMMENT", 1);
-    if ( !psMemCheckType(PS_DATA_METADATAITEM, metaItem) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckMetadataItem failed in memCheckType. \n");
-        psFree(metaItem);
-        return 1;
-    }
-    psFree(metaItem);
-
-    psMinimization *min;
-    min = psMinimizationAlloc(3, 0.1);
-    if ( !psMemCheckType(PS_DATA_MINIMIZATION, min) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckMinimization failed in memCheckType. \n");
-        psFree(min);
-        return 1;
-    }
-    psFree(min);
-
-    psPixels *pixels;
-    pixels = psPixelsAlloc(100);
-    if ( !psMemCheckType(PS_DATA_PIXELS, pixels) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckPixels failed in memCheckType. \n");
-        psFree(pixels);
-        return 1;
-    }
-    psFree(pixels);
-
-    psPlane *plane;
-    plane = psPlaneAlloc();
-    if ( !psMemCheckType(PS_DATA_PLANE, plane) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckPlane failed in memCheckType. \n");
-        psFree(plane);
-        return 1;
-    }
-    psFree(plane);
-
-    psPlaneDistort *planeDistort;
-    planeDistort = psPlaneDistortAlloc(1, 1, 1, 1);
-    if ( !psMemCheckType(PS_DATA_PLANEDISTORT, planeDistort) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckPlaneDistort failed in memCheckType. \n");
-        psFree(planeDistort);
-        return 1;
-    }
-    psFree(planeDistort);
-
-    psPlaneTransform *planeTransform;
-    planeTransform = psPlaneTransformAlloc(1, 1);
-    if ( !psMemCheckType(PS_DATA_PLANETRANSFORM, planeTransform) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckPlaneTransform failed in memCheckType. \n");
-        psFree(planeTransform);
-        return 1;
-    }
-    psFree(planeTransform);
-
-    psPolynomial1D *poly1;
-    poly1 = psPolynomial1DAlloc(PS_POLYNOMIAL_ORD, 2);
-    if ( !psMemCheckType(PS_DATA_POLYNOMIAL1D, poly1) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckPolynomial1D failed in memCheckType. \n");
-        psFree(poly1);
-        return 1;
-    }
-    psFree(poly1);
-
-    psPolynomial2D *poly2;
-    poly2 = psPolynomial2DAlloc(PS_POLYNOMIAL_ORD, 2, 1);
-    if ( !psMemCheckType(PS_DATA_POLYNOMIAL2D, poly2) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckPolynomial2D failed in memCheckType. \n");
-        psFree(poly2);
-        return 1;
-    }
-    psFree(poly2);
-
-    psPolynomial3D *poly3;
-    poly3 = psPolynomial3DAlloc(PS_POLYNOMIAL_ORD, 2, 1, 1);
-    if ( !psMemCheckType(PS_DATA_POLYNOMIAL3D, poly3) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckPolynomial3D failed in memCheckType. \n");
-        psFree(poly3);
-        return 1;
-    }
-    psFree(poly3);
-
-    psPolynomial4D *poly4;
-    poly4 = psPolynomial4DAlloc(PS_POLYNOMIAL_ORD, 2, 1, 2, 1);
-    if ( !psMemCheckType(PS_DATA_POLYNOMIAL4D, poly4) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckPolynomial4D failed in memCheckType. \n");
-        psFree(poly4);
-        return 1;
-    }
-    psFree(poly4);
-
-    psProjection *proj;
-    proj = psProjectionAlloc(1, 1, 2.1, 2.1, PS_PROJ_TAN);
-    if ( !psMemCheckType(PS_DATA_PROJECTION, proj) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckProjection failed in memCheckType. \n");
-        psFree(proj);
-        return 1;
-    }
-    psFree(proj);
-
-    psScalar *scalar;
-    psC64 c64 = 1.1 + 7I;
-    scalar = psScalarAlloc(c64, PS_TYPE_F64);
-    if ( !psMemCheckType(PS_DATA_SCALAR, scalar) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckScalar failed in memCheckType. \n");
-        psFree(scalar);
-        return 1;
-    }
-    psFree(scalar);
-
-    psSphere *sphere;
-    sphere = psSphereAlloc();
-    if ( !psMemCheckType(PS_DATA_SPHERE, sphere) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckSphere failed in memCheckType. \n");
-        psFree(sphere);
-        return 1;
-    }
-    psFree(sphere);
-
-    psSphereRot *sphereRot;
-    sphereRot = psSphereRotAlloc(0, 0, 20);
-    if ( !psMemCheckType(PS_DATA_SPHEREROT, sphereRot) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckSphereRot failed in memCheckType. \n");
-        psFree(sphereRot);
-        return 1;
-    }
-    psFree(sphereRot);
-
-    psSpline1D *spline;
-    spline = psSpline1DAlloc(2, 1, 0, 2);
-    if ( !psMemCheckType(PS_DATA_SPLINE1D, spline) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckSpline1D failed in memCheckType. \n");
-        psFree(spline);
-        return 1;
-    }
-    psFree(spline);
-
-    psStats *stats;
-    stats = psStatsAlloc(PS_STAT_MAX);
-    if ( !psMemCheckType(PS_DATA_STATS, stats) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckStats failed in memCheckType. \n");
-        psFree(stats);
-        return 1;
-    }
-    psFree(stats);
-
-    psTime *time;
-    time = psTimeAlloc(PS_TIME_UT1);
-    if ( !psMemCheckType(PS_DATA_TIME, time) )  {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckTime failed in memCheckType. \n");
-        psFree(time);
-        return 1;
-    }
-    psFree(time);
-
-    psVector *vector;
-    vector = psVectorAlloc(100, PS_TYPE_F32);
-    if ( !psMemCheckType(PS_DATA_VECTOR, vector) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckVector failed in memCheckType. \n");
-        psFree(vector);
-        return 1;
-    }
-    psFree(vector);
-
-
-    psFree(negative);
-    psFree(neg);
-
-    return 0;
-}
Index: trunk/psLib/test/sys/tst_psString.c
===================================================================
--- trunk/psLib/test/sys/tst_psString.c	(revision 24023)
+++ 	(revision )
@@ -1,740 +1,0 @@
-/** @file  tst_psString.c
- *
- * -*- mode: C; c-basic-indent: 4; tab-width: 8; indent-tabs-mode: nil -*-
- * vim: set cindent ts=8 sw=4 expandtab:
- *
- *  @brief Test driver for psString functions
- *
- *  This test driver contains the following test points for psStringCopy
- *  and psStringNCopy, and related string functions.
- *    1) Verify string copy - psStringCopy
- *    2) Verify empty string copy - psStringCopy
- *    3) Verify string copy with length - psStringNCopy
- *    4) Verify empty string copy with length - psStringNCopy
- *    5) Copy string to larger string - psStringNCopy
- *    6) Copy string with negative size - psStringNCopy
- *    7) Verifiy creation of string literal - PS_STRING
- *
- *  Return:   Number of test points which failed
- *
- *  @author  Eric Van Alst, MHPCC
- *
- *  @version $Revision: 1.11 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2006-07-14 02:26:25 $
- *
- *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
- *
- */
-
-#include <string.h>
-#include "pslib_strict.h"
-#include "psTest.h"
-
-#define STR_0 "binky had a leeeetle lamb"
-
-static psS32 testStringCopy00(void);
-static psS32 testStringCopy01(void);
-static psS32 testStringCopy02(void);
-static psS32 testStringCopy03(void);
-static psS32 testStringCopy04(void);
-//static psS32 testStringCopy05(void);
-static psS32 testStringCopy06(void);
-
-static psS32 testStrAppend00(void);
-static psS32 testStrAppend01(void);
-static psS32 testStrAppend02(void);
-static psS32 testStrAppend03(void);
-
-static psS32 testStrPrepend00(void);
-static psS32 testStrPrepend01(void);
-static psS32 testStrPrepend02(void);
-static psS32 testStrPrepend03(void);
-
-static psS32 testStrSplit00(void);
-static psS32 testNULLStrings(void);
-static psS32 testStrCheck(void);
-
-testDescription tests[] = {
-                              {testStringCopy00, 0, "Verify string copy", 0, false},
-                              {testStringCopy01, 1, "Verify empty string copy", 0, false},
-                              {testStringCopy02, 2, "Verify string copy with length", 0, false},
-                              {testStringCopy03, 3, "Verify empty string copy with length", 0, false},
-                              {testStringCopy04, 4, "Copy string to larger string", 0, false},
-                              //                              {testStringCopy05, 5, "Copy string with negative size", 0, false},
-                              {testStringCopy06, 6, "Verify creation of string literal", 0, false},
-
-                              {testStrAppend00,  7, "Verify generic string append", 0, false},
-                              {testStrAppend01,  8, "Test append NULL handling", 0, false},
-                              {testStrAppend02,  9, "Verify append string creation", 0, false},
-                              {testStrAppend03, 10, "Test append null-op", 0, false},
-
-                              {testStrPrepend00,11, "Verify generic string prepend", 0, false},
-                              {testStrPrepend01,12, "Test prepend NULL handling", 0, false},
-                              {testStrPrepend02,13, "Verify prepend string creation", 0, false},
-                              {testStrPrepend03,14, "Test prepend null-op", 0, false},
-                              {testStrSplit00,15, "Test String Splitting", 0, false},
-                              {testNULLStrings,666, "Test NULL String Error Handling", 0, false},
-                              {testStrCheck,16, "Test String Allocation and MemCheck", 0, false},
-                              {NULL}
-                          };
-
-psS32 main( psS32 argc, char* argv[] )
-{
-    psLogSetLevel( PS_LOG_INFO );
-
-    return ( ! runTestSuite( stderr, "psString", tests, argc, argv ) );
-}
-
-/*
-psS32 main( psS32 argc,
-          char * argv[] )
-{
-    psBool  tpResult = false;
-    char  stringval[20] = "E R R O R";
-    char  stringval1[20] = "e r r o r";
-    char  *stringvalnocopy = "F A I L";
-    char  *substringval = "e r r";
-    psS32   substringlen = 6;
-    char  *emptyval = "";
-    psS32   tpFails = 0;
-    char  *strResult;
-    psS32   increaseSize = 5;
-    psS32   negativeSize = -5;
-    psS32   result = 0;
-    psS32   result1 = 0;
-    psS32   memBlockAllocated = 0;
-    psMemBlock ***memBlockPtr = NULL;
- 
-*/
-
-static psS32 testStringCopy00(void)
-{
-    char  stringval[20] = "E R R O R";
-    psS32   result = 0;
-    psS32   result1 = 0;
-    char  *strResult;
-
-    // Test point #1 Verify string copy - psStringCopy
-    strResult = psStringCopy(stringval);
-    // Perform string compare
-    result = strcmp(strResult, stringval);
-    // Modify original string
-    stringval[0]='G';
-    result1 = strcmp(strResult, stringval);
-    stringval[0]='E';
-    if ( ( result != 0 ) || ( result1 == 0) ) {
-        fprintf(stderr, "Failed test point #1 strcmp result = %d expected 0\n",result);
-        fprintf(stderr, "                               src = %s expected %s\n",
-                strResult, stringval);
-        fprintf(stderr, "             changed strcmp result = %d expected 1\n",result1);
-        fprintf(stderr, "             changed           src = %s expected %s\n",strResult,
-                stringval);
-        return 1;
-    }
-
-    // Free memory allocated
-    psFree(strResult);
-
-    return 0;
-}
-
-static psS32 testStringCopy01(void)
-{
-    char  *emptyval = "";
-    psS32   result = 0;
-    char  *strResult;
-
-    // Test point #2 Verify empty string copy - psStringCopy
-    strResult = psStringCopy(emptyval);
-    // Perform string compare
-    result = strcmp(strResult, emptyval);
-    if ( result != 0 ) {
-        fprintf(stderr,"Failed test point #2 strcmp result = %d expected 0\n",result);
-        fprintf(stderr,"                               src = %s expected %s\n",
-                strResult, emptyval);
-        return 1;
-    }
-
-    // Free memory allocated
-    psFree(strResult);
-
-    return 0;
-}
-
-static psS32 testStringCopy02(void)
-{
-    psS32   result = 0;
-    psS32   result1 = 0;
-    char  *strResult;
-    char  stringval1[20] = "e r r o r";
-    psS32   substringlen = 5;
-    char  *substringval = "e r r";
-
-    // Test point #3 Verify string copy with length - psStringNCopy
-    strResult = psStringNCopy(stringval1, substringlen);
-    // Perform string compare and get string length
-    result = strncmp(strResult, substringval, substringlen);
-    // Change original string
-    stringval1[0] = 'g';
-    result1 = strncmp(strResult, substringval, substringlen);
-    if ( ( result != 0 ) || ( result1 != 0 ) ) {
-        fprintf(stderr,"Failed test point #3 strcmp result = %d expected 0\n",result);
-        fprintf(stderr,"                               src = %s expected %s\n",
-                strResult, substringval);
-        fprintf(stderr,"             changed strcmp result = %d expected 0\n",result1);
-        fprintf(stderr,"                               src = %s expected %s\n",
-                strResult, substringval);
-        return 1;
-    }
-    // Free memory allocated
-    psFree(strResult);
-
-    return 0;
-}
-
-static psS32 testStringCopy03(void)
-{
-    psS32   result = 0;
-    psS32   result1 = 0;
-    char  *strResult;
-    char  *stringvalnocopy = "F A I L";
-
-    // Test point #4 Verify empty string copy with length - psStringNCopy
-    strResult = psStringNCopy(stringvalnocopy, 0);
-    // Perform string compare and get sting length
-    result = strcmp(strResult, stringvalnocopy);
-    result1 = strlen(strResult);
-    if ( result == 0 ) {
-        fprintf(stderr,"Failed test point #4 strcmp result = %d didn't expected %d\n",result,0);
-        fprintf(stderr,"                               src = %s didn't expected %s\n",
-                strResult, stringvalnocopy);
-        return 1;
-    }
-    // Free memory
-    psFree(strResult);
-
-    return 0;
-}
-
-static psS32 testStringCopy04(void)
-{
-    psS32   result = 0;
-    psS32   result1 = 0;
-    char  *strResult;
-    char  stringval[20] = "E R R O R";
-    psS32   increaseSize = 5;
-
-    // Test point #5 Copy string to larger string - psStringNCopy
-    strResult = psStringNCopy(stringval, (strlen(stringval) + increaseSize));
-    // Perform string compare and get string length
-    result = strcmp(strResult, stringval);
-    result1 = strlen(strResult);
-    // The strings should still compare
-    if ( ( result != 0 ) ||
-            ( result1 != strlen(stringval) ) ) {
-        fprintf(stderr,"Failed test point #5 strcmp result = %d expected %d\n",result,0);
-        fprintf(stderr,"                               src = %s expected %s\n",
-                strResult, stringval);
-        fprintf(stderr,"                     strlne result = %d expected %d\n",result1,
-                (psS32)strlen(stringval));
-        return 1;
-    }
-    // Free memory
-    psFree(strResult);
-
-    return 0;
-}
-
-// XXX This test needs to be modified to check for maximum size
-//     This will require a mod to psStringNCopy source to check for maximum size
-//
-//static psS32 testStringCopy05(void)
-//{
-//    char  *strResult;
-//    char  stringval[20] = "E R R O R";
-//    psS32   negativeSize = -5;
-//
-//    // Test point #6 Copy string with negative size - psStringNCopy
-//    strResult = psStringNCopy(stringval, negativeSize);
-//    if ( strResult != NULL ) {
-//        fprintf(stderr,"Failed test point #6 return value = %p expected NULL\n",
-//                strResult);
-//        return 1;
-//    }
-//    // Memory should not have been allocated
-//
-//    return 0;
-//}
-
-static psS32 testStringCopy06(void)
-{
-    char  *strResult;
-    char  stringval[20] = "E R R O R";
-    psS32   result = 0;
-
-    // Test point #7 Verify creation of string literal - PS_STRING
-    strResult = PS_STRING(E R R O R);
-    result = strcmp(strResult, stringval);
-    if ( result != 0 ) {
-        fprintf(stderr,"Failed test point #7 strcmp result = %d expected %d",result,0);
-        return 1;
-    }
-    // Memory should not have been allocated
-
-    return 0;
-}
-
-static psS32 testStrAppend00(void)
-{
-    char *str=NULL;
-    int result = 0;
-
-    str = psStringCopy("3.14159");
-
-    psStringAppend(&str, "%d%s", 2653589, "79323846");
-
-    // Test point: Verify string append
-    result = strcmp(str, "3.14159265358979323846");
-    if ( result != 0 ) {
-        fprintf(stderr,"%s","Failed test point\n");
-        return 1;
-    }
-
-    psFree(str);
-
-    return 0;
-}
-
-static psS32 testStrAppend01(void)
-{
-    ssize_t sz;
-    char *str=NULL;
-
-    // test nonsensical invocations ...
-    sz = psStringAppend(NULL, NULL);
-    if ( sz != 0 ) {
-        fprintf(stderr,"%s","Failed test point\n");
-        return 1;
-    }
-    sz = psStringAppend(&str, NULL);
-    if ( sz != 0 ) {
-        fprintf(stderr,"%s","Failed test point\n");
-        return 1;
-    }
-
-    return 0;
-}
-
-static psS32 testStrAppend02(void)
-{
-    char *str=NULL;
-    int result;
-
-    // test string creation
-    psStringAppend(&str, "%s", "fubar");
-    result = strcmp(str, "fubar");
-    if ( result != 0 ) {
-        fprintf(stderr,"%s","Failed test point\n");
-        return 1;
-    }
-
-    psFree(str);
-
-    return 0;
-}
-
-static psS32 testStrAppend03(void)
-{
-    char *str=NULL;
-    int result;
-
-    str = psStringCopy(STR_0);
-
-    // test null-op
-    psStringAppend(&str, "");
-    result = strcmp(str, STR_0);
-    if ( result != 0 ) {
-        fprintf(stderr,"Failed test point str=[%s]\n", str);
-        return 1;
-    }
-
-    psFree(str);
-
-    return 0;
-}
-
-static psS32 testStrPrepend00(void)
-{
-    char *str=NULL;
-    int result = 0;
-
-    str = psStringCopy("79323846");
-
-    psStringPrepend(&str, "%s%d","3.14159", 2653589 );
-
-    // Test point: Verify string append
-    result = strcmp(str, "3.14159265358979323846");
-    if ( result != 0 ) {
-        fprintf(stderr,"%s","Failed test point\n");
-        return 1;
-    }
-
-    psFree(str);
-
-    return 0;
-}
-
-static psS32 testStrPrepend01(void)
-{
-    ssize_t sz;
-    char *str=NULL;
-
-    // test nonsensical invocations ...
-    sz = psStringPrepend(NULL, NULL);
-    if ( sz != 0 ) {
-        fprintf(stderr,"%s","Failed test point\n");
-        return 1;
-    }
-    sz = psStringPrepend(&str, NULL);
-    if ( sz != 0 ) {
-        fprintf(stderr,"%s","Failed test point\n");
-        return 1;
-    }
-
-    return 0;
-}
-
-static psS32 testStrPrepend02(void)
-{
-    char *str=NULL;
-    int result;
-
-    // test string creation
-    psStringPrepend(&str, "%s", "fubar");
-    result = strcmp(str, "fubar");
-    if ( result != 0 ) {
-        fprintf(stderr,"%s","Failed test point\n");
-        return 1;
-    }
-
-    psFree(str);
-
-    return 0;
-}
-
-static psS32 testStrPrepend03(void)
-{
-    char *str=NULL;
-    int result;
-
-    str = psStringCopy(STR_0);
-
-    // test null-op
-    psStringPrepend(&str, "");
-    result = strcmp(str, STR_0);
-    if ( result != 0 ) {
-        fprintf(stderr,"Failed test point str=[%s]\n", str);
-        return 1;
-    }
-
-    psFree(str);
-
-    return 0;
-}
-
-static psS32 testStrSplit00(void)
-{
-    psList *strList = NULL;
-    char str[35];
-    char split[5];
-    strncpy(str, "This is, a, test case, to check.", 35);
-    strncpy(split, ",", 2);
-    psString psStr;
-    psString psSplit;
-    psStr = psStringCopy(str);
-    psSplit = psStringCopy(split);
-
-    //Return NULL for NULL inputs
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
-    strList = psStringSplit(NULL, NULL, true);
-    //    if (strList != NULL) {
-    if (strList) {
-        psFree(strList);
-        return 1;
-    }
-    psFree(strList);
-    strList = NULL;
-    //Return empty list for NULL string input
-    //psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
-    strList = psStringSplit(NULL, split, true);
-    //    if (strList != NULL) {
-    if ( psListLength(strList) ) {
-        psFree(strList);
-        return 2;
-    }
-    psFree(strList);
-    strList = NULL;
-    //Return NULL for NULL splitter input
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
-    strList = psStringSplit(str, NULL, true);
-    //    if (strList != NULL) {
-    if ( strList ) {
-        psFree(strList);
-        return 3;
-    }
-    psFree(strList);
-    strList = NULL;
-    //Return a psList* of psStrings
-    strList = psStringSplit(str, split, true);
-    if (strList->n != 4) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return the correct number of strings.\n");
-        return 4;
-    }
-    if ( strncmp((psString)(strList->head->data), "This is", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 5;
-    }
-    if ( strncmp((psString)(strList->head->next->data), " a", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 6;
-    }
-    if ( strncmp((psString)(strList->head->next->next->data), " test case", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 7;
-    }
-    if ( strncmp((psString)(strList->head->next->next->next->data), " to check.", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 8;
-    }
-    psFree(strList);
-    //Return correct psList when using (psString, char*)
-    strList = psStringSplit(psStr, split, true);
-    if (strList->n != 4) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return the correct number of strings.\n");
-        return 9;
-    }
-    if ( strncmp((psString)(strList->head->data), "This is", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 10;
-    }
-    if ( strncmp((psString)(strList->head->next->data), " a", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 11;
-    }
-    if ( strncmp((psString)(strList->head->next->next->data), " test case", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 12;
-    }
-    if ( strncmp((psString)(strList->head->next->next->next->data), " to check.", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 13;
-    }
-    psFree(strList);
-    //Return correct psList when using (char*, psString)
-    strList = psStringSplit(str, psSplit, true);
-    if (strList->n != 4) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return the correct number of strings.\n");
-        return 14;
-    }
-    if ( strncmp((psString)(strList->head->data), "This is", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 15;
-    }
-    if ( strncmp((psString)(strList->head->next->data), " a", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 16;
-    }
-    if ( strncmp((psString)(strList->head->next->next->data), " test case", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 17;
-    }
-    if ( strncmp((psString)(strList->head->next->next->next->data), " to check.", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 18;
-    }
-    psFree(strList);
-    //Return correct psList when using (psString, psString)
-    strList = psStringSplit(psStr, psSplit, true);
-    if (strList->n != 4) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return the correct number of strings.\n");
-        return 19;
-    }
-    if ( strncmp((psString)(strList->head->data), "This is", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 20;
-    }
-    if ( strncmp((psString)(strList->head->next->data), " a", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 21;
-    }
-    if ( strncmp((psString)(strList->head->next->next->data), " test case", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 22;
-    }
-    if ( strncmp((psString)(strList->head->next->next->next->data), " to check.", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 23;
-    }
-    psFree(strList);
-    //Return correct psList output for string of zero length case
-    strncpy(str, "This is,, a,, test case,, to check.", 35);
-    strList = psStringSplit(str, split, false);
-    if (strList->n != 4) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return the correct number of strings.\n");
-        return 24;
-    }
-    if ( strncmp((psString)(strList->head->data), "This is", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 25;
-    }
-    if ( strncmp((psString)(strList->head->next->data), " a", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 26;
-    }
-    if ( strncmp((psString)(strList->head->next->next->data), " test case", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 27;
-    }
-    if ( strncmp((psString)(strList->head->next->next->next->data), " to check.", 10) ) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psStringSplit failed to return expected strings.");
-        return 28;
-    }
-
-    psFree(strList);
-    psFree(psStr);
-    psFree(psSplit);
-    return 0;
-}
-
-static psS32 testNULLStrings(void)
-{
-    psString nullTest = NULL;
-    psString output = NULL;
-    ssize_t outSize = 0;
-    char** nullDest = NULL;
-    char** test;
-    //psStringCopy should return NULL for NULL input string
-    //    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
-    output = psStringCopy(nullTest);
-    if (output != NULL) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, false,
-                "psStringCopy failed to return NULL for NULL input string.\n");
-        return 1;
-    }
-    //psStringNCopy should return NULL for NULL input string
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
-    output = psStringNCopy(nullTest, 100);
-    if (output != NULL) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, false,
-                "psStringNCopy failed to return NULL for NULL input string.\n");
-        return 2;
-    }
-
-    //psStringAppend should return 0 for NULL input destination
-    outSize = psStringAppend(nullDest, "");
-    if (outSize != 0) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, false,
-                "psStringAppend failed to return 0 for NULL input destination.\n");
-        return 3;
-    }
-    //psStringAppend should return 0 for NULL input format
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
-    outSize = psStringAppend(test, nullTest);
-    if (outSize != 0) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, false,
-                "psStringAppend failed to return 0 for NULL input format.\n");
-        return 4;
-    }
-    //psStringPrepend should return 0 for NULL input destination
-    outSize = psStringPrepend(nullDest, " ");
-    if (outSize != 0) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, false,
-                "psStringPrepend failed to return 0 for NULL input destination.\n");
-        return 3;
-    }
-    //psStringPrepend should return 0 for NULL input format
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
-    outSize = psStringPrepend(test, nullTest);
-    if (outSize != 0) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, false,
-                "psStringPrepend failed to return 0 for NULL input format.\n");
-        return 4;
-    }
-    //psStringSplit should return empty list for NULL input string
-    psList *nullList = NULL;
-    // psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
-    nullList = psStringSplit(nullTest, ",", true);
-    //    if (nullList != NULL) {
-    if ( psListLength(nullList) ) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, false,
-                "psStringSplit failed to return NULL for NULL input string.\n");
-        return 5;
-    }
-    psFree(nullList);
-    nullList = NULL;
-    //psStringSplit should return NULL for NULL input splitter
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
-    nullList = psStringSplit("Hello World", nullTest, true);
-    //    if (nullList != NULL) {
-    if ( nullList ) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, false,
-                "psStringSplit failed to return NULL for NULL input splitter.\n");
-        return 6;
-    }
-    psFree(nullList);
-
-    return 0;
-}
-
-psS32 testStrCheck(void)
-{
-    psString str = NULL;
-    str = psStringAlloc(10);
-    strcpy(str, "Hello");
-    if (!psMemCheckString(str)) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                "psString wasn't properly allocated!\n");
-        return 1;
-    }
-    if (!psMemCheckType(PS_DATA_STRING, str)) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                "psString wasn't properly allocated!\n");
-        return 2;
-    }
-    psFree(str);
-
-    char charStr[10];
-    if (psMemCheckType(PS_DATA_STRING, charStr)) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                "Input string is not a psDataType!!!  (Should have returned false)\n");
-        return 3;
-    }
-
-    return 0;
-}
-
Index: trunk/psLib/test/sys/tst_psTrace.c
===================================================================
--- trunk/psLib/test/sys/tst_psTrace.c	(revision 24023)
+++ 	(revision )
@@ -1,381 +1,0 @@
-/*****************************************************************************
-    This code will test whether trace levels can be set successfully.
- 
-    XXX: For the last two testpoints, must verify that the results are
-    correct, and put that verification in the test as well.
- *****************************************************************************/
-#include <stdio.h>
-#include "pslib_strict.h"
-#include "psTest.h"
-#include <fcntl.h>
-#include <unistd.h>
-
-
-static psS32 testTrace00(void);
-static psS32 testTrace01(void);
-static psS32 testTrace02(void);
-static psS32 testTrace03(void);
-static psS32 testTrace04(void);
-static psS32 testTrace05(void);
-static psS32 testTrace05a(void);
-static psS32 testTrace06(void);
-static psS32 testTrace08(void);
-
-testDescription tests[] = {
-                              {testTrace00, 0, "psTraceSetLevel() and psTraceGetLevel()", 0, false},
-                              {testTrace01, 1, "psTraceSetLevel(): set multiple components in one call", 0, false},
-                              {testTrace02, 2, "psTraceSetLevel(): test static/dynamic inheritance", 0, false},
-                              {testTrace03, 3, "psTraceReset()", 0, false},
-                              {testTrace04, 4, "psTrace()", 0, false},
-                              {testTrace05, 5, "psTracePrintLevels()", 0, false},
-                              {testTrace05a, 5, "optional leading dot and psTracePrintLevels()", 0, false},
-                              {testTrace06, 6, "Testing psTraceReset", 0, false},
-                              {testTrace08, 8, "Testing ", 0, false},
-                              {NULL}
-                          };
-
-testDescription tests2[] = {
-                               {testTrace08, 8, "Testing ", 0, false},
-                           };
-
-psS32 main( psS32 argc, char* argv[] )
-{
-    psLogSetLevel( PS_LOG_INFO );
-
-    return ( ! runTestSuite( stderr, "psTrace", tests, argc, argv ) );
-}
-
-static psS32 testTrace00(void)
-{
-    psS32 i;
-    psS32 lev = 0;
-
-    //    psTraceSetDestination(stderr);
-    psTraceSetDestination(2);
-
-    for (i=0;i<10;i++) {
-        (void)psTraceSetLevel(".", i);
-        lev = psTraceGetLevel(".");
-        if (lev != i) {
-            fprintf(stderr,"ERROR: (.) expected trace level was %d, actual was %d\n",
-                    i, lev);
-            return 1;
-        }
-    }
-    (void)psTraceSetLevel(".", 3);
-
-    for (i=5;i<10;i++) {
-        (void)psTraceSetLevel(".NODE00", i);
-        lev = psTraceGetLevel(".NODE00");
-        if (lev != i) {
-            fprintf(stderr,
-                    "ERROR: (.NODE00) expected trace level was %d, actual was %d\n",
-                    i, lev);
-            return 2;
-        }
-
-        lev = psTraceGetLevel(".");
-        if (lev != 3) {
-            fprintf(stderr,"ERROR: (.) expected trace level was %d, actual was %d\n",
-                    i, 3);
-            return 3;
-        }
-    }
-
-
-    (void)psTraceSetLevel(".NODE00.NODE01", 4);
-    for (i=0;i<10;i++) {
-        (void)psTraceSetLevel(".NODE00.NODE01", i);
-        lev = psTraceGetLevel(".NODE00.NODE01");
-        if (lev != i) {
-            fprintf(stderr,
-                    "ERROR: (.NODE00.NODE01) expected trace level was %d, actual was %d\n",
-                    i, lev);
-            return 4;
-        }
-    }
-
-    return 0;
-}
-
-static psS32 testTrace01(void)
-{
-    //    psTraceSetDestination(stderr);
-    psTraceSetDestination(2);
-    (void)psTraceSetLevel(".A.B.C.D.E", 5);
-
-    psTrace(".A.C.D.C",1,"You should not see this.\n");
-    psTrace(".A.B.C.D.E",2,"You should see this.\n");
-    psTrace(".A.B.C.D.E.F",3,"You should see this too.\n");
-
-    psTracePrintLevels();
-
-    return 0;
-}
-
-static psS32 testTrace02(void)
-{
-    psTraceReset();
-    //    psTraceSetDestination(stderr);
-    psTraceSetDestination(2);
-    psTraceSetLevel(".A.B", 2);
-    psTraceSetLevel(".A.B.C.D.E", 5);
-    psTracePrintLevels();
-    psTraceSetLevel(".A.B", 10);
-    psTracePrintLevels();
-
-    if (10 != psTraceGetLevel(".A.B.C")) {
-        fprintf(stderr,"ERROR: .A.B.C did not dynamically inherit a trace level (%d)\n",
-                psTraceGetLevel(".A.B.C"));
-        return 2;
-    }
-
-    if (10 != psTraceGetLevel(".A.B.C.D")) {
-        fprintf(stderr,"ERROR: .A.B.C.D did not dynamically inherit a trace level (%d)\n", psTraceGetLevel(".A.B.C.D"));
-        return 2;
-    }
-
-    if (5 != psTraceGetLevel(".A.B.C.D.E")) {
-        fprintf(stderr,"ERROR: .A.B.C.D.E did dynamically inherit a trace level (%d)\n", psTraceGetLevel(".A.B.C.D.E"));
-        return 2;
-    }
-
-    return 0;
-}
-
-static psS32 testTrace03(void)
-{
-    psS32 i = 0;
-    psS32 lev = 0;
-
-    //    psTraceSetDestination(stderr);
-    psTraceSetDestination(2);
-
-    for (i=0;i<10;i++) {
-        (void)psTraceSetLevel(".", i);
-        psTraceReset();
-
-        lev = psTraceGetLevel(".");
-        if (lev != PS_UNKNOWN_TRACE_LEVEL) {
-            fprintf(stderr,"ERROR: expected trace level was %d, actual was %d\n",
-                    PS_UNKNOWN_TRACE_LEVEL, lev);
-            return 1;
-        }
-    }
-    (void)psTraceSetLevel(".", 5);
-    (void)psTraceSetLevel(".a", 4);
-    (void)psTraceSetLevel(".a.b", 3);
-    (void)psTraceSetLevel(".a.b.c", 2);
-    if ((5 != psTraceGetLevel(".")) ||
-            (4 != psTraceGetLevel(".a")) ||
-            (3 != psTraceGetLevel(".a.b")) ||
-            (2 != psTraceGetLevel(".a.b.c"))) {
-        fprintf(stderr,"ERROR: trace successFlag = false;levels were not settable?\n");
-        return 2;
-    }
-
-    psTraceReset();
-    if ((PS_UNKNOWN_TRACE_LEVEL != psTraceGetLevel(".")) ||
-            (PS_UNKNOWN_TRACE_LEVEL != psTraceGetLevel(".a")) ||
-            (PS_UNKNOWN_TRACE_LEVEL != psTraceGetLevel(".a.b")) ||
-            (PS_UNKNOWN_TRACE_LEVEL != psTraceGetLevel(".a.b.c"))) {
-        fprintf(stderr,"ERROR: trace levels were not reset properly\n");
-        return 3;
-    }
-
-    return 0;
-}
-
-
-static psS32 testTrace04(void)
-{
-    int FD;
-    psS32 nb = 0;
-    FD = creat("tst_psTrace02_OUT", 0666);
-    //    printf("\nFD = %d\n", FD);
-    //    fp = fopen("tst_psTrace02_OUT", "w");
-    for (nb = 0 ; nb<4;nb++) {
-        if (nb == 0)
-            //            psTraceSetDestination(stdout);
-            psTraceSetDestination(1);
-        if (nb == 1)
-            //            psTraceSetDestination(stderr);
-            psTraceSetDestination(2);
-        if (nb == 2)
-            psTraceSetDestination(0); //NULL
-        if (nb == 3)
-            psTraceSetDestination(FD);
-
-        (void)psTraceSetLevel(".", 4);
-        psTrace(".", 5, "(0) This message should not be displayed (%x)\n",
-                0xbeefface);
-        (void)psTraceSetLevel(".", 7);
-        psTrace(".", 5, "(0) This message should be displayed (%x)\n",
-                0xbeefface);
-
-        (void)psTraceSetLevel(".a", 4);
-        psTrace(".a", 5, "(1) This message should not be displayed (%x)\n",
-                0xbeefface);
-        (void)psTraceSetLevel(".a", 7);
-        psTrace(".a", 5, "(1) This message should be displayed (%x)\n",
-                0xbeefface);
-
-
-        (void)psTraceSetLevel(".a.b", 4);
-        psTrace(".a.b", 5, "(2) This message should not be displayed (%x)\n",
-                0xbeefface);
-        (void)psTraceSetLevel(".a.b", 7);
-        psTrace(".a.b", 5, "(2) This message should be displayed (%x)\n",
-                0xbeefface);
-        (void)psTraceSetLevel(".a.b.c", 12);
-        psTrace(".a.b.c", 11, "(3) This message should be displayed (%x)\n",
-                0xbeefface);
-
-    }
-
-    close(FD);
-
-    return(0);
-}
-
-static psS32 testTrace05(void)
-{
-    //    psTraceSetDestination(stderr);
-    psTraceSetDestination(2);
-
-    (void)psTraceSetLevel(".", 9);
-
-    (void)psTraceSetLevel(".a", 8);
-    (void)psTraceSetLevel(".b", 7);
-    (void)psTraceSetLevel(".c", 5);
-
-    (void)psTraceSetLevel(".a.a", 4);
-    (void)psTraceSetLevel(".a.b", 3);
-
-    (void)psTraceSetLevel(".b.a", 2);
-    (void)psTraceSetLevel(".b.b", 1);
-
-    (void)psTraceSetLevel(".c.a", 0);
-    (void)psTraceSetLevel(".c.b", 3);
-    (void)psTraceSetLevel(".c.c", 5);
-
-    psTracePrintLevels();
-
-    return 0;
-
-}
-
-static psS32 testTrace05a(void)
-{
-    (void)psTraceSetLevel(".", 9);
-
-    (void)psTraceSetLevel("a", 8);
-    (void)psTraceSetLevel("b", 7);
-    (void)psTraceSetLevel("c", 5);
-
-    (void)psTraceSetLevel("a.a", 4);
-    (void)psTraceSetLevel("a.b", 3);
-
-    (void)psTraceSetLevel("b.a", 2);
-    (void)psTraceSetLevel("b.b", 1);
-
-    (void)psTraceSetLevel("c.a", 0);
-    (void)psTraceSetLevel("c.b", 3);
-    (void)psTraceSetLevel("c.c", 5);
-
-    psTracePrintLevels();
-
-    return 0;
-
-}
-
-static psS32 testTrace06(void)
-{
-    //    psTraceSetDestination(stderr);
-    psTraceSetDestination(2);
-
-    (void)psTraceSetLevel(".", 9);
-
-    (void)psTraceSetLevel(".a", 8);
-    (void)psTraceSetLevel(".b", 7);
-    (void)psTraceSetLevel(".c", 5);
-
-    (void)psTraceSetLevel(".a.a", 4);
-    (void)psTraceSetLevel(".a.b", 3);
-
-    (void)psTraceSetLevel(".b.a", 2);
-    (void)psTraceSetLevel(".b.b", 1);
-
-    (void)psTraceSetLevel(".c.a", 0);
-    (void)psTraceSetLevel(".c.b", 3);
-    (void)psTraceSetLevel(".c.c", 5);
-
-    psTraceReset();
-
-    if ((psTraceGetLevel(".")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".a")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".b")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".c")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".a.a")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".a.b")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".b.a")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".b.b")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".c.a")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".c.b")!=PS_UNKNOWN_TRACE_LEVEL) ||
-            (psTraceGetLevel(".c.c")!=PS_UNKNOWN_TRACE_LEVEL)) {
-        return 1;
-    }
-
-    return 0;
-}
-
-// Ensure that the leading dot in the component names are optional.
-static psS32 testTrace08(void)
-{
-    psTraceReset();
-    (void)psTraceSetLevel(".", 9);
-
-    (void)psTraceSetLevel(".a", 8);
-    (void)psTraceSetLevel(".b", 7);
-    (void)psTraceSetLevel(".c", 5);
-
-    (void)psTraceSetLevel(".a.a", 4);
-    (void)psTraceSetLevel(".a.b", 3);
-
-    (void)psTraceSetLevel(".b.a", 2);
-    (void)psTraceSetLevel(".b.b", 1);
-
-    (void)psTraceSetLevel(".c.a", 0);
-    (void)psTraceSetLevel(".c.b", 3);
-    (void)psTraceSetLevel(".c.c", 5);
-
-    psTracePrintLevels();
-
-    if ((psTraceGetLevel(".")!=9) ||
-            (psTraceGetLevel("a")!=8) ||
-            (psTraceGetLevel("b")!=7) ||
-            (psTraceGetLevel("c")!=5) ||
-            (psTraceGetLevel("a.a")!=4) ||
-            (psTraceGetLevel("a.b")!=3) ||
-            (psTraceGetLevel("b.a")!=2) ||
-            (psTraceGetLevel("b.b")!=1) ||
-            (psTraceGetLevel("c.a")!=0) ||
-            (psTraceGetLevel("c.b")!=3) ||
-            (psTraceGetLevel("c.c")!=5)) {
-        printf("psTraceGetLevel(.) is %d\n", psTraceGetLevel("."));
-        printf("psTraceGetLevel(a) is %d\n", psTraceGetLevel("a"));
-        printf("psTraceGetLevel(b) is %d\n", psTraceGetLevel("b"));
-        printf("psTraceGetLevel(c) is %d\n", psTraceGetLevel("c"));
-        printf("psTraceGetLevel(a.a) is %d\n", psTraceGetLevel("a.a"));
-        printf("psTraceGetLevel(a.b) is %d\n", psTraceGetLevel("a.b"));
-        printf("psTraceGetLevel(b.a) is %d\n", psTraceGetLevel("b.a"));
-        printf("psTraceGetLevel(b.b) is %d\n", psTraceGetLevel("b.b"));
-        printf("psTraceGetLevel(c.a) is %d\n", psTraceGetLevel("c.a"));
-        printf("psTraceGetLevel(c.b) is %d\n", psTraceGetLevel("c.b"));
-        printf("psTraceGetLevel(c.c) is %d\n", psTraceGetLevel("c.c"));
-
-        return 1;
-    }
-
-    return 0;
-}
