From 8fc4107c911826f7e0900797e36b24010230e30d Mon Sep 17 00:00:00 2001 From: Thomas Wood Date: Fri, 25 Jul 2014 15:35:36 +0100 Subject: testdisplay: set a non-zero exit code if getopt detected an error Signed-off-by: Thomas Wood --- tests/testdisplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/testdisplay.c') 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,,,\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() -- cgit v1.2.3