Commit Graph

18 Commits

Author SHA1 Message Date
Daniel Wagner 7d947e8e62 rt-utils: Move time defininitions to common header
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>
2020-09-03 10:24:15 -04:00
John Kacur e554f3d5d9 rt-tests: ptsematest.8: Update the ptsematest man page
The smp option should be a capital (-S)
Also fix the update synopsis to include missing and options

Signed-off-by: John Kacur <jkacur@redhat.com>
2020-07-06 16:27:24 -04:00
John Kacur 68cba61ce5 rt-tests: ptsematest: Update man page and add -h option
- Update the man page with the -s or --smp option
- Reorder the program help to match the man page
- Make the -h option work correctly

Signed-off-by: John Kacur <jkacur@redhat.com>
2020-01-23 18:19:34 +01:00
John Kacur 64a823d216 rt-tests: Add SPDX tags V3
Add SPDX tags instead of having out-of-date and incomplete licences at
the top of files

Audited again to make sure that GPL-2.0-only is used where appropriate
and not GPL-2.0-or-later (and the other way around)

Signed-off-by: John Kacur <jkacur@redhat.com>
2019-11-26 17:33:27 +01:00
Qiao Zhao 28612a2609 ptsematest, sigwaittest, pmqtest, svsematest reprot error "Could not access /sys/kernel/debug/tracing/tracing_enabled"
tracing_enabled was deprecated a long time ago and is no longer
available, use tracing_on instead

To reproduce

This patches fixes that

Signed-off-by: Qiao Zhao <qzhao@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2019-11-26 17:33:27 +01:00
John Kacur c5e0171b21 rt-tests: Use gettid from rt-utils.c everywhere
gettid is defined in rt-utils, so we should use that everywhere instead
of defining a separate macro in each test for it.

Signed-off-by: John Kacur <jkacur@redhat.com>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Kurt Kanzenbach <kurt.kanzenbach@linutronix.de>
2019-11-26 17:33:10 +01: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
John Kacur 4594d66e78 rt-tests: Housekeeping fix some spelling errors.
Fix a number of errors like procesor->processor, specifed->specified and
cylictest->cyclictest.

Note, Uwe Kleine-König <ukleinek@debian.org> pointed out some of these
spelling errors previously.

Signed-off-by: John Kacur <jkacur@redhat.com>
2016-05-13 14:54:13 +02:00
Uwe Kleine-König 675f551202 remove several unused Makefiles
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-05 20:21:15 +02:00
John Kacur b6b5c594b2 Change VERSION_STRING to VERSION
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>
2015-07-09 14:31:01 +02:00
Uwe Kleine-König 954e01fe14 rt-tests: have printf use %s format for strings
Discovered while compiling with "hardening flags"

For Debian 7.0 (aka wheezy) packages it's recommended to use several
hardening flags, the default on amd64 being:

	CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
	CPPFLAGS=-D_FORTIFY_SOURCE=2
	LDFLAGS=-Wl,-z,relro

This patch doesn't fix all warnings but at least makes all programs compile
again by not using char *variables as printf format strings.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2012-10-17 00:21:52 +02:00
John Kacur 6f2665250e Move info, warn, and fatal functions to error.[ch]
Move warning, error and fatal function to the error files.
This is a first step in cleaning up rt-tests.

Signed-off-by: John Kacur <jkacur@redhat.com>
2012-03-23 02:15:19 +01:00
Carsten Emde cd34b8b172 add-smp-option-to-ptsematest.patch
Add SMP testing option (-S, --smp) to ptsematest, same as in
cyclictest.

Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Acked-by: John Kacur <jkacur@redhat.com>
2010-03-08 13:40:10 +01:00
John Kacur 2d85600632 rt-tests: Add a get_cpu() function to the library.
Add a get_cpu() function to the library.
Most platforms will simply use sched_getcpu()
However, if you have a glibc < 2.6 then
64-bits will use vsyscall for getcpu (if available).
32-bits will use getcpu() (if available)

Signed-off-by: John Kacur <jkacur@redhat.com>
2009-12-21 22:02:38 +01:00
John Kacur 5ee3c0f037 rt-tests: Makefile - Changes to unify and simplify the Makefile
- These changes simplify the Makefile. For example, notice that we no
longer need to specify the full path to the source file
- These changes also unify the Makefile, for example, every program
gets VERSION_STRING as an floating point number.
- Due to the above change I had to make a number of changes in the programs
that expected VERSION_STRING as a string.
- By unifying what we CFLAGS, to include -D_GNU_SOURCE, I had to remove
__USE_GNU which is reduncant in a number of files.

Signed-off-by: John Kacur <jkacur@redhat.com>
2009-12-21 21:08:00 +01:00
Clark Williams 1c3c9e34d6 convert source back to unix text (was DOS text)
Somehow the last set of tests added got converted to DOS text
(CRLF line terminators). Change them back

Signed-off-by: Clark Williams <williams@redhat.com>
2009-12-21 10:27:18 -06:00
John Kacur a017e969b3 Use sched_getcpu
- sched_getcpu is available since glibc 2.6
- the current tests were broken in anycase.

Signed-off-by: John Kacur <jkacur@redhat.com>
2009-12-14 16:13:09 +01:00
Carsten Emde 92b0181ce8 Add the following new tests
- ptsematest
- sigwaittest
- svsematest
- sendme

Signed-off-by: Carsten Emde <carsten.emde@osadl.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
2009-12-14 15:53:20 +01:00