[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230412132122.29452-6-ilpo.jarvinen@linux.intel.com>
Date: Wed, 12 Apr 2023 16:21:05 +0300
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
Reinette Chatre <reinette.chatre@...el.com>,
Fenghua Yu <fenghua.yu@...el.com>,
Shuah Khan <shuah@...nel.org>
Cc: Shaopeng Tan <tan.shaopeng@...fujitsu.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Subject: [PATCH 05/22] selftests/resctrl: Remove duplicated preparation for span arg
When no benchmark_cmd is given, benchmark_cmd[1] is set to span in
main(). There's no need to do it again in run_mba_test().
Remove the duplicated preparation for span argument into
benchmark_cmd[1] from run_mba_test(). It enables also removing has_ben
argument from run_mba_test() as unnecessary.
Co-developed-by: Fenghua Yu <fenghua.yu@...el.com>
Signed-off-by: Fenghua Yu <fenghua.yu@...el.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
---
tools/testing/selftests/resctrl/resctrl_tests.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/resctrl/resctrl_tests.c b/tools/testing/selftests/resctrl/resctrl_tests.c
index a26fb4badde0..3ca6f09f5195 100644
--- a/tools/testing/selftests/resctrl/resctrl_tests.c
+++ b/tools/testing/selftests/resctrl/resctrl_tests.c
@@ -91,8 +91,8 @@ static void run_mbm_test(bool has_ben, char **benchmark_cmd, unsigned long span,
mbm_test_cleanup();
}
-static void run_mba_test(bool has_ben, char **benchmark_cmd, unsigned long span,
- int cpu_no, char *bw_report)
+static void run_mba_test(char **benchmark_cmd, unsigned long span, int cpu_no,
+ char *bw_report)
{
int res;
@@ -103,8 +103,6 @@ static void run_mba_test(bool has_ben, char **benchmark_cmd, unsigned long span,
return;
}
- if (!has_ben)
- sprintf(benchmark_cmd[1], "%lu", span);
res = mba_schemata_change(cpu_no, bw_report, benchmark_cmd);
ksft_test_result(!res, "MBA: schemata change\n");
mba_test_cleanup();
@@ -263,7 +261,7 @@ int main(int argc, char **argv)
run_mbm_test(has_ben, benchmark_cmd, span, cpu_no, bw_report);
if ((get_vendor() == ARCH_INTEL) && mba_test)
- run_mba_test(has_ben, benchmark_cmd, span, cpu_no, bw_report);
+ run_mba_test(benchmark_cmd, span, cpu_no, bw_report);
if (cmt_test)
run_cmt_test(has_ben, benchmark_cmd, cpu_no);
--
2.30.2
Powered by blists - more mailing lists