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 @@ -626,7 +626,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 @@ -1073,7 +1073,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. @@ -2351,7 +2351,7 @@ export BPFTOOL=$(pwd)/tools/bpf/bpftool/bpftool 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=1 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=1 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. @@ -2689,6 +2689,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