Linux KERNEL TESTING signaltest

ABOUT Signal(IPC)

Signals are a limited form of inter-process communication (IPC), typically used in Unix, Unix-like, and other POSIX-compliant operating systems. A signal is an asynchronous notification sent to a process or to a specific thread within the same process in order to notify it of an event that occurred. Signals originated in 1970s Bell Labs Unix and have been more recently specified in the POSIX standard.

When a signal is sent, the operating system interrupts the target process' normal flow of execution to deliver the signal. Execution can be interrupted during any non-atomic instruction. If the process has previously registered a signal handler, that routine is executed. Otherwise, the default signal handler is executed.

TYPICAL COMMANDLINE SESSION
[bash]
$sudo ./signaltest –help
signaltest V 0.85
Usage:
signaltest <options>

-b USEC –breaktrace=USEC send break trace command when latency > USEC
-l LOOPS –loops=LOOPS number of loops: default=0(endless)
-p PRIO –prio=PRIO priority of highest prio thread
-q –quiet print only a summary on exit
-t NUM –threads=NUM number of threads: default=2
-m –mlockall lock current and future memory allocations
-v –verbose output values on stdout for statistics
format: n:c:v n=tasknum c=count v=value in us

$sudo ./signaltest -v -t 10 -l 10
0: 0: 0
0: 1: 118
0: 2: 91
0: 3: 83
0: 4: 80
0: 5: 78
0: 6: 78
0: 7: 80
0: 8: 78
0: 9: 79
$

[/bash]
LINK
https://en.wikipedia.org/wiki/Signal_(IPC)
https://www.ibm.com/developerworks/community/blogs/aimsupport/entry/Finding_the_source_of_signals_on_Linux_with_strace_auditd_or_Systemtap?lang=en

Linux KERNEL TESTING cyclictest DETAIL

ABOUT SOFTWARE TESTING

Software testing is an investigation conducted to provide stakeholders with information about the quality of the software product or service under test.[1] Software testing can also provide an objective, independent view of the software to allow the business to appreciate and understand the risks of software implementation. Test techniques include the process of executing a program or application with the intent of finding software bugs (errors or other defects), and verifying that the software product is fit for use.

TYPICAL COMMANDLINE RELATED EXPOSURE
[bash]
$sudo ./cyclictest –smp -p95 -f -b 200
# /dev/cpu_dma_latency set to 0us
INFO: debugfs mountpoint: /sys/kernel/debug/tracing/
could not set ftrace_enabled to 1
Requested tracer ” not available
could not set tracing_max_latency to 0
policy: fifo: loadavg: 0.16 0.24 0.17 1/364 16976

T: 0 (16976) P:95 I:1000 C: 2902 Min: 7 Act: 15 Avg: 20 Max: 169
# Thread Ids: 16976
# Break thread: 16976
# Break value: 246
could not set ftrace_enabled to 0
[/bash]
[bash]
$sudo ./cyclictest –smp -p95 -f -b 100
# /dev/cpu_dma_latency set to 0us
INFO: debugfs mountpoint: /sys/kernel/debug/tracing/
could not set ftrace_enabled to 1
Requested tracer ” not available
could not set tracing_max_latency to 0
policy: fifo: loadavg: 0.27 0.15 0.14 2/361 16999

T: 0 ( 0) P:95 I:1000 C: 0 Min:1000000 Act: 0 Avg: 0 Max: 0
# Thread Ids: 16999
# Break thread: 16999
# Break value: 161
could not set ftrace_enabled to 0
[/bash]
[bash]
$sudo ./cyclictest –smp -p95 -f -b 1000
# /dev/cpu_dma_latency set to 0us
INFO: debugfs mountpoint: /sys/kernel/debug/tracing/
could not set ftrace_enabled to 1
Requested tracer ” not available
could not set tracing_max_latency to 0
policy: fifo: loadavg: 0.17 0.14 0.14 3/361 17002

T: 0 (17002) P:95 I:1000 C: 35587 Min: 7 Act: 32 Avg: 20 Max: 264
^C# Thread Ids: 17002
could not set ftrace_enabled to 0
$

[/bash]
LINKS
https://events.static.linuxfound.org/sites/events/files/slides/cyclictest.pdf
https://en.wikipedia.org/wiki/Software_testing