`oldtrace' is set for kernels prior 2.6.18. Remove "support" for them.
The alternative code (for new kernels) issues
prctl(0, [01]);
which is not valid the kernel returns an error. I have no idea what its
purpose is, remove it.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
Record only the first incident including tid, value and trace event.
If multiple threads exceed the limit then the reported `tid' might not
match the reported value.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
- minor grammar and spelling edit
Signed-off-by: John Kacur <jkacur@redhat.com>
Fix various style problems as reported by checkpatch.pl
For example, spacing around "<", indentation of a lable, and so on.
Signed-off-by: John Kacur <jkacur@redhat.com>
Fix various style problems such as spaces in indentation instead of
tabs, unsigned long long int, to just unsigned long long, and so on.
Signed-off-by: John Kacur <jkacur@redhat.com>
A few style changes as suggested by checkpatch.pl
Please note not everything that checkpatch reports will be applicable to
rt-tests.
Signed-off-by: John Kacur <jkacur@redhat.com>
This is an ancient spec file from way back before this program was
included in the rt-tests suite. There is no need to keep it around
anymore.
Signed-off-by: John Kacur <jkacur@redhat.com>
Add a default command line parser to print at least the current
version.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
Use getopt_long to parse long version of the commands.
Change the 'a/affinity' option to handle all cases including what '-c'
did. We still keep '-c' silently supported to avoid breaking existing
users.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
The numa library has support for counting the bits in the affinity
mask and how many CPUs are available and usable by the tasks. Let's
use those helpers.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
Now rt-tests won't build for archs other than x86/i386/ppc64 after oslat is
merged. Instead of failing the build, let's make it pass. However, whenever
oslat is executed, instead of running the real program, dump an error message,
so that people can try to implement the frc() function for it when there's a
real need for the new arch.
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
The makefile will run a shell command to determine the location of the
python libraries. If an error occurs, for example if the system doesn't
have python installed on it, undefine PYLIB
This prevents undesired side effects such as installing man pages for
utilities that will not be installed and does not interfere with other
conditionals such as if test -n "${PYLIB]"
Signed-off-by: John Kacur <jkacur@redhat.com>
Since the installation of get_cyclictest_snapshot.py is done if PYLIB
then we should only install the manpages then as well.
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
When the quiet option is used don't print all threads stats. The first
thread will pause every 16 cycles for 10000us. This will show up in
the max values for all other threads when the final results are
printed:
# signaltest -q -D 2s
T: 0 ( 4517) P: 0 C: 3121 Min: 5 Act: 8 Avg: 8 Max: 19
T: 1 ( 4518) P: 0 C: 3121 Min: 5 Act:10065 Avg: 639 Max: 10073
We could also remove the sleep but then the system gets fully loaded
by the test. Furthermore, we would keep the path pretty hot and that's
not ideal if one wants to test the eratic signal behavior. So only
consider the first thread for the stats.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
Move the ARRAY_SIZE macro to a common header to avoid code
duplication.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
Several tests define the same time values. Move them all to
common header to avoid code duplication.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
Several test implement the same helpers. Move it to a
common header to avoid code duplication.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
Format the code with kernel coding style. Meanwhile use spdx license
identifier as suggested by John.
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
oslat was initially a standalone program [1]. This patch merges oslat into
rt-tests repo.
This is a direct port of oslat v0.1.7 into rt-tests. It naturally bumps the
version to latest rt-tests version.
[1] https://github.com/xzpeter/oslat
Signed-off-by: Peter Xu <peterx@redhat.com>
A few minor fixes to the grammar in the man page
Signed-off-by: John Kacur <jkacur@redhat.com>
Then they can be further used by other programs too.
Two trivial things to mention.
Firstly, move trace_marker out of enable_trace_mark(). No functional change.
Secondly, remove the fileprefix setting in process_options(), because if
tracelimit is non-zero, fileprefix will be after all replaced by a further call
to get_debugfileprefix() in debugfs_prepare().
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Each inversion group is three SCHED_FIFO threads, so the chances of more groups
than online cores actually getting to run is very slim. Limit the number of
groups requested to be <= the number of online cpus.
Signed-off-by: Clark Williams <williams@redhat.com>
Changing the conversion in printf to %ld since the number of online
processors is a long.
Signed-off-by: John Kacur <jkacur@redhat.com>
- Print a warning if no cyclictest instance is found.
- Also fix up the method take_snapshot for the case when the user
provides a pid.
Signed-off-by: John Kacur <jkacur@redhat.com>