[Devel] [PATCH hci-8.2 2/3] selftests/ve: move ve_devcg_bpf into ve/ and reuse ve_selftest.h
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Thu Nov 19 10:54:07 MSK 2026
Thank you for your contribution! Sashiko AI review found 4 potential
issues to consider:
- [Low] selftests/ve: commit message says 'No test logic change' but
fixture behavior changed
- [Low] selftests/ve: TOOLS_INCLUDES now applies to every ve test, not
just one
- [Low] selftests/ve: Makefile comment claims in-tree headers are
preferred but KHDR comes first
- [Low] selftests/ve: commit message cites a kselftest-list.txt change
not present in the patch
--
commit c6588b79206d134a16807ef9ccef5905155c17f6
Author: Mirian Shilakadze <mirian.shilakadze at virtuozzo.com>
selftests/ve: move ve_devcg_bpf into ve/ and reuse ve_selftest.h
This moves the ve_devcg_bpf test into tools/testing/selftests/ve/. It drops the test's private copies of helpers that ve_selftest.h already provides, and moves the TOOLS_INCLUDES flag into the ve Makefile.
> In kselftest-list.txt the test moves from the ve_devcg_bpf collection to
> ve. No test logic change.
[Severity: Low]
Is the kselftest-list.txt sentence accurate? The diff touches no such file, and none is tracked in the tree. selftests/Makefile generates it at install time from TARGETS and the per-target test lists. The move follows from the TARGETS removal and the ve Makefile addition, but the wording reads as if a file was edited.
[Severity: Low]
Is "No test logic change" accurate? The fixture's behavior differs in a few ways:
- FIXTURE_SETUP now uses open_cg2_fd(), which opens the host's existing cgroup2 mount at /sys/fs/cgroup and checks its magic. The old mount_cg2_fd() made a private mount through fsopen()/fsmount(). A host with no cgroup2 mount there now fails the ASSERT_GE in the fixture, where it used to pass.
- FIXTURE_TEARDOWN now calls destroy_ve(), which retries on EBUSY for about a second and prints diagnostics. The old code made a single unlinkat().
- make_ve() removes the new cgroup if the controllers_hidden write fails. The old code did not.
These look reasonable, but the changelog could describe them instead of claiming no change.
> diff --git a/tools/testing/selftests/ve/Makefile b/tools/testing/selftests/ve/Makefile
> index fa4f858227e5e..3f47e34cbb18f 100644
> --- a/tools/testing/selftests/ve/Makefile
> +++ b/tools/testing/selftests/ve/Makefile
> @@ -1,6 +1,9 @@
> # SPDX-License-Identifier: GPL-2.0
> # Makefile for ve selftests.
> CFLAGS += -g -Wall -O2 $(KHDR_INCLUDES)
> +# orig_prog_len/orig_prog_insns may be newer than the system UAPI headers, so
> +# build against the in-tree copy under tools/include/uapi.
> +CFLAGS += $(TOOLS_INCLUDES)
[Severity: Low]
Does this comment match the include order? KHDR_INCLUDES comes first in CFLAGS, and -isystem directories are searched in the order given. A header present in both trees is therefore taken from the installed headers, and the tools/include/uapi copy is only a fallback. The old ve_devcg_bpf Makefile used TOOLS_INCLUDES alone, so this ordering is a silent change. Should the comment be reworded, or the two flags swapped?
[Severity: Low]
Should TOOLS_INCLUDES be applied to every ve test? Only ve_devcg_bpf_test needs it, but the flag now goes into the shared CFLAGS. ve_perms_test, ve_tmpfs_mpol_test and the others are now built with the tools uapi directory on their include path too. A per-target CFLAGS assignment for ve_devcg_bpf_test would keep the change scoped to the test that needs it.
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=2
More information about the Devel
mailing list