Commit Graph

262 Commits

Author SHA1 Message Date
John Kacur 88449adc30 rt-tests: Automatically generate dependencies.
Automatically generate dependencies. This will tell the make file that
cyclictest is dependent on rt_numa.h for example, and that if a change
is made there, then cyclictest needs to be remade.

Signed-off-by: John Kacur <jkacur@redhat.com>
2010-01-27 21:12:06 +01:00
John Kacur db54b6152a rt-tests: Fix some style problems, such as spaces instead of tabs.
Fix some style problems, such as spaces instead of tabs, trailing spaces,
spaces required before }

Signed-off-by: John Kacur <jkacur@redhat.com>
2010-01-27 20:17:15 +01:00
John Kacur 522560b82f rt-tests: Remove the ret variable, the end label and the goto.
Remove the ret variable, the end lable and the goto. We already have
inconsistent exit points for the function, and the end lable wasn't strictly
for errors. Directly returning simplifies and shortens the code.

Signed-off-by: John Kacur <jkacur@redhat.com>
2010-01-27 19:47:03 +01:00
John Kacur 51dfab754a rt-tests: Separate the #ifdef LIBNUMA_API_VERSION functions.
Separate the #ifdef LIBNUMA_API_VERSION of function rt_numa_numa_node_of_cpu,
it is slightly cleaner this way.

Signed-off-by: John Kacur <jkacur@redhat.com>
2010-01-27 19:42:50 +01:00
John Kacur 29c4f544fb rt-tests: Add header including copyright notice to rt_numa.h
Add a header which includes a copyright notice to rt_numa.h for cyclictest.

Signed-off-by: John Kacur <jkacur@redhat.com>
2010-01-27 19:38:15 +01:00
Clark Williams 94839e793e fix missing BuildRequires for numactl-devel
Signed-off-by: Clark Williams <williams@redhat.com>
2010-01-27 10:11:22 -06:00
Clark Williams 9306dab499 version bump to 0.63
Signed-off-by: Clark Williams <williams@redhat.com>
2010-01-27 09:51:02 -06:00
Clark Williams fedb3c7bc5 added libnuma v1 API support
Modified NUMA code to handle version 1 API (for RHEL5)

Signed-off-by: Clark Williams <williams@redhat.com>
2010-01-26 22:31:58 -06:00
Clark Williams 5384bcd747 version bump to 0.62
Signed-off-by: Clark Williams <williams@redhat.com>
2010-01-26 13:46:14 -06:00
Clark Williams 20ece7f8a1 fixed numa compile and added numa option to usage printout
Added NUMA=1 to specfile build command line to enable NUMA
options. Added description of --numa option to usage output.

Signed-off-by: Clark Williams <williams@redhat.com>
2010-01-26 12:24:54 -06:00
Uwe Kleine-König 1bb1e65265 Add copyright statements to files in src/lib
Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: John Kacur <jkacur@redhat.com>
Cc: Carsten Emde <carsten.emde@osadl.org>
2010-01-26 12:24:44 -06:00
Clark Williams a1a0609561 moved hwlatdetect to python site-library
Moved the hwlatdetect script to the python site-library directory
so that it can be imported by other scripts

Signed-off-by: Clark Williams <williams@redhat.com>
2010-01-26 12:23:49 -06:00
GeunSik Lim 8947c646fe rt-tests: Support static linking by reordering the link flags in LIBS
Some embedded developers cross-compile the tests with the -static link flag.
Reordering the link flags in LIBS to put -lrt before -lpthread is necessary,
else you get undefined references to pthread calls.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Clark Williams <williams@redhat.com>
2010-01-26 12:14:30 -06:00
Clark Williams 582be2a52c simplify equal priority logic for cyclictest
use a variable to indicate that priorities should be equal
on all cpus when smp, numa or histogram options are specified.

Signed-off-by: Clark Williams <williams@redhat.com>
2010-01-26 12:14:21 -06:00
John Kacur 761911503c rt-tests: Make cyclic test compilable for non-numa systems.
Runtime tests are not sufficient, cyclic tests needs to be compilable
on non-numa systems.

This separates numa functionality into rt_numa.h

Signed-off-by: John Kacur <jkacur@redhat.com>
2010-01-26 12:14:02 -06:00
John Kacur 9f4edeb601 rt-tests: Makefile: Add NUMA compile option.
This adds a NUMA compile option, and links to numa only for the tests that
need it. (Currently that is only cyclictest)

If you want to build with the NUMA feature, then define NUMA to anything.
Eg., make NUMA=1

This only adds support to the Makefile. Further patches are required
to make this work in cyclictest itself.

Signed-off-by: John Kacur <jkacur@redhat.com>
2010-01-26 12:13:47 -06:00
Clark Williams db0988a070 setup equal priorities on all cpus in numa mode in cyclictest
Signed-off-by: Clark Williams <williams@redhat.com>
2010-01-26 12:13:33 -06:00
Clark Williams 6c66beba0a fixed missing reference to outpar label
added back reference to outpar label in allocation failure for
statistics array (got dropped in previous two commits).

Signed-off-by: Clark Williams <williams@redhat.com>
2010-01-26 12:13:13 -06:00
Clark Williams 9345a49ac8 added threadalloc/threadfree for thread memmory manipulation
refactored numa allocation logic into threadalloc() and added
threadfree() for releasing it.

Signed-off-by: Clark Williams <williams@redhat.com>
2010-01-26 12:13:00 -06:00
Clark Williams cb5d2b4ca0 added numa logic to cyclictest
Modify cyclictest to have a --numa option which enables calls into
libnuma functions for binding threads to memory nodes.

Signed-off-by: Clark Williams <williams@redhat.com>
2010-01-26 12:12:37 -06:00
Clark Williams edb2443d01 version bump to 0.61
Signed-off-by: Clark Williams <williams@redhat.com>
2010-01-13 10:58:26 -06:00
Clark Williams a548d8fc80 fixed missing short option 'S' in getopt_long() call
Signed-off-by: Clark Williams <williams@redhat.com>
2010-01-13 10:57:28 -06:00
Clark Williams 77abded073 added SMP testing option and make use of new diag functions
Added the --smp (-S) option which is short hand for setting
the options -t, -a, and -n and for not changing any specified
priority across processors.

Also changed many printfs to use either warn() or fatal()

Signed-off-by: Clark Williams <williams@redhat.com>
2010-01-13 10:45:00 -06:00
Clark Williams 2bf1bce58c added merge to master step in release checklist
Signed-off-by: Clark Williams <williams@redhat.com>
2010-01-13 10:44:00 -06:00
Clark Williams 99d07bebf3 added warn() and fatal() routines
Added routines to print warning and fatal messages with appropriate
text prefixes (e.g. WARNING: and FATAL: )

Signed-off-by: Clark Williams <williams@redhat.com>
2010-01-13 10:42:35 -06:00
Clark Williams 015025fb4d version bump to 0.60 2009-12-29 12:30:53 -06:00
Michael Olbrich f1619c5c19 cyclictest: add command line option for unbuffered output
When reading the output from cyclictest with another program, the data is
buffered by default. This prevents nice 'live' display.
This patch adds an command line option to force the output to always be
unbuffered.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Clark Williams <williams@redhat.com>
2009-12-29 12:23:27 -06:00
Carsten Emde 2fc5d42f86 rt-tests: Add a new test pip - priority inheritance with processes
John,

When creating an RPM package with the newly provided test pip, the message
error: Installed (but unpackaged) file(s) found:
   /usr/bin/pip
appeared, and rpmbuild refused to finish building the package.

	Carsten.

-=--------------------------------------------------------------------=-

Prevent rpmbuild from finding installed but unpackaged files.

Signed-off-by: Carsten Emde <C.Emde@osadl.org>
2009-12-24 00:19:07 +01:00
John Kacur 7e2594ba90 rt-tests: Add a "make tags" option.
Add a "make tags" option to the Makefile

Signed-off-by: John Kacur <jkacur@redhat.com>
2009-12-23 16:50:37 +01:00
John Kacur 20b8b253f3 rt-tests: pip - Use check_privs() from the rt-utils library.
Use check_privs() from the rt-utils library to make sure that the user is
running with real-time privileges for the pip test program.

Signed-off-by: John Kacur <jkacur@redhat.com>
2009-12-23 16:41:12 +01:00
John Kacur 3dec3c9e04 rt-tests: Move header files from src/lib to src/include
Move header files from src/lib to src/include and adjust the Makefile to
reflect this change.

Signed-off-by: John Kacur <jkacur@redhat.com>
2009-12-23 16:26:49 +01:00
John Kacur 3b0dcdaefc rt-tests: Add a new test pip - priority inheritance with processes
This test is similar to pi_stress in that it purpursely triggers a priority-
inversion. However, instead of using pthreads it uses processes.
Since pthread_mutex_t are the only objects backed by priority inheritance
this is accomplished by having the processes use a pthread_mutex_t in
shared memory. See the header of pip.c for more information as well as the
code of course.

In addition this patch starts a src/include directory as a common place
to put header files.

Signed-off-by: John Kacur <jkacur@redhat.com>
2009-12-23 16:01:17 +01:00
John Kacur aee58a288f rt-tests: Add error routines to the library
Add error routines, similar to those found in Advanced Programming in the
UNIX Environment 2nd ed. for use by all rt test programs

Signed-off-by: John Kacur <jkacur@redhat.com>
2009-12-23 14:43:54 +01:00
Clark Williams 3115847ca0 version bump to 0.59
Signed-off-by: Clark Williams <williams@redhat.com>
2009-12-22 16:27:15 -06:00
Clark Williams 8ab7958d06 deleted classic_pi program
classic_pi was the original proof of concept for a Priority
Inheritance mutex demonstration, but pi_stress does that much
better now.

Signed-off-by: Clark Williams <williams@redhat.com>
2009-12-22 16:22:11 -06:00
John Kacur d3f77dcefc rt-tests: Add help screen info about -M / refresh_on_max in cyclictest
Signed-off-by: David Sommerseth <davids@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2009-12-22 22:54:00 +01:00
David Sommerseth 61b1309285 Missing parsing of --mlockall in signaltest
Signed-off-by: David Sommerseth <davids@redhat.com>
2009-12-22 21:54:37 +01:00
David Sommerseth 2e2c1eb6ae Fixed missing parsing of short arguments in classic_pi (David)
- Added the '+' back to the arguments (John)

Signed-off-by: David Sommerseth <davids@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2009-12-22 21:42:28 +01:00
Carsten Emde 77c00420d0 rt-tests: Better explanation in the kernel module
Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
2009-12-22 00:58:59 +01:00
John Kacur b1ff404d55 rt-tests: Clean-up, Fix the comment part of the #endif protecting include files
Clean-up, Fix the comment part of the #endif protecting include files

Signed-off-by: John Kacur <jkacur@redhat.com>
2009-12-22 00:43:04 +01:00
Clark Williams c663bf76dd version bump to 0.58 2009-12-21 16:11:09 -06:00
Clark Williams e3c3bab1c6 fixed missing function invocation in cyclictest
Added missing () to get_debugfileprefix in cyclictest.

Signed-off-by: Clark Williams <williams@redhat.com>
2009-12-21 16:04:41 -06:00
Clark Williams 1c6c589606 move guard macros into implementor namespace
renamed the guard macros in rt-get_cpu.h and rt-utils.h to
have leading double underscores which takes them out of the
application namespace. Also changed a '.' in the rt-get_cpu.h
guard macro to an underscore.

Signed-off-by: Clark Williams <williams@redhat.com>
2009-12-21 16:02:21 -06:00
Carsten Emde d6e8606c24 Completely remove VERSION_STRING until we have a better solution.
Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
2009-12-21 22:36:55 +01:00
John Kacur 738ab3ea95 rt-tests: Clean-up - protect rt-utils.h
Clean-up: Protect rt-utils.h with #ifndef RT_UTILS_H

Signed-off-by: John Kacur <jkacur@redhat.com>
2009-12-21 22:17:59 +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
John Kacur 273aa36231 Merge remote branch 'clrk/master' into rt-tests-dev
Conflicts:
	src/backfire/sendme.c
2009-12-21 17:48:20 +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 2e1f658161 Merge commit 'clrk/master' into rt-tests-dev
Conflicts:
	rt-tests.spec-in
2009-12-15 23:21:00 +01:00