From patchwork Wed Sep 5 13:49:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10588887 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 116E315E9 for ; Wed, 5 Sep 2018 13:50:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F33142A1DF for ; Wed, 5 Sep 2018 13:50:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E74652A1EA; Wed, 5 Sep 2018 13:50:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AAB452A1DF for ; Wed, 5 Sep 2018 13:50:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 19B976E4B4; Wed, 5 Sep 2018 13:49:58 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8FF396E49C for ; Wed, 5 Sep 2018 13:49:55 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id t25-v6so7799929wmi.3 for ; Wed, 05 Sep 2018 06:49:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QXzzCTd9UZ3iH3c3jcuAret+ZOSyZw1S1+OrtQlcT9A=; b=QFHMEwhUbqmnoKIwQFbbx1LwJLACWzUa4H052Hh//vo97gNjPSwEDlctSYpfqamJYk HC6Rlv1QAOvnl6RmFFWIaP+M6xxVK4sy6sXuIjzt4NFAx2v+DX2nJBRYKBzxTlilAYmp wx3PTqa28Gp3P9dxoFf8A8Q5NzapJXeafnXYrUAJQ2D7pmSWeLWeOlCW7k9AOTX8HLJD fTSBVrJ/BM2MGBJPoomlOn+B3p50P82OQWeaO18p3GsMQmKgWKL74v8PndLE+lHglbGS XvZqL+c+n3XNQxm/QaiRQvekrZKjm5/8sd+1vC69pdnJLO4XXY1TzQjsr/wL4efyjBM7 7X+w== X-Gm-Message-State: APzg51DbcOCVFHNylHzc0NZzbDMPO3XEArfdLKeEpHhyIxJjdn/JlP52 lr3k7sUTf71O5/BKosXAaHUPkQ== X-Google-Smtp-Source: ANB0Vda4n+CQCJpuYXlmvCZMn3MnIlvUaIybzakjmq7ELECnL+uFiODZ+RZav3/QrXFcNnphQT/AGg== X-Received: by 2002:a1c:1c92:: with SMTP id c140-v6mr268277wmc.155.1536155393880; Wed, 05 Sep 2018 06:49:53 -0700 (PDT) Received: from localhost.localdomain ([95.144.165.37]) by smtp.gmail.com with ESMTPSA id j66-v6sm2701639wrj.28.2018.09.05.06.49.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 06:49:53 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Wed, 5 Sep 2018 14:49:36 +0100 Message-Id: <20180905134939.2942-11-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180905134939.2942-1-tvrtko.ursulin@linux.intel.com> References: <20180905134939.2942-1-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [PATH i-g-t 10/13] media-bench: Protect against incorrect -b syntax X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Intel-gfx@lists.freedesktop.org MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Tvrtko Ursulin -b is to pass the command argument directly to gem_wsim so must include another -b. Signed-off-by: Tvrtko Ursulin --- scripts/media-bench.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/media-bench.pl b/scripts/media-bench.pl index a3619ceb34cc..5070cae088f3 100755 --- a/scripts/media-bench.pl +++ b/scripts/media-bench.pl @@ -341,7 +341,10 @@ ENDHELP $verbose = 1 if defined $opts{'v'}; $gt2 = 1 if defined $opts{'2'}; $show_cmds = 1 if defined $opts{'x'}; -$balancer = $opts{'b'} if defined $opts{'b'}; +if (defined $opts{'b'}) { + die unless substr($opts{'b'}, 0, 2) eq '-b'; + $balancer = $opts{'b'}; +} if (defined $opts{'B'}) { @balancers = split /,/, $opts{'B'}; } else {