summaryrefslogtreecommitdiff
path: root/tests/kms_cursor_edge_walk.c
diff options
context:
space:
mode:
authorPetri Latvala <petri.latvala@intel.com>2019-05-23 15:27:15 +0300
committerPetri Latvala <petri.latvala@intel.com>2019-05-27 12:47:43 +0300
commitdaf72d1094a96b3eb8a61dfcd0c35ca2375147bf (patch)
tree044f9376bf14020ca28658b8601375c9ed5c4952 /tests/kms_cursor_edge_walk.c
parentb15d7f6c29dab4f63609de72663a5b364ebb4635 (diff)
kms_cursor_edge_walk: Nuke custom main function
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'tests/kms_cursor_edge_walk.c')
-rw-r--r--tests/kms_cursor_edge_walk.c32
1 files changed, 13 insertions, 19 deletions
diff --git a/tests/kms_cursor_edge_walk.c b/tests/kms_cursor_edge_walk.c
index 86629555..809dca42 100644
--- a/tests/kms_cursor_edge_walk.c
+++ b/tests/kms_cursor_edge_walk.c
@@ -285,31 +285,27 @@ static int opt_handler(int opt, int opt_index, void *_data)
data->jump = true;
break;
default:
- break;
+ return IGT_OPT_HANDLER_ERROR;
}
- return 0;
+ return IGT_OPT_HANDLER_SUCCESS;
}
static data_t data;
static uint64_t max_curw = 64, max_curh = 64;
+static const struct option long_opts[] = {
+ { .name = "colored", .val = 'c' },
+ { .name = "disable", .val = 'd'},
+ { .name = "jump", .val = 'j' },
+ {}
+};
+static const char *help_str =
+ " --colored\t\tUse a colored cursor (disables CRC checks)\n"
+ " --disable\t\tDisable the cursor between each step\n"
+ " --jump\t\tJump the cursor to middle of the screen between each step)\n";
-int main(int argc, char **argv)
+igt_main_args("", long_opts, help_str, opt_handler, &data)
{
- static const struct option long_opts[] = {
- { .name = "colored", .val = 'c' },
- { .name = "disable", .val = 'd'},
- { .name = "jump", .val = 'j' },
- {}
- };
- static const char *help_str =
- " --colored\t\tUse a colored cursor (disables CRC checks)\n"
- " --disable\t\tDisable the cursor between each step\n"
- " --jump\t\tJump the cursor to middle of the screen between each step)\n";
-
- igt_subtest_init_parse_opts(&argc, argv, "", long_opts, help_str,
- opt_handler, &data);
-
igt_skip_on_simulation();
igt_fixture {
@@ -370,6 +366,4 @@ int main(int argc, char **argv)
igt_fixture
igt_display_fini(&data.display);
-
- igt_exit();
}