Looks good. (jfyi: For criu (zdtm) CI we just require vzctl (built today into 
vhi-10).)

Reviewed-by: Pavel Tikhomirov <[email protected]>

On 2/17/26 16:56, Aleksei Oladko wrote:
> kselftest ve_printk may fail if vzctl is not installed on the host,
> as the required cgroup parameters are not initialized.
> 
> Initialize the required cgroup parameters during test setup
> to make the test self-contained.
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-123251
> 
> Signed-off-by: Aleksei Oladko <[email protected]>
> ---
>  tools/testing/selftests/ve_printk/ve_printk_test.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/tools/testing/selftests/ve_printk/ve_printk_test.c 
> b/tools/testing/selftests/ve_printk/ve_printk_test.c
> index d5733b9e4aaa..2df672d75e00 100644
> --- a/tools/testing/selftests/ve_printk/ve_printk_test.c
> +++ b/tools/testing/selftests/ve_printk/ve_printk_test.c
> @@ -102,6 +102,19 @@ FIXTURE_SETUP(ve_printk)
>  
>       ASSERT_EQ(get_mount_path("cgroup2", NULL, self->cgv2_path, 
> sizeof(self->cgv2_path)), 0);
>  
> +     snprintf(path, sizeof(path), "echo \"+cpuset +cpu +cpuacct +io +memory 
> +hugetlb +pids +rdma +misc +ve\""
> +                                  " > %s/cgroup.subtree_control 
> 2>/dev/null", self->cgv2_path);
> +     ASSERT_EQ(system(path), 0);
> +
> +     snprintf(path, sizeof(path), "echo \"/ rx\" > 
> %s/ve.default_sysfs_permissions 2>/dev/null", self->cgv2_path);
> +     ASSERT_EQ(system(path), 0);
> +
> +     snprintf(path, sizeof(path), "echo \"fs rx\" > 
> %s/ve.default_sysfs_permissions 2>/dev/null", self->cgv2_path);
> +     ASSERT_EQ(system(path), 0);
> +
> +     snprintf(path, sizeof(path), "echo \"fs/cgroup rw\" > 
> %s/ve.default_sysfs_permissions 2>/dev/null", self->cgv2_path);
> +     ASSERT_EQ(system(path), 0);
> +
>       self->ctid = CTID_MIN;
>       while (self->ctid < CTID_MAX) {
>               snprintf(path, sizeof(path), "%s/%d", self->cgv2_path, 
> self->ctid);

-- 
Best regards, Pavel Tikhomirov
Senior Software Developer, Virtuozzo.

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to