aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/resctrl/resctrl_tests.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2023-07-17 16:14:58 +0300
committerShuah Khan <skhan@linuxfoundation.org>2023-07-25 08:53:18 -0600
commite24ac42889810168f7a2022b868bb4b9a9481760 (patch)
tree87403f81d0e8d9863c2838ada971217fe3a01df9 /tools/testing/selftests/resctrl/resctrl_tests.c
parentselftests/resctrl: Convert span to size_t (diff)
downloadwireguard-linux-e24ac42889810168f7a2022b868bb4b9a9481760.tar.xz
wireguard-linux-e24ac42889810168f7a2022b868bb4b9a9481760.zip
selftests/resctrl: Express span internally in bytes
MBA and MBM tests to use megabytes to represent span. CMT test uses bytes. The difference requires run_benchmark() to size the buffer differently based on the test name, which in turn requires passing the test name into run_benchmark(). Convert MBA and MBM tests to use span internally in bytes like CMT test to remove the internal inconsistency between the tests. Remove the test dependent buffer sizing from run_benchmark(). This change eliminates one of the reasons why the test name has to be passed around but there are still other users too so the test name passing cannot yet be removed. Co-developed-by: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Tested-by: Babu Moger <babu.moger@amd.com> Tested-by: Shaopeng Tan (Fujitsu) <tan.shaopeng@fujitsu.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/resctrl/resctrl_tests.c')
-rw-r--r--tools/testing/selftests/resctrl/resctrl_tests.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/resctrl/resctrl_tests.c b/tools/testing/selftests/resctrl/resctrl_tests.c
index bae8f205fc3f..3a65dacb441e 100644
--- a/tools/testing/selftests/resctrl/resctrl_tests.c
+++ b/tools/testing/selftests/resctrl/resctrl_tests.c
@@ -185,8 +185,8 @@ int main(int argc, char **argv)
char benchmark_cmd_area[BENCHMARK_ARGS][BENCHMARK_ARG_SIZE];
int c, cpu_no = 1, argc_new = argc, i, no_of_bits = 0;
int ben_ind, ben_count, tests = 0;
+ size_t span = 250 * MB;
bool cat_test = true;
- size_t span = 250;
for (i = 0; i < argc; i++) {
if (strcmp(argv[i], "-b") == 0) {