Commit Graph

668 Commits

Author SHA1 Message Date
John Kacur 88efdb99bc rt-tests: Version 1.4
Create version 1.4

Signed-off-by: John Kacur <jkacur@redhat.com>
2019-06-19 14:40:42 +02:00
John Kacur ae393cf8d4 Add ssdd to .gitignore
Add ssdd to .gitignore

Signed-off-by: John Kacur <jkacur@redhat.com>
2019-06-19 01:43:22 +02:00
John Kacur d6edef62b8 rt-tests: ssdd: Add a simple manpage for ssdd
Add a simple manpage to rt-tests for ssdd, and modify the manpage to
install it

Signed-off-by: John Kacur <jkacur@redhat.com>
2019-06-19 01:43:22 +02:00
John Kacur c7d35519ac rt-tests: ssdd: Add Licence information to ssdd
Add License Information to ssdd

Signed-off-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Joe Korty <joe.korty@concurrent-rt.com>
2019-06-19 01:43:22 +02:00
Daniel Wagner 37516acefc rt-migrate-test: Add duration command line argument
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>
2019-06-19 01:43:22 +02:00
Daniel Wagner 74e9face21 svsematest: Add duration command line argument
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>
2019-06-19 01:43:09 +02:00
Daniel Wagner 96bd8df1aa sigwaittest: Add duration command line argument
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>
2019-06-19 01:04:58 +02:00
Daniel Wagner f750e58986 signaltest: Add duration command line argument
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>
2019-06-19 01:04:50 +02:00
Daniel Wagner fb61d543d9 cyclicdeadline: Add duration command line argument
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>
2019-06-19 01:04:42 +02:00
Daniel Wagner e3f890b21c ptsematest: Add duration command line argument
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>
2019-06-19 01:04:31 +02:00
Daniel Wagner 9072a472ee pmqtest: Add duration command line argument
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>
2019-06-19 01:04:21 +02:00
Daniel Wagner a037de86a6 pi_stress: Rename -t command line option to -D
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>
2019-06-19 01:04:14 +02:00
Daniel Wagner 81f63a4ebd pi_stress: Allow short command line arguments
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>
2019-06-19 01:04:06 +02:00
Daniel Wagner edd0e70e55 rt-utils: Move parse_time_string()
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>
2019-06-19 01:03:56 +02:00
Daniel Wagner 6a9661a03e queuelat: Use clock syscall for ARM 32 bit
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>
2019-06-19 01:03:45 +02:00
Daniel Wagner 6a7446e489 rt_numa.h: Remove unused function
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>
2019-06-19 01:03:30 +02:00
John Kacur 1c80348ac6 rt-tests: hwlatdetect.py: Code clean-up
- 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>
2019-05-23 17:59:13 +02:00
Clark Williams ef49ccfab8 hwlatdetect: disable/enable c-state transitions during detection
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>
2019-05-09 16:00:36 +02:00
John Kacur 38e7eb899f queuelat: Install queuelat helper scripts from the rt-tests Makefile
Install queuelat helper scripts from the rt-tests Makefile

Signed-off-by: John Kacur <jkacur@redhat.com>
2019-05-07 16:10:05 +02:00
John Kacur 59c7b5e334 queuelat: Assume queuelat and queuelat scripts are in the path
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>
2019-05-07 16:08:34 +02:00
Daniel Wagner 138eca451e cyclicdeadline: Free allocated resources at exit
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2019-04-05 18:31:13 +02:00
Daniel Wagner e527d6ebd8 deadline_test: Free allocated resources at exit
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2019-04-05 18:24:51 +02:00
Kurt Kanzenbach 9bd019bd22 rt-tests: deadline_tests: fix stack buffer flow
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>
2019-04-05 18:24:51 +02:00
Kurt Kanzenbach efbb46d137 rt-tests: cyclicdeadline: fix segmentation fault on close
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>
2019-04-05 18:24:51 +02:00
Kurt Kanzenbach 76ba006ebc rt-tests: cyclicdeadline: fix getopt string
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>
2019-04-05 18:24:51 +02:00
John Kacur 966b4eeda6 cyclictest: Make sure affinity is respected when numa is detected
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>
2019-02-20 23:16:34 +01:00
Clark Williams 2b126beda6 cyclictest: Fix compiler warning about srncpy output truncated
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
2019-02-19 16:17:50 +01:00
Sebastian Andrzej Siewior 153c8171e0 ssdd: change the written pid
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>
2019-01-15 12:43:12 +01:00
Sebastian Andrzej Siewior b9f812a0c4 ssdd: remove sleeps
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>
2019-01-15 12:35:12 +01:00
Sebastian Andrzej Siewior c3521e2c81 ssdd: make every function static
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>
2019-01-15 12:32:48 +01:00
John Kacur 524aebc390 rt-tests: Makefile: ssdd: Incoroporate ssdd into the rt-tests Makefile
Incoroporate ssdd into the rt-tests build

Signed-off-by: John Kacur <jkacur@redhat.com>
2019-01-14 21:39:47 +01:00
Joe Korty 88b17cb724 Add ssdd test to the rt-tests suite
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>
2019-01-14 17:45:58 +01:00
Li Xiaoming e1fa2cda6a cyclictest: fix_with_expected_identifier_in_latest
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>
2019-01-11 15:11:23 +01:00
Marcelo Tosatti 5c7ee5d6a0 queuelat: use mfence for rdtsc ordering
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>
2019-01-08 16:40:25 +01:00
John Kacur ed58e7ad03 rt-tests: deadline_test: Add NULL check before freeing setcpu_buf
setcpu_buf doesn't always call malloc, so NULL check it before freeing

Signed-off-by: John Kacur <jkacur@redhat.com>
2018-11-15 13:00:06 +01:00
John Kacur 7ea837b01d rt-tests: cyclictest: Remove numa from help
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>
2018-11-05 15:16:58 +01:00
John Kacur 803c33cfe8 rt-tests: deadline_test: Add a manpage
Add an initial manpage for deadline_test.
Modify the Makefile to install it too.

Signed-off-by: John Kacur <jkacur@redhat.com>
2018-11-02 16:23:22 +01:00
John Kacur 2829763fdd rt-tests: Remove install and build of backfire and sendme
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>
2018-10-19 16:24:40 +02:00
John Kacur 377458c8fa rt-tests: cyclictest.8: Remove reference to -n in --smp in manpage too
Remove reference to -n in --smp in manpage too.

clock_nanosleep is the default now.

Signed-off-by: John Kacur <jkacur@redhat.com>
2018-10-19 16:24:40 +02:00
Ralf Ramsauer 1ff21b923e cyclictest: remove reference to -n in --smp
-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>
2018-10-19 16:24:40 +02:00
Marcelo Tosatti be7bbfeff4 Add queuelat manpage
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>
2018-10-19 16:24:40 +02:00
Marcelo Tosatti f4ca6f6f2b add -h option to queuelat
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>
2018-10-19 16:24:40 +02:00
John Kacur f3eb08bee5 rt-tests: queuelat: Remove initial manpage, and replace
Remove the intial manpage and replace it with one written by the author
of queuelat

Signed-off-by: John Kacur <jkacur@redhat.com>
2018-10-19 16:24:40 +02:00
John Kacur 283f5a73a3 rt-tests: manpages: Modify makefile for queuelat.8 and pip_stress.8
Modify the manpage to include queuelat.8 and pip_stress.8 for the
install

Signed-off-by: John Kacur <jkacur@redhat.com>
2018-10-19 16:24:40 +02:00
John Kacur aae6f114f0 rt-tests: queuelat: Add an intial manpage for queuelat
Add an initial manpage for queuelat

Signed-off-by: John Kacur <jkacur@redhat.com>
2018-10-19 16:24:40 +02:00
John Kacur c7282d22d9 rt-tests: .gitignore: Add queuelat to the list of ignored files
Add queuelat to the list of ignored files

Signed-off-by: John Kacur <jkacur@redhat.com>
2018-10-19 16:24:40 +02:00
John Kacur c2cf910af8 rt-tests: pip_stress: Add an initial man page for pip_stress
This adds a man page for pip_stress

Signed-off-by: John Kacur <jkacur@redhat.com>
2018-10-19 16:24:40 +02:00
Juri Lelli 4b58d42774 rt-tests: pi_stress: remove unused report option from help
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>
2018-09-14 13:50:35 +02:00
John Kacur be3ef7f9d2 Remove --numa option
Signed-off-by: John Kacur <jkacur@redhat.com>
2018-06-19 01:38:48 +02:00
John Kacur 8436a798b3 Revert "first stab at removing smp/numa and modifying threads"
Redoing the removal of the numa option

This reverts commit 47f82f1b44.

Signed-off-by: John Kacur <jkacur@redhat.com>
2018-06-18 23:23:52 +02:00