selftests/resctrl: Use remount_resctrlfs() consistently with boolean
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 15 Feb 2023 13:06:04 +0000 (15:06 +0200)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 10 Apr 2023 18:21:10 +0000 (12:21 -0600)
remount_resctrlfs() accepts a boolean value as an argument. Some tests
pass 0/1 and some tests pass true/false.

Make all the callers of remount_resctrlfs() use true/false so that the
parameter usage is consistent across tests.

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>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/resctrl/cat_test.c
tools/testing/selftests/resctrl/cmt_test.c
tools/testing/selftests/resctrl/mba_test.c
tools/testing/selftests/resctrl/mbm_test.c
tools/testing/selftests/resctrl/resctrl.h

index 2d3c7c7..08070d4 100644 (file)
@@ -145,7 +145,7 @@ int cat_perf_miss_val(int cpu_no, int n, char *cache_type)
        struct resctrl_val_param param = {
                .resctrl_val    = CAT_STR,
                .cpu_no         = cpu_no,
-               .mum_resctrlfs  = 0,
+               .mum_resctrlfs  = false,
                .setup          = cat_setup,
        };
 
index 3b0454e..47cde5c 100644 (file)
@@ -82,12 +82,11 @@ void cmt_test_cleanup(void)
 
 int cmt_resctrl_val(int cpu_no, int n, char **benchmark_cmd)
 {
-       int ret, mum_resctrlfs;
+       int ret;
 
        cache_size = 0;
-       mum_resctrlfs = 1;
 
-       ret = remount_resctrlfs(mum_resctrlfs);
+       ret = remount_resctrlfs(true);
        if (ret)
                return ret;
 
@@ -118,7 +117,7 @@ int cmt_resctrl_val(int cpu_no, int n, char **benchmark_cmd)
                .ctrlgrp        = "c1",
                .mongrp         = "m1",
                .cpu_no         = cpu_no,
-               .mum_resctrlfs  = 0,
+               .mum_resctrlfs  = false,
                .filename       = RESULT_FILE_NAME,
                .mask           = ~(long_mask << n) & long_mask,
                .span           = cache_size * n / count_of_bits,
index 97dc98c..7defb32 100644 (file)
@@ -154,7 +154,7 @@ int mba_schemata_change(int cpu_no, char *bw_report, char **benchmark_cmd)
                .ctrlgrp        = "c1",
                .mongrp         = "m1",
                .cpu_no         = cpu_no,
-               .mum_resctrlfs  = 1,
+               .mum_resctrlfs  = true,
                .filename       = RESULT_FILE_NAME,
                .bw_report      = bw_report,
                .setup          = mba_setup
index 2801876..c9dfa54 100644 (file)
@@ -122,7 +122,7 @@ int mbm_bw_change(int span, int cpu_no, char *bw_report, char **benchmark_cmd)
                .mongrp         = "m1",
                .span           = span,
                .cpu_no         = cpu_no,
-               .mum_resctrlfs  = 1,
+               .mum_resctrlfs  = true,
                .filename       = RESULT_FILE_NAME,
                .bw_report      =  bw_report,
                .setup          = mbm_setup
index 20aaa7c..9555a6f 100644 (file)
@@ -64,7 +64,7 @@ struct resctrl_val_param {
        char            mongrp[64];
        int             cpu_no;
        unsigned long   span;
-       int             mum_resctrlfs;
+       bool            mum_resctrlfs;
        char            filename[64];
        char            *bw_report;
        unsigned long   mask;