Commit Graph

700 Commits

Author SHA1 Message Date
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
John Kacur 54b1ce911c Revert "shuffle numa options around a bit"
Redoing the removal of the numa option

This reverts commit 1e4b4dc250.

Signed-off-by: John Kacur <jkacur@redhat.com>
2018-06-18 23:22:57 +02:00
John Kacur 026f2a31c5 rt-tests: Makefile: Change syntax for python3
When testing for the PYLIB version, we need to explicitly
specify python3 and fix the print syntax

Signed-off-by: John Kacur <jkacur@redhat.com>
2018-06-13 02:07:17 +02:00
Clark Williams 1e4b4dc250 shuffle numa options around a bit
Signed-off-by: Clark Williams <williams@redhat.com>
(cherry picked from commit 59aa86a9af7204f10def6872e1088d83fc7579bc)
Signed-off-by: John Kacur <jkacur@redhat.com>
2018-05-30 00:51:46 +01:00
Clark Williams 47f82f1b44 first stab at removing smp/numa and modifying threads
Signed-off-by: Clark Williams <williams@redhat.com>
(cherry picked from commit b1b7a3886b3859fef72efe52e6bb418393bcf24d)
Signed-off-by: John Kacur <jkacur@redhat.com>
2018-05-30 00:36:52 +01:00
Clark Williams f5ccfbe4d6 cyclictest: remove ftrace code
Remove all the code that manipulates tracing values with the exception
of the breaktrace logic. Cyclictest now presumes that any tracing
will be done by the trace-cmd command and will only *stop* tracing
if the breaktrace value is hit.

Signed-off-by: Clark Williams <williams@redhat.com>
(cherry picked from commit 26838f86d54e3ff74223165cbbcc2d211becdaf2)
Signed-off-by: John Kacur <jkacur@redhat.com>
2018-05-30 00:35:37 +01:00
John Kacur e905f555f3 rt-tests: Makefile - New development (unstable) release
Modify the Makefile for a new release

Signed-off-by: John Kacur <jkacur@redhat.com>
2018-04-30 15:39:26 +01:00
Carsten Emde 57d9076786 rt-tests: Include SMI count in cyclictest summary
Cylictest's --smi option allows to continuously display SMIs that occur
during the measurement. However, the SMI count was not yet included in the
summary at the end of the program run. Added this.

While we are at it, update the list of Intel family 6 models that support
retrieving the SMI count by copying newly added items from kernel sources
at tools/power/x86/turbostat.

Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
(cherry picked from commit 34caa080e0)
Signed-off-by: John Kacur <jkacur@redhat.com>
2018-04-30 15:38:45 +01:00
John Kacur 62d2e8b40c Merge remote-tracking branch 'marcelowt2/queuelat' into unstable/devel/v1.2
Merging queuelat into rt-tests

Signed-off-by: John Kacur <jkacur@redhat.com>
2018-04-30 15:27:49 +01:00
John Kacur fa97bdab61 Merge remote-tracking branch 'clrkwllms/hwlatdetect_py3' into unstable/devel/v1.2
Signed-off-by: John Kacur <jkacur@redhat.com>
2018-04-24 13:45:26 +01:00
marcelo 08d255cb88 queuelat: add statistics print
Add statistics print at the end of each run.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2018-04-18 15:03:14 -03:00
Marcelo Tosatti 9e41e33d94 Add queuelat test to rt-tests
Add queuelat, a test to simulate a DPDK queue.

See README in src/queuelat/ for details.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2018-04-16 20:30:25 -03:00
John Kacur 59d86812cc rt-tests: Makefile
Tag v1.2 in order to start some new development

Signed-off-by: John Kacur <jkacur@redhat.com>
2018-03-26 22:51:25 +01:00
Clark Williams 809eed92c1 hwlatdetect: convert from optparse to argparse for python3
Signed-off-by: Clark Williams <williams@redhat.com>
2018-02-23 14:30:04 -06:00
Clark Williams 61d21a918b hwlatdetect: fix str/binary mismatches
Signed-off-by: Clark Williams <williams@redhat.com>
2018-02-23 14:29:53 -06:00
Clark Williams 9a5c9c514d hwlatdetect: initial python3 changes
Signed-off-by: Clark Williams <williams@redhat.com>
2018-02-23 14:29:44 -06:00
John Kacur e5bca09eb8 rt-tests: Need to generate debug info for rpms
Need to generate debug info for rpms, use -g even for non-debug version

Signed-off-by: John Kacur <jkacur@redhat.com>
2017-12-20 17:48:24 +00:00
Jianxun Zhang 44de1a4945 Make -x option position-agnostic
Change 9d2c9edd86 introduces
the new option of POSIX timer and makes MODE_CLOCK_NANOSLEEP
the default choice. But there are two places explicitly set
MODE_CLOCK_NANOSLEEP to the variable use_nanosleep in the code,
so the actual value of the variable after parsing depends on
the position of '-x' to '-U' and '-S'.

These command pairs result in different values in the variable:
'cyclictest -S -x' VS 'cyclictest -x -S'
'cyclictest -U -x' VS 'cyclictest -x -U'

This change ensures -x work regardless its position by removing
the two lines in these cases.

Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2017-05-15 16:47:46 +02:00
Jianxun Zhang 470b7394e6 cyclictest: cannot stop running with '-M' option
Most of time having '-M' option causes cyclictest  won't exit after
a duration ('-D') expires, like this quick  command on my machines:

sudo cyclictest  -S -M -D2 -d0

This is because the main thread is blocked on waiting for the next
update of MAX, but the timer thread doesn't signal the main thread
before it quits.

Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2017-05-04 14:31:27 +02:00