diff options
| author | Fenghua Yu <fenghua.yu@intel.com> | 2021-03-17 02:22:38 +0000 |
|---|---|---|
| committer | Shuah Khan <skhan@linuxfoundation.org> | 2021-04-02 13:51:36 -0600 |
| commit | 2428673638ea28fa93d2a38b1c3e8d70122b00ee (patch) | |
| tree | ba40c64b21e5bcea79744d7bd9760fd1b4408068 /tools/testing/selftests/resctrl/cqm_test.c | |
| parent | selftests/resctrl: Fix compilation issues for other global variables (diff) | |
| download | linux-2428673638ea28fa93d2a38b1c3e8d70122b00ee.tar.gz linux-2428673638ea28fa93d2a38b1c3e8d70122b00ee.zip | |
selftests/resctrl: Clean up resctrl features check
Checking resctrl features call strcmp() to compare feature strings
(e.g. "mba", "cat" etc). The checkings are error prone and don't have
good coding style. Define the constant strings in macros and call
strncmp() to solve the potential issues.
Suggested-by: Shuah Khan <skhan@linuxfoundation.org>
Tested-by: Babu Moger <babu.moger@amd.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/resctrl/cqm_test.c')
| -rw-r--r-- | tools/testing/selftests/resctrl/cqm_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/resctrl/cqm_test.c b/tools/testing/selftests/resctrl/cqm_test.c index de33d1c0466e..271752e9ef5b 100644 --- a/tools/testing/selftests/resctrl/cqm_test.c +++ b/tools/testing/selftests/resctrl/cqm_test.c @@ -145,7 +145,7 @@ int cqm_resctrl_val(int cpu_no, int n, char **benchmark_cmd) } struct resctrl_val_param param = { - .resctrl_val = "cqm", + .resctrl_val = CQM_STR, .ctrlgrp = "c1", .mongrp = "m1", .cpu_no = cpu_no, |
