Changeset 2275
- Timestamp:
- Nov 3, 2004, 4:02:10 PM (22 years ago)
- Location:
- trunk/psModules/src
- Files:
-
- 6 edited
-
pmFlatField.c (modified) (7 diffs)
-
pmMaskBadPixels.c (modified) (7 diffs)
-
pmNonLinear.c (modified) (3 diffs)
-
pmReadoutCombine.c (modified) (6 diffs)
-
pmSubtractBias.c (modified) (6 diffs)
-
psTest.c (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/pmFlatField.c
r2138 r2275 18 18 * @author Ross Harman, MHPCC 19 19 * 20 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $21 * @date $Date: 2004-1 0-14 23:52:09$20 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 21 * @date $Date: 2004-11-04 02:02:10 $ 22 22 * 23 23 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 56 56 return true; // Readout may not have data in it 57 57 } else if(flat==NULL) { 58 psError Msg(PS_ERRORNAME_DOMAIN "pmFlatField",PS_ERR_BAD_PARAMETER_NULL, true,59 PS_ERRORTEXT_pmFlatField_NULL_FLAT_READOUT);58 psError( PS_ERR_BAD_PARAMETER_NULL, true, 59 PS_ERRORTEXT_pmFlatField_NULL_FLAT_READOUT); 60 60 return false; 61 61 } … … 64 64 flatImage = flat->image; 65 65 if (inImage == NULL) { 66 psError Msg(PS_ERRORNAME_DOMAIN "pmFlatField",PS_ERR_BAD_PARAMETER_NULL, true,67 PS_ERRORTEXT_pmFlatField_NULL_INPUT_IMAGE);66 psError( PS_ERR_BAD_PARAMETER_NULL, true, 67 PS_ERRORTEXT_pmFlatField_NULL_INPUT_IMAGE); 68 68 return false; 69 69 } else if(flatImage == NULL) { 70 psError Msg(PS_ERRORNAME_DOMAIN "pmFlatField",PS_ERR_BAD_PARAMETER_NULL, true,71 PS_ERRORTEXT_pmFlatField_NULL_FLAT_IMAGE);70 psError( PS_ERR_BAD_PARAMETER_NULL, true, 71 PS_ERRORTEXT_pmFlatField_NULL_FLAT_IMAGE); 72 72 return false; 73 73 } else if(in->mask == NULL) { … … 79 79 // Check input image and its mask are not larger than flat image 80 80 if(inImage->numRows>flatImage->numRows || inImage->numCols>flatImage->numCols) { 81 psError Msg(PS_ERRORNAME_DOMAIN "pmFlatField",PS_ERR_BAD_PARAMETER_SIZE, true,82 PS_ERRORTEXT_pmFlatField_SIZE_INPUT_IMAGE,83 inImage->numRows, inImage->numCols, flatImage->numRows, flatImage->numCols);81 psError( PS_ERR_BAD_PARAMETER_SIZE, true, 82 PS_ERRORTEXT_pmFlatField_SIZE_INPUT_IMAGE, 83 inImage->numRows, inImage->numCols, flatImage->numRows, flatImage->numCols); 84 84 return false; 85 85 } else if(inMask->numRows>flatImage->numRows || inMask->numCols > flatImage->numCols) { 86 psError Msg(PS_ERRORNAME_DOMAIN "pmFlatField",PS_ERR_BAD_PARAMETER_SIZE, true,87 PS_ERRORTEXT_pmFlatField_SIZE_MASK_IMAGE,88 inMask->numRows, inMask->numCols, flatImage->numRows, flatImage->numCols);86 psError( PS_ERR_BAD_PARAMETER_SIZE, true, 87 PS_ERRORTEXT_pmFlatField_SIZE_MASK_IMAGE, 88 inMask->numRows, inMask->numCols, flatImage->numRows, flatImage->numCols); 89 89 return false; 90 90 } … … 96 96 // Check that offsets are within image limits 97 97 if(totOffRow>=flatImage->numRows || totOffCol>=flatImage->numCols) { 98 psError Msg(PS_ERRORNAME_DOMAIN "pmFlatField",PS_ERR_BAD_PARAMETER_SIZE, true,99 PS_ERRORTEXT_pmFlatField_OFFSET_FLAT_IMAGE,100 totOffRow, totOffCol, flatImage->numRows, flatImage->numCols);98 psError( PS_ERR_BAD_PARAMETER_SIZE, true, 99 PS_ERRORTEXT_pmFlatField_OFFSET_FLAT_IMAGE, 100 totOffRow, totOffCol, flatImage->numRows, flatImage->numCols); 101 101 return false; 102 102 } else if(totOffRow>=inImage->numRows || totOffCol>=inImage->numCols) { 103 psError Msg(PS_ERRORNAME_DOMAIN "pmFlatField",PS_ERR_BAD_PARAMETER_SIZE, true,104 PS_ERRORTEXT_pmFlatField_OFFSET_INPUT_IMAGE,105 totOffRow, totOffCol, inImage->numRows, inImage->numCols);103 psError( PS_ERR_BAD_PARAMETER_SIZE, true, 104 PS_ERRORTEXT_pmFlatField_OFFSET_INPUT_IMAGE, 105 totOffRow, totOffCol, inImage->numRows, inImage->numCols); 106 106 return false; 107 107 } else if(totOffRow>=inMask->numRows || totOffCol>=inMask->numCols) { 108 psError Msg(PS_ERRORNAME_DOMAIN "pmFlatField",PS_ERR_BAD_PARAMETER_SIZE, true,109 PS_ERRORTEXT_pmFlatField_OFFSET_MASK_IMAGE,110 totOffRow, totOffCol, inMask->numRows, inMask->numCols);108 psError( PS_ERR_BAD_PARAMETER_SIZE, true, 109 PS_ERRORTEXT_pmFlatField_OFFSET_MASK_IMAGE, 110 totOffRow, totOffCol, inMask->numRows, inMask->numCols); 111 111 return false; 112 112 } … … 117 117 maskType = inMask->type.type; 118 118 if(PS_IS_PSELEMTYPE_COMPLEX(inType)) { 119 psError Msg(PS_ERRORNAME_DOMAIN "pmFlatField",PS_ERR_BAD_PARAMETER_TYPE, true,120 PS_ERRORTEXT_pmFlatField_TYPE_INPUT_IMAGE,121 inType);119 psError( PS_ERR_BAD_PARAMETER_TYPE, true, 120 PS_ERRORTEXT_pmFlatField_TYPE_INPUT_IMAGE, 121 inType); 122 122 return false; 123 123 } else if(PS_IS_PSELEMTYPE_COMPLEX(flatType)) { 124 psError Msg(PS_ERRORNAME_DOMAIN "pmFlatField",PS_ERR_BAD_PARAMETER_TYPE, true,125 PS_ERRORTEXT_pmFlatField_TYPE_FLAT_IMAGE,126 flatType);124 psError( PS_ERR_BAD_PARAMETER_TYPE, true, 125 PS_ERRORTEXT_pmFlatField_TYPE_FLAT_IMAGE, 126 flatType); 127 127 return false; 128 128 } else if(maskType != PS_TYPE_MASK) { 129 psError Msg(PS_ERRORNAME_DOMAIN "pmFlatField",PS_ERR_BAD_PARAMETER_TYPE, true,130 PS_ERRORTEXT_pmFlatField_TYPE_MASK_IMAGE,131 maskType);129 psError( PS_ERR_BAD_PARAMETER_TYPE, true, 130 PS_ERRORTEXT_pmFlatField_TYPE_MASK_IMAGE, 131 maskType); 132 132 return false; 133 133 } else if(inType != flatType) { 134 psError Msg(PS_ERRORNAME_DOMAIN "pmFlatField",PS_ERR_BAD_PARAMETER_TYPE, true,135 PS_ERRORTEXT_pmFlatField_TYPE_MISMATCH,136 inType, flatType);134 psError( PS_ERR_BAD_PARAMETER_TYPE, true, 135 PS_ERRORTEXT_pmFlatField_TYPE_MISMATCH, 136 inType, flatType); 137 137 return false; 138 138 } … … 172 172 PM_FLAT_DIVISION(F64); 173 173 default: 174 psError Msg(PS_ERRORNAME_DOMAIN "pmFlatField",PS_ERR_BAD_PARAMETER_TYPE, true,175 PS_ERRORTEXT_pmFlatField_TYPE_UNSUPPORTED,176 inType);174 psError( PS_ERR_BAD_PARAMETER_TYPE, true, 175 PS_ERRORTEXT_pmFlatField_TYPE_UNSUPPORTED, 176 inType); 177 177 } 178 178 -
trunk/psModules/src/pmMaskBadPixels.c
r2138 r2275 19 19 * @author Ross Harman, MHPCC 20 20 * 21 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $22 * @date $Date: 2004-1 0-14 23:52:09$21 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 22 * @date $Date: 2004-11-04 02:02:10 $ 23 23 * 24 24 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 61 61 return true; // Readout may not have data in it 62 62 } else if(mask==NULL) { 63 psError Msg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels",PS_ERR_BAD_PARAMETER_NULL, true,64 PS_ERRORTEXT_pmMaskBadPixels_NULL_MASK_IMAGE);63 psError( PS_ERR_BAD_PARAMETER_NULL, true, 64 PS_ERRORTEXT_pmMaskBadPixels_NULL_MASK_IMAGE); 65 65 return false; 66 66 } … … 68 68 inImage = in->image; 69 69 if (inImage == NULL) { 70 psError Msg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels",PS_ERR_BAD_PARAMETER_NULL, true,71 PS_ERRORTEXT_pmMaskBadPixels_NULL_INPUT_IMAGE);70 psError( PS_ERR_BAD_PARAMETER_NULL, true, 71 PS_ERRORTEXT_pmMaskBadPixels_NULL_INPUT_IMAGE); 72 72 return false; 73 73 } else if(in->mask == NULL) { … … 79 79 // Check input image and its mask are not larger than mask 80 80 if(inImage->numRows > mask->numRows || inImage->numCols > mask->numCols) { 81 psError Msg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels",PS_ERR_BAD_PARAMETER_SIZE, true,82 PS_ERRORTEXT_pmMaskBadPixels_SIZE_INPUT_IMAGE,83 inImage->numRows, inImage->numCols, mask->numRows, mask->numCols);81 psError( PS_ERR_BAD_PARAMETER_SIZE, true, 82 PS_ERRORTEXT_pmMaskBadPixels_SIZE_INPUT_IMAGE, 83 inImage->numRows, inImage->numCols, mask->numRows, mask->numCols); 84 84 return false; 85 85 } else if(inMask->numRows>mask->numRows || inMask->numCols>mask->numCols) { 86 psError Msg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels",PS_ERR_BAD_PARAMETER_SIZE, true,87 PS_ERRORTEXT_pmMaskBadPixels_SIZE_MASK_IMAGE,88 inMask->numRows, inMask->numCols, mask->numRows, mask->numCols);86 psError( PS_ERR_BAD_PARAMETER_SIZE, true, 87 PS_ERRORTEXT_pmMaskBadPixels_SIZE_MASK_IMAGE, 88 inMask->numRows, inMask->numCols, mask->numRows, mask->numCols); 89 89 return false; 90 90 } … … 96 96 // Check that offsets are within image limits 97 97 if(totOffRow>=mask->numRows || totOffCol>=mask->numCols) { 98 psError Msg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels",PS_ERR_BAD_PARAMETER_SIZE, true,99 PS_ERRORTEXT_pmMaskBadPixels_OFFSET_MASK_IMAGE,100 totOffRow, totOffCol, mask->numRows, mask->numCols);98 psError( PS_ERR_BAD_PARAMETER_SIZE, true, 99 PS_ERRORTEXT_pmMaskBadPixels_OFFSET_MASK_IMAGE, 100 totOffRow, totOffCol, mask->numRows, mask->numCols); 101 101 return false; 102 102 } else if(totOffRow>=inImage->numRows || totOffCol>=inImage->numCols) { 103 psError Msg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels",PS_ERR_BAD_PARAMETER_SIZE, true,104 PS_ERRORTEXT_pmMaskBadPixels_OFFSET_INPUT_IMAGE,105 totOffRow, totOffCol, inImage->numRows, inImage->numCols);103 psError( PS_ERR_BAD_PARAMETER_SIZE, true, 104 PS_ERRORTEXT_pmMaskBadPixels_OFFSET_INPUT_IMAGE, 105 totOffRow, totOffCol, inImage->numRows, inImage->numCols); 106 106 return false; 107 107 } else if(totOffRow>=inMask->numRows || totOffCol>=inMask->numCols) { 108 psError Msg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels",PS_ERR_BAD_PARAMETER_SIZE, true,109 PS_ERRORTEXT_pmMaskBadPixels_OFFSET_INPUT_IMAGE_MASK,110 totOffRow, totOffCol, inMask->numRows, inMask->numCols);108 psError( PS_ERR_BAD_PARAMETER_SIZE, true, 109 PS_ERRORTEXT_pmMaskBadPixels_OFFSET_INPUT_IMAGE_MASK, 110 totOffRow, totOffCol, inMask->numRows, inMask->numCols); 111 111 return false; 112 112 } … … 116 116 maskType = mask->type.type; 117 117 if(PS_IS_PSELEMTYPE_COMPLEX(inType)) { 118 psError Msg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels",PS_ERR_BAD_PARAMETER_TYPE, true,119 PS_ERRORTEXT_pmMaskBadPixels_TYPE_INPUT_IMAGE,120 inType);118 psError( PS_ERR_BAD_PARAMETER_TYPE, true, 119 PS_ERRORTEXT_pmMaskBadPixels_TYPE_INPUT_IMAGE, 120 inType); 121 121 return false; 122 122 } else if(maskType!=PS_TYPE_MASK) { 123 psError Msg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels",PS_ERR_BAD_PARAMETER_TYPE, true,124 PS_ERRORTEXT_pmMaskBadPixels_TYPE_MASK_IMAGE,125 maskType);123 psError( PS_ERR_BAD_PARAMETER_TYPE, true, 124 PS_ERRORTEXT_pmMaskBadPixels_TYPE_MASK_IMAGE, 125 maskType); 126 126 return false; 127 127 } … … 175 175 PM_BAD_PIXELS(F64); 176 176 default: 177 psError Msg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels",PS_ERR_BAD_PARAMETER_TYPE, true,178 PS_ERRORTEXT_pmMaskBadPixels_TYPE_UNSUPPORTED,179 inType);177 psError( PS_ERR_BAD_PARAMETER_TYPE, true, 178 PS_ERRORTEXT_pmMaskBadPixels_TYPE_UNSUPPORTED, 179 inType); 180 180 } 181 181 -
trunk/psModules/src/pmNonLinear.c
r2130 r2275 5 5 * @author George Gusciora, MHPCC 6 6 * 7 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $8 * @date $Date: 2004-1 0-14 21:44:08$7 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2004-11-04 02:02:10 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 34 34 int j; 35 35 36 PS_ CHECK_NULL_PTR_RETURN_NULL(in);37 PS_ CHECK_NULL_PTR_RETURN_NULL(in->image);38 PS_ CHECK_NULL_PTR_RETURN_NULL(coeff);36 PS_PTR_CHECK_NULL(in,NULL); 37 PS_PTR_CHECK_NULL(in->image, NULL); 38 PS_PTR_CHECK_NULL(coeff,NULL); 39 39 40 40 for (i=0;i<(in->image)->numRows;i++) { … … 58 58 const psVector *outFlux) 59 59 { 60 PS_ CHECK_NULL_PTR_RETURN_NULL(in);61 PS_ CHECK_NULL_PTR_RETURN_NULL(in->image);62 PS_ CHECK_NULL_PTR_RETURN_NULL(inFlux);63 PS_ CHECK_NULL_PTR_RETURN_NULL(outFlux);60 PS_PTR_CHECK_NULL(in,NULL); 61 PS_PTR_CHECK_NULL(in->image,NULL); 62 PS_PTR_CHECK_NULL(inFlux,NULL); 63 PS_PTR_CHECK_NULL(outFlux,NULL); 64 64 65 65 int i; -
trunk/psModules/src/pmReadoutCombine.c
r2270 r2275 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $8 * @date $Date: 2004-11-0 3 22:10:37$7 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2004-11-04 02:02:10 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 15 15 #include<math.h> 16 16 #include "pslib.h" 17 // XXX: have Desonia do this correctly. 18 #include "../../psLib/src/dataManip/psConstants.h" 17 #include "psConstants.h" 19 18 20 19 typedef struct … … 90 89 // XXX 91 90 if (numInputCols != tmpReadout->image->numCols) { 92 psError( __func__, "Image %d not same size as other input images (%d, %d)\n",91 psError(PS_ERR_UNKNOWN,true, "Image %d not same size as other input images (%d, %d)\n", 93 92 tmpReadout->image->numRows, tmpReadout->image->numCols); 94 93 return(NULL); … … 96 95 // XXX 97 96 if (numInputRows != tmpReadout->image->numRows) { 98 psError( __func__, "Image %d not same size as other input images (%d, %d)\n",97 psError(PS_ERR_UNKNOWN,true, "Image %d not same size as other input images (%d, %d)\n", 99 98 tmpReadout->image->numRows, tmpReadout->image->numCols); 100 99 return(NULL); … … 111 110 112 111 if (1 < p_psDetermineNumBits(params->stats->options)) { 113 psError( __func__, "Multiple statistical options have been requested.\n");112 psError(PS_ERR_UNKNOWN,true, "Multiple statistical options have been requested.\n"); 114 113 return(NULL); 115 114 } … … 175 174 double statValue; 176 175 if (!p_psGetStatValue(stats, &statValue)) { 177 psError( __func__, "Could not determine stats value.\n");176 psError(PS_ERR_UNKNOWN,true, "Could not determine stats value.\n"); 178 177 return(NULL); 179 178 } else { -
trunk/psModules/src/pmSubtractBias.c
r2148 r2275 6 6 * @author George Gusciora, MHPCC 7 7 * 8 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-1 0-15 02:20:39$8 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-11-04 02:02:10 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 38 38 39 39 if (((in->image)->numRows + in->row0 - bias->row0) > (bias->image)->numRows) { 40 psError( __func__, "bias image does not have enough rows\n");40 psError(PS_ERR_UNKNOWN,true, "bias image does not have enough rows\n"); 41 41 } 42 42 if (((in->image)->numCols + in->row0 - bias->row0) > (bias->image)->numCols) { 43 psError( __func__, "bias image does not have enough columns\n");43 psError(PS_ERR_UNKNOWN,true, "bias image does not have enough columns\n"); 44 44 } 45 45 … … 130 130 131 131 if (numOptions == 0) { 132 psError( __func__, "No statistics options have been specified\n");132 psError(PS_ERR_UNKNOWN,true, "No statistics options have been specified\n"); 133 133 } 134 134 if (numOptions != 1) { … … 189 189 } 190 190 } else { 191 psError( __func__, "unknown fit type\n");191 psError(PS_ERR_UNKNOWN,true, "unknown fit type\n"); 192 192 } 193 193 … … 219 219 int nBin; 220 220 221 PS_ CHECK_NULL_PTR_RETURN_NULL(in);221 PS_PTR_CHECK_NULL(in,NULL); 222 222 223 223 // … … 229 229 230 230 if ((overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE)) { 231 psError( __func__, "(overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE)\n");231 psError(PS_ERR_UNKNOWN,true, "(overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE)\n"); 232 232 return(in); 233 233 } -
trunk/psModules/src/psTest.c
r2126 r2275 28 28 #define HEADER_BOTTOM "\\**********************************************************************************/\n\n" 29 29 30 bool p_runTestSuite( FILE *fp, const char* testPointFile, const char* packageName,31 testDescription tests[], intargc, char * const argv[] )32 { 33 bool success = true;34 bool runAll = true;35 bool useFork = true;36 bool found;37 intc;38 intn;30 psBool p_runTestSuite( FILE *fp, const char* testPointFile, const char* packageName, 31 testDescription tests[], psS32 argc, char * const argv[] ) 32 { 33 psBool success = true; 34 psBool runAll = true; 35 psBool useFork = true; 36 psBool found; 37 psS32 c; 38 psS32 n; 39 39 extern char *optarg; 40 40 … … 62 62 printf( "Testpoints:\n" ); 63 63 runAll = false; 64 for ( intindex = 0; tests[ index ].fcn != NULL; index++ ) {64 for ( psS32 index = 0; tests[ index ].fcn != NULL; index++ ) { 65 65 printf( " %6d - %s \n", tests[ index ].testPointNumber, 66 66 tests[ index ].testPointName ); … … 70 70 case 't': 71 71 runAll = false; 72 for ( intindex = 0; tests[ index ].fcn != NULL; index++ ) {72 for ( psS32 index = 0; tests[ index ].fcn != NULL; index++ ) { 73 73 if ( strcmp( optarg, tests[ index ].testPointName ) == 0 ) { 74 74 success = p_runTest( fp, … … 85 85 runAll = false; 86 86 if ( sscanf( optarg, "%i", &n ) != 1 ) { 87 psError( __func__, "Failed to parse the testpoint number (%s).",88 optarg );87 psError(PS_ERR_UNKNOWN, true, "Failed to parse the testpoint number (%s).", 88 optarg ); 89 89 break; 90 90 } 91 91 found = false; 92 for ( intindex = 0; tests[ index ].fcn != NULL; index++ ) {92 for ( psS32 index = 0; tests[ index ].fcn != NULL; index++ ) { 93 93 if ( n == tests[ index ].testPointNumber ) { 94 94 found = true; … … 103 103 } 104 104 if ( ! found ) { 105 psError( __func__, "The specified testpoint number (%d) doesn't exist in this test driver.",106 n );105 psError(PS_ERR_UNKNOWN, true, "The specified testpoint number (%d) doesn't exist in this test driver.", 106 n ); 107 107 break; 108 108 } 109 109 break; 110 110 case '?': 111 psError( __func__, "Option %s is not recognized and is ignored.", optarg );111 psError(PS_ERR_UNKNOWN, true, "Option %s is not recognized and is ignored.", optarg ); 112 112 break; 113 113 } … … 116 116 117 117 if ( runAll ) { 118 for ( intindex = 0; tests[ index ].fcn != NULL; index++ ) {118 for ( psS32 index = 0; tests[ index ].fcn != NULL; index++ ) { 119 119 if ( ! tests[ index ].isDuplicateEntry ) { 120 120 success = p_runTest( fp, … … 130 130 131 131 if ( ! success ) { 132 psError( testPointFile, "One or more tests failed" ); 132 psError( PS_ERR_UNKNOWN, true, 133 "One or more tests failed" ); 133 134 } 134 135 … … 136 137 } 137 138 138 bool p_runTest( FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName,139 testFcn fcn, int expectedReturn, bool useFork )140 { 141 intchildReturn = 0;139 psBool p_runTest( FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName, 140 testFcn fcn, psS32 expectedReturn, psBool useFork ) 141 { 142 psS32 childReturn = 0; 142 143 pid_t child; 143 144 … … 147 148 child = fork(); 148 149 if ( child == 0 ) { // I am the child process, run the test 149 intcurrentId = psMemGetId();150 intretVal = fcn();150 psS32 currentId = psMemGetId(); 151 psS32 retVal = fcn(); 151 152 if ( retVal == 0 ) { // only bother checking memory if test executed to end. 152 153 if ( psMemCheckLeaks( currentId, NULL, stderr ) != 0 ) { 153 psError( __func__, "Memory Leaks Detected" );154 psError(PS_ERR_UNKNOWN, true, "Memory Leaks Detected" ); 154 155 retVal = 64; 155 156 } … … 171 172 } 172 173 } else { 173 intcurrentId = psMemGetId();174 psS32 currentId = psMemGetId(); 174 175 childReturn = fcn(); 175 176 if ( childReturn == 0 ) { // only bother checking memory if test executed to end. 176 177 if ( psMemCheckLeaks( currentId, NULL, stderr ) != 0 ) { 177 psError( __func__, "Memory Leaks Detected" );178 psError(PS_ERR_UNKNOWN, true, "Memory Leaks Detected" ); 178 179 childReturn = 64; 179 180 } … … 215 216 const char* testPointName, 216 217 const char* expectedError, 217 intexitValue )218 psS32 exitValue ) 218 219 { 219 220 char TP[ 80 ]; … … 235 236 const char* packageName, 236 237 const char* testPointName, 237 bool success )238 psBool success ) 238 239 { 239 240 if ( success ) {
Note:
See TracChangeset
for help on using the changeset viewer.
