Message ID | 20220708162711.1309633-1-dlatypov@google.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Brendan Higgins |
Headers | show |
Series | [v3] kunit: tool: Enable virtio/PCI by default on UML | expand |
Hi David, Daniel, On Fri, Jul 08, 2022 at 04:27:11PM +0000, Daniel Latypov wrote: > From: David Gow <davidgow@google.com> > > There are several tests which depend on PCI, and hence need a bunch of > extra options to run under UML. This makes it awkward to give > configuration instructions (whether in documentation, or as part of a > .kunitconfig file), as two separate, incompatible sets of config options > are required for UML and "most other architectures". > > For non-UML architectures, it's possible to add default kconfig options > via the qemu_config python files, but there's no equivalent for UML. Add > a new tools/testing/kunit/configs/arch_uml.config file containing extra > kconfig options to use on UML. > > Tested-by: José Expósito <jose.exposito89@gmail.com> > Reviewed-by: Daniel Latypov <dlatypov@google.com> > Signed-off-by: David Gow <davidgow@google.com> > Reviewed-by: Brendan Higgins <brendanhiggins@google.com> > Signed-off-by: Daniel Latypov <dlatypov@google.com> Unfortunately, this breaks the clock tests in next-20220711: $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/clk/.kunitconfig --raw_output [16:45:52] Configuring KUnit Kernel ... Regenerating .config ... Populating config with: $ make ARCH=um O=.kunit olddefconfig [16:45:53] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make ARCH=um O=.kunit --jobs=16 [16:45:58] Starting KUnit Kernel (1/1)... TAP version 14 1..10 # Subtest: clk-test 1..4 ok 1 - clk_test_get_rate ok 2 - clk_test_set_get_rate ok 3 - clk_test_set_set_get_rate ok 4 - clk_test_round_set_get_rate # clk-test: pass:4 fail:0 skip:0 total:4 # Totals: pass:4 fail:0 skip:0 total:4 ok 1 - clk-test # Subtest: clk-orphan-transparent-single-parent-test 1..1 ok 1 - clk_test_orphan_transparent_parent_mux_set_range ok 2 - clk-orphan-transparent-single-parent-test # Subtest: clk-range-test 1..11 ok 1 - clk_range_test_set_range clk_set_rate_range: clk test_dummy_rate dev (null) con (null): invalid range [142001000, 142000000] ok 2 - clk_range_test_set_range_invalid ok 3 - clk_range_test_multiple_disjoints_range ok 4 - clk_range_test_set_range_round_rate_lower ok 5 - clk_range_test_set_range_set_rate_lower ok 6 - clk_range_test_set_range_set_round_rate_consistent_lower ok 7 - clk_range_test_set_range_round_rate_higher ok 8 - clk_range_test_set_range_set_rate_higher ok 9 - clk_range_test_set_range_set_round_rate_consistent_higher ok 10 - clk_range_test_set_range_get_rate_raised ok 11 - clk_range_test_set_range_get_rate_lowered # clk-range-test: pass:11 fail:0 skip:0 total:11 # Totals: pass:11 fail:0 skip:0 total:11 ok 3 - clk-range-test # Subtest: clk-range-maximize-test 1..2 ok 1 - clk_range_test_set_range_rate_maximized ok 2 - clk_range_test_multiple_set_range_rate_maximized # clk-range-maximize-test: pass:2 fail:0 skip:0 total:2 # Totals: pass:2 fail:0 skip:0 total:2 ok 4 - clk-range-maximize-test # Subtest: clk-range-minimize-test 1..2 ok 1 - clk_range_test_set_range_rate_minimized ok 2 - clk_range_test_multiple_set_range_rate_minimized # clk-range-minimize-test: pass:2 fail:0 skip:0 total:2 # Totals: pass:2 fail:0 skip:0 total:2 ok 5 - clk-range-minimize-test # Subtest: clk-gate-register-test 1..6 ok 1 - clk_gate_register_test_dev ok 2 - clk_gate_register_test_parent_names ok 3 - clk_gate_register_test_parent_data ok 4 - clk_gate_register_test_parent_data_legacy ok 5 - clk_gate_register_test_parent_hw gate bit exceeds LOWORD field ok 6 - clk_gate_register_test_hiword_invalid # clk-gate-register-test: pass:6 fail:0 skip:0 total:6 # Totals: pass:6 fail:0 skip:0 total:6 ok 6 - clk-gate-register-test # Subtest: clk-gate-test 1..3 ok 1 - clk_gate_test_parent_rate ------------[ cut here ]------------ WARNING: CPU: 0 PID: 45 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0 CPU: 0 PID: 45 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 0000008d 6031ccb0 a088bd08 60294456 00000000 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601ececa>] ? clk_core_lookup+0x5a/0x150 [<601ec370>] ? clk_prepare_unlock+0x0/0x100 [<601ee953>] ? __clk_register+0x8c3/0xb50 [<601f0d95>] ? clk_hw_register+0x15/0x30 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264b3f>] ? __raw_readl+0x9f/0xd0 [<601f68bd>] ? clk_gate_endisable+0xcd/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f8ccf>] ? clk_gate_test_enable+0xff/0x2f0 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 45 at lib/logic_iomem.c:190 __raw_readl+0xbd/0xd0 Invalid readl at address 60c057d8 CPU: 0 PID: 45 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 000000be 6031ccb0 a088bd08 60294456 a088bd50 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601ececa>] ? clk_core_lookup+0x5a/0x150 [<601ec370>] ? clk_prepare_unlock+0x0/0x100 [<601ee953>] ? __clk_register+0x8c3/0xb50 [<601f0d95>] ? clk_hw_register+0x15/0x30 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264b5d>] ? __raw_readl+0xbd/0xd0 [<601f68bd>] ? clk_gate_endisable+0xcd/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f8ccf>] ? clk_gate_test_enable+0xff/0x2f0 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 45 at lib/logic_iomem.c:141 __raw_writel+0xb0/0xe0 CPU: 0 PID: 45 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 0000008d 6031ccb0 a088bcf8 60294456 00000000 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<60277543>] ? _printk+0x0/0x9b [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601ececa>] ? clk_core_lookup+0x5a/0x150 [<601ee953>] ? __clk_register+0x8c3/0xb50 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264c20>] ? __raw_writel+0xb0/0xe0 [<601f689f>] ? clk_gate_endisable+0xaf/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f8ccf>] ? clk_gate_test_enable+0xff/0x2f0 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 45 at lib/logic_iomem.c:190 clk_gate_endisable+0xaf/0x110 Invalid writeql of 0xffffffff at address 60c057d8 CPU: 0 PID: 45 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 000000be 6031ccb0 a088bd28 60294456 a088bd70 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601ee953>] ? __clk_register+0x8c3/0xb50 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264c20>] ? __raw_writel+0xb0/0xe0 [<601f689f>] ? clk_gate_endisable+0xaf/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f8ccf>] ? clk_gate_test_enable+0xff/0x2f0 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- # clk_gate_test_enable: EXPECTATION FAILED at drivers/clk/clk-gate_test.c:169 Expected enable_val == ctx->fake_reg, but enable_val == 32 ctx->fake_reg == 0 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 45 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0 CPU: 0 PID: 45 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000001 0000008d 6031ccb0 a088bd58 60294456 00000000 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<601c0280>] ? kunit_resource_instance_match+0x0/0x10 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601bfdc0>] ? kunit_do_failed_assertion+0x100/0x1c0 [<601c022c>] ? kunit_destroy_resource+0x10c/0x160 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<601bfcc0>] ? kunit_do_failed_assertion+0x0/0x1c0 [<60264c20>] ? __raw_writel+0xb0/0xe0 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<601ef400>] ? clk_hw_is_enabled+0x0/0x10 [<60264b3f>] ? __raw_readl+0x9f/0xd0 [<601f694a>] ? clk_gate_is_enabled+0x1a/0x50 [<601ebf42>] ? clk_core_is_enabled+0x22/0xb0 [<601f8c77>] ? clk_gate_test_enable+0xa7/0x2f0 [<601c0ad0>] ? kunit_binary_assert_format+0x0/0x100 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 45 at lib/logic_iomem.c:190 __raw_readl+0xbd/0xd0 Invalid readl at address 60c057d8 CPU: 0 PID: 45 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000001 000000be 6031ccb0 a088bd58 60294456 a088bda0 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<601c0280>] ? kunit_resource_instance_match+0x0/0x10 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601bfdc0>] ? kunit_do_failed_assertion+0x100/0x1c0 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<601bfcc0>] ? kunit_do_failed_assertion+0x0/0x1c0 [<60264c20>] ? __raw_writel+0xb0/0xe0 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<601ef400>] ? clk_hw_is_enabled+0x0/0x10 [<60264b5d>] ? __raw_readl+0xbd/0xd0 [<601f694a>] ? clk_gate_is_enabled+0x1a/0x50 [<601ebf42>] ? clk_core_is_enabled+0x22/0xb0 [<601f8c77>] ? clk_gate_test_enable+0xa7/0x2f0 [<601c0ad0>] ? kunit_binary_assert_format+0x0/0x100 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- clk_unregister: unregistering prepared clock: test_gate clk_unregister: unregistering prepared clock: test_parent not ok 2 - clk_gate_test_enable ------------[ cut here ]------------ WARNING: CPU: 0 PID: 46 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0 CPU: 0 PID: 46 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 0000008d 6031ccb0 a088bcf8 60294456 00000000 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<601ef880>] ? clk_unprepare+0x0/0x50 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601ee1bb>] ? __clk_register+0x12b/0xb50 [<601ececa>] ? clk_core_lookup+0x5a/0x150 [<601ec370>] ? clk_prepare_unlock+0x0/0x100 [<601ee953>] ? __clk_register+0x8c3/0xb50 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264b3f>] ? __raw_readl+0x9f/0xd0 [<601f68bd>] ? clk_gate_endisable+0xcd/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f80cf>] ? clk_gate_test_disable+0x12f/0x390 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 46 at lib/logic_iomem.c:190 __raw_readl+0xbd/0xd0 Invalid readl at address 60c057d8 CPU: 0 PID: 46 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 000000be 6031ccb0 a088bcf8 60294456 a088bd40 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<601ef880>] ? clk_unprepare+0x0/0x50 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601ee1bb>] ? __clk_register+0x12b/0xb50 [<601ececa>] ? clk_core_lookup+0x5a/0x150 [<601ec370>] ? clk_prepare_unlock+0x0/0x100 [<601ee953>] ? __clk_register+0x8c3/0xb50 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264b5d>] ? __raw_readl+0xbd/0xd0 [<601f68bd>] ? clk_gate_endisable+0xcd/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f80cf>] ? clk_gate_test_disable+0x12f/0x390 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 46 at lib/logic_iomem.c:141 __raw_writel+0xb0/0xe0 CPU: 0 PID: 46 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 0000008d 6031ccb0 a088bce8 60294456 00000000 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<60277543>] ? _printk+0x0/0x9b [<601ef880>] ? clk_unprepare+0x0/0x50 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601ee1bb>] ? __clk_register+0x12b/0xb50 [<601ec370>] ? clk_prepare_unlock+0x0/0x100 [<601ee953>] ? __clk_register+0x8c3/0xb50 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264c20>] ? __raw_writel+0xb0/0xe0 [<601f689f>] ? clk_gate_endisable+0xaf/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f80cf>] ? clk_gate_test_disable+0x12f/0x390 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 46 at lib/logic_iomem.c:190 clk_gate_endisable+0xaf/0x110 Invalid writeql of 0xffffffff at address 60c057d8 CPU: 0 PID: 46 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 000000be 6031ccb0 a088bd18 60294456 a088bd60 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<601ef880>] ? clk_unprepare+0x0/0x50 [<601ef880>] ? clk_unprepare+0x0/0x50 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601ec370>] ? clk_prepare_unlock+0x0/0x100 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264c20>] ? __raw_writel+0xb0/0xe0 [<601f689f>] ? clk_gate_endisable+0xaf/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f80cf>] ? clk_gate_test_disable+0x12f/0x390 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- # clk_gate_test_disable: ASSERTION FAILED at drivers/clk/clk-gate_test.c:186 Expected enable_val == ctx->fake_reg, but enable_val == 32 ctx->fake_reg == 0 clk_unregister: unregistering prepared clock: test_gate clk_unregister: unregistering prepared clock: test_parent not ok 3 - clk_gate_test_disable # clk-gate-test: pass:1 fail:2 skip:0 total:3 # Totals: pass:1 fail:2 skip:0 total:3 not ok 7 - clk-gate-test # Subtest: clk-gate-invert-test 1..2 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 47 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0 CPU: 0 PID: 47 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 0000008d 6031ccb0 a088bd08 60294456 00000000 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601ececa>] ? clk_core_lookup+0x5a/0x150 [<601ec370>] ? clk_prepare_unlock+0x0/0x100 [<601ee953>] ? __clk_register+0x8c3/0xb50 [<601f0d95>] ? clk_hw_register+0x15/0x30 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264b3f>] ? __raw_readl+0x9f/0xd0 [<601f68bd>] ? clk_gate_endisable+0xcd/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f89df>] ? clk_gate_test_invert_enable+0xff/0x2f0 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 47 at lib/logic_iomem.c:190 __raw_readl+0xbd/0xd0 Invalid readl at address 60c057d8 CPU: 0 PID: 47 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 000000be 6031ccb0 a088bd08 60294456 a088bd50 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601ececa>] ? clk_core_lookup+0x5a/0x150 [<601ec370>] ? clk_prepare_unlock+0x0/0x100 [<601ee953>] ? __clk_register+0x8c3/0xb50 [<601f0d95>] ? clk_hw_register+0x15/0x30 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264b5d>] ? __raw_readl+0xbd/0xd0 [<601f68bd>] ? clk_gate_endisable+0xcd/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f89df>] ? clk_gate_test_invert_enable+0xff/0x2f0 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 47 at lib/logic_iomem.c:141 __raw_writel+0xb0/0xe0 CPU: 0 PID: 47 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 0000008d 6031ccb0 a088bcf8 60294456 00000000 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<60277543>] ? _printk+0x0/0x9b [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601ececa>] ? clk_core_lookup+0x5a/0x150 [<601ee953>] ? __clk_register+0x8c3/0xb50 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264c20>] ? __raw_writel+0xb0/0xe0 [<601f689f>] ? clk_gate_endisable+0xaf/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f89df>] ? clk_gate_test_invert_enable+0xff/0x2f0 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 47 at lib/logic_iomem.c:190 clk_gate_endisable+0xaf/0x110 Invalid writeql of 0xffff7fff at address 60c057d8 CPU: 0 PID: 47 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 000000be 6031ccb0 a088bd28 60294456 a088bd70 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601ee953>] ? __clk_register+0x8c3/0xb50 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264c20>] ? __raw_writel+0xb0/0xe0 [<601f689f>] ? clk_gate_endisable+0xaf/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f89df>] ? clk_gate_test_invert_enable+0xff/0x2f0 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- # clk_gate_test_invert_enable: EXPECTATION FAILED at drivers/clk/clk-gate_test.c:249 Expected enable_val == ctx->fake_reg, but enable_val == 0 ctx->fake_reg == 32768 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 47 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0 CPU: 0 PID: 47 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000001 0000008d 6031ccb0 a088bd58 60294456 00000000 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<6002a044>] ? um_set_signals+0x44/0x50 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601bfdc0>] ? kunit_do_failed_assertion+0x100/0x1c0 [<601bf580>] ? kunit_log_append+0x0/0x130 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<601bfcc0>] ? kunit_do_failed_assertion+0x0/0x1c0 [<60264c20>] ? __raw_writel+0xb0/0xe0 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<601ef400>] ? clk_hw_is_enabled+0x0/0x10 [<60264b3f>] ? __raw_readl+0x9f/0xd0 [<601f694a>] ? clk_gate_is_enabled+0x1a/0x50 [<601ebf42>] ? clk_core_is_enabled+0x22/0xb0 [<601f8986>] ? clk_gate_test_invert_enable+0xa6/0x2f0 [<601c0ad0>] ? kunit_binary_assert_format+0x0/0x100 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 47 at lib/logic_iomem.c:190 __raw_readl+0xbd/0xd0 Invalid readl at address 60c057d8 CPU: 0 PID: 47 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000001 000000be 6031ccb0 a088bd58 60294456 a088bda0 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<6002a044>] ? um_set_signals+0x44/0x50 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601bfdc0>] ? kunit_do_failed_assertion+0x100/0x1c0 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<601bfcc0>] ? kunit_do_failed_assertion+0x0/0x1c0 [<60264c20>] ? __raw_writel+0xb0/0xe0 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<601ef400>] ? clk_hw_is_enabled+0x0/0x10 [<60264b5d>] ? __raw_readl+0xbd/0xd0 [<601f694a>] ? clk_gate_is_enabled+0x1a/0x50 [<601ebf42>] ? clk_core_is_enabled+0x22/0xb0 [<601f8986>] ? clk_gate_test_invert_enable+0xa6/0x2f0 [<601c0ad0>] ? kunit_binary_assert_format+0x0/0x100 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- # clk_gate_test_invert_enable: EXPECTATION FAILED at drivers/clk/clk-gate_test.c:250 Expected clk_hw_is_enabled(hw) to be true, but is false clk_unregister: unregistering prepared clock: test_gate clk_unregister: unregistering prepared clock: test_parent not ok 1 - clk_gate_test_invert_enable ------------[ cut here ]------------ WARNING: CPU: 0 PID: 48 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0 CPU: 0 PID: 48 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 0000008d 6031ccb0 a088bcf8 60294456 00000000 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<601ef880>] ? clk_unprepare+0x0/0x50 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601ee1bb>] ? __clk_register+0x12b/0xb50 [<601ececa>] ? clk_core_lookup+0x5a/0x150 [<601ec370>] ? clk_prepare_unlock+0x0/0x100 [<601ee953>] ? __clk_register+0x8c3/0xb50 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264b3f>] ? __raw_readl+0x9f/0xd0 [<601f68bd>] ? clk_gate_endisable+0xcd/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f937f>] ? clk_gate_test_invert_disable+0x12f/0x390 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 48 at lib/logic_iomem.c:190 __raw_readl+0xbd/0xd0 Invalid readl at address 60c057d8 CPU: 0 PID: 48 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 000000be 6031ccb0 a088bcf8 60294456 a088bd40 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<601ef880>] ? clk_unprepare+0x0/0x50 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601ee1bb>] ? __clk_register+0x12b/0xb50 [<601ececa>] ? clk_core_lookup+0x5a/0x150 [<601ec370>] ? clk_prepare_unlock+0x0/0x100 [<601ee953>] ? __clk_register+0x8c3/0xb50 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264b5d>] ? __raw_readl+0xbd/0xd0 [<601f68bd>] ? clk_gate_endisable+0xcd/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f937f>] ? clk_gate_test_invert_disable+0x12f/0x390 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 48 at lib/logic_iomem.c:141 __raw_writel+0xb0/0xe0 CPU: 0 PID: 48 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 0000008d 6031ccb0 a088bce8 60294456 00000000 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<60277543>] ? _printk+0x0/0x9b [<601ef880>] ? clk_unprepare+0x0/0x50 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601ee1bb>] ? __clk_register+0x12b/0xb50 [<601ec370>] ? clk_prepare_unlock+0x0/0x100 [<601ee953>] ? __clk_register+0x8c3/0xb50 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264c20>] ? __raw_writel+0xb0/0xe0 [<601f689f>] ? clk_gate_endisable+0xaf/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f937f>] ? clk_gate_test_invert_disable+0x12f/0x390 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 48 at lib/logic_iomem.c:190 clk_gate_endisable+0xaf/0x110 Invalid writeql of 0xffff7fff at address 60c057d8 CPU: 0 PID: 48 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 000000be 6031ccb0 a088bd18 60294456 a088bd60 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<601ef880>] ? clk_unprepare+0x0/0x50 [<601ef880>] ? clk_unprepare+0x0/0x50 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601ec370>] ? clk_prepare_unlock+0x0/0x100 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264c20>] ? __raw_writel+0xb0/0xe0 [<601f689f>] ? clk_gate_endisable+0xaf/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f937f>] ? clk_gate_test_invert_disable+0x12f/0x390 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- # clk_gate_test_invert_disable: ASSERTION FAILED at drivers/clk/clk-gate_test.c:266 Expected enable_val == ctx->fake_reg, but enable_val == 0 ctx->fake_reg == 32768 clk_unregister: unregistering prepared clock: test_gate clk_unregister: unregistering prepared clock: test_parent not ok 2 - clk_gate_test_invert_disable # clk-gate-invert-test: pass:0 fail:2 skip:0 total:2 # Totals: pass:0 fail:2 skip:0 total:2 not ok 8 - clk-gate-invert-test # Subtest: clk-gate-hiword-test 1..2 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 49 at lib/logic_iomem.c:141 __raw_writel+0xb0/0xe0 CPU: 0 PID: 49 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 0000008d 6031ccb0 a088bcf8 60294456 00000000 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601ee1bb>] ? __clk_register+0x12b/0xb50 [<601ececa>] ? clk_core_lookup+0x5a/0x150 [<601ec370>] ? clk_prepare_unlock+0x0/0x100 [<601ee953>] ? __clk_register+0x8c3/0xb50 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264c20>] ? __raw_writel+0xb0/0xe0 [<601f689f>] ? clk_gate_endisable+0xaf/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f86e7>] ? clk_gate_test_hiword_enable+0x107/0x300 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 49 at lib/logic_iomem.c:190 clk_gate_endisable+0xaf/0x110 Invalid writeql of 0x2000200 at address 60c057d8 CPU: 0 PID: 49 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 000000be 6031ccb0 a088bd28 60294456 a088bd70 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601ec370>] ? clk_prepare_unlock+0x0/0x100 [<601ee953>] ? __clk_register+0x8c3/0xb50 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264c20>] ? __raw_writel+0xb0/0xe0 [<601f689f>] ? clk_gate_endisable+0xaf/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f86e7>] ? clk_gate_test_hiword_enable+0x107/0x300 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- # clk_gate_test_hiword_enable: EXPECTATION FAILED at drivers/clk/clk-gate_test.c:322 Expected enable_val == ctx->fake_reg, but enable_val == 33554944 ctx->fake_reg == 0 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 49 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0 CPU: 0 PID: 49 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000001 0000008d 6031ccb0 a088bd58 60294456 00000000 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<6002a044>] ? um_set_signals+0x44/0x50 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601bfdc0>] ? kunit_do_failed_assertion+0x100/0x1c0 [<601bf580>] ? kunit_log_append+0x0/0x130 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<601bfcc0>] ? kunit_do_failed_assertion+0x0/0x1c0 [<60264c20>] ? __raw_writel+0xb0/0xe0 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<601ef400>] ? clk_hw_is_enabled+0x0/0x10 [<60264b3f>] ? __raw_readl+0x9f/0xd0 [<601f694a>] ? clk_gate_is_enabled+0x1a/0x50 [<601ebf42>] ? clk_core_is_enabled+0x22/0xb0 [<601f8689>] ? clk_gate_test_hiword_enable+0xa9/0x300 [<601c0ad0>] ? kunit_binary_assert_format+0x0/0x100 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 49 at lib/logic_iomem.c:190 __raw_readl+0xbd/0xd0 Invalid readl at address 60c057d8 CPU: 0 PID: 49 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000001 000000be 6031ccb0 a088bd58 60294456 a088bda0 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<6002a044>] ? um_set_signals+0x44/0x50 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601bfdc0>] ? kunit_do_failed_assertion+0x100/0x1c0 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<601bfcc0>] ? kunit_do_failed_assertion+0x0/0x1c0 [<60264c20>] ? __raw_writel+0xb0/0xe0 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<601ef400>] ? clk_hw_is_enabled+0x0/0x10 [<60264b5d>] ? __raw_readl+0xbd/0xd0 [<601f694a>] ? clk_gate_is_enabled+0x1a/0x50 [<601ebf42>] ? clk_core_is_enabled+0x22/0xb0 [<601f8689>] ? clk_gate_test_hiword_enable+0xa9/0x300 [<601c0ad0>] ? kunit_binary_assert_format+0x0/0x100 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- clk_unregister: unregistering prepared clock: test_gate clk_unregister: unregistering prepared clock: test_parent not ok 1 - clk_gate_test_hiword_enable ------------[ cut here ]------------ WARNING: CPU: 0 PID: 50 at lib/logic_iomem.c:141 __raw_writel+0xb0/0xe0 CPU: 0 PID: 50 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 0000008d 6031ccb0 a088bce8 60294456 00000000 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<601ef880>] ? clk_unprepare+0x0/0x50 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<600ed737>] ? kmem_cache_alloc+0x137/0x1a0 [<601ee1bb>] ? __clk_register+0x12b/0xb50 [<601ec370>] ? clk_prepare_unlock+0x0/0x100 [<601ec370>] ? clk_prepare_unlock+0x0/0x100 [<601ee953>] ? __clk_register+0x8c3/0xb50 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264c20>] ? __raw_writel+0xb0/0xe0 [<601f689f>] ? clk_gate_endisable+0xaf/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f8fef>] ? clk_gate_test_hiword_disable+0x12f/0x390 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 50 at lib/logic_iomem.c:190 clk_gate_endisable+0xaf/0x110 Invalid writeql of 0x2000200 at address 60c057d8 CPU: 0 PID: 50 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000000 000000be 6031ccb0 a088bd18 60294456 a088bd60 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<601ef880>] ? clk_unprepare+0x0/0x50 [<601ef880>] ? clk_unprepare+0x0/0x50 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<601ec370>] ? clk_prepare_unlock+0x0/0x100 [<601ec370>] ? clk_prepare_unlock+0x0/0x100 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264c20>] ? __raw_writel+0xb0/0xe0 [<601f689f>] ? clk_gate_endisable+0xaf/0x110 [<601f6925>] ? clk_gate_enable+0x15/0x20 [<601ec147>] ? clk_core_enable+0x57/0xc0 [<601efb0e>] ? clk_enable+0x2e/0x50 [<601f8fef>] ? clk_gate_test_hiword_disable+0x12f/0x390 [<60295990>] ? schedule_preempt_disabled+0x0/0x20 [<60063aa0>] ? complete+0x0/0x70 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- # clk_gate_test_hiword_disable: ASSERTION FAILED at drivers/clk/clk-gate_test.c:339 Expected enable_val == ctx->fake_reg, but enable_val == 33554944 ctx->fake_reg == 0 clk_unregister: unregistering prepared clock: test_gate clk_unregister: unregistering prepared clock: test_parent not ok 2 - clk_gate_test_hiword_disable # clk-gate-hiword-test: pass:0 fail:2 skip:0 total:2 # Totals: pass:0 fail:2 skip:0 total:2 not ok 9 - clk-gate-hiword-test # Subtest: clk-gate-is_enabled-test 1..4 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 51 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0 CPU: 0 PID: 51 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000001 0000008d 6031ccb0 a088bd78 60294456 00000000 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<601ee1bb>] ? __clk_register+0x12b/0xb50 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<600ed737>] ? kmem_cache_alloc+0x137/0x1a0 [<601f0d95>] ? clk_hw_register+0x15/0x30 [<601f6ae7>] ? __clk_hw_register_gate+0x167/0x190 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264b3f>] ? __raw_readl+0x9f/0xd0 [<601f694a>] ? clk_gate_is_enabled+0x1a/0x50 [<601ebf42>] ? clk_core_is_enabled+0x22/0xb0 [<601f717f>] ? clk_gate_test_is_enabled+0x6f/0x130 [<60063aa0>] ? complete+0x0/0x70 [<6002a044>] ? um_set_signals+0x44/0x50 [<602952f0>] ? __schedule+0x0/0x510 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 51 at lib/logic_iomem.c:190 __raw_readl+0xbd/0xd0 Invalid readl at address 60c057d8 CPU: 0 PID: 51 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000001 000000be 6031ccb0 a088bd78 60294456 a088bdc0 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<601ee1bb>] ? __clk_register+0x12b/0xb50 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<600ed737>] ? kmem_cache_alloc+0x137/0x1a0 [<601f0d95>] ? clk_hw_register+0x15/0x30 [<601f6ae7>] ? __clk_hw_register_gate+0x167/0x190 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264b5d>] ? __raw_readl+0xbd/0xd0 [<601f694a>] ? clk_gate_is_enabled+0x1a/0x50 [<601ebf42>] ? clk_core_is_enabled+0x22/0xb0 [<601f717f>] ? clk_gate_test_is_enabled+0x6f/0x130 [<60063aa0>] ? complete+0x0/0x70 [<6002a044>] ? um_set_signals+0x44/0x50 [<602952f0>] ? __schedule+0x0/0x510 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ok 1 - clk_gate_test_is_enabled ------------[ cut here ]------------ WARNING: CPU: 0 PID: 52 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0 CPU: 0 PID: 52 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000001 0000008d 6031ccb0 a088bd78 60294456 00000000 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<601ee1bb>] ? __clk_register+0x12b/0xb50 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<600ed737>] ? kmem_cache_alloc+0x137/0x1a0 [<601f0d95>] ? clk_hw_register+0x15/0x30 [<601f6ae7>] ? __clk_hw_register_gate+0x167/0x190 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264b3f>] ? __raw_readl+0x9f/0xd0 [<601f694a>] ? clk_gate_is_enabled+0x1a/0x50 [<601ebf42>] ? clk_core_is_enabled+0x22/0xb0 [<601f704f>] ? clk_gate_test_is_disabled+0x6f/0x130 [<60063aa0>] ? complete+0x0/0x70 [<6002a044>] ? um_set_signals+0x44/0x50 [<602952f0>] ? __schedule+0x0/0x510 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 52 at lib/logic_iomem.c:190 __raw_readl+0xbd/0xd0 Invalid readl at address 60c057d8 CPU: 0 PID: 52 Comm: kunit_try_catch Tainted: G W N 5.19.0-rc1-00014-g6fc3a8636a7b #165 Stack: 6030a5b6 60277543 60350943 6030a5b6 6002a000 00000001 000000be 6031ccb0 a088bd78 60294456 a088bdc0 00000000 Call Trace: [<6002a000>] ? um_set_signals+0x0/0x50 [<60294456>] ? dump_stack_lvl+0x44/0x50 [<60277543>] ? _printk+0x0/0x9b [<60274ddb>] ? __warn.cold+0x33/0xa3 [<601ee1bb>] ? __clk_register+0x12b/0xb50 [<60274f24>] ? warn_slowpath_fmt+0xd9/0xe9 [<600ed737>] ? kmem_cache_alloc+0x137/0x1a0 [<601f0d95>] ? clk_hw_register+0x15/0x30 [<601f6ae7>] ? __clk_hw_register_gate+0x167/0x190 [<60274e4b>] ? warn_slowpath_fmt+0x0/0xe9 [<60264b5d>] ? __raw_readl+0xbd/0xd0 [<601f694a>] ? clk_gate_is_enabled+0x1a/0x50 [<601ebf42>] ? clk_core_is_enabled+0x22/0xb0 [<601f704f>] ? clk_gate_test_is_disabled+0x6f/0x130 [<60063aa0>] ? complete+0x0/0x70 [<6002a044>] ? um_set_signals+0x44/0x50 [<602952f0>] ? __schedule+0x0/0x510 [<601bff9d>] ? kunit_try_run_case+0x4d/0x80 [<60295855>] ? schedule+0x55/0x100 [<601c0d90>] ? kunit_generic_run_threadfn_adapter+0x0/0x20 [<601c0d9b>] ? kunit_generic_run_threadfn_adapter+0xb/0x20 [<60054364>] ? kthread+0xf4/0x150 [<60019e42>] ? new_thread_handler+0x82/0xc0 ---[ end trace 0000000000000000 ]--- # clk_gate_test_is_disabled: ASSERTION FAILED at drivers/clk/clk-gate_test.c:409 Expected clk_hw_is_enabled(hw) to be false, but is true not ok 2 - clk_gate_test_is_disabled # clk_gate_test_is_enabled_inverted: ASSERTION FAILED at drivers/clk/clk-gate_test.c:423 Expected hw is not error, but is: -17 not ok 3 - clk_gate_test_is_enabled_inverted # clk_gate_test_is_disabled_inverted: ASSERTION FAILED at drivers/clk/clk-gate_test.c:438 Expected hw is not error, but is: -17 not ok 4 - clk_gate_test_is_disabled_inverted # clk-gate-is_enabled-test: pass:1 fail:3 skip:0 total:4 # Totals: pass:1 fail:3 skip:0 total:4 not ok 10 - clk-gate-is_enabled-test [16:45:58] Elapsed time: 5.759s total, 0.857s configuring, 4.786s building, 0.080s running Maxime
On Mon, Jul 11, 2022 at 7:46 AM Maxime Ripard <maxime@cerno.tech> wrote: > > Unfortunately, this breaks the clock tests in next-20220711: > $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/clk/.kunitconfig --raw_output Thanks, this is indeed an issue. I remember noticing this in early April. I incorrectly remembered that a fix had been sent. A more minimal reproducer: $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/clk 'clk-gate-test.clk_gate_test_enable' The part of the test that becomes problematic with this patch (i.e. enabling logic iomem) is the cast on line 143. 130 struct clk_gate_test_context { 131 void __iomem *fake_mem; 132 struct clk_hw *hw; 133 struct clk_hw *parent; 134 u32 fake_reg; /* Keep at end, KASAN can detect out of bounds */ 135 }; 136 137 static struct clk_gate_test_context *clk_gate_test_alloc_ctx(struct kunit *test) 138 { 139 struct clk_gate_test_context *ctx; 140 141 test->priv = ctx = kunit_kzalloc(test, sizeof(*ctx), GFP_KERNEL); 142 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, ctx); 143 ctx->fake_mem = (void __force __iomem *)&ctx->fake_reg; 144 145 return ctx; 146 } A simple fix we could carry in the KUnit branch is this: diff --git a/drivers/clk/.kunitconfig b/drivers/clk/.kunitconfig index cdbc7d7deba9..2fbeb71316f8 100644 --- a/drivers/clk/.kunitconfig +++ b/drivers/clk/.kunitconfig @@ -2,3 +2,4 @@ CONFIG_KUNIT=y CONFIG_COMMON_CLK=y CONFIG_CLK_KUNIT_TEST=y CONFIG_CLK_GATE_KUNIT_TEST=y +CONFIG_UML_PCI_OVER_VIRTIO=n The new ability to disable it comes from https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=kunit&id=8a7c6f859a20ca36a9e3ce71662de697898c9ef5 Thoughts? Daniel
On Mon, Jul 11, 2022 at 08:10:36AM -0700, Daniel Latypov wrote: > On Mon, Jul 11, 2022 at 7:46 AM Maxime Ripard <maxime@cerno.tech> wrote: > > > > Unfortunately, this breaks the clock tests in next-20220711: > > $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/clk/.kunitconfig --raw_output > > Thanks, this is indeed an issue. > > I remember noticing this in early April. > I incorrectly remembered that a fix had been sent. > > A more minimal reproducer: > $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/clk > 'clk-gate-test.clk_gate_test_enable' > > The part of the test that becomes problematic with this patch (i.e. > enabling logic iomem) is the cast on line 143. > > 130 struct clk_gate_test_context { > 131 void __iomem *fake_mem; > 132 struct clk_hw *hw; > 133 struct clk_hw *parent; > 134 u32 fake_reg; /* Keep at end, KASAN can detect out of bounds */ > 135 }; > 136 > 137 static struct clk_gate_test_context > *clk_gate_test_alloc_ctx(struct kunit *test) > 138 { > 139 struct clk_gate_test_context *ctx; > 140 > 141 test->priv = ctx = kunit_kzalloc(test, sizeof(*ctx), > GFP_KERNEL); > 142 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, ctx); > 143 ctx->fake_mem = (void __force __iomem *)&ctx->fake_reg; > 144 > 145 return ctx; > 146 } > > A simple fix we could carry in the KUnit branch is this: > > diff --git a/drivers/clk/.kunitconfig b/drivers/clk/.kunitconfig > index cdbc7d7deba9..2fbeb71316f8 100644 > --- a/drivers/clk/.kunitconfig > +++ b/drivers/clk/.kunitconfig > @@ -2,3 +2,4 @@ CONFIG_KUNIT=y > CONFIG_COMMON_CLK=y > CONFIG_CLK_KUNIT_TEST=y > CONFIG_CLK_GATE_KUNIT_TEST=y > +CONFIG_UML_PCI_OVER_VIRTIO=n It works for me now thanks Feel free to add my Tested-by Maxime
On Mon, Jul 11, 2022 at 8:50 AM Maxime Ripard <maxime@cerno.tech> wrote: > > A simple fix we could carry in the KUnit branch is this: > > > > diff --git a/drivers/clk/.kunitconfig b/drivers/clk/.kunitconfig > > index cdbc7d7deba9..2fbeb71316f8 100644 > > --- a/drivers/clk/.kunitconfig > > +++ b/drivers/clk/.kunitconfig > > @@ -2,3 +2,4 @@ CONFIG_KUNIT=y > > CONFIG_COMMON_CLK=y > > CONFIG_CLK_KUNIT_TEST=y > > CONFIG_CLK_GATE_KUNIT_TEST=y > > +CONFIG_UML_PCI_OVER_VIRTIO=n > > It works for me now thanks > > Feel free to add my Tested-by > > Maxime Thanks, sending out https://lore.kernel.org/linux-kselftest/20220711162713.2467476-1-dlatypov@google.com
diff --git a/tools/testing/kunit/configs/arch_uml.config b/tools/testing/kunit/configs/arch_uml.config new file mode 100644 index 000000000000..e824ce43b05a --- /dev/null +++ b/tools/testing/kunit/configs/arch_uml.config @@ -0,0 +1,5 @@ +# Config options which are added to UML builds by default + +# Enable virtio/pci, as a lot of tests require it. +CONFIG_VIRTIO_UML=y +CONFIG_UML_PCI_OVER_VIRTIO=y diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/kunit_kernel.py index 56492090e28e..f5c26ea89714 100644 --- a/tools/testing/kunit/kunit_kernel.py +++ b/tools/testing/kunit/kunit_kernel.py @@ -26,6 +26,7 @@ KUNITCONFIG_PATH = '.kunitconfig' OLD_KUNITCONFIG_PATH = 'last_used_kunitconfig' DEFAULT_KUNITCONFIG_PATH = 'tools/testing/kunit/configs/default.config' BROKEN_ALLCONFIG_PATH = 'tools/testing/kunit/configs/broken_on_uml.config' +UML_KCONFIG_PATH = 'tools/testing/kunit/configs/arch_uml.config' OUTFILE_PATH = 'test.log' ABS_TOOL_PATH = os.path.abspath(os.path.dirname(__file__)) QEMU_CONFIGS_DIR = os.path.join(ABS_TOOL_PATH, 'qemu_configs') @@ -53,7 +54,7 @@ class LinuxSourceTreeOperations: except subprocess.CalledProcessError as e: raise ConfigError(e.output.decode()) - def make_arch_qemuconfig(self, base_kunitconfig: kunit_config.Kconfig) -> kunit_config.Kconfig: + def make_arch_config(self, base_kunitconfig: kunit_config.Kconfig) -> kunit_config.Kconfig: return base_kunitconfig def make_allyesconfig(self, build_dir: str, make_options) -> None: @@ -109,7 +110,7 @@ class LinuxSourceTreeOperationsQemu(LinuxSourceTreeOperations): self._kernel_command_line = qemu_arch_params.kernel_command_line + ' kunit_shutdown=reboot' self._extra_qemu_params = qemu_arch_params.extra_qemu_params - def make_arch_qemuconfig(self, base_kunitconfig: kunit_config.Kconfig) -> kunit_config.Kconfig: + def make_arch_config(self, base_kunitconfig: kunit_config.Kconfig) -> kunit_config.Kconfig: kconfig = kunit_config.parse_from_string(self._kconfig) kconfig.merge_in_entries(base_kunitconfig) return kconfig @@ -138,6 +139,11 @@ class LinuxSourceTreeOperationsUml(LinuxSourceTreeOperations): def __init__(self, cross_compile=None): super().__init__(linux_arch='um', cross_compile=cross_compile) + def make_arch_config(self, base_kunitconfig: kunit_config.Kconfig) -> kunit_config.Kconfig: + kconfig = kunit_config.parse_file(UML_KCONFIG_PATH) + kconfig.merge_in_entries(base_kunitconfig) + return kconfig + def make_allyesconfig(self, build_dir: str, make_options) -> None: stdout.print_with_timestamp( 'Enabling all CONFIGs for UML...') @@ -298,7 +304,7 @@ class LinuxSourceTree: if build_dir and not os.path.exists(build_dir): os.mkdir(build_dir) try: - self._kconfig = self._ops.make_arch_qemuconfig(self._kconfig) + self._kconfig = self._ops.make_arch_config(self._kconfig) self._kconfig.write_to_file(kconfig_path) self._ops.make_olddefconfig(build_dir, make_options) except ConfigError as e: @@ -329,7 +335,7 @@ class LinuxSourceTree: return self.build_config(build_dir, make_options) existing_kconfig = kunit_config.parse_file(kconfig_path) - self._kconfig = self._ops.make_arch_qemuconfig(self._kconfig) + self._kconfig = self._ops.make_arch_config(self._kconfig) if self._kconfig.is_subset_of(existing_kconfig) and not self._kunitconfig_changed(build_dir): return True diff --git a/tools/testing/kunit/kunit_tool_test.py b/tools/testing/kunit/kunit_tool_test.py index ad63d0d34f3f..446ac432d9a4 100755 --- a/tools/testing/kunit/kunit_tool_test.py +++ b/tools/testing/kunit/kunit_tool_test.py @@ -430,6 +430,10 @@ class LinuxSourceTreeTest(unittest.TestCase): f.write('CONFIG_KUNIT=y') tree = kunit_kernel.LinuxSourceTree(build_dir) + # Stub out the source tree operations, so we don't have + # the defaults for any given architecture get in the + # way. + tree._ops = kunit_kernel.LinuxSourceTreeOperations('none', None) mock_build_config = mock.patch.object(tree, 'build_config').start() # Should generate the .config @@ -447,6 +451,10 @@ class LinuxSourceTreeTest(unittest.TestCase): f.write('CONFIG_KUNIT=y\nCONFIG_KUNIT_TEST=y') tree = kunit_kernel.LinuxSourceTree(build_dir) + # Stub out the source tree operations, so we don't have + # the defaults for any given architecture get in the + # way. + tree._ops = kunit_kernel.LinuxSourceTreeOperations('none', None) mock_build_config = mock.patch.object(tree, 'build_config').start() self.assertTrue(tree.build_reconfig(build_dir, make_options=[])) @@ -463,6 +471,10 @@ class LinuxSourceTreeTest(unittest.TestCase): f.write('CONFIG_KUNIT=y\nCONFIG_KUNIT_TEST=y') tree = kunit_kernel.LinuxSourceTree(build_dir) + # Stub out the source tree operations, so we don't have + # the defaults for any given architecture get in the + # way. + tree._ops = kunit_kernel.LinuxSourceTreeOperations('none', None) mock_build_config = mock.patch.object(tree, 'build_config').start() # ... so we should trigger a call to build_config()