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

selftests/resctrl: Remove test type checks from cat_val()

cat_val() is only used during CAT test but it checks for test type.

Remove test type checks and the unused else branch from cat_val().
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Tested-by: default avatarBabu Moger <babu.moger@amd.com>
Tested-by: default avatarShaopeng Tan (Fujitsu) <tan.shaopeng@fujitsu.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 3dad011b
...@@ -230,12 +230,10 @@ int cat_val(struct resctrl_val_param *param) ...@@ -230,12 +230,10 @@ int cat_val(struct resctrl_val_param *param)
if (ret) if (ret)
return ret; return ret;
if (!strncmp(resctrl_val, CAT_STR, sizeof(CAT_STR)))
initialize_llc_perf(); initialize_llc_perf();
/* Test runs until the callback setup() tells the test to stop. */ /* Test runs until the callback setup() tells the test to stop. */
while (1) { while (1) {
if (!strncmp(resctrl_val, CAT_STR, sizeof(CAT_STR))) {
ret = param->setup(param); ret = param->setup(param);
if (ret == END_OF_TESTS) { if (ret == END_OF_TESTS) {
ret = 0; ret = 0;
...@@ -257,11 +255,6 @@ int cat_val(struct resctrl_val_param *param) ...@@ -257,11 +255,6 @@ int cat_val(struct resctrl_val_param *param)
ret = measure_cache_vals(param, bm_pid); ret = measure_cache_vals(param, bm_pid);
if (ret) if (ret)
goto pe_close; goto pe_close;
close(fd_lm);
} else {
break;
}
} }
return ret; return ret;
......
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