Checked proper IOR behavior for -f option.

master
Julian M. Kunkel 2019-03-27 20:37:46 +00:00
parent 20e960d020
commit 07ca5247d7
4 changed files with 16 additions and 16 deletions

View File

@ -304,8 +304,9 @@ void *POSIX_Create(char *testFileName, IOR_param_t * param)
if (fd == NULL) if (fd == NULL)
ERR("Unable to malloc file descriptor"); ERR("Unable to malloc file descriptor");
posix_options_t * o = (posix_options_t*) param->backend_options; posix_options_t * o = (posix_options_t*) param->backend_options;
if (o->direct_io == TRUE) if (o->direct_io == TRUE){
set_o_direct_flag(&fd_oflag); set_o_direct_flag(&fd_oflag);
}
if(param->dryRun) if(param->dryRun)
return 0; return 0;

View File

@ -221,7 +221,6 @@ void option_print_current(option_help * args){
} }
static void option_parse_token(char ** argv, int * flag_parsed_next, int * requiredArgsSeen, options_all_t * opt_all, int * error, int * print_help){ static void option_parse_token(char ** argv, int * flag_parsed_next, int * requiredArgsSeen, options_all_t * opt_all, int * error, int * print_help){
int foundOption = 0;
char * txt = argv[0]; char * txt = argv[0];
char * arg = strstr(txt, "="); char * arg = strstr(txt, "=");
int replaced_equal = 0; int replaced_equal = 0;
@ -243,8 +242,6 @@ static void option_parse_token(char ** argv, int * flag_parsed_next, int * requi
continue; continue;
} }
if ( (txt[0] == '-' && o->shortVar == txt[1]) || (strlen(txt) > 2 && txt[0] == '-' && txt[1] == '-' && o->longVar != NULL && strcmp(txt + 2, o->longVar) == 0)){ if ( (txt[0] == '-' && o->shortVar == txt[1]) || (strlen(txt) > 2 && txt[0] == '-' && txt[1] == '-' && o->longVar != NULL && strcmp(txt + 2, o->longVar) == 0)){
foundOption = 1;
// now process the option. // now process the option.
switch(o->arg){ switch(o->arg){
case (OPTION_FLAG):{ case (OPTION_FLAG):{
@ -324,18 +321,15 @@ static void option_parse_token(char ** argv, int * flag_parsed_next, int * requi
(*requiredArgsSeen)++; (*requiredArgsSeen)++;
} }
break; return;
} }
} }
} }
if(strcmp(txt, "-h") == 0 || strcmp(txt, "--help") == 0){
if (! foundOption){ *print_help = 1;
if(strcmp(txt, "-h") == 0 || strcmp(txt, "--help") == 0){ }else{
*print_help = 1; *error = 1;
}else{
*error = 1;
}
} }
} }

View File

@ -111,8 +111,6 @@ void DecodeDirective(char *line, IOR_param_t *params, options_all_t * module_opt
fprintf(out_logfile, "Could not load backend API %s\n", params->api); fprintf(out_logfile, "Could not load backend API %s\n", params->api);
exit(-1); exit(-1);
} }
/* copy the actual module options into the test */
params->backend_options = airoi_update_module_options(params->backend, global_options);
} else if (strcasecmp(option, "summaryFile") == 0) { } else if (strcasecmp(option, "summaryFile") == 0) {
if (rank == 0){ if (rank == 0){
out_resultfile = fopen(value, "w"); out_resultfile = fopen(value, "w");
@ -411,6 +409,8 @@ IOR_test_t *ReadConfigScript(char *scriptName)
create duplicate test */ create duplicate test */
tail->next = CreateTest(&tail->params, test_num++); tail->next = CreateTest(&tail->params, test_num++);
AllocResults(tail); AllocResults(tail);
((IOR_test_t*) tail)->params.backend_options = airoi_update_module_options(((IOR_test_t*) tail)->params.backend, global_options);
tail = tail->next; tail = tail->next;
*option_p = createGlobalOptions(& ((IOR_test_t*) tail->next)->params); *option_p = createGlobalOptions(& ((IOR_test_t*) tail->next)->params);
} }
@ -422,6 +422,8 @@ IOR_test_t *ReadConfigScript(char *scriptName)
tail->next = CreateTest(&tail->params, test_num++); tail->next = CreateTest(&tail->params, test_num++);
*option_p = createGlobalOptions(& ((IOR_test_t*) tail->next)->params); *option_p = createGlobalOptions(& ((IOR_test_t*) tail->next)->params);
AllocResults(tail); AllocResults(tail);
((IOR_test_t*) tail)->params.backend_options = airoi_update_module_options(((IOR_test_t*) tail)->params.backend, global_options);
tail = tail->next; tail = tail->next;
ParseLine(ptr, &tail->params, global_options); ParseLine(ptr, &tail->params, global_options);
} else { } else {
@ -432,7 +434,8 @@ IOR_test_t *ReadConfigScript(char *scriptName)
/* close the script */ /* close the script */
if (fclose(file) != 0) if (fclose(file) != 0)
ERR("fclose() of script file failed"); ERR("fclose() of script file failed");
AllocResults(tail); AllocResults(tail); /* copy the actual module options into the test */
((IOR_test_t*) tail)->params.backend_options = airoi_update_module_options(((IOR_test_t*) tail)->params.backend, global_options);
return head; return head;
} }

View File

@ -14,4 +14,6 @@ transferSize=100k
blockSize=100k blockSize=100k
# space-prefixed comment # space-prefixed comment
run run
--dummy.delay-create=1000
api=dummy
ior stop ior stop