From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Wood Subject: [PATCH i-g-t 5/8] lib: don't ignore unknown options in multi-tests Date: Wed, 23 Jul 2014 11:57:52 +0100 Message-ID: <1406113075-30860-6-git-send-email-thomas.wood@intel.com> References: <1406113075-30860-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-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) In-Reply-To: <1406113075-30860-1-git-send-email-thomas.wood@intel.com> 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 Cc: daniel.vetter@ffwll.ch List-Id: intel-gfx@lists.freedesktop.org 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 --- 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); } /** -- 1.9.3