[igt-dev] [PATCH i-g-t 28/36] kms_mmap_write_crc: Nuke custom main function

Petri Latvala petri.latvala at intel.com
Thu May 23 12:27:19 UTC 2019


Signed-off-by: Petri Latvala <petri.latvala at intel.com>
---
 tests/kms_mmap_write_crc.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/tests/kms_mmap_write_crc.c b/tests/kms_mmap_write_crc.c
index bf2b0c29..73606b16 100644
--- a/tests/kms_mmap_write_crc.c
+++ b/tests/kms_mmap_write_crc.c
@@ -258,18 +258,18 @@ static int opt_handler(int opt, int opt_index, void *data)
 	if (opt == 'n') {
 		ioctl_sync = false;
 		igt_info("set via cmd line to not use sync ioctls\n");
+	} else {
+		return IGT_OPT_HANDLER_ERROR;
 	}
 
-	return 0;
+	return IGT_OPT_HANDLER_SUCCESS;
 }
 
 static data_t data;
 
-int main(int argc, char **argv)
+igt_main_args("n", NULL, NULL, opt_handler, NULL)
 {
 	int i;
-	igt_subtest_init_parse_opts(&argc, argv, "n", NULL, NULL,
-				    opt_handler, NULL);
 
 	igt_skip_on_simulation();
 
@@ -299,6 +299,4 @@ int main(int argc, char **argv)
 
 		igt_stop_helper(&hog);
 	}
-
-	igt_exit();
 }
-- 
2.19.1



More information about the igt-dev mailing list