From patchwork Wed Jul 23 10:57:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Wood X-Patchwork-Id: 4609941 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 D8E9FC0514 for ; Wed, 23 Jul 2014 10:58:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DD999201CD for ; Wed, 23 Jul 2014 10:58:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D81F3201C0 for ; Wed, 23 Jul 2014 10:58:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6B4836E62B; Wed, 23 Jul 2014 03:58:15 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-we0-f176.google.com (mail-we0-f176.google.com [74.125.82.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 6991F6E625 for ; Wed, 23 Jul 2014 03:58:06 -0700 (PDT) Received: by mail-we0-f176.google.com with SMTP id q58so983872wes.35 for ; Wed, 23 Jul 2014 03:58:05 -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:cc:subject:date:message-id:in-reply-to :references; bh=EvesTDV4gNFexIqsrRUb+1VXO3I4zJbAfn1h5Luo+Wg=; b=XYlAiTXrD3bora0u2YPWfEkO+t0yCyBB2pJgaS7UJ9NUWy5RvUn/8/0ZnsJyr/65AY +AN1CtQvd3zZkMtE/iJfkrWKmfxovdDlt+m9EJAwklL9np6jtaTxufnd/OPlXwmwLtOK CGJQHI5KQvdgHZj7/RgmiPPc6g/Gjlv/UF3XpzdQP1U2FH6fbha8Q0AFTxm1nznMeKoX 7nD7/6b1mXhtnSLvfF45unnxV0t4tyRfxRBWLSOIP/D00dclYWFWWiiOLoD42c/l75Ik Wl9cax0et9DoprR192yo2Rru2OQuc6pR254ohI220SPL6/Xo08rFrOBhXrFbvubZOQqB 4Tag== X-Gm-Message-State: ALoCoQnOEasLuJ7OkQSnjjmZWyNISG4VOlRVUz5tmt5X01VIWy7IPxs8S99iqWLr0r1+t+I0U50a X-Received: by 10.194.57.132 with SMTP id i4mr842430wjq.6.1406113084966; Wed, 23 Jul 2014 03:58:04 -0700 (PDT) Received: from pistachio.icx.intel.com ([83.217.123.106]) by mx.google.com with ESMTPSA id de5sm7787760wib.18.2014.07.23.03.58.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jul 2014 03:58:04 -0700 (PDT) From: Thomas Wood To: intel-gfx@lists.freedesktop.org Date: Wed, 23 Jul 2014 11:57:52 +0100 Message-Id: <1406113075-30860-6-git-send-email-thomas.wood@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1406113075-30860-1-git-send-email-thomas.wood@intel.com> References: <1406113075-30860-1-git-send-email-thomas.wood@intel.com> Cc: daniel.vetter@ffwll.ch Subject: [Intel-gfx] [PATCH i-g-t 5/8] lib: don't ignore unknown options in multi-tests 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 None of the current tests have additional options that might make use of any unknown options and igt_subtest_init_parse_opts is available that integrates additional option parsing. Signed-off-by: Thomas Wood Reviewed-by: Tim Gore --- lib/igt_core.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/lib/igt_core.c b/lib/igt_core.c index 72c77e6..0867c27 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -459,18 +459,7 @@ enum igt_log_level igt_log_level = IGT_LOG_INFO; */ void igt_subtest_init(int argc, char **argv) { - int ret; - - /* supress getopt errors about unknown options */ - opterr = 0; - - ret = igt_subtest_init_parse_opts(argc, argv, NULL, NULL, NULL, NULL); - if (ret < 0) - /* exit with no error for -h/--help */ - exit(ret == -1 ? 0 : ret); - - /* reset opt parsing */ - optind = 1; + igt_subtest_init_parse_opts(argc, argv, NULL, NULL, NULL, NULL); } /**