selftests/resctrl: Make benchmark command const and build it with pointers
stable inclusion from stable-v6.6.3 commit b1d34cb556292014b04593428190352662020117 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8LBQP Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b1d34cb556292014b04593428190352662020117 -------------------------------- [ Upstream commit e33cb5702a9f287d829b0e9e6abe57f6a4aba6d2 ] Benchmark command is used in multiple tests so it should not be mutated by the tests but CMT test alters span argument. Due to the order of tests (CMT test runs last), mutating the span argument in CMT test does not trigger any real problems currently. Mark benchmark_cmd strings as const and setup the benchmark command using pointers. Because the benchmark command becomes const, the input arguments can be used directly. Besides being simpler, using the input arguments directly also removes the internal size restriction. CMT test has to create a copy of the benchmark command before altering the benchmark command. Signed-off-by:Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Tested-by:
Shaopeng Tan <tan.shaopeng@jp.fujitsu.com> Reviewed-by:
Shaopeng Tan <tan.shaopeng@jp.fujitsu.com> Reviewed-by:
Reinette Chatre <reinette.chatre@intel.com> Reviewed-by:
"Wieczor-Retman, Maciej" <maciej.wieczor-retman@intel.com> Signed-off-by:
Shuah Khan <skhan@linuxfoundation.org> Stable-dep-of: 3aff51464455 ("selftests/resctrl: Extend signal handler coverage to unmount on receiving signal") Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Loading
Please sign in to comment