Skip to content

Commit 506774b

Browse files
committed
Merge: livepatch: no need to build kselftests with kernel
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1116 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> Approved-by: Jan Stancek <jstancek@redhat.com> Approved-by: Joe Lawrence <joe.lawrence@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Julio Faracco <jfaracco@redhat.com>
2 parents 735a580 + af28e05 commit 506774b

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
@@ -3208,13 +3205,6 @@ TARGETS="bpf cgroup kmod mm net net/forwarding net/mptcp net/netfilter net/packe
32083205
export CFLAGS="%{build_cflags}"
32093206
export CXXFLAGS="%{build_cxxflags}"
32103207

3211-
%ifarch %{klptestarches}
3212-
# kernel livepatching selftest test_modules will build against
3213-
# /lib/modules/$(shell uname -r)/build tree unless KDIR is set
3214-
export KDIR=$(realpath $(pwd)/../../..)
3215-
%{make} %{?_smp_mflags} ARCH=$Arch V=1 TARGETS="livepatch" SKIP_TARGETS="" $force_targets VMLINUX_H="${RPM_VMLINUX_H}" && TARGETS="${TARGETS} livepatch" || true
3216-
%endif
3217-
32183208
# We must install all the targets in a single step as each `make install`
32193209
# command overrides the kselftest-list.txt file.
32203210
%{make} ARCH=$Arch TARGETS="${TARGETS}" SKIP_TARGETS="" $force_targets INSTALL_PATH=%{buildroot}%{_libexecdir}/kselftests install
@@ -3588,12 +3578,6 @@ find -type d -exec install -d %{buildroot}%{_libexecdir}/kselftests/tc-testing/{
35883578
find -type f -executable -exec install -D -m755 {} %{buildroot}%{_libexecdir}/kselftests/tc-testing/{} \;
35893579
find -type f ! -executable -exec install -D -m644 {} %{buildroot}%{_libexecdir}/kselftests/tc-testing/{} \;
35903580
popd
3591-
# install livepatch selftests
3592-
pushd tools/testing/selftests/livepatch
3593-
find -type d -exec install -d %{buildroot}%{_libexecdir}/kselftests/livepatch/{} \;
3594-
find -type f -executable -exec install -D -m755 {} %{buildroot}%{_libexecdir}/kselftests/livepatch/{} \;
3595-
find -type f ! -executable -exec install -D -m644 {} %{buildroot}%{_libexecdir}/kselftests/livepatch/{} \;
3596-
popd
35973581
# install net/netfilter selftests
35983582
pushd tools/testing/selftests/net/netfilter
35993583
find -type d -exec install -d %{buildroot}%{_libexecdir}/kselftests/net/netfilter/{} \;

0 commit comments

Comments
 (0)