The selftests: user_events tests failed on all devices and all architectures.
Test log: --------- kselftest: Running tests in user_events TAP version 13 1..4 # timeout set to 90 # selftests: user_events: ftrace_test # TAP version 13 # 1..6 # # Starting 6 tests from 1 test cases. # # RUN user.register_events ... # # ftrace_test.c:210:register_events:Expected -1 (-1) != self->status_fd (-1) # # register_events: Test terminated by assertion # # FAIL user.register_events # not ok 1 user.register_events # # RUN user.write_events ... # # ftrace_test.c:210:write_events:Expected -1 (-1) != self->status_fd (-1) # # write_events: Test terminated by assertion # # FAIL user.write_events # not ok 2 user.write_events # # RUN user.write_empty_events ... # # ftrace_test.c:210:write_empty_events:Expected -1 (-1) != self->status_fd (-1) # # write_empty_events: Test terminated by assertion # # FAIL user.write_empty_events # not ok 3 user.write_empty_events # # RUN user.write_fault ... # # ftrace_test.c:210:write_fault:Expected -1 (-1) != self->status_fd (-1) # # write_fault: Test terminated by assertion # # FAIL user.write_fault # not ok 4 user.write_fault # # RUN user.write_validator ... # # ftrace_test.c:210:write_validator:Expected -1 (-1) != self->status_fd (-1) # # write_validator: Test terminated by assertion # # FAIL user.write_validator # not ok 5 user.write_validator # # RUN user.print_fmt ... # # ftrace_test.c:210:print_fmt:Expected -1 (-1) != self->status_fd (-1) # # print_fmt: Test terminated by assertion # # FAIL user.print_fmt # not ok 6 user.print_fmt # # FAILED: 0 / 6 tests passed. # # Totals: pass:0 fail:6 xfail:0 xpass:0 skip:0 error:0 not ok 1 selftests: user_events: ftrace_test # exit=1 # timeout set to 90 # selftests: user_events: dyn_test # TAP version 13 # 1..4 # # Starting 4 tests from 1 test cases. # # RUN user.basic_types ... # # dyn_test.c:157:basic_types:Expected -1 (-1) != parse(&self->check, "u:__test_event u64 a") (-1) # # basic_types: Test terminated by assertion # # FAIL user.basic_types # not ok 1 user.basic_types # # RUN user.loc_types ... # # dyn_test.c:181:loc_types:Expected -1 (-1) != parse(&self->check, "u:__test_event __data_loc char[] a") (-1) # # loc_types: Test terminated by assertion # # FAIL user.loc_types # not ok 2 user.loc_types # # RUN user.size_types ... # # dyn_test.c:189:size_types:Expected -1 (-1) != parse(&self->check, "u:__test_event struct custom a 20") (-1) # # size_types: Test terminated by assertion # # FAIL user.size_types # not ok 3 user.size_types # # RUN user.matching ... # # dyn_test.c:199:matching:Expected -1 (-1) != check_match(&self->check, "__test_event u32 a", "__test_event u32 a", &match) (-1) # # matching: Test terminated by assertion # # FAIL user.matching # not ok 4 user.matching # # FAILED: 0 / 4 tests passed. # # Totals: pass:0 fail:4 xfail:0 xpass:0 skip:0 error:0 not ok 2 selftests: user_events: dyn_test # exit=1 # timeout set to 90 # selftests: user_events: perf_test # TAP version 13 # 1..2 # # Starting 2 tests from 1 test cases. # # RUN user.perf_write ... # # perf_test.c:117:perf_write:Expected -1 (-1) != self->data_fd (-1) # # perf_write: Test terminated by assertion # # FAIL user.perf_write # not ok 1 user.perf_write # # RUN user.perf_empty_events ... # # perf_test.c:117:perf_empty_events:Expected -1 (-1) != self->data_fd (-1) # # perf_empty_events: Test terminated by assertion # # FAIL user.perf_empty_events # not ok 2 user.perf_empty_events # # FAILED: 0 / 2 tests passed. # # Totals: pass:0 fail:2 xfail:0 xpass:0 skip:0 error:0 not ok 3 selftests: user_events: perf_test # exit=1 # timeout set to 90 # selftests: user_events: abi_test # TAP version 13 # 1..4 # # Starting 4 tests from 1 test cases. # # RUN user.enablement ... # # abi_test.c:106:enablement:Expected 0 (0) == reg_enable(&self->check, sizeof(int), 0) (-1) # # enablement: Test terminated by assertion # # FAIL user.enablement # not ok 1 user.enablement # # RUN user.bit_sizes ... # # abi_test.c:126:bit_sizes:Expected 0 (0) == reg_enable(&self->check, sizeof(int), 0) (-1) # # bit_sizes: Test terminated by assertion # # FAIL user.bit_sizes # not ok 2 user.bit_sizes # # RUN user.forks ... # # abi_test.c:154:forks:Expected 0 (0) == reg_enable(&self->check, sizeof(int), 0) (-1) # # forks: Test terminated by assertion # # FAIL user.forks # not ok 3 user.forks # # RUN user.clones ... # # abi_test.c:212:clones:Expected 0 (0) == reg_enable(&self->check, sizeof(int), 0) (-1) # # clones: Test terminated by assertion # # FAIL user.clones # not ok 4 user.clones # # FAILED: 0 / 4 tests passed. # # Totals: pass:0 fail:4 xfail:0 xpass:0 skip:0 error:0 not ok 4 selftests: user_events: abi_test # exit=1
Links: - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230906/tes... - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230906/tes... - https://storage.tuxsuite.com/public/linaro/lkft/builds/2V0Oq00RB2Cvog83Dw4Gg...
-- Linaro LKFT https://lkft.linaro.org
On Wed, Sep 06, 2023 at 03:59:32PM +0530, Naresh Kamboju wrote:
The selftests: user_events tests failed on all devices and all architectures.
According to the config at [1] CONFIG_USER_EVENTS is not set, so these self tests will fail without the feature enabled: # CONFIG_USER_EVENTS is not set
What is the expected behavior of self tests if run without their feature enabled? Is it expected these should skip vs fail in that case?
Thanks, -Beau
1. https://storage.tuxsuite.com/public/linaro/lkft/builds/2V0Oq00RB2Cvog83Dw4Gg...
Test log:
kselftest: Running tests in user_events TAP version 13 1..4 # timeout set to 90 # selftests: user_events: ftrace_test # TAP version 13 # 1..6 # # Starting 6 tests from 1 test cases. # # RUN user.register_events ... # # ftrace_test.c:210:register_events:Expected -1 (-1) != self->status_fd (-1) # # register_events: Test terminated by assertion # # FAIL user.register_events # not ok 1 user.register_events # # RUN user.write_events ... # # ftrace_test.c:210:write_events:Expected -1 (-1) != self->status_fd (-1) # # write_events: Test terminated by assertion # # FAIL user.write_events # not ok 2 user.write_events # # RUN user.write_empty_events ... # # ftrace_test.c:210:write_empty_events:Expected -1 (-1) != self->status_fd (-1) # # write_empty_events: Test terminated by assertion # # FAIL user.write_empty_events # not ok 3 user.write_empty_events # # RUN user.write_fault ... # # ftrace_test.c:210:write_fault:Expected -1 (-1) != self->status_fd (-1) # # write_fault: Test terminated by assertion # # FAIL user.write_fault # not ok 4 user.write_fault # # RUN user.write_validator ... # # ftrace_test.c:210:write_validator:Expected -1 (-1) != self->status_fd (-1) # # write_validator: Test terminated by assertion # # FAIL user.write_validator # not ok 5 user.write_validator # # RUN user.print_fmt ... # # ftrace_test.c:210:print_fmt:Expected -1 (-1) != self->status_fd (-1) # # print_fmt: Test terminated by assertion # # FAIL user.print_fmt # not ok 6 user.print_fmt # # FAILED: 0 / 6 tests passed. # # Totals: pass:0 fail:6 xfail:0 xpass:0 skip:0 error:0 not ok 1 selftests: user_events: ftrace_test # exit=1 # timeout set to 90 # selftests: user_events: dyn_test # TAP version 13 # 1..4 # # Starting 4 tests from 1 test cases. # # RUN user.basic_types ... # # dyn_test.c:157:basic_types:Expected -1 (-1) != parse(&self->check, "u:__test_event u64 a") (-1) # # basic_types: Test terminated by assertion # # FAIL user.basic_types # not ok 1 user.basic_types # # RUN user.loc_types ... # # dyn_test.c:181:loc_types:Expected -1 (-1) != parse(&self->check, "u:__test_event __data_loc char[] a") (-1) # # loc_types: Test terminated by assertion # # FAIL user.loc_types # not ok 2 user.loc_types # # RUN user.size_types ... # # dyn_test.c:189:size_types:Expected -1 (-1) != parse(&self->check, "u:__test_event struct custom a 20") (-1) # # size_types: Test terminated by assertion # # FAIL user.size_types # not ok 3 user.size_types # # RUN user.matching ... # # dyn_test.c:199:matching:Expected -1 (-1) != check_match(&self->check, "__test_event u32 a", "__test_event u32 a", &match) (-1) # # matching: Test terminated by assertion # # FAIL user.matching # not ok 4 user.matching # # FAILED: 0 / 4 tests passed. # # Totals: pass:0 fail:4 xfail:0 xpass:0 skip:0 error:0 not ok 2 selftests: user_events: dyn_test # exit=1 # timeout set to 90 # selftests: user_events: perf_test # TAP version 13 # 1..2 # # Starting 2 tests from 1 test cases. # # RUN user.perf_write ... # # perf_test.c:117:perf_write:Expected -1 (-1) != self->data_fd (-1) # # perf_write: Test terminated by assertion # # FAIL user.perf_write # not ok 1 user.perf_write # # RUN user.perf_empty_events ... # # perf_test.c:117:perf_empty_events:Expected -1 (-1) != self->data_fd (-1) # # perf_empty_events: Test terminated by assertion # # FAIL user.perf_empty_events # not ok 2 user.perf_empty_events # # FAILED: 0 / 2 tests passed. # # Totals: pass:0 fail:2 xfail:0 xpass:0 skip:0 error:0 not ok 3 selftests: user_events: perf_test # exit=1 # timeout set to 90 # selftests: user_events: abi_test # TAP version 13 # 1..4 # # Starting 4 tests from 1 test cases. # # RUN user.enablement ... # # abi_test.c:106:enablement:Expected 0 (0) == reg_enable(&self->check, sizeof(int), 0) (-1) # # enablement: Test terminated by assertion # # FAIL user.enablement # not ok 1 user.enablement # # RUN user.bit_sizes ... # # abi_test.c:126:bit_sizes:Expected 0 (0) == reg_enable(&self->check, sizeof(int), 0) (-1) # # bit_sizes: Test terminated by assertion # # FAIL user.bit_sizes # not ok 2 user.bit_sizes # # RUN user.forks ... # # abi_test.c:154:forks:Expected 0 (0) == reg_enable(&self->check, sizeof(int), 0) (-1) # # forks: Test terminated by assertion # # FAIL user.forks # not ok 3 user.forks # # RUN user.clones ... # # abi_test.c:212:clones:Expected 0 (0) == reg_enable(&self->check, sizeof(int), 0) (-1) # # clones: Test terminated by assertion # # FAIL user.clones # not ok 4 user.clones # # FAILED: 0 / 4 tests passed. # # Totals: pass:0 fail:4 xfail:0 xpass:0 skip:0 error:0 not ok 4 selftests: user_events: abi_test # exit=1
Links:
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230906/tes...
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230906/tes...
- https://storage.tuxsuite.com/public/linaro/lkft/builds/2V0Oq00RB2Cvog83Dw4Gg...
-- Linaro LKFT https://lkft.linaro.org
On Wed, 6 Sep 2023 17:02:19 +0100 Mark Brown broonie@kernel.org wrote:
On Wed, Sep 06, 2023 at 08:39:22AM -0700, Beau Belgrave wrote:
What is the expected behavior of self tests if run without their feature enabled? Is it expected these should skip vs fail in that case?
Yes, tests should skip if preconditions for running them aren't met.
Yep, see how the ftrace selftests run. If it is determined that the feature is not present, it simple returns UNSUPPORTED and not FAILED.
-- Steve
On Wed, Sep 06, 2023 at 12:28:22PM -0400, Steven Rostedt wrote:
Mark Brown broonie@kernel.org wrote:
Yes, tests should skip if preconditions for running them aren't met.
Yep, see how the ftrace selftests run. If it is determined that the feature is not present, it simple returns UNSUPPORTED and not FAILED.
In KTAP terms that's specifically SKIP, generated by calling SKIP() if using kselftest_harness.h.
On Wed, Sep 06, 2023 at 05:36:52PM +0100, Mark Brown wrote:
On Wed, Sep 06, 2023 at 12:28:22PM -0400, Steven Rostedt wrote:
Mark Brown broonie@kernel.org wrote:
Yes, tests should skip if preconditions for running them aren't met.
Yep, see how the ftrace selftests run. If it is determined that the feature is not present, it simple returns UNSUPPORTED and not FAILED.
In KTAP terms that's specifically SKIP, generated by calling SKIP() if using kselftest_harness.h.
Great, I'll have a patch shortly to address this.
Thanks, -Beau