tests: CONFIG_TEST_USERSPACE now off by default
Unlike CONFIG_HW_STACK_PROTECTION, which greatly helps expose stack overflows in test code, activating userspace without putting threads in user mode is of very limited value. Now CONFIG_TEST_USERSPACE is off by default. Any test which puts threads in user mode will need to set CONFIG_TEST_USERSPACE. This should greatly increase sanitycheck build times as there is non-trivial build time overhead to enabling this feature. This also allows some tests which failed the build on RAM-constrained platforms to compile properly. tests/drivers/build_all is a special case; it doesn't put threads in user mode, but we want to ensure all the syscall handlers compile properly. Fixes: #15103 (and probably others) Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
3b53e69249
commit
7b1ee5cf13
61 changed files with 58 additions and 73 deletions
|
@ -58,15 +58,33 @@ config COVERAGE_GCOV
|
|||
endif
|
||||
|
||||
config TEST_USERSPACE
|
||||
bool "Enable userspace if available"
|
||||
bool "Indicate that this test exercises user mode"
|
||||
help
|
||||
This option indicates that a test case puts threads in user mode,
|
||||
and that the build system should enable userspace if the platform
|
||||
supports it. It should be set on a per-test basis.
|
||||
|
||||
The userspace APIs are no-ops if userspace is not enabled, so it is
|
||||
OK to enable this even if the test will run on platforms which do
|
||||
not support userspace. The test should still run on those platforms,
|
||||
just with all threads in supervisor mode.
|
||||
|
||||
If a test *requires* that userspace be enabled in order to
|
||||
function, CONFIG_ARCH_HAS_USERSPACE should be filtered in its
|
||||
testcase.yaml.
|
||||
|
||||
config TEST_ENABLE_USERSPACE
|
||||
bool
|
||||
depends on TEST_USERSPACE
|
||||
depends on ARCH_HAS_USERSPACE
|
||||
depends on TEST
|
||||
select USERSPACE
|
||||
select DYNAMIC_OBJECTS
|
||||
default y
|
||||
help
|
||||
This option will help test the userspace mode. This can be enabled
|
||||
only when CONFIG_ARCH_HAS_USERSPACE is set.
|
||||
This hidden option will help test the userspace mode. This will be
|
||||
enabled only when CONFIG_ARCH_HAS_USERSPACE is set, and that the test
|
||||
case itself indicates that it exercises user mode via
|
||||
CONFIG_TEST_HAS_USERSPACE.
|
||||
|
||||
config TEST_HW_STACK_PROTECTION
|
||||
bool "Enable hardware-based stack overflow detection if available"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue