summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/resctrl/resctrl_tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/resctrl/resctrl_tests.c')
-rw-r--r--tools/testing/selftests/resctrl/resctrl_tests.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/tools/testing/selftests/resctrl/resctrl_tests.c b/tools/testing/selftests/resctrl/resctrl_tests.c
index bf0cadab36b0..125ed0ca11e3 100644
--- a/tools/testing/selftests/resctrl/resctrl_tests.c
+++ b/tools/testing/selftests/resctrl/resctrl_tests.c
@@ -89,7 +89,7 @@ static void run_mbm_test(bool has_ben, char **benchmark_cmd, size_t span,
}
if (!has_ben)
- sprintf(benchmark_cmd[5], "%s", MBA_STR);
+ sprintf(benchmark_cmd[4], "%s", MBA_STR);
res = mbm_bw_change(span, cpu_no, bw_report, benchmark_cmd);
ksft_test_result(!res, "MBM: bw change\n");
if ((get_vendor() == ARCH_INTEL) && res)
@@ -141,7 +141,7 @@ static void run_cmt_test(bool has_ben, char **benchmark_cmd, int cpu_no)
}
if (!has_ben)
- sprintf(benchmark_cmd[5], "%s", CMT_STR);
+ sprintf(benchmark_cmd[4], "%s", CMT_STR);
res = cmt_resctrl_val(cpu_no, 5, benchmark_cmd);
ksft_test_result(!res, "CMT: test\n");
if ((get_vendor() == ARCH_INTEL) && res)
@@ -267,16 +267,15 @@ int main(int argc, char **argv)
benchmark_cmd[ben_count] = NULL;
} else {
/* If no benchmark is given by "-b" argument, use fill_buf. */
- for (i = 0; i < 6; i++)
+ for (i = 0; i < 5; i++)
benchmark_cmd[i] = benchmark_cmd_area[i];
strcpy(benchmark_cmd[0], "fill_buf");
sprintf(benchmark_cmd[1], "%zu", span);
strcpy(benchmark_cmd[2], "1");
- strcpy(benchmark_cmd[3], "1");
- strcpy(benchmark_cmd[4], "0");
- strcpy(benchmark_cmd[5], "");
- benchmark_cmd[6] = NULL;
+ strcpy(benchmark_cmd[3], "0");
+ strcpy(benchmark_cmd[4], "");
+ benchmark_cmd[5] = NULL;
}
sprintf(bw_report, "reads");