2 # SPDX-License-Identifier: GPL-2.0
3 # description: test for the preemptirqsoff tracer
4 # requires: preemptoff:tracer irqsoff:tracer
6 MOD
=preemptirq_delay_test
28 modprobe
$MOD || unres
"$MOD module not available"
33 # Simulate preemptoff section for half a second couple of times
34 echo preemptoff
> current_tracer
36 modprobe
$MOD test_mode
=preempt delay
=500000 || fail
38 modprobe
$MOD test_mode
=preempt delay
=500000 || fail
40 modprobe
$MOD test_mode
=preempt delay
=500000 || fail
45 # Confirm which tracer
46 grep -q "tracer: preemptoff" trace || fail
48 # Check the end of the section
49 grep -E -q "5.....us : <stack trace>" trace || fail
51 # Check for 500ms of latency
52 grep -E -q "latency: 5..... us" trace || fail
56 # Simulate irqsoff section for half a second couple of times
57 echo irqsoff
> current_tracer
59 modprobe
$MOD test_mode
=irq delay
=500000 || fail
61 modprobe
$MOD test_mode
=irq delay
=500000 || fail
63 modprobe
$MOD test_mode
=irq delay
=500000 || fail
68 # Confirm which tracer
69 grep -q "tracer: irqsoff" trace || fail
71 # Check the end of the section
72 grep -E -q "5.....us : <stack trace>" trace || fail
74 # Check for 500ms of latency
75 grep -E -q "latency: 5..... us" trace || fail