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>
- Clean this function up a bit before modifying it
- Don't use assignment in if statements
- Put spaces before open braces and parentheses
- Break lines up where possible that go over 80 chars
Signed-off-by: John Kacur <jkacur@redhat.com>
This was mistakenly included in the #ifdef in 88af643971 (android:
adjust target for android). Moved back into the correct #ifdef-entry.
Cc: Clark Williams <williams@redhat.com>
Cc: John Kacur <jkacur@redhat.com>
Signed-off-by: Henrik Austad <haustad@cisco.com>
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>
Although we have less strict rules than the linux kernel
some of the checkpatch complaints really do make the files better and
easier to read. Fix a few of these.
Signed-off-by: John Kacur <jkacur@redhat.com>
Call process_options beforeing checking priviledges so that
process_options can display help for a normal user as designed.
This was already fixed in cyclictest. I also tested everywhere else to
make sure this is now fixed everywhere.
I fixed some small white spaces problems at the same time.
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>
On Wed, Sep 16, 2015 at 01:05:51AM +0200, John Kacur wrote:
> On Mon, 31 Aug 2015, Josh Cartwright wrote:
> > From: Gratian Crisan <gratian.crisan@ni.com>
> >
> > Add an option '-J' or '--histfile' to dump the latency histogram to <path>
> > instead of stdout. This allows for live update of the current min, avg, and max
> > numbers while retaining the option to save histogram data for later analysis.
> >
> > Signed-off-by: Gratian Crisan <gratian.crisan@ni.com>
> > Signed-off-by: Josh Cartwright <joshc@ni.com>
[..]
>
> We worked really hard to remove the large amount of options, and we may
> have been over zealous in some cases (Carsten?).
Fair enough, cyclictest has way too many knobs. Regardless, we've at
least found this particular option useful.
> If I were to accept this patch, I would at least like you to remove
> the short form option, and just have it in the long form.
Here is a v2 with the short form -J dropped.
Thanks,
Josh
-- 8< --
From: Gratian Crisan <gratian.crisan@ni.com>
Subject: [PATCH v2] cyclictest: add option for dumping the histogram in a file
Add an option '--histfile' to dump the latency histogram to <path>
instead of stdout. This allows for live update of the current min, avg,
and max numbers while retaining the option to save histogram data for
later analysis.
Signed-off-by: Gratian Crisan <gratian.crisan@ni.com>
Signed-off-by: Josh Cartwright <joshc@ni.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
These functions never return to their caller. Mark them as such to aide
in code generation and help out static analysis.
Signed-off-by: Josh Cartwright <joshc@ni.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
The fifothread is only created when use_fifo is set; having the thread
itself perform a check is redundant and unnecessary. Drop it.
Signed-off-by: Josh Cartwright <joshc@ni.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
On any sane platform sizeof(long) == sizeof(unsigned long), so this
does not actually fix a real bug, but the code should at least be
consistent.
Signed-off-by: Josh Cartwright <joshc@ni.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
We don't support building without numa libs anymore, although we of
course support running on machines without numa. Never-the-less I
created two versions of numa_on_and_available, one for if you build with
the unsupported NUMA=0 and one for if you build with NUMA=1, which is
the default.
I would prefer not to drop this function, since I think it cleanly
documents the fact that numa_available must be called before any other
numa library functions are defined.
As Josh Cartwright reported though, there was no need to call it from
main() since it was already tested in process_options(), so I tested it
there.
Tested by building with NUMA=0, NUMA=1 and with the non-standard
-Wimplicit-function-declaration
Reported-by: Josh Cartwright <joshc@ni.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Most functions in cyclictest were already 'static', with a few
exceptions. Fixup those exceptions, in the interest of consistency,
optimization, etc.
Signed-off-by: Josh Cartwright <joshc@ni.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
The childinfo_t union shares the 'long long error' member with a
'pthread_t threadid'. For a "sufficiently large" threadid, it's
possible that the error condition is incorrectly hit even though a valid
thread was created.
Stop conflating the error condition with legitimate thread/process
identifiers by modifying create_worker to explicitly return an error
code.
Inspired by a patch in OpenEmbedded authored by Song Li and Jesse Zhang.
Cc: Song.Li <Song.Li@windriver.com>
Cc: Jesse Zhang <sen.zhang@windriver.com>
Signed-off-by: Josh Cartwright <joshc@ni.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>
Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Put Back #ifndef _GNU_SOURCE
We define _GNU_SOURCE in our Makefile. I don't mind having it a second
time as documentation in the files, but we need to have the #ifdef to
prevent the compiler warning about it being redfined
Signed-off-by: John Kacur <jkacur@redhat.com>
- Change VERSION_STRING to VERSION to get the same version number as the
the rest of the suite
- Assume that VERSION is defined, instead of replacing it with a
nonsensical number
- Print the help option in the usage() function
Reported-by: DIXLOR <dixlor@gmail.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
The help text shows prio as the long option name for the process priority.
But it is actually priority.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
The help text shows prio as the long option name for the process priority.
But it is actually priority.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.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>