Re: [Intel-gfx] [PATCH i-g-t 2/5] lib/igt_core: reserve long options for individual tests

2019-05-31 Thread Petri Latvala
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 

This is much better than requiring additional opts to begin from a particular 
number.


Reviewed-by: Petri Latvala 


> ---
>  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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH i-g-t 2/5] lib/igt_core: reserve long options for individual tests

2019-05-29 Thread Antonio Argenziano



On 29/05/19 16:27, 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 


Acked-by: Antonio Argenziano 


---
  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;



___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH i-g-t 2/5] lib/igt_core: reserve long options for individual tests

2019-05-29 Thread Lucas De Marchi
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 
---
 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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx