From patchwork Fri Jul 25 15:37:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Wood X-Patchwork-Id: 4624161 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 13F71C0338 for ; Fri, 25 Jul 2014 15:37:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2822D2020F for ; Fri, 25 Jul 2014 15:37:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 321FB2020A for ; Fri, 25 Jul 2014 15:37:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B687D6E0CB; Fri, 25 Jul 2014 08:37:25 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org 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) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=jDA9p7/rYRUtRJxi1FrTORj9UBSwZENyvx1qo6heY24=; b=HCf9sJ74lr2YDbNnkoGrm2lx5Sg5FvFMwwAt3IOwKBKc4YgBmeZECQ4l7E7XGqFIkv 1SrSumfagkFn4FXv6unoUXfpnpE9CMTgn0XSIHzfEVesJQA8jnxwwk5I+bXrKjvvjWHH NGCzvRmhu58INDgb6s3YO81ulSHDHy7y1uzanPUq+geExCaaox9zBY4H3euMQ7OA9KAi v9jhs9++ZPyOqy2twbOnCQA1L3Fc6gabkxdlUoo6VE4DR5jgZR+n0SM89v+KtlRcT483 33krMCqZFbK/f00Yda+mjnhBiZW56LFb3kH756Y0fXd8l/dKa8TJUz3KLbs7QmCknLjV 48uQ== X-Gm-Message-State: ALoCoQkGqixGoKEDDy54KPCa4jAh1qcwesN7Cw2uuKIiKHBE4viiTtvbOuljUXkpHERkkgsdDqvc X-Received: by 10.194.91.200 with SMTP id cg8mr23368447wjb.50.1406302638520; Fri, 25 Jul 2014 08:37:18 -0700 (PDT) Received: from pistachio.icx.intel.com ([83.217.123.106]) by mx.google.com with ESMTPSA id n8sm7184432wia.19.2014.07.25.08.37.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jul 2014 08:37:17 -0700 (PDT) From: Thomas Wood To: intel-gfx@lists.freedesktop.org Date: Fri, 25 Jul 2014 16:37:16 +0100 Message-Id: <1406302636-24943-1-git-send-email-thomas.wood@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [Intel-gfx] [PATCH i-g-t] testdisplay: set a non-zero exit code if getopt detected an error X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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()