From: Radomir Vrbovsky rvrbovsk@redhat.com
livepatch: no need to build kselftests with kernel
Upstream Status: RHEL only
Remove livepatch kselftest .ko creation from the kernel spec / build.
These kselftests modules are now built dynamically during testing using tools provided by an external repository. As a result, the manual build in the spec file is no longer necessary.
This patch removes the manual kselftests build logic from the kernel RPM spec file.
Signed-off-by: Radomir Vrbovsky rvrbovsk@redhat.com
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100644 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -644,9 +644,6 @@ Summary: The Linux kernel %define cpupowerarchs i686 x86_64 ppc64le aarch64 riscv64 %endif
-# Architectures we build kernel livepatching selftests on -%define klptestarches x86_64 ppc64le s390x - %if 0%{?use_vdso} %define _use_vdso 1 %else @@ -3098,11 +3095,6 @@ BuildKernel %make_target %kernel_image %{_use_vdso} # and some variables so that the various userspace tools can be built. %{log_msg "Initialize userspace tools build environment"} InitBuildVars -# Some tests build also modules, and need Module.symvers -if ! [[ -e Module.symvers ]] && [[ -f $DevelDir/Module.symvers ]]; then - %{log_msg "Found Module.symvers in DevelDir, copying to ."} - cp "$DevelDir/Module.symvers" . -fi %endif %endif
@@ -3256,13 +3248,6 @@ pushd tools/testing/selftests %{log_msg "main selftests compile"} %{make} %{?_smp_mflags} ARCH=$Arch V=1 TARGETS="bpf cgroup kmod mm net net/forwarding net/mptcp net/netfilter net/packetdrill tc-testing memfd drivers/net drivers/net/hw iommu cachestat pid_namespace rlimits timens pidfd" SKIP_TARGETS="" $force_targets INSTALL_PATH=%{buildroot}%{_libexecdir}/kselftests VMLINUX_H="${RPM_VMLINUX_H}" install
-%ifarch %{klptestarches} - # kernel livepatching selftest test_modules will build against - # /lib/modules/$(shell uname -r)/build tree unless KDIR is set - export KDIR=$(realpath $(pwd)/../../..) - %{make} %{?_smp_mflags} ARCH=$Arch V=1 TARGETS="livepatch" SKIP_TARGETS="" $force_targets INSTALL_PATH=%{buildroot}%{_libexecdir}/kselftests VMLINUX_H="${RPM_VMLINUX_H}" install || true -%endif - # 'make install' for bpf is broken and upstream refuses to fix it. # Install the needed files manually. %{log_msg "install selftests"} @@ -3625,12 +3610,6 @@ find -type d -exec install -d %{buildroot}%{_libexecdir}/kselftests/tc-testing/{ find -type f -executable -exec install -D -m755 {} %{buildroot}%{_libexecdir}/kselftests/tc-testing/{} ; find -type f ! -executable -exec install -D -m644 {} %{buildroot}%{_libexecdir}/kselftests/tc-testing/{} ; popd -# install livepatch selftests -pushd tools/testing/selftests/livepatch -find -type d -exec install -d %{buildroot}%{_libexecdir}/kselftests/livepatch/{} ; -find -type f -executable -exec install -D -m755 {} %{buildroot}%{_libexecdir}/kselftests/livepatch/{} ; -find -type f ! -executable -exec install -D -m644 {} %{buildroot}%{_libexecdir}/kselftests/livepatch/{} ; -popd # install net/netfilter selftests pushd tools/testing/selftests/net/netfilter find -type d -exec install -d %{buildroot}%{_libexecdir}/kselftests/net/netfilter/{} ;
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3974
From: Jan Stancek on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3974#note_2591612...
Won't this impact kmods other than livepatch ones?
kernel@lists.fedoraproject.org