diff --git a/fabtests/common/shared.c b/fabtests/common/shared.c index 5ca4f8ddc26..ca51284d61b 100644 --- a/fabtests/common/shared.c +++ b/fabtests/common/shared.c @@ -4156,6 +4156,10 @@ void ft_longopts_usage() FT_PRINT_OPTS_USAGE("--debug-assert", "Replace asserts with while loops to force process to\n" "spin until a debugger can be attached."); + FT_PRINT_OPTS_USAGE("--data-progress ", + "manual, or auto"); + FT_PRINT_OPTS_USAGE("--control-progress ", + "manual, auto, or unified"); } int debug_assert; @@ -4165,9 +4169,25 @@ struct option long_opts[] = { {"pin-core", required_argument, NULL, LONG_OPT_PIN_CORE}, {"timeout", required_argument, NULL, LONG_OPT_TIMEOUT}, {"debug-assert", no_argument, &debug_assert, LONG_OPT_DEBUG_ASSERT}, + {"data-progress", required_argument, NULL, LONG_OPT_DATA_PROGRESS}, + {"control-progress", required_argument, NULL, LONG_OPT_CONTROL_PROGRESS}, {NULL, 0, NULL, 0}, }; +int ft_parse_progress_model_string(char* progress_str) +{ + int ret = -1; + + if (!strcasecmp("manual", progress_str)) + ret = FI_PROGRESS_MANUAL; + else if (!strcasecmp("auto", progress_str)) + ret = FI_PROGRESS_AUTO; + else if (!strcasecmp("unified", progress_str)) + ret = FI_PROGRESS_CONTROL_UNIFIED; + + return ret; +} + int ft_parse_long_opts(int op, char *optarg) { switch (op) { @@ -4178,6 +4198,16 @@ int ft_parse_long_opts(int op, char *optarg) return 0; case LONG_OPT_DEBUG_ASSERT: return 0; + case LONG_OPT_DATA_PROGRESS: + hints->domain_attr->data_progress = ft_parse_progress_model_string(optarg); + if (hints->domain_attr->data_progress == -1) + return EXIT_FAILURE; + return 0; + case LONG_OPT_CONTROL_PROGRESS: + hints->domain_attr->control_progress = ft_parse_progress_model_string(optarg); + if (hints->domain_attr->control_progress == -1) + return EXIT_FAILURE; + return 0; default: return EXIT_FAILURE; } diff --git a/fabtests/include/shared.h b/fabtests/include/shared.h index 470a913d0b3..50ada9b1cae 100644 --- a/fabtests/include/shared.h +++ b/fabtests/include/shared.h @@ -633,6 +633,8 @@ enum { LONG_OPT_PIN_CORE = 1, LONG_OPT_TIMEOUT, LONG_OPT_DEBUG_ASSERT, + LONG_OPT_DATA_PROGRESS, + LONG_OPT_CONTROL_PROGRESS, }; extern int debug_assert;