[Devel] [PATCH hci-8.2 3/3] selftests/ve: move ve_printk into ve/ and reuse ve_selftest.h

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Thu Nov 19 10:56:58 MSK 2026


Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] selftests/ve: commit message cites spec and list changes not in
  the patch
- [Low] selftests/ve: cgroup2 lookup now fixed to /sys/fs/cgroup despite
  'no logic change'
--

commit db60704593e6cbaf854de13ca0609bff94acb9d5
Author: Mirian Shilakadze <mirian.shilakadze at virtuozzo.com>

selftests/ve: move ve_printk into ve/ and reuse ve_selftest.h

This moves the ve_printk selftest and its two helper programs into tools/testing/selftests/ve/. The test now uses the openat-based helpers from ve_selftest.h instead of its own /proc/mounts lookup, system("echo ...") calls, ctid search and enter_cgroup.

> The kernel spec builds ve_printk as a target of its own and has to drop
> it in the same release. In kselftest-list.txt the test moves from the
> ve_printk collection to ve.

[Severity: Low]
Is this sentence accurate for this tree? The TARGETS list in redhat/kernel.spec.template names neither ve nor ve_printk. The patch touches no spec file and no kselftest-list.txt. If these changes live out of tree, could the message say where? Otherwise the sentence could be corrected.

> diff --git a/tools/testing/selftests/ve_printk/ve_printk_test.c b/tools/testing/selftests/ve/ve_printk_test.c
> similarity index 77%
> rename from tools/testing/selftests/ve_printk/ve_printk_test.c
> rename to tools/testing/selftests/ve/ve_printk_test.c

[ ... ]

>  FIXTURE(ve_printk)
>  {
> -	char cgv2_path[PATH_MAX];
> +	int cgv2_fd;
>  	int ctid;
>  };
>  
>  FIXTURE_SETUP(ve_printk)
>  {
> -	char path[PATH_MAX * 2];
> -
> -	ASSERT_EQ(get_mount_path("cgroup2", NULL, self->cgv2_path, sizeof(self->cgv2_path)), 0);
> +	char ctid_str[16];
> +	char path[64];
>  
> -	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);
> +	self->cgv2_fd = open_cg2_fd();
> +	ASSERT_GE(self->cgv2_fd, 0);

[Severity: Low]
Is this really "No test logic change"? The removed get_mount_path("cgroup2", ...) accepted a cgroup2 mount anywhere in /proc/mounts. open_cg2_fd() opens only /sys/fs/cgroup and fails with ENODEV unless it is a cgroup2 mount. On a host with cgroup2 mounted elsewhere, the fixture now fails at ASSERT_GE() where it used to run, and there is no skip reason. The shared helper makes this consistent with the other ve tests, but the commit message should mention the change.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply at sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261119074808.478064-1-mirian.shilakadze@virtuozzo.com?part=3



More information about the Devel mailing list