From: Imre Deak Date: Mon, 26 Aug 2013 14:15:46 +0000 (+0300) Subject: tests/kms_setmode: don't save/restore vt graphics for dry-run X-Git-Tag: intel-gpu-tools-1.4~92 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86f60ee593e3fb6808150d63088e508cf7068a75;p=platform%2Fupstream%2Fintel-gpu-tools.git tests/kms_setmode: don't save/restore vt graphics for dry-run Signed-off-by: Imre Deak --- diff --git a/lib/drmtest.c b/lib/drmtest.c index ad91c65..37d7da3 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -744,12 +744,12 @@ int igt_subtest_init_parse_opts(int argc, char **argv, break; case 'h': print_usage(command_str, help_str, false); - ret = -2; + ret = -1; goto out; case '?': if (opterr) { print_usage(command_str, help_str, true); - ret = -1; + ret = -2; goto out; } /* @@ -779,7 +779,7 @@ void igt_subtest_init(int argc, char **argv) ret = igt_subtest_init_parse_opts(argc, argv, NULL, NULL, NULL, NULL); if (ret < 0) /* exit with no error for -h/--help */ - exit(ret == -2 ? 0 : ret); + exit(ret == -1 ? 0 : ret); /* reset opt parsing */ optind = 1; diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c index 47fab25..7b22225 100644 --- a/tests/kms_setmode.c +++ b/tests/kms_setmode.c @@ -701,7 +701,8 @@ int main(int argc, char **argv) igt_fixture { drm_fd = drm_open_any(); - do_or_die(igt_set_vt_graphics_mode()); + if (!dry_run) + do_or_die(igt_set_vt_graphics_mode()); drm_resources = drmModeGetResources(drm_fd); assert(drm_resources);