From: Radomir Vrbovsky <rvrbo...@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. V2: Keep a copy of Module.symvers in $DevelDir for other selftests as they depend on it. Signed-off-by: Radomir Vrbovsky <rvrbo...@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 @@ -3256,13 +3253,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 +3615,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 -- _______________________________________________ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue