Commit 34813938 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by Shuah Khan

selftests/resctrl: Change function comments to say < 0 on error

A number function comments state the function return non-zero on
failure but in reality they can only return 0 on success and < 0 on
error.

Update the comments to say < 0 on error to match the behavior.

While at it, improve cat_val() comment to state that 0 means the test
was run (either pass or fail).
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent bcd8a929
......@@ -206,7 +206,7 @@ int measure_cache_vals(struct resctrl_val_param *param, int bm_pid)
* @param: parameters passed to cache_val()
* @span: buffer size for the benchmark
*
* Return: 0 on success. non-zero on failure.
* Return: 0 when the test was run, < 0 on error.
*/
int cat_val(struct resctrl_val_param *param, size_t span)
{
......
......@@ -56,7 +56,7 @@ static int find_resctrl_mount(char *buffer)
* Mounts resctrl FS. Fails if resctrl FS is already mounted to avoid
* pre-existing settings interfering with the test results.
*
* Return: 0 on success, non-zero on failure
* Return: 0 on success, < 0 on error.
*/
int mount_resctrlfs(void)
{
......@@ -276,7 +276,7 @@ int get_core_sibling(int cpu_no)
* @bm_pid: PID that should be binded
* @cpu_no: CPU number at which the PID would be binded
*
* Return: 0 on success, non-zero on failure
* Return: 0 on success, < 0 on error.
*/
int taskset_benchmark(pid_t bm_pid, int cpu_no)
{
......@@ -300,7 +300,7 @@ int taskset_benchmark(pid_t bm_pid, int cpu_no)
* @grp: Full path and name of the group
* @parent_grp: Full path and name of the parent group
*
* Return: 0 on success, non-zero on failure
* Return: 0 on success, < 0 on error.
*/
static int create_grp(const char *grp_name, char *grp, const char *parent_grp)
{
......@@ -376,7 +376,7 @@ static int write_pid_to_tasks(char *tasks, pid_t pid)
* pid is not written, this means that pid is in con_mon grp and hence
* should consult con_mon grp's mon_data directory for results.
*
* Return: 0 on success, non-zero on failure
* Return: 0 on success, < 0 on error.
*/
int write_bm_pid_to_resctrl(pid_t bm_pid, char *ctrlgrp, char *mongrp,
char *resctrl_val)
......@@ -435,7 +435,7 @@ int write_bm_pid_to_resctrl(pid_t bm_pid, char *ctrlgrp, char *mongrp,
* Update schemata of a con_mon grp *only* if requested resctrl feature is
* allocation type
*
* Return: 0 on success, non-zero on failure
* Return: 0 on success, < 0 on error.
*/
int write_schemata(char *ctrlgrp, char *schemata, int cpu_no, char *resctrl_val)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment