From: Prarit Bhargava <prarit@xxxxxxxxxx> redhat: build and include memfd to kernel-selftests-internal Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2027506 Upstream Status: RHEL9 only Tested: by reporter This patch adds memfd to the list of selftests built and packaged in kernel-selftests-internal. Signed-off-by: Aristeu Rozanski <arozansk@xxxxxxxxxx> Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx> diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100755 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -630,7 +630,7 @@ BuildRequires: python3-docutils BuildRequires: zlib-devel binutils-devel %endif %if %{with_selftests} -BuildRequires: clang llvm +BuildRequires: clang llvm fuse-devel %ifnarch %{arm} BuildRequires: numactl-devel %endif @@ -1077,7 +1077,7 @@ This package provides debug information for the bpftool package. %package selftests-internal Summary: Kernel samples and selftests License: GPLv2 -Requires: binutils, bpftool, iproute-tc, nmap-ncat, python3 +Requires: binutils, bpftool, iproute-tc, nmap-ncat, python3, fuse-libs %description selftests-internal Kernel sample programs and selftests. @@ -2356,7 +2356,7 @@ pushd tools/testing/selftests # We need to install here because we need to call make with ARCH set which # doesn't seem possible to do in the install section. -%{make} %{?_smp_mflags} ARCH=$Arch V=1 TARGETS="bpf vm livepatch net net/forwarding net/mptcp netfilter tc-testing" SKIP_TARGETS="" FORCE_TARGETS=%{bpf_force_targets} INSTALL_PATH=%{buildroot}%{_libexecdir}/kselftests VMLINUX_H="${RPM_VMLINUX_H}" install +%{make} %{?_smp_mflags} ARCH=$Arch V=1 TARGETS="bpf vm livepatch net net/forwarding net/mptcp netfilter tc-testing memfd" SKIP_TARGETS="" FORCE_TARGETS=%{bpf_force_targets} INSTALL_PATH=%{buildroot}%{_libexecdir}/kselftests VMLINUX_H="${RPM_VMLINUX_H}" install # 'make install' for bpf is broken and upstream refuses to fix it. # Install the needed files manually. @@ -2694,6 +2694,13 @@ find -type d -exec install -d %{buildroot}%{_libexecdir}/kselftests/netfilter/{} find -type f -executable -exec install -D -m755 {} %{buildroot}%{_libexecdir}/kselftests/netfilter/{} \; find -type f ! -executable -exec install -D -m644 {} %{buildroot}%{_libexecdir}/kselftests/netfilter/{} \; popd + +# install memfd selftests +pushd tools/testing/selftests/memfd +find -type d -exec install -d %{buildroot}%{_libexecdir}/kselftests/memfd/{} \; +find -type f -executable -exec install -D -m755 {} %{buildroot}%{_libexecdir}/kselftests/memfd/{} \; +find -type f ! -executable -exec install -D -m644 {} %{buildroot}%{_libexecdir}/kselftests/memfd/{} \; +popd %endif ### -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2021 _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx 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@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue