Skip to content

Commit 1b9537b

Browse files
ij-intelshuahkh
authored andcommitted
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(). After this, the has_ben and span arguments to run_mba_test() can be removed. Co-developed-by: Fenghua Yu <[email protected]> Signed-off-by: Fenghua Yu <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Tested-by: Babu Moger <[email protected]> Tested-by: Shaopeng Tan (Fujitsu) <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent e24ac42 commit 1b9537b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tools/testing/selftests/resctrl/resctrl_tests.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ static void run_mbm_test(bool has_ben, char **benchmark_cmd, size_t span,
9999
umount_resctrlfs();
100100
}
101101

102-
static void run_mba_test(bool has_ben, char **benchmark_cmd, size_t span,
103-
int cpu_no, char *bw_report)
102+
static void run_mba_test(char **benchmark_cmd, int cpu_no, char *bw_report)
104103
{
105104
int res;
106105

@@ -117,8 +116,6 @@ static void run_mba_test(bool has_ben, char **benchmark_cmd, size_t span,
117116
goto umount;
118117
}
119118

120-
if (!has_ben)
121-
sprintf(benchmark_cmd[1], "%zu", span);
122119
res = mba_schemata_change(cpu_no, bw_report, benchmark_cmd);
123120
ksft_test_result(!res, "MBA: schemata change\n");
124121

@@ -299,7 +296,7 @@ int main(int argc, char **argv)
299296
run_mbm_test(has_ben, benchmark_cmd, span, cpu_no, bw_report);
300297

301298
if (mba_test)
302-
run_mba_test(has_ben, benchmark_cmd, span, cpu_no, bw_report);
299+
run_mba_test(benchmark_cmd, cpu_no, bw_report);
303300

304301
if (cmt_test)
305302
run_cmt_test(has_ben, benchmark_cmd, cpu_no);

0 commit comments

Comments
 (0)