[Devel] [PATCH hci-8.2 v2 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 11:22:26 MSK 2026


Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] selftests/ve: x86-only test_trap/test_segf built unconditionally
  in ve Makefile
--

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

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

The patch moves the ve_printk test and its two helper programs, test_segf and test_trap, into tools/testing/selftests/ve/. It also switches the test to the openat-based helpers from ve_selftest.h and removes the old ve_printk directory and its Makefile.

> diff --git a/tools/testing/selftests/ve/Makefile b/tools/testing/selftests/ve/Makefile
> --- a/tools/testing/selftests/ve/Makefile
> +++ b/tools/testing/selftests/ve/Makefile
> @@ -11,6 +11,8 @@ TEST_GEN_PROGS += ve_aio_ring_test
>  TEST_GEN_PROGS += ve_numa_syscalls_prohibited_test
>  TEST_GEN_PROGS += ve_tmpfs_mpol_test
>  TEST_GEN_PROGS += ve_devcg_bpf_test
> +TEST_GEN_PROGS += ve_printk_test
> +TEST_GEN_FILES += test_segf test_trap
>  
>  # CPUID faulting is x86-64 only. ARCH says "x86" for 32-bit too and lib.mk
>  # picks the clang target by its emptiness, so decide by the compiler.

[Severity: Low]
Should test_segf and test_trap be built unconditionally here?

test_trap.c uses __asm__("int3"), which does not assemble on non-x86 targets. test_segf.c also casts the 64-bit address 0xffffffffffffff00 to an int pointer. The Makefile already guards ve_cpuid_override_test for x86-64 just below this hunk, but these helpers have no such guard.

Before this patch, such a build failure only affected the separate ve_printk target. Now it breaks the whole ve selftest directory on non-x86 and 32-bit builds. Could the helpers and ve_printk_test go behind the same x86-64 check?

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/20261119081654.484107-2-mirian.shilakadze@virtuozzo.com?part=3



More information about the Devel mailing list