Skip to content

Commit af28e05

Browse files
committed
livepatch: no need to build kselftests with kernel
JIRA: https://issues.redhat.com/browse/RHEL-70905 Upstream Status: RHEL only ARK: 2047e6f4ea6f 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 <rvrbovsk@redhat.com>
1 parent 03ca39e commit af28e05

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

redhat/kernel.spec.template

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -615,9 +615,6 @@ Summary: The Linux kernel
615615
%define cpupowerarchs i686 x86_64 ppc64le aarch64
616616
%endif
617617

618-
# Architectures we build kernel livepatching selftests on
619-
%define klptestarches x86_64 ppc64le s390x
620-
621618
%if 0%{?use_vdso}
622619
%define _use_vdso 1
623620
%else
@@ -3206,13 +3203,6 @@ TARGETS="bpf cgroup mm net net/forwarding net/mptcp net/netfilter net/packetdril
32063203
%define _fortify_level %{_fortify_level_bak}
32073204
export CFLAGS="%{build_cflags}"
32083205

3209-
%ifarch %{klptestarches}
3210-
# kernel livepatching selftest test_modules will build against
3211-
# /lib/modules/$(shell uname -r)/build tree unless KDIR is set
3212-
export KDIR=$(realpath $(pwd)/../../..)
3213-
%{make} %{?_smp_mflags} ARCH=$Arch V=1 TARGETS="livepatch" SKIP_TARGETS="" $force_targets VMLINUX_H="${RPM_VMLINUX_H}" && TARGETS="${TARGETS} livepatch" || true
3214-
%endif
3215-
32163206
# We must install all the targets in a single step as each `make install`
32173207
# command overrides the kselftest-list.txt file.
32183208
%{make} ARCH=$Arch TARGETS="${TARGETS}" SKIP_TARGETS="" $force_targets INSTALL_PATH=%{buildroot}%{_libexecdir}/kselftests install
@@ -3581,12 +3571,6 @@ find -type d -exec install -d %{buildroot}%{_libexecdir}/kselftests/tc-testing/{
35813571
find -type f -executable -exec install -D -m755 {} %{buildroot}%{_libexecdir}/kselftests/tc-testing/{} \;
35823572
find -type f ! -executable -exec install -D -m644 {} %{buildroot}%{_libexecdir}/kselftests/tc-testing/{} \;
35833573
popd
3584-
# install livepatch selftests
3585-
pushd tools/testing/selftests/livepatch
3586-
find -type d -exec install -d %{buildroot}%{_libexecdir}/kselftests/livepatch/{} \;
3587-
find -type f -executable -exec install -D -m755 {} %{buildroot}%{_libexecdir}/kselftests/livepatch/{} \;
3588-
find -type f ! -executable -exec install -D -m644 {} %{buildroot}%{_libexecdir}/kselftests/livepatch/{} \;
3589-
popd
35903574
# install net/netfilter selftests
35913575
pushd tools/testing/selftests/net/netfilter
35923576
find -type d -exec install -d %{buildroot}%{_libexecdir}/kselftests/net/netfilter/{} \;

0 commit comments

Comments
 (0)