diff options
author | Thomas Wood <thomas.wood@intel.com> | 2014-07-25 15:35:36 +0100 |
---|---|---|
committer | Thomas Wood <thomas.wood@intel.com> | 2014-07-30 11:13:13 +0100 |
commit | 8fc4107c911826f7e0900797e36b24010230e30d (patch) | |
tree | bdddb2ee27dcfe11489a00f5e075225fcfcba1a5 /tests/testdisplay.c | |
parent | 2fae99bf2cc69eed3ef71ba4d71f640463de57c3 (diff) |
testdisplay: set a non-zero exit code if getopt detected an error
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'tests/testdisplay.c')
-rw-r--r-- | tests/testdisplay.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/testdisplay.c b/tests/testdisplay.c index 3bf61336..a187c16e 100644 --- a/tests/testdisplay.c +++ b/tests/testdisplay.c @@ -672,7 +672,7 @@ static void __attribute__((noreturn)) usage(char *name) igt_info("\t\t<vdisp>,<vsync-start>,<vsync-end>,<vtotal>\n"); igt_info("\t\ttest force mode\n"); igt_info("\tDefault is to test all modes.\n"); - exit(0); + exit((optopt) ? -1 : 0); } #define dump_resource(res) if (res) dump_##res() |