mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
selftests/resctrl: Allow ->setup() to return errors
resctrl_val() assumes ->setup() always returns either 0 to continue tests or < 0 in case of the normal termination of tests after x runs. The latter overlaps with normal error returns. Define END_OF_TESTS (=1) to differentiate the normal termination of tests and return errors as negative values. Alter callers of ->setup() to handle errors properly. Fixes:790bf585b0("selftests/resctrl: Add Cache Allocation Technology (CAT) selftest") Fixes:ecdbb911f2("selftests/resctrl: Add MBM test") 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>
This commit is contained in:
committed by
Shuah Khan
parent
c90b3b588e
commit
fa10366cc6
@@ -32,7 +32,7 @@ static int cmt_setup(int num, ...)
|
||||
|
||||
/* Run NUM_OF_RUNS times */
|
||||
if (p->num_of_runs >= NUM_OF_RUNS)
|
||||
return -1;
|
||||
return END_OF_TESTS;
|
||||
|
||||
p->num_of_runs++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user