master
Julian M. Kunkel 2018-08-29 17:49:41 +01:00
parent c8e0ebf816
commit c1f3f485ec
3 changed files with 7 additions and 2 deletions

View File

@ -499,7 +499,7 @@ static void* safeMalloc(uint64_t size){
return d;
}
static void AllocResults(IOR_test_t *test)
void AllocResults(IOR_test_t *test)
{
int reps;
if (test->results != NULL)
@ -533,7 +533,6 @@ IOR_test_t *CreateTest(IOR_param_t *init_params, int test_num)
newTest->next = NULL;
newTest->results = NULL;
AllocResults(newTest);
return newTest;
}

View File

@ -228,6 +228,8 @@ typedef struct IOR_test_t {
IOR_test_t *CreateTest(IOR_param_t *init_params, int test_num);
void AllocResults(IOR_test_t *test);
char * GetPlatformName();
void init_IOR_Param_t(IOR_param_t *p);

View File

@ -396,6 +396,7 @@ IOR_test_t *ReadConfigScript(char *scriptName)
/* previous line was a "run" as well
create duplicate test */
tail->next = CreateTest(&tail->params, test_num++);
AllocResults(tail);
tail = tail->next;
}
runflag = 1;
@ -404,6 +405,7 @@ IOR_test_t *ReadConfigScript(char *scriptName)
create and initialize a new test structure */
runflag = 0;
tail->next = CreateTest(&tail->params, test_num++);
AllocResults(tail);
tail = tail->next;
ParseLine(linebuf, &tail->params);
} else {
@ -414,6 +416,7 @@ IOR_test_t *ReadConfigScript(char *scriptName)
/* close the script */
if (fclose(file) != 0)
ERR("fclose() of script file failed");
AllocResults(head);
return head;
}
@ -565,6 +568,7 @@ IOR_test_t *ParseCommandLine(int argc, char **argv)
tests = ReadConfigScript(testscripts);
}else{
tests = CreateTest(&initialTestParams, 0);
AllocResults(tests);
}
CheckRunSettings(tests);