1# Copyright (c) 2016 Intel Corporation 2# SPDX-License-Identifier: Apache-2.0 3 4menu "Testing" 5 6source "subsys/testsuite/ztest/Kconfig" 7 8config TEST 9 bool "Mark project as a test" 10 # For tests, store thread names in binary and dump them on crash to 11 # ease debugging. 12 select THREAD_NAME 13 help 14 Mark a project or an application as a test. This will enable a few 15 test defaults. 16 17config TEST_EXTRA_STACK_SIZE 18 int "Test function extra thread stack size" 19 default 2048 if COVERAGE_GCOV 20 default 768 if XTENSA 21 default 0 22 depends on TEST 23 help 24 Additional stack for tests on some platform where default is not 25 enough. 26 27config TEST_USERSPACE 28 bool "Indicate that this test exercises user mode" 29 help 30 This option indicates that a test case puts threads in user mode, 31 and that the build system will [override and] enable USERSPACE 32 if the platform supports it. It should be set in a .conf file on 33 a per-test basis and is not meant to be used outside test cases. 34 Tests with this option should also have the "userspace" filtering 35 tag in their testcase.yaml file. 36 37 The userspace APIs are no-ops if userspace is not enabled, so it is 38 OK to enable this even if the test will run on platforms which do 39 not support userspace. The test should still run on those platforms, 40 just with all threads in supervisor mode. 41 42 If a test *requires* that userspace be enabled in order to 43 pass, CONFIG_ARCH_HAS_USERSPACE should be filtered in its 44 testcase.yaml. 45 46config TEST_LOGGING_DEFAULTS 47 bool "Test case logging defaults" 48 depends on TEST 49 select LOG 50 select LOG_DEFAULT_MINIMAL 51 default y 52 help 53 Option which implements default policy of enabling logging in 54 minimal mode for all test cases. For tests that need alternate 55 logging configuration, or no logging at all, disable this 56 in the project-level defconfig. 57 58config TEST_ENABLE_USERSPACE 59 bool 60 depends on TEST_USERSPACE 61 depends on ARCH_HAS_USERSPACE 62 select USERSPACE 63 imply DYNAMIC_OBJECTS 64 default y 65 help 66 This hidden option implements the TEST_USERSPACE logic. It turns on 67 USERSPACE when CONFIG_ARCH_HAS_USERSPACE is set and the test 68 case itself indicates that it exercises user mode via 69 CONFIG_TEST_USERSPACE. 70 71config TEST_USERSPACE_WITHOUT_HW_STACK_PROTECTION 72 bool "Run User Mode tests without additionally enabling stack protection" 73 depends on TEST_ENABLE_USERSPACE 74 default y if SOC_SERIES_KINETIS_KE1XF || SOC_SERIES_S32K1 75 help 76 A HW platform might not have sufficient MPU/MMU capabilities to support 77 running all test cases with User Mode and HW Stack Protection features 78 simultaneously enabled. For this platforms we execute the User Mode- 79 related tests without enabling HW stack protection. 80 81config TEST_HW_STACK_PROTECTION 82 bool "Hardware-based stack overflow detection if available" 83 depends on ARCH_HAS_STACK_PROTECTION 84 depends on TEST 85 select HW_STACK_PROTECTION 86 default y if !TEST_USERSPACE_WITHOUT_HW_STACK_PROTECTION 87 help 88 This option will enable hardware-based stack protection by default 89 for all test cases if the hardware supports it. 90 91config TEST_FLASH_DRIVERS 92 bool "Test flash drivers" 93 depends on BOARD_QEMU_X86 94 select FLASH_HAS_DRIVER_ENABLED 95 help 96 This option will help test the flash drivers. This should be enabled 97 only when using qemu_x86. 98 99config TEST_ARM_CORTEX_M 100 bool 101 depends on CPU_CORTEX_M 102 depends on TEST 103 default y 104 select ARM_SECURE_BUSFAULT_HARDFAULT_NMI if ARM_SECURE_FIRMWARE 105 help 106 ARM Cortex-M configuration required when testing. 107 108 This option is used to select stack sizes and enable features for 109 testing. 110 111 This option is also used to force routing 112 BusFault, HardFault, and NMI exceptions to Secure State, 113 when building a Secure ARMv8-M firmware. This will allow 114 the testing suite to utilize these exceptions, in tests. 115 Note that by default, when building with ARM_SECURE_FIRMWARE 116 set, these exceptions are set to target the Non-Secure state. 117 118config TEST_BUSY_SIM 119 bool "Busy simulator" 120 depends on TEST 121 select ENTROPY_GENERATOR 122 select RING_BUFFER if !XOSHIRO_RANDOM_GENERATOR 123 select COUNTER 124 help 125 It simulates cpu load by using counter device to generate interrupts 126 with random intervals and random busy looping in the interrupt. 127 128endmenu 129 130 131rsource "Kconfig.coverage" 132