================================================================================
selftests: ftracetest
========================================
=== Ftrace unit tests ===
[1] Basic trace file check [FAIL]
[2] Basic test for tracers [FAIL]
[3] Basic trace clock test [FAIL]
[4] Basic event tracing check [FAIL]
[5] Snapshot and tracing setting [FAIL]
[6] event tracing - enable/disable with event level files [FAIL]
[7] event tracing - restricts events based on pid [FAIL]
[8] event tracing - enable/disable with subsystem level files [FAIL]
[9] event tracing - enable/disable with top level files [FAIL]
[10] ftrace - function graph filters with stack tracer [FAIL]
[11] ftrace - function graph filters [FAIL]
[12] ftrace - function pid filters [FAIL]
[13] ftrace - test for function event triggers [FAIL]
[14] ftrace - function profiler with function tracing [FAIL]
[15] ftrace - test reading of set_ftrace_filter [FAIL]
[16] ftrace - test for function traceon/off triggers [FAIL]
[17] Test creation and deletion of trace instances while setting an event [FAIL]
[18] Test creation and deletion of trace instances [FAIL]
[19] Kprobe dynamic event - adding and removing [FAIL]
[20] Kprobe dynamic event - busy event check [FAIL]
[21] Kprobe dynamic event with arguments [FAIL]
[22] Kprobe event string type argument [FAIL]
[23] Kprobe event argument syntax [FAIL]
[24] Kprobes event arguments with types [FAIL]
[25] Kprobe event auto/manual naming [FAIL]
[26] Kprobe dynamic event with function tracer [FAIL]
[27] Kretprobe dynamic event with arguments [FAIL]
[28] Kretprobe dynamic event with maxactive [FAIL]
[29] Register/unregister many kprobe events [FAIL]
[30] event trigger - test multiple actions on hist trigger [FAIL]
[31] event trigger - test synthetic_events syntax parser [FAIL]
[32] event trigger - test event enable/disable trigger [FAIL]
[33] event trigger - test trigger filter [FAIL]
[34] event trigger - test histogram modifiers [FAIL]
[35] event trigger - test multiple histogram triggers [FAIL]
[36] event trigger - test snapshot-trigger [FAIL]
[37] event trigger - test stacktrace-trigger [FAIL]
[38] event trigger - test traceon/off trigger [FAIL]
[39] (instance) Basic test for tracers [FAIL]
[40] (instance) Basic trace clock test [FAIL]
[41] (instance) Snapshot and tracing setting [FAIL]
[42] (instance) event tracing - enable/disable with event level files [FAIL]
[43] (instance) event tracing - restricts events based on pid [FAIL]
[44] (instance) event tracing - enable/disable with subsystem level files [FAIL]
[45] (instance) ftrace - test for function event triggers [FAIL]
[46] (instance) ftrace - test for function traceon/off triggers [FAIL]
[47] (instance) event trigger - test event enable/disable trigger [FAIL]
[48] (instance) event trigger - test trigger filter [FAIL]
[49] (instance) event trigger - test histogram modifiers [FAIL]
[50] (instance) event trigger - test multiple histogram triggers [FAIL]
# of passed: 0
# of failed: 50
# of unresolved: 0
# of untested: 0
# of unsupported: 0
# of xfailed: 0
# of undefined(test bug): 0
not ok 1..1 selftests: ftracetest [FAIL]
================================================================================
After some debugging I've found out that the testcases are not actually run, the failure happens while running 'tools/testing/selftests/ftrace/test.d/functions:initialize_ftrace()', on the following line:
[ -f set_ftrace_filter ] && echo | tee set_ftrace_*
After a reboot for clean ftrace state, with kernel 4.15.0-168-generic:
root@kleber-bionic:/sys/kernel/debug/tracing# head set_ftrace_*
head: cannot open 'set_ftrace_filter' for reading: No such device
head: cannot open 'set_ftrace_notrace' for reading: No such device
==> set_ftrace_pid <==
no pid
With kernel 4.15.0-167-generic:
root@kleber-bionic-2:/sys/kernel/debug/tracing# head set_ftrace_*
==> set_ftrace_filter <==
#### all functions enabled ####
==> set_ftrace_notrace <==
#### no functions disabled ####
All ftrace tests from selftests are failing with bionic:linux 4.15.0-168.176 on s390x:
https:/ /autopkgtest. ubuntu. com/results/ autopkgtest- bionic/ bionic/ s390x/l/ linux/20220201_ 190955_ 5689e@/ log.gz
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= === ======= ======= ======= ======= =====
selftests: ftracetest
=======
=== Ftrace unit tests ===
[1] Basic trace file check [FAIL]
[2] Basic test for tracers [FAIL]
[3] Basic trace clock test [FAIL]
[4] Basic event tracing check [FAIL]
[5] Snapshot and tracing setting [FAIL]
[6] event tracing - enable/disable with event level files [FAIL]
[7] event tracing - restricts events based on pid [FAIL]
[8] event tracing - enable/disable with subsystem level files [FAIL]
[9] event tracing - enable/disable with top level files [FAIL]
[10] ftrace - function graph filters with stack tracer [FAIL]
[11] ftrace - function graph filters [FAIL]
[12] ftrace - function pid filters [FAIL]
[13] ftrace - test for function event triggers [FAIL]
[14] ftrace - function profiler with function tracing [FAIL]
[15] ftrace - test reading of set_ftrace_filter [FAIL]
[16] ftrace - test for function traceon/off triggers [FAIL]
[17] Test creation and deletion of trace instances while setting an event [FAIL]
[18] Test creation and deletion of trace instances [FAIL]
[19] Kprobe dynamic event - adding and removing [FAIL]
[20] Kprobe dynamic event - busy event check [FAIL]
[21] Kprobe dynamic event with arguments [FAIL]
[22] Kprobe event string type argument [FAIL]
[23] Kprobe event argument syntax [FAIL]
[24] Kprobes event arguments with types [FAIL]
[25] Kprobe event auto/manual naming [FAIL]
[26] Kprobe dynamic event with function tracer [FAIL]
[27] Kretprobe dynamic event with arguments [FAIL]
[28] Kretprobe dynamic event with maxactive [FAIL]
[29] Register/unregister many kprobe events [FAIL]
[30] event trigger - test multiple actions on hist trigger [FAIL]
[31] event trigger - test synthetic_events syntax parser [FAIL]
[32] event trigger - test event enable/disable trigger [FAIL]
[33] event trigger - test trigger filter [FAIL]
[34] event trigger - test histogram modifiers [FAIL]
[35] event trigger - test multiple histogram triggers [FAIL]
[36] event trigger - test snapshot-trigger [FAIL]
[37] event trigger - test stacktrace-trigger [FAIL]
[38] event trigger - test traceon/off trigger [FAIL]
[39] (instance) Basic test for tracers [FAIL]
[40] (instance) Basic trace clock test [FAIL]
[41] (instance) Snapshot and tracing setting [FAIL]
[42] (instance) event tracing - enable/disable with event level files [FAIL]
[43] (instance) event tracing - restricts events based on pid [FAIL]
[44] (instance) event tracing - enable/disable with subsystem level files [FAIL]
[45] (instance) ftrace - test for function event triggers [FAIL]
[46] (instance) ftrace - test for function traceon/off triggers [FAIL]
[47] (instance) event trigger - test event enable/disable trigger [FAIL]
[48] (instance) event trigger - test trigger filter [FAIL]
[49] (instance) event trigger - test histogram modifiers [FAIL]
[50] (instance) event trigger - test multiple histogram triggers [FAIL]
# of passed: 0 ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ===
# of failed: 50
# of unresolved: 0
# of untested: 0
# of unsupported: 0
# of xfailed: 0
# of undefined(test bug): 0
not ok 1..1 selftests: ftracetest [FAIL]
=======
After some debugging I've found out that the testcases are not actually run, the failure happens while running 'tools/ testing/ selftests/ ftrace/ test.d/ functions: initialize_ ftrace( )', on the following line:
[ -f set_ftrace_filter ] && echo | tee set_ftrace_*
After a reboot for clean ftrace state, with kernel 4.15.0-168-generic:
root@kleber- bionic: /sys/kernel/ debug/tracing# head set_ftrace_* notrace' for reading: No such device
head: cannot open 'set_ftrace_filter' for reading: No such device
head: cannot open 'set_ftrace_
==> set_ftrace_pid <==
no pid
With kernel 4.15.0-167-generic:
root@kleber- bionic- 2:/sys/ kernel/ debug/tracing# head set_ftrace_*
==> set_ftrace_filter <==
#### all functions enabled ####
==> set_ftrace_notrace <==
#### no functions disabled ####
==> set_ftrace_pid <==
no pid