linux-stable/tools/testing/selftests
Shuah Khan ef9feb682d tools: fix mq_open_tests compile warnings
Fix several compile warnings - these are repeats like the ones
below:

gcc -O2 -lrt mq_open_tests.c -o mq_open_tests
mq_open_tests.c: In function ‘main’:
mq_open_tests.c:295:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘rlim_t’ [-Wformat=]
  printf("\tRLIMIT_MSGQUEUE(soft):\t\t%d\n", saved_limits.rlim_cur);
  ^
mq_open_tests.c: In function ‘shutdown’:
mq_open_tests.c:83:9: warning: ignoring return value of ‘seteuid’, declared with attribute warn_unused_result [-Wunused-result]
  seteuid(0);

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-11 18:11:18 -07:00
..
breakpoints breakpoint selftests: print failure status instead of cause make error 2012-12-17 17:15:27 -08:00
cpu-hotplug tools: cpu-hotplug fix unexpected operator error 2014-07-11 18:11:18 -07:00
efivarfs efivars: efivarfs_valid_name() should handle pstore syntax 2013-03-06 14:46:04 +00:00
ipc tools/testing/selftests/ipc/msgque.c: handle msgget failure return correctly 2014-03-10 17:26:21 -07:00
kcmp selftests: add .gitignore for kcmp 2013-07-03 16:08:07 -07:00
memory-hotplug tools: memory-hotplug fix unexpected operator error 2014-07-11 18:11:18 -07:00
mqueue tools: fix mq_open_tests compile warnings 2014-07-11 18:11:18 -07:00
net net: filter: BPF testsuite 2014-05-12 00:23:55 -04:00
powerpc selftests/powerpc: Add tests of PMU EBBs 2014-06-11 17:03:58 +10:00
ptrace selftest: add a test case for PTRACE_PEEKSIGINFO 2013-04-30 17:04:05 -07:00
rcutorture rcutorture: Note diffs from git commits 2014-05-14 09:46:25 -07:00
sysctl tools/testing/selftests/sysctl: validate sysctl_writes_strict 2014-06-06 16:08:13 -07:00
timers tools/testing/selftests: fix uninitialized variable 2013-10-16 21:35:53 -07:00
user test: check copy_to/from_user boundary validation 2014-01-23 16:36:57 -08:00
vm selftests: add .gitignore for vm 2013-07-03 16:08:07 -07:00
Makefile tools/testing/selftests/sysctl: validate sysctl_writes_strict 2014-06-06 16:08:13 -07:00
README.txt selftests: add a simple doc 2013-02-27 19:10:24 -08:00

Linux Kernel Selftests

The kernel contains a set of "self tests" under the tools/testing/selftests/
directory. These are intended to be small unit tests to exercise individual
code paths in the kernel.

Running the selftests
=====================

To build the tests:

  $ make -C tools/testing/selftests


To run the tests:

  $ make -C tools/testing/selftests run_tests

- note that some tests will require root privileges.


To run only tests targetted for a single subsystem:

  $  make -C tools/testing/selftests TARGETS=cpu-hotplug run_tests

See the top-level tools/testing/selftests/Makefile for the list of all possible
targets.


Contributing new tests
======================

In general, the rules for for selftests are

 * Do as much as you can if you're not root;

 * Don't take too long;

 * Don't break the build on any architecture, and

 * Don't cause the top-level "make run_tests" to fail if your feature is
   unconfigured.