Message ID | 20201020235126.1871815-10-fenghua.yu@intel.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=1IpV=D3=vger.kernel.org=linux-kselftest-owner@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EAC341744 for <patchwork-linux-kselftest@patchwork.kernel.org>; Tue, 20 Oct 2020 23:52:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D1D53223BF for <patchwork-linux-kselftest@patchwork.kernel.org>; Tue, 20 Oct 2020 23:52:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439375AbgJTXvh (ORCPT <rfc822;patchwork-linux-kselftest@patchwork.kernel.org>); Tue, 20 Oct 2020 19:51:37 -0400 Received: from mga07.intel.com ([134.134.136.100]:11167 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439371AbgJTXvg (ORCPT <rfc822;linux-kselftest@vger.kernel.org>); Tue, 20 Oct 2020 19:51:36 -0400 IronPort-SDR: tBdW2MZCQc5jl13pCJXOH2/kjNiqEMCUoxeQmnPqXHz4th0CY9PL+IpMX0XRzXJzmbxjm+lH6v dapoFanqEoUg== X-IronPort-AV: E=McAfee;i="6000,8403,9780"; a="231486360" X-IronPort-AV: E=Sophos;i="5.77,399,1596524400"; d="scan'208";a="231486360" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2020 16:51:31 -0700 IronPort-SDR: GnOwIwzsBZ+noSIq8OxyNUGioU4nqz4Z2lcCc8FovBFCMsPSBZJ49CaTY0lqWUJ8igcaMjQc4j AWZHqdjb7QhA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,399,1596524400"; d="scan'208";a="320833838" Received: from otcwcpicx6.sc.intel.com ([172.25.55.29]) by orsmga006.jf.intel.com with ESMTP; 20 Oct 2020 16:51:31 -0700 From: Fenghua Yu <fenghua.yu@intel.com> To: "Shuah Khan" <shuah@kernel.org>, "Reinette Chatre" <reinette.chatre@intel.com>, "Tony Luck" <tony.luck@intel.com>, "Babu Moger" <babu.moger@amd.com>, "James Morse" <james.morse@arm.com>, "Borislav Petkov" <bp@alien8.de>, "Thomas Gleixner" <tglx@linutronix.de>, "Ravi V Shankar" <ravi.v.shankar@intel.com> Cc: "linux-kselftest" <linux-kselftest@vger.kernel.org>, "linux-kernel" <linux-kernel@vger.kernel.org>, Fenghua Yu <fenghua.yu@intel.com> Subject: [PATCH v3 09/21] selftests/resctrl: Fix missing options "-n" and "-p" Date: Tue, 20 Oct 2020 23:51:14 +0000 Message-Id: <20201020235126.1871815-10-fenghua.yu@intel.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20201020235126.1871815-1-fenghua.yu@intel.com> References: <20201020235126.1871815-1-fenghua.yu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <linux-kselftest.vger.kernel.org> X-Mailing-List: linux-kselftest@vger.kernel.org |
Series |
Miscellaneous fixes for resctrl selftests
|
expand
|
diff --git a/tools/testing/selftests/resctrl/resctrl_tests.c b/tools/testing/selftests/resctrl/resctrl_tests.c index d24de546d4ef..cab69ed8c67d 100644 --- a/tools/testing/selftests/resctrl/resctrl_tests.c +++ b/tools/testing/selftests/resctrl/resctrl_tests.c @@ -73,7 +73,7 @@ int main(int argc, char **argv) } } - while ((c = getopt(argc_new, argv, "ht:b:")) != -1) { + while ((c = getopt(argc_new, argv, "ht:b:n:p:")) != -1) { char *token; switch (c) {
resctrl test suite accepts command line arguments (like -b, -t, -n and -p) as documented in the help. But passing -n and -p throws an invalid option error. This happens because -n and -p are missing in the list of characters that getopt() recognizes as valid arguments. Hence, they are treated as invalid options. Fix this by adding them to the list of characters that getopt() recognizes as valid arguments. Please note that the main() function already has the logic to deal with the values passed as part of these arguments and hence no changes are needed there. Fixes: ecdbb911f22d ("selftests/resctrl: Add MBM test") Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> --- tools/testing/selftests/resctrl/resctrl_tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)