[igt-dev] [PATCH i-g-t 2/4] lib: Fix option parsing

Petri Latvala petri.latvala at intel.com
Mon Apr 19 09:33:00 UTC 2021


On Fri, Apr 16, 2021 at 08:48:39PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> --skip-crc-compare and --trace-on-oops mistakenly abort further
> option parsing. So depending on where you have them in your command line
> you get some very confusing behaviour where some of the options get
> totally ignored.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Petri Latvala <petri.latvala at intel.com>

> ---
>  lib/igt_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/igt_core.c b/lib/igt_core.c
> index 6a43d955d562..ec05535cd56e 100644
> --- a/lib/igt_core.c
> +++ b/lib/igt_core.c
> @@ -1014,10 +1014,10 @@ static int common_init(int *argc, char **argv,
>  			goto out;
>  		case OPT_SKIP_CRC:
>  			igt_skip_crc_compare = true;
> -			goto out;
> +			break;
>  		case OPT_TRACE_OOPS:
>  			show_ftrace = true;
> -			goto out;
> +			break;
>  		case OPT_DEVICE:
>  			assert(optarg);
>  			/* if set by env IGT_DEVICE we need to free it */
> -- 
> 2.26.3
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev


More information about the igt-dev mailing list