Bug 205217 - Consider putting KUnit in __init sections
Summary: Consider putting KUnit in __init sections
Status: RESOLVED WILL_NOT_FIX
Alias: None
Product: Tools
Classification: Unclassified
Component: KUnit (show other bugs)
Hardware: All Linux
: P1 enhancement
Assignee: Tools/KUnit virtual default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-16 20:44 UTC by Brendan Higgins
Modified: 2020-02-12 18:39 UTC (History)
2 users (show)

See Also:
Kernel Version: kselftest/test (5.4)
Tree: Mainline
Regression: No


Attachments

Description Brendan Higgins 2019-10-16 20:44:53 UTC
(Paraphrased from Andrew Morton) Given that everything runs at late_initcall time, we may want to put all the KUnit code (core and tests) in __init, __initdata etc so all the code and data doesn't hang around forever?

It is worth pointing out that we are considering allowing at least some tests to be made into loadable modules that will be run after the kernel is booted.
Comment 1 Brendan Higgins 2019-10-16 20:47:43 UTC
Note: The original discussion can be found here: https://lore.kernel.org/linux-kselftest/20191011140536.03c3e25500b31ddcfa0f542b@linux-foundation.org/
Comment 2 Brendan Higgins 2020-02-12 18:39:09 UTC
KUnit no longer runs strictly in late_init: It now has module support, and there is ongoing work to make it run at arbitrary points in time via debugfs.

Note You need to log in before you can comment on or make changes to this bug.