From: Thomas Wood Subject: [PATCH i-g-t] testdisplay: set a non-zero exit code if getopt detected an error Date: Fri, 25 Jul 2014 16:37:16 +0100 Message-ID: <1406302636-24943-1-git-send-email-thomas.wood@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 9A3336E0CB for ; Fri, 25 Jul 2014 08:37:24 -0700 (PDT) Received: by mail-wi0-f172.google.com with SMTP id n3so1197821wiv.5 for ; Fri, 25 Jul 2014 08:37:19 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org Signed-off-by: Thomas Wood --- tests/testdisplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testdisplay.c b/tests/testdisplay.c index f60e66d..20b0615 100644 --- a/tests/testdisplay.c +++ b/tests/testdisplay.c @@ -670,7 +670,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() -- 1.9.3