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

Ville Syrjala ville.syrjala at linux.intel.com
Fri Apr 16 17:48:39 UTC 2021


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



More information about the igt-dev mailing list