Many of the test programs have the --loop argument for automatic
stopping. The main problem with the --loop argument is how long is
--loop 1000?
To simplify automated tests introduce a --duration argument which
allows to set the time how long a test should run. This allows the
test suite to define the execution time and also the timeout which a
normal human can understand.
For example run the test for 10 minutes and timeout at 11 minutes:
# timeout 11m rt-migrate-test -D 10m
Signed-off-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
Many of the test programs have the --loop argument for automatic
stopping. The main problem with the --loop argument is how long is
--loop 1000?
To simplify automated tests introduce a --duration argument which
allows to set the time how long a test should run. This allows the
test suite to define the execution time and also the timeout which a
normal human can understand.
For example run the test for 10 minutes and timeout at 11 minutes:
# timeout 11m svsematest -D 10m
Signed-off-by: Daniel Wagner <wagi@monom.org>
-Fixed some dos line endings on the man page
Signed-off-by: John Kacur <jkacur@redhat.com>
Many of the test programs have the --loop argument for automatic
stopping. The main problem with the --loop argument is how long is
--loop 1000?
To simplify automated tests introduce a --duration argument which
allows to set the time how long a test should run. This allows the
test suite to define the execution time and also the timeout which a
normal human can understand.
For example run the test for 10 minutes and timeout at 11 minutes:
# timeout 11m sigwaittest -D 10m
Signed-off-by: Daniel Wagner <wagi@monom.org>
-Fixed up some dos line endings in the man page changes
Signed-off-by: John Kacur <jkacur@redhat.com>
Many of the test programs have the --loop argument for automatic
stopping. The main problem with the --loop argument is how long is
--loop 1000?
To simplify automated tests introduce a --duration argument which
allows to set the time how long a test should run. This allows the
test suite to define the execution time and also the timeout which a
normal human can understand.
For example run the test for 10 minutes and timeout at 11 minutes:
# timeout 11m signaltest -D 10m
Signed-off-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
Many of the test programs have the --loop argument for automatic
stopping. The main problem with the --loop argument is how long is
--loop 1000?
To simplify automated tests introduce a --duration argument which
allows to set the time how long a test should run. This allows the
test suite to define the execution time and also the timeout which a
normal human can understand.
For example run the test for 10 minutes and timeout at 11 minutes:
# timeout 11m cyclicdeadline -D 10m
Signed-off-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
Many of the test programs have the --loop argument for automatic
stopping. The main problem with the --loop argument is how long is
--loop 1000?
To simplify automated tests introduce a --duration argument which
allows to set the time how long a test should run. This allows the
test suite to define the execution time and also the timeout which a
normal human can understand.
For example run the test for 10 minutes and timeout at 11 minutes:
# timeout 11m ptsematest -D 10m
Signed-off-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
Many of the test programs have the --loop argument for automatic
stopping. The main problem with the --loop argument is how long is
--loop 1000?
To simplify automated tests introduce a --duration argument which
allows to set the time how long a test should run. This allows the
test suite to define the execution time and also the timeout which a
normal human can understand.
For example run the test for 10 minutes and timeout at 11 minutes:
# timeout 11m pmqtest -D 10m
Signed-off-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
Streamline the duration command line argument for all rt-tests. While
at it also add man page.
Signed-off-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
Add optstring to getopt_long() command line parser to support the
short options as it documented in the man page and also in the usage
help text.
Signed-off-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
Move parse_time_string() to rt-utils.c so we can re use it.
Signed-off-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
CPUs such as Cortex-M8 don't have a rdtsc instruction. Fallback using
a syscall.
Signed-off-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
GCC on a BeagleBoneBlack complains:
In file included from src/cyclictest/cyclictest.c:39:0:
src/cyclictest/rt_numa.h:253:13: warning: ‘numa_on_and_available’ defined but not used [-Wunused-function]
static void numa_on_and_available()
^~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
- Remove obsolete from __future__
- Fix spacing around calls to print, open and brackets
- Fix spacing around assignments
Signed-off-by: John Kacur <jkacur@redhat.com>
Recent performance tuning problems led me to realize that just running
at fifo:99 and turning off interrupts isn't enough while looking for
BIOS induced latencies. Power savings logic is built into most modern
cpus and so must be disabled while looking for BIOS induced (SMI/NMI)
latencies.
Use the /dev/cpu_dma_latency mechanism to disable c-state transitions
while running the hardware latency detector. Open the file
/dev/cpu_dma_latency and write a 32-bit zero to it, which will prevent
c-state transitions while the file is open.
Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Assume queuelat and queuelat scripts are in the path. Don't hardcode
their location.
Write the temporary data to /usr/tmp/outfile
Signed-off-by: John Kacur <jkacur@redhat.com>
The appended string is actually longer than 14 characters. Use strlen() to
compute the correct length like the other functions do.
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
The current code generates a segmentation fault in the last free() call.
$ sudo ./cyclicdeadline
Using all CPUS
/sys/kernel/debug/sched_features: Success
interval: 600:1000
Tested at 5us of 600us
deadline thread 2963
thread[2963] runtime=600us deadline=1000us
main thread 2962
fail 2 0
T: 0 ( 2963) I:1000 C: 1268 Min: 7 Act: 55 Avg: 56 Max: 256
[1] 2961 segmentation fault sudo ./cyclicdeadline
This is caused by a buffer overflow in setup_ftrace_marker(). The appended
string is 21 not 14 characters wide. Fix it by using strlen() like the other
function do.
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
There is code to parse the interval and step parameters from the command
line. However, these options cannot be set, because the getopt string is
incomplete. Adjust it accordingly to make '-i' and '-s' work.
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
Make sure affinity is respected when numa is automatically detected and
when smp is not specified. Don't break the way smp currently works.
Signed-off-by: John Kacur <jkacur@redhat.com>
Fix compiler warning about strncpy output truncated before terminating
nul copying as many bytes from a string as its length
Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Extracted from a patch from Clark
During debugging it turned out to be helpful to see the parent pid
and mostly the two tasks interact with each other: the tracer and
tracee.
Add this information it can searched for it.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
There two sleep functions which ensure that the forked function sleeps
and does not spin until everything is setup. There is no need for that,
the scheduler will take care of that anyway. Also that sleep may
complete before or after the testcase starts. If it completes afterwards
then the testcase waits to start so…
Remove the sleep, it does change the outcome of the testcase.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
Those functions and variables are not used outside of main so they can
be static.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
The following program might make a good addition to the rt
test suite. It tests the reliability of PTRACE_SINGLESTEP.
It does by default 10,000 ssteps against a simple,
spinner tracee. Also by default, it spins off ten of these
tracer/tracee pairs, all of which are to run concurrently.
Starting with 4.13-rt, this test occasionally encounters a
sstep whose waitpid returns a WIFSIGNALED (signal SIGTRAP)
rather than a WIFSTOPPED. This usually happens after
thousands of ssteps have executed. Having multiple
tracer/tracee pairs running dramatically increases the
chances of failure.
The is what the test output looks like for a good run:
forktest#0/22872: STARTING
forktest#7/22879: STARTING
forktest#8/22880: STARTING
forktest#6/22878: STARTING
forktest#5/22877: STARTING
forktest#3/22875: STARTING
forktest#4/22876: STARTING
forktest#9/22882: STARTING
forktest#2/22874: STARTING
forktest#1/22873: STARTING
forktest#0/22872: EXITING, no error
forktest#8/22880: EXITING, no error
forktest#3/22875: EXITING, no error
forktest#7/22879: EXITING, no error
forktest#6/22878: EXITING, no error
forktest#5/22877: EXITING, no error
forktest#2/22874: EXITING, no error
forktest#4/22876: EXITING, no error
forktest#9/22882: EXITING, no error
forktest#1/22873: EXITING, no error
All tests PASSED.
Signed-off-by: Joe Korty <joe.korty@concurrent-rt.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
An error occurred during the build process:
src/cyclictest/cyclictest.c:1396:2: error: expected identifier or '(' before 'if'
if (option_affinity) {
The expected identifier "}" for "if (option_affinity){" occurs in another place.
Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
Signed-off-by: Zhong Lu <zhongl.fnst@cn.fujitsu.com>
- Fixed the indentation of the bracket
- Fixed the indentation of the block where NUMA is not defined
Signed-off-by: John Kacur <jkacur@redhat.com>
cpuid is causing register corruption: use mfence instead.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
v2: fix signed-off-by line
Signed-off-by: John Kacur <jkacur@redhat.com>
The numa mode is invoked automatically now, and not from the commandline.
Remove it from help and the man page as well.
Clean-up messages to refer to "numa" or "numa" mode instead of "--numa"
Even though --smp can still be invoked, change messages to "smp mode"
for consistency.
Signed-off-by: John Kacur <jkacur@redhat.com>
Leave the source code in place but remove the install and build of
backfire and sendme for now as it is broken
Signed-off-by: John Kacur <jkacur@redhat.com>
-n, resp. --nanosleep was removed in 9d2c9edd86 ("cyclictest: make
clock_nanosleep as default and add option for POSIX timers."). It's now
used by default.
The usage of --smp still refers to -n, remove this reference.
Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
Add a man page for queuelat, with a short introduction
and description for each option.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Add -h (help) option to queuelat, which lists all
options.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Command line --report option is not actually implemented (even if
advertised on --help).
Remove it from the help banner.
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>