The commit is pushed to "branch-rh10-6.12.0-55.52.1.5.x.vz10-ovz" and will
appear at [email protected]:openvz/vzkernel.git
after rh10-6.12.0-55.52.1.5.8.vz10
------>
commit 2f47a516208da454089da3d6b4071f212d66a25b
Author: Aleksei Oladko <[email protected]>
Date: Tue Feb 17 15:56:10 2026 +0000
selftests: ve_printk: initialize required cgroup parameters
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]>
Reviewed-by: Pavel Tikhomirov <[email protected]>
Feature: fix selftests
---
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 d5733b9e4aaa0..2df672d75e006 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);
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel