Bugfix for the parsing of flags. Backwards compatibility for direct IO.
parent
21405ed924
commit
07217c93aa
|
@ -306,6 +306,7 @@ void *POSIX_Create(char *testFileName, IOR_param_t * param)
|
||||||
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){
|
||||||
|
printf("ODIREC\n");
|
||||||
set_o_direct_flag(&fd_oflag);
|
set_o_direct_flag(&fd_oflag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -223,6 +223,7 @@ 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){
|
||||||
char * txt = argv[0];
|
char * txt = argv[0];
|
||||||
char * arg = strstr(txt, "=");
|
char * arg = strstr(txt, "=");
|
||||||
|
|
||||||
int replaced_equal = 0;
|
int replaced_equal = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
if(arg != NULL){
|
if(arg != NULL){
|
||||||
|
@ -338,12 +339,14 @@ static void option_parse_token(char ** argv, int * flag_parsed_next, int * requi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int option_parse_key_value(char * key, char * value, options_all_t * opt_all){
|
int option_parse_key_value(char * key, char *val, options_all_t * opt_all){
|
||||||
int flag_parsed_next;
|
int flag_parsed_next;
|
||||||
char * argv[2] = {key, value};
|
|
||||||
int error = 0;
|
int error = 0;
|
||||||
int requiredArgsSeen = 0;
|
int requiredArgsSeen = 0;
|
||||||
int print_help = 0;
|
int print_help = 0;
|
||||||
|
char value[1024];
|
||||||
|
sprintf(value, "%s=%s", key, val);
|
||||||
|
char * argv[2] = {value, NULL};
|
||||||
option_parse_token(argv, & flag_parsed_next, & requiredArgsSeen, opt_all, & error, & print_help);
|
option_parse_token(argv, & flag_parsed_next, & requiredArgsSeen, opt_all, & error, & print_help);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
|
@ -291,6 +291,10 @@ void DecodeDirective(char *line, IOR_param_t *params, options_all_t * module_opt
|
||||||
} else if (strcasecmp(option, "summaryalways") == 0) {
|
} else if (strcasecmp(option, "summaryalways") == 0) {
|
||||||
params->summary_every_test = atoi(value);
|
params->summary_every_test = atoi(value);
|
||||||
} else {
|
} else {
|
||||||
|
// backward compatibility for now
|
||||||
|
if (strcasecmp(option, "useo_direct") == 0) {
|
||||||
|
strcpy(option, "--posix.odirect");
|
||||||
|
}
|
||||||
int parsing_error = option_parse_key_value(option, value, module_options);
|
int parsing_error = option_parse_key_value(option, value, module_options);
|
||||||
if(parsing_error){
|
if(parsing_error){
|
||||||
if (rank == 0)
|
if (rank == 0)
|
||||||
|
@ -410,7 +414,7 @@ IOR_test_t *ReadConfigScript(char *scriptName)
|
||||||
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);
|
((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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,5 +15,7 @@ blockSize=100k
|
||||||
# space-prefixed comment
|
# space-prefixed comment
|
||||||
run
|
run
|
||||||
--dummy.delay-create=1000
|
--dummy.delay-create=1000
|
||||||
|
useo_direct=0
|
||||||
|
#--posix.odirect=0
|
||||||
api=dummy
|
api=dummy
|
||||||
ior stop
|
ior stop
|
||||||
|
|
Loading…
Reference in New Issue