kernel-ark/drivers/misc
Jason Wessel e8d31c204e kgdb: add kgdb internal test suite
This patch adds regression tests for testing the kgdb core and arch
specific implementation.

The kgdb test suite is designed to be built into the kernel and not as
a module because it uses a number of low level kernel and kgdb
primitives which should not be exported externally.

The kgdb test suite is designed as a KGDB I/O module which
simulates the communications that a debugger would have with kgdb.
The tests are broken up in to a line by line and referenced here as
a "get" which is kgdb requesting input and "put" which is kgdb
sending a response.

The kgdb suite can be invoked from the kernel command line
arguments system or executed dynamically at run time.  The test
suite uses the variable "kgdbts" to obtain the information about
which tests to run and to configure the verbosity level.  The
following are the various characters you can use with the kgdbts=
line:

When using the "kgdbts=" you only choose one of the following core
test types:
A = Run all the core tests silently
V1 = Run all the core tests with minimal output
V2 = Run all the core tests in debug mode

You can also specify optional tests:
N## = Go to sleep with interrupts of for ## seconds
      to test the HW NMI watchdog
F## = Break at do_fork for ## iterations
S## = Break at sys_open for ## iterations

NOTE: that the do_fork and sys_open tests are mutually exclusive.

To invoke the kgdb test suite from boot you use a kernel start
argument as follows:
	kgdbts=V1 kgdbwait
Or if you wanted to perform the NMI test for 6 seconds and do_fork
test for 100 forks, you could use:
	kgdbts=V1N6F100 kgdbwait

The test suite can also be invoked at run time with:
echo kgdbts=V1N6F100 > /sys/module/kgdbts/parameters/kgdbts
Or as another example:
echo kgdbts=V2 > /sys/module/kgdbts/parameters/kgdbts

When developing a new kgdb arch specific implementation or
using these tests for the purpose of regression testing,
several invocations are required.

1) Boot with the test suite enabled by using the kernel arguments
      "kgdbts=V1F100 kgdbwait"
   ## If kgdb arch specific implementation has NMI use
      "kgdbts=V1N6F100

2) After the system boot run the basic test.
echo kgdbts=V1 > /sys/module/kgdbts/parameters/kgdbts

3) Run the concurrency tests.  It is best to use n+1
   while loops where n is the number of cpus you have
   in your system.  The example below uses only two
   loops.

## This tests break points on sys_open
while [ 1 ] ; do find / > /dev/null 2>&1 ; done &
while [ 1 ] ; do find / > /dev/null 2>&1 ; done &
echo kgdbts=V1S10000 > /sys/module/kgdbts/parameters/kgdbts
fg # and hit control-c
fg # and hit control-c
## This tests break points on do_fork
while [ 1 ] ; do date > /dev/null ; done &
while [ 1 ] ; do date > /dev/null ; done &
echo kgdbts=V1F1000 > /sys/module/kgdbts/parameters/kgdbts
fg # and hit control-c

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 20:05:42 +02:00
..
hdpuftrs misc: fix platform driver hotplug/coldplug 2008-04-15 19:35:40 -07:00
ibmasm NULL noise: drivers/misc 2008-03-30 14:18:41 -07:00
acer-wmi.c Merge branches 'release', 'ejd', 'sony' and 'wmi' into release 2008-03-13 01:59:52 -04:00
asus-laptop.c Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2008-02-07 09:45:58 -08:00
atmel_pwm.c misc: fix platform driver hotplug/coldplug 2008-04-15 19:35:40 -07:00
atmel-ssc.c misc: fix platform driver hotplug/coldplug 2008-04-15 19:35:40 -07:00
eeprom_93cx6.c
enclosure.c [SCSI] enclosure: add support for enclosure services 2008-02-07 18:04:10 -06:00
fujitsu-laptop.c NULL noise: drivers/misc 2008-03-30 14:18:41 -07:00
intel_menlow.c intel_menlo: extract return values using PTR_ERR 2008-02-15 18:29:30 -05:00
ioc4.c
Kconfig acer-wmi: build depends on i8042 2008-03-13 00:23:48 -04:00
kgdbts.c kgdb: add kgdb internal test suite 2008-04-17 20:05:42 +02:00
lkdtm.c NULL noise: drivers/misc 2008-03-30 14:18:41 -07:00
Makefile kgdb: add kgdb internal test suite 2008-04-17 20:05:42 +02:00
msi-laptop.c Remove inclusions of <linux/autoconf.h> 2008-02-06 10:41:00 -08:00
phantom.c phantom: don't grab other devices 2008-02-06 10:41:10 -08:00
sony-laptop.c sony-laptop.c: fix off-by-one 2008-02-21 04:49:24 -05:00
tc1100-wmi.c tc1100-wmi: Add driver for HP Compaq TC1100 Tablets 2008-02-05 15:07:16 -05:00
thinkpad_acpi.c ACPI: thinkpad-acpi: fix hotkey_get_tablet_mode 2008-03-04 16:35:16 -08:00
tifm_7xx1.c tifm: clear interrupt mask bits before setting them on adapter init 2008-03-10 18:01:18 -07:00
tifm_core.c memstick: initial commit for Sony MemoryStick support 2008-02-09 11:08:34 -08:00