Skip to content

Commit bea24f7

Browse files
Tom Zanussirostedt
authored andcommitted
selftests/ftrace: Distinguish between hist and synthetic event checks
With synthetic events now a separate config item as a result of 'tracing: Move synthetic events to a separate file', tests that use both need to explicitly check for hist trigger support rather than relying on hist triggers to pull in synthetic events. Add an additional hist trigger check to all the trigger tests that now require it, otherwise they'll fail if synthetic events but not hist triggers are enabled. Link: http://lkml.kernel.org/r/af36c539006ef2768114b4ed38e6b054f7c7a3bd.1590693308.git.zanussi@kernel.org Acked-by: Masami Hiramatsu <[email protected]> Signed-off-by: Tom Zanussi <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent 726721a commit bea24f7

8 files changed

+40
-0
lines changed

tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-field-variable-support.tc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ if [ ! -f synthetic_events ]; then
1717
exit_unsupported
1818
fi
1919

20+
if [ ! -f events/sched/sched_process_fork/hist ]; then
21+
echo "hist trigger is not supported"
22+
exit_unsupported
23+
fi
24+
2025
echo "Test field variable support"
2126

2227
echo 'wakeup_latency u64 lat; pid_t pid; int prio; char comm[16]' > synthetic_events

tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-inter-event-combined-hist.tc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ if [ ! -f synthetic_events ]; then
1717
exit_unsupported
1818
fi
1919

20+
if [ ! -f events/sched/sched_process_fork/hist ]; then
21+
echo "hist trigger is not supported"
22+
exit_unsupported
23+
fi
24+
2025
echo "Test create synthetic event"
2126

2227
echo 'waking_latency u64 lat pid_t pid' > synthetic_events

tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-multi-actions-accept.tc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ if [ ! -f synthetic_events ]; then
1717
exit_unsupported
1818
fi
1919

20+
if [ ! -f events/sched/sched_process_fork/hist ]; then
21+
echo "hist trigger is not supported"
22+
exit_unsupported
23+
fi
24+
2025
echo "Test multiple actions on hist trigger"
2126
echo 'wakeup_latency u64 lat; pid_t pid' >> synthetic_events
2227
TRIGGER1=events/sched/sched_wakeup/trigger

tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmatch-action-hist.tc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ if [ ! -f synthetic_events ]; then
1717
exit_unsupported
1818
fi
1919

20+
if [ ! -f events/sched/sched_process_fork/hist ]; then
21+
echo "hist trigger is not supported"
22+
exit_unsupported
23+
fi
24+
2025
echo "Test create synthetic event"
2126

2227
echo 'wakeup_latency u64 lat pid_t pid char comm[16]' > synthetic_events

tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmatch-onmax-action-hist.tc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ if [ ! -f synthetic_events ]; then
1717
exit_unsupported
1818
fi
1919

20+
if [ ! -f events/sched/sched_process_fork/hist ]; then
21+
echo "hist trigger is not supported"
22+
exit_unsupported
23+
fi
24+
2025
echo "Test create synthetic event"
2126

2227
echo 'wakeup_latency u64 lat pid_t pid char comm[16]' > synthetic_events

tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmax-action-hist.tc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ if [ ! -f synthetic_events ]; then
1717
exit_unsupported
1818
fi
1919

20+
if [ ! -f events/sched/sched_process_fork/hist ]; then
21+
echo "hist trigger is not supported"
22+
exit_unsupported
23+
fi
24+
2025
echo "Test create synthetic event"
2126

2227
echo 'wakeup_latency u64 lat pid_t pid char comm[16]' > synthetic_events

tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-snapshot-action-hist.tc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ if [ ! -f set_event ]; then
1212
exit_unsupported
1313
fi
1414

15+
if [ ! -f events/sched/sched_process_fork/hist ]; then
16+
echo "hist trigger is not supported"
17+
exit_unsupported
18+
fi
19+
1520
if [ ! -f snapshot ]; then
1621
echo "snapshot is not supported"
1722
exit_unsupported

tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-trace-action-hist.tc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ if [ ! -f synthetic_events ]; then
1717
exit_unsupported
1818
fi
1919

20+
if [ ! -f events/sched/sched_process_fork/hist ]; then
21+
echo "hist trigger is not supported"
22+
exit_unsupported
23+
fi
24+
2025
grep -q "trace(<synthetic_event>" README || exit_unsupported # version issue
2126

2227
echo "Test create synthetic event"

0 commit comments

Comments
 (0)