3 %bcond_without kernel # backfire kernel module
4 %bcond_without userspace # userspace programs
5 %bcond_with verbose # verbose kernel module build (V=1)
7 %if 0%{?_pld_builder:1} && %{with kernel} && %{with userspace}
8 %{error:kernel and userspace cannot be built at the same time on PLD builders}
12 %if %{without userspace}
13 %define _enable_debug_packages 0
16 Summary: Programs that test various rt-linux features
17 Summary(pl.UTF-8): Programy testujące różne właściwości rt-linuksa
18 %define pname rt-tests
19 Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
22 Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
24 Group: Applications/System
25 Source0: https://www.kernel.org/pub/linux/utils/rt-tests/%{pname}-%{version}.tar.xz
26 # Source0-md5: 4da4d205fb46758251d026e2279f51c7
27 # https://bugs.launchpad.net/ubuntu/+source/rt-tests/+bug/881771/+attachment/2572753/+files/0001-Fix-deprecated-removed-spinlock-declaration.patch
28 # + http://www.spinics.net/lists/linux-rt-users/msg08966.html
29 Patch0: %{pname}-backfire.patch
30 URL: https://rt.wiki.kernel.org/index.php/Cyclictest
31 %{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
32 %ifarch %{ix86} %{x8664} x32 ia64 mips ppc
33 BuildRequires: numactl-devel
35 BuildRequires: python3-modules >= 1:3
36 BuildRequires: rpmbuild(macros) >= 1.701
37 BuildRequires: sed >= 4.0
38 BuildRequires: tar >= 1:1.22
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 Programs that test various rt-linux features.
45 %description -l pl.UTF-8
46 Programy testujące różne właściwości rt-linuksa.
49 %package -n kernel%{_alt_kernel}-char-backfire\
50 Summary: Linux kernel module to benchmark signal delivery\
51 Summary(pl.UTF-8): Moduł jądra Linuksa do testowania dostarczania sygnałów\
52 Release: %{rel}@%{_kernel_ver_str}\
54 Requires(post,postun): /sbin/depmod\
55 %requires_releq_kernel\
56 Requires(postun): %releq_kernel\
58 %description -n kernel%{_alt_kernel}-char-backfire\
59 Linux kernel "backfire" module sends a signal from driver to user.\
60 It's primary use is benchmarking signal delivery.\
62 %description -n kernel%{_alt_kernel}-char-backfire -l pl.UTF-8\
63 Moduł jądra Linuksa "backfire" wysyła sygnał ze sterownika do\
64 użytkownika. Głównym zastosowaniem jest testowanie wydajności\
65 dostarczania sygnałów.\
68 %files -n kernel%{_alt_kernel}-char-backfire\
69 %defattr(644,root,root,755)\
70 /lib/modules/%{_kernel_ver}/kernel/drivers/char/backfire.ko*\
73 %post -n kernel%{_alt_kernel}-char-backfire\
74 %depmod %{_kernel_ver}\
76 %postun -n kernel%{_alt_kernel}-char-backfire\
77 %depmod %{_kernel_ver}\
80 %define build_kernel_pkg()\
81 %build_kernel_modules -C src/backfire -m backfire\
83 %install_kernel_modules -D installed -m src/backfire/backfire -d kernel/drivers/char\
86 %{?with_kernel:%{expand:%create_kernel_packages}}
89 %setup -q -n %{pname}-%{version}
92 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' src/cyclictest/get_cyclictest_snapshot.py
96 CFLAGS="%{rpmcflags}" \
100 LDFLAGS="%{rpmldflags}"
103 %{?with_kernel:%{expand:%build_kernel_packages}}
106 rm -rf $RPM_BUILD_ROOT
108 %if %{with userspace}
110 DESTDIR=$RPM_BUILD_ROOT \
111 prefix="%{_prefix}" \
112 PYLIB="%{py3_sitescriptdir}"
114 %py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir}
115 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir}
119 cp -a installed/* $RPM_BUILD_ROOT
123 rm -rf $RPM_BUILD_ROOT
126 %defattr(644,root,root,755)
127 %doc README.markdown MAINTAINERS
128 %attr(755,root,root) %{_bindir}/cyclicdeadline
129 %attr(755,root,root) %{_bindir}/cyclictest
130 %attr(755,root,root) %{_bindir}/deadline_test
131 %attr(755,root,root) %{_bindir}/determine_maximum_mpps.sh
132 %attr(755,root,root) %{_bindir}/get_cyclictest_snapshot
133 %attr(755,root,root) %{_bindir}/hackbench
134 %attr(755,root,root) %{_bindir}/hwlatdetect
135 %attr(755,root,root) %{_bindir}/oslat
136 %attr(755,root,root) %{_bindir}/pi_stress
137 %attr(755,root,root) %{_bindir}/pip_stress
138 %attr(755,root,root) %{_bindir}/pmqtest
139 %attr(755,root,root) %{_bindir}/ptsematest
140 %attr(755,root,root) %{_bindir}/queuelat
141 %attr(755,root,root) %{_bindir}/rt-migrate-test
142 %attr(755,root,root) %{_bindir}/signaltest
143 %attr(755,root,root) %{_bindir}/sigwaittest
144 %attr(755,root,root) %{_bindir}/ssdd
145 %attr(755,root,root) %{_bindir}/svsematest
146 %{py3_sitescriptdir}/hwlatdetect.py
147 %{py3_sitescriptdir}/get_cyclictest_snapshot.py
148 %{py3_sitescriptdir}/__pycache__/hwlatdetect.cpython-*.py[co]
149 %{py3_sitescriptdir}/__pycache__/get_cyclictest_snapshot.cpython-*.py[co]
150 %{_mandir}/man8/cyclicdeadline.8*
151 %{_mandir}/man8/cyclictest.8*
152 %{_mandir}/man8/deadline_test.8*
153 %{_mandir}/man8/determine_maximum_mpps.8*
154 %{_mandir}/man8/get_cyclictest_snapshot.8*
155 %{_mandir}/man8/hackbench.8*
156 %{_mandir}/man8/hwlatdetect.8*
157 %{_mandir}/man8/oslat.8*
158 %{_mandir}/man8/pi_stress.8*
159 %{_mandir}/man8/pip_stress.8*
160 %{_mandir}/man8/pmqtest.8*
161 %{_mandir}/man8/ptsematest.8*
162 %{_mandir}/man8/queuelat.8*
163 %{_mandir}/man8/rt-migrate-test.8*
164 %{_mandir}/man8/signaltest.8*
165 %{_mandir}/man8/sigwaittest.8*
166 %{_mandir}/man8/ssdd.8*
167 %{_mandir}/man8/svsematest.8*