[Intel-gfx] [PATCH i-g-t 2/5] lib/igt_core: reserve long options for individual tests
Petri Latvala
petri.latvala at intel.com
Fri May 31 10:00:35 UTC 2019
On Wed, May 29, 2019 at 04:27:34PM -0700, Lucas De Marchi wrote:
> Start the core optiosn from 500 so the individual tests can have their
> own options starting from 0. This makes it easier to set the long
> options without conflicting.
>
> 500 is just a magic number, higher than any ascii char that could be
> used in the individual test.
>
> While at it, fix the coding style to use tab rather than space.
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
This is much better than requiring additional opts to begin from a particular number.
Reviewed-by: Petri Latvala <petri.latvala at intel.com>
> ---
> lib/igt_core.c | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/lib/igt_core.c b/lib/igt_core.c
> index 9c86d664..814f5c72 100644
> --- a/lib/igt_core.c
> +++ b/lib/igt_core.c
> @@ -280,12 +280,16 @@ int test_children_sz;
> bool test_child;
>
> enum {
> - OPT_LIST_SUBTESTS,
> - OPT_RUN_SUBTEST,
> - OPT_DESCRIPTION,
> - OPT_DEBUG,
> - OPT_INTERACTIVE_DEBUG,
> - OPT_HELP = 'h'
> + /*
> + * Let the first values be used by individual tests so options don't
> + * conflict with core ones
> + */
> + OPT_LIST_SUBTESTS = 500,
> + OPT_RUN_SUBTEST,
> + OPT_DESCRIPTION,
> + OPT_DEBUG,
> + OPT_INTERACTIVE_DEBUG,
> + OPT_HELP = 'h'
> };
>
> static int igt_exitcode = IGT_EXIT_SUCCESS;
> --
> 2.21.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list