This helps it compile with clang or any other compilers besides gcc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Remove anything to do with rpm, spec, release and so on that should be
maintained in distribution specific ways. One exception is make tarball,
which is useful in a more general way.
Signed-off-by: John Kacur <jkacur@redhat.com>
Bionic is the libc implementation used in Android and should not be
confused with the architecture.
Cc: John Kacur <jkacur@redhat.com>
Signed-off-by: Henrik Austad <haustad@cisco.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Place TARGETS after sources. The evaluation of it doesn't depend on it's
position in the file, so remove the incorrect comment
Signed-off-by: John Kacur <jkacur@redhat.com>
OBJDIR should be an order only prerequisite.
- create the OBJDIR if necessary before .d, .o and before all TARGETS
including hwlatdetect
- Don't rebuild if the timestamp on the OBJDIR changes
Signed-off-by: John Kacur <jkacur@redhat.com>
- Make the Makefile more readable by moving android functionality to it's
own Makefile.
- Don't evaluate TARGETS until after including arch Makefiles
Signed-off-by: John Kacur <jkacur@redhat.com>
Tested-by: Henrik Austad <haustad@cisco.com>
- Store the result of cc -dumpmachine in the dumpmachine variable
- Use makefile parsing to obtain the ostype
- Use shell and sed functions to obtain the machinetype
- Turn on the bionic functionality if the ostype=android
Signed-off-by: John Kacur <jkacur@redhat.com>
Tested-by: Henrik Austad <haustad@cisco.com>
- Document compiling with and without NUMA, explaining the defaults
- Document compiling with HAVE_PARSE_CPUSTRING_ALL
Reorganize these options a little for readability
Signed-off-by: John Kacur <jkacur@redhat.com>
- Add a man page to signaltest
- Improve the display_help in signaltest
- Add install of new man page to makefile
Signed-off-by: John Kacur <jkacur@redhat.com>
When building rt-tests, object files, libs and .d (dependencies) were
all generated in the base directory. Instead, place all of these
build files in a dir called bld. The final programs are still in the
basedir
Signed-off-by: John Kacur <jkacur@redhat.com>
VPATH paths can be separated by either a space or a colon.
Explicitly insert a colon instead of relying on a space being inserted
due to the spacing of our Makefile
Signed-off-by: John Kacur <jkacur@redhat.com>
Bionic (Android's libc implementation) lacks support for (amongst other
things) pthread_barriers and pthread_setaffinity. The former is removed
by ifdeffery, the latter is added as a per-android wrapper to
sched_setaffinity.
Signed-off-by: Henrik Austad <haustad@cisco.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
linker must be able to resolve reference to err_msg_n properly
rt-migrate-test.c:(.text+0x1ff): undefined reference to `err_msg_n'
Signed-off-by: Henrik Austad <haustad@cisco.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Update from joshc for job-level safety
Co-authored.by: Josh Cartwright <joshc@ni.com>
Signed-off-by: Henrik Austad <haustad@cisco.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Some 'gzip' implementations, in particular 'pigz' don't properly handle
the '-c' argument if it's passed after the name of the input files.
Work around this by putting the '-c' option before the file names.
Inspired by patches in OpenEmbedded by Robert Yang and Kai Kang.
Cc: Robert Yang <liezhi.yang@windriver.com>
Cc: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Josh Cartwright <joshc@ni.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Allow hwlatdetect to be installed independently of the rest of the
tests. This is convenient for build systems that package it separately
due to the python dependency.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Clark Williams <williams@redhat.com>
CC: John Kacur <jkacur@redhat.com>
Signed-off-by: Josh Cartwright <joshc@ni.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Allow users (build systems) to specify PYLIB. This allows for a
cross-build-system to specify the target PYLIB rather than the host
PYLIB.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Clark Williams <williams@redhat.com>
CC: John Kacur <jkacur@redhat.com>
Signed-off-by: Josh Cartwright <joshc@ni.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Adding _STRING doesn't add any extra meaning, but the extra length makes
the Makefile more unreadable than is necessary, so shorten this up
Signed-off-by: John Kacur <jkacur@redhat.com>
This is a temporary solution until we have time to look into autotools
If you know that you are building on a system that has
numa_parse_cpustring_all()
Then you can type
make HAVE_PARSE_CPUSTRING_ALL=1
to define it.
If you omit that, then the default is the old behaviour that uses
numa_parse_cpustring((char *)s)
Signed-off-by: John Kacur <jkacur@redhat.com>
Only add '-lrttest -L.' where it's actually needed.
Use '$<' instead of '$^'. Otherwise librttest is added twice:
As 'librttest.a' and as '-lrttest'.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
Some architectures are still stuck with non-NPTL toolchains.
These are for example ARC, Blackfin, Xtensa etc.
Still rt-tests are very good benchmarks and it would be good to enable use of
at least selected (those that will be built) tests on those architectures.
This change makes it possible to only build subset of tests that don't require
NPTL calls.
By default behavior is not modified - all tests are built, but if one wants
to build with non-NPTL toolchain just add "HAVE_NPTL=no" in command line
or modify "HAVE_NPTL" variable right in Makefile and execute "make".
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Clark Williams <clark.williams@gmail.com>
Until we have a proper libc implementation we maintain a simple
version of it. We this new API we are able to use SCHED_DEADLINE.
This is shamelessly stolen from Dario Faggioli's libdl.
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Cc: Dario Faggioli <raistlin@linux.it>
Don't tag copies of files in BUILD created when building an rpm
Without this change tags finds both copies, eg: for tag cyclictest.c
# pri kind tag file
1 F F cyclictest.c BUILD/rt-tests/src/cyclictest/cyclictest.c
1
2 F F cyclictest.c src/cyclictest/cyclictest.c
With this change, only the later one is found
Signed-off-by: John Kacur <jkacur@redhat.com>
version 2:
- Add new placeholders in rt-tests.spec-in to make the replacements by
"make rpm" more visible to future maintainers of rt-tests.spec-in
- fix typo of my name in rt-tests.spec-in
rt-tests can be built without NUMA:
make NUMA=0
But "make rpm" does not have a way to be successful without NUMA:
build_rt-tests_0.85> make rpm
for F in cyclictest signaltest pi_stress rt-migrate-test ptsematest sigwaittest svsematest pmqtest sendme pip_stress hackbench *.o .depend *.*~ *.orig *.rej rt-tests.spec *.d *.a ChangeLog; do find -type f -name $F | xargs rm -f; done
rm -f hwlatdetect
rm -f tags
rm -rf BUILD BUILDROOT RPMS SRPMS SPECS releases *.tar.gz rt-tests.spec tmp
git log >ChangeLog
mkdir -p releases
mkdir -p tmp/rt-tests
cp -r Makefile COPYING ChangeLog src tmp/rt-tests
tar -C tmp -czf rt-tests-0.85.tar.gz rt-tests
rm -f ChangeLog
cp rt-tests-0.85.tar.gz releases
sed s/__VERSION__/0.85/ <rt-tests.spec-in >rt-tests.spec
rpmbuild -ba --define "_topdir /a/home/frowand/me/src/rt-tests/build_rt-tests_0.85" --define "_sourcedir /a/home/frowand/me/src/rt-tests/build_rt-tests_0.85/releases" --define "_builddir /a/home/frowand/me/src/rt-tests/build_rt-tests_0.85/BUILD" rt-tests.spec
error: Failed build dependencies:
numactl-devel is needed by rt-tests-0.85-1.fc12.src
make: *** [rpm] Error 1
The following patch allows the rpm to be built without NUMA, with the command:
make NUMA=0 rpm
Signed-off-by: Frank Rowand <frank.rowand@am.sony.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
make rpm creates the dirs BUILDROOT and SPECS that are missed by distclean.
Gather all rpm related DIRS to the RPMDIRS and add that to distclean.
Signed-off-by: John Kacur <jkacur@redhat.com>
Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
Tested-by: Frank Rowand <frank.rowand@am.sony.com>
The files in the tmp dir are generated during make release.
These are the kind of generated files that should be removed for distclean,
So add tmp. make release can be slightly simplified by then depending
on distclean instead of clean.
Signed-off-by: John Kacur <jkacur@redhat.com>
Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
Tested-by: Frank Rowand <frank.rowand@am.sony.com>
Don't tag the copies of the source files placed in the tmp directory
during the creation of a release.
Without this change tags finds both copies, eg: for tag cyclictest.c
# pri kind tag file
1 F C F cyclictest.c src/cyclictest/cyclictest.c
1
2 F F cyclictest.c tmp/rt-tests/src/cyclictest/cyclictest.c
1
With this change only the first one is found.
Signed-off-by: John Kacur <jkacur@redhat.com>
Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
Tested-by: Frank Rowand <frank.rowand@am.sony.com>
For compilation to work
-D_GNU_SOURCE -Isrc/include
is needed to be passed to the compiler. For Debian packaging several
things are added but not these two from above. So be a bit more friendly
and add them unconditionally. There is no harm if they are included in
the user supplied CFLAGS and so passed twice.
Moreover be a bit more correct about CFLAGS/CPPFLAGS. Both should be
passed to the compiler with CFLAGS taking options for the compiler and
CPPFLAGS taking options for the preprocessor. This is also needed for
Debian packaging where the helper scripts set CPPFLAGS.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>