From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
Reinette Chatre <reinette.chatre@intel.com>,
Fenghua Yu <fenghua.yu@intel.com>, Shuah Khan <shuah@kernel.org>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: [PATCH v2 8/9] selftests/resctrl: Use remount_resctrlfs() consistently with boolean
Date: Wed, 15 Feb 2023 15:06:04 +0200 [thread overview]
Message-ID: <20230215130605.31583-9-ilpo.jarvinen@linux.intel.com> (raw)
In-Reply-To: <20230215130605.31583-1-ilpo.jarvinen@linux.intel.com>
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>
---
tools/testing/selftests/resctrl/cat_test.c | 2 +-
tools/testing/selftests/resctrl/cmt_test.c | 7 +++----
tools/testing/selftests/resctrl/mba_test.c | 2 +-
tools/testing/selftests/resctrl/mbm_test.c | 2 +-
tools/testing/selftests/resctrl/resctrl.h | 2 +-
5 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/resctrl/cat_test.c b/tools/testing/selftests/resctrl/cat_test.c
index 2d3c7c77ab6c..08070d4fa735 100644
--- a/tools/testing/selftests/resctrl/cat_test.c
+++ b/tools/testing/selftests/resctrl/cat_test.c
@@ -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,
};
diff --git a/tools/testing/selftests/resctrl/cmt_test.c b/tools/testing/selftests/resctrl/cmt_test.c
index 3b0454e7fc82..47cde5c02b7f 100644
--- a/tools/testing/selftests/resctrl/cmt_test.c
+++ b/tools/testing/selftests/resctrl/cmt_test.c
@@ -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,
diff --git a/tools/testing/selftests/resctrl/mba_test.c b/tools/testing/selftests/resctrl/mba_test.c
index 97dc98c0c949..7defb32ad0de 100644
--- a/tools/testing/selftests/resctrl/mba_test.c
+++ b/tools/testing/selftests/resctrl/mba_test.c
@@ -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
diff --git a/tools/testing/selftests/resctrl/mbm_test.c b/tools/testing/selftests/resctrl/mbm_test.c
index 280187628054..c9dfa54af42f 100644
--- a/tools/testing/selftests/resctrl/mbm_test.c
+++ b/tools/testing/selftests/resctrl/mbm_test.c
@@ -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
diff --git a/tools/testing/selftests/resctrl/resctrl.h b/tools/testing/selftests/resctrl/resctrl.h
index 20aaa7c0e784..9555a6f683f7 100644
--- a/tools/testing/selftests/resctrl/resctrl.h
+++ b/tools/testing/selftests/resctrl/resctrl.h
@@ -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;
--
2.30.2
next prev parent reply other threads:[~2023-02-15 13:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-15 13:05 [PATCH v2 0/9] selftests/resctrl: Fixes to error handling logic and cleanups Ilpo Järvinen
2023-02-15 13:05 ` [PATCH v2 1/9] selftests/resctrl: Return NULL if malloc_and_init_memory() did not alloc mem Ilpo Järvinen
2023-03-15 23:59 ` Reinette Chatre
2023-02-15 13:05 ` [PATCH v2 2/9] selftests/resctrl: Move ->setup() call outside of test specific branches Ilpo Järvinen
2023-03-16 0:01 ` Reinette Chatre
2023-02-15 13:05 ` [PATCH v2 3/9] selftests/resctrl: Allow ->setup() to return errors Ilpo Järvinen
2023-03-16 0:02 ` Reinette Chatre
2023-02-15 13:06 ` [PATCH v2 4/9] selftests/resctrl: Check for return value after write_schemata() Ilpo Järvinen
2023-03-16 0:02 ` Reinette Chatre
2023-02-15 13:06 ` [PATCH v2 5/9] selftests/resctrl: Replace obsolete memalign() with posix_memalign() Ilpo Järvinen
2023-03-16 0:02 ` Reinette Chatre
2023-02-15 13:06 ` [PATCH v2 6/9] selftests/resctrl: Change initialize_llc_perf() return type to void Ilpo Järvinen
2023-03-16 0:03 ` Reinette Chatre
2023-02-15 13:06 ` [PATCH v2 7/9] selftests/resctrl: Change name from CBM_MASK_PATH to INFO_PATH Ilpo Järvinen
2023-03-16 0:03 ` Reinette Chatre
2023-02-15 13:06 ` Ilpo Järvinen [this message]
2023-03-16 15:57 ` [PATCH v2 8/9] selftests/resctrl: Use remount_resctrlfs() consistently with boolean Reinette Chatre
2023-02-15 13:06 ` [PATCH v2 9/9] selftests/resctrl: Correct get_llc_perf() param in function comment Ilpo Järvinen
2023-03-16 0:04 ` Reinette Chatre
2023-03-16 10:21 ` Ilpo Järvinen
2023-03-16 16:01 ` [PATCH v2 0/9] selftests/resctrl: Fixes to error handling logic and cleanups Reinette Chatre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230215130605.31583-9-ilpo.jarvinen@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=fenghua.yu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=reinette.chatre@intel.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®