From: Hangbin Liu <liuhang...@gmail.com>

redhat/kernel.spec.template: add drivers/net and drivers/net/hw selftest

Add drivers/net/hw for mlxsw related tests that depend on files in that path.

Also include drivers/net for SW-only tests. At the same time, since all
bonding tests are bash scripts, there's no need to list drivers/net/bonding
explicitly in TARGETS. Replace it with drivers/net instead.

Signed-off-by: Hangbin Liu <liuhang...@gmail.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
@@ -3254,7 +3254,7 @@ pushd tools/testing/selftests
 %endif
 
 %{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/bonding iommu cachestat pid_namespace rlimits timens pidfd" 
SKIP_TARGETS="" $force_targets 
INSTALL_PATH=%{buildroot}%{_libexecdir}/kselftests VMLINUX_H="${RPM_VMLINUX_H}" 
install
+%{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
@@ -3577,12 +3577,24 @@ find -type d -exec install -d 
%{buildroot}%{_libexecdir}/kselftests/cgroup/{} \;
 find -type f -executable -exec install -D -m755 {} 
%{buildroot}%{_libexecdir}/kselftests/cgroup/{} \;
 find -type f ! -executable -exec install -D -m644 {} 
%{buildroot}%{_libexecdir}/kselftests/cgroup/{} \;
 popd
+# install drivers/net selftests
+pushd tools/testing/selftests/drivers/net
+find -type d -exec install -d 
%{buildroot}%{_libexecdir}/kselftests/drivers/net/{} \;
+find -type f -executable -exec install -D -m755 {} 
%{buildroot}%{_libexecdir}/kselftests/drivers/net/{} \;
+find -type f ! -executable -exec install -D -m644 {} 
%{buildroot}%{_libexecdir}/kselftests/drivers/net/{} \;
+popd
 # install drivers/net/mlxsw selftests
 pushd tools/testing/selftests/drivers/net/mlxsw
 find -type d -exec install -d 
%{buildroot}%{_libexecdir}/kselftests/drivers/net/mlxsw/{} \;
 find -type f -executable -exec install -D -m755 {} 
%{buildroot}%{_libexecdir}/kselftests/drivers/net/mlxsw/{} \;
 find -type f ! -executable -exec install -D -m644 {} 
%{buildroot}%{_libexecdir}/kselftests/drivers/net/mlxsw/{} \;
 popd
+# install drivers/net/hw selftests
+pushd tools/testing/selftests/drivers/net/hw
+find -type d -exec install -d 
%{buildroot}%{_libexecdir}/kselftests/drivers/net/hw/{} \;
+find -type f -executable -exec install -D -m755 {} 
%{buildroot}%{_libexecdir}/kselftests/drivers/net/hw/{} \;
+find -type f ! -executable -exec install -D -m644 {} 
%{buildroot}%{_libexecdir}/kselftests/drivers/net/hw/{} \;
+popd
 # install drivers/net/netdevsim selftests
 pushd tools/testing/selftests/drivers/net/netdevsim
 find -type d -exec install -d 
%{buildroot}%{_libexecdir}/kselftests/drivers/net/netdevsim/{} \;

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3968

-- 
_______________________________________________
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

Reply via email to