Userspace doesn't necessarily imply stack overflow protection
for supervisor threads. Enable this as well if the hardware
supports it.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Many boards do not enable user mode in their default configuration
even though they support it. However for purposes of our unit
testing we really do want it on all the time.
It's not enough to just flip on CONFIG_USERSPACE, the tests largely
assume that CONFIG_APPLICATION_MEMORY and CONFIG_DYNAMIC_OBJECTS
are enabled. Update CONFIG_TEST_USERSPACE to be on by default if
CONFIG_TEST is active, and hang CONFIG_DYNAMIC_OBJECTS on it too.
This problem was not previously detected as qemu_x86 has the
user mode options in its defconfig and it is currently the only
user mode compatible platform which runs in emulation.
Fixes#7692
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The qemu doesn't have any flash drivers present in the
drivers/flash folder.
When building the tests/subsys/fs/nffs_fs_api the qemu picks
up a local file to emulate the drivers. This setup was causing the
failures in mapping required dependencies. This patch creates a
new kconfig which can be used to test out the flash drivers.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
A new Kconfig to help test the userspace mode. Needed for devices
which have userspace capabilities but are not enabled by default.
This kconfig enables the userspace for the devices which have
CONFIG_ARCH_HAS_USERSPACE enabled.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This patch does several things, most notably it changes the semantics
of CONFIG_DEBUG. CONFIG_DEBUG continues to behave as a vaguely defined
"debug mode" that enables printf's, -Og, etc. but now the user may
choose to be in "debug mode" while using a different optimization
level than -Og.
Tp support this a new config is defined to enable -Og;
CONFIG_DEBUG_OPTIMIZATIONS.
Additionally CONFIG_SIZE_OPTIMIZATIONS is introduced to allow the user
to explicitly request optimizing for size instead of relying on
defaulting to it.
The three config's {NO,SIZE,DEBUG}_OPTIMIZATIONS are now organized in
a Kconfig choice to ensure that at most one can be enabled at a time.
Finally, selected users of CONFIG_DEBUG have been ported to use one of
the optimizations configs when it was clear from usage that the
intention was to behave differently when using a different
optimization level and not when in "debug mode".
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Added a new config option which lowers the compiler
optimizations to -O0 independently of other flags.
CONFIG_COVERAGE uses it now instead of having its own
choice in CMakeLists.txt
Fixes#5720
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Build with coverage enabled for any other boards or applications is
useless at least right now. Make sure we only enable coverage for native
applications.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
With the native port we are able to generate coverage reports, add the
needed options to the compliler and add a kconfig option to enable this
on the supported architectures.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This option is added in order to support Xtensa, which needs more stack than
other architecture. This allows having a centralized way to change stack
requirements for all tests.
This extra stack size is eaqual to 0 for most architectures, except Xtensa
which requires additional 768 bytes for each stack.
Change-Id: Ie5dcae1dfd29018d36ef35dae22dc4c1a2ecdc14
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
Replace the existing Apache 2.0 boilerplate header with an SPDX tag
throughout the zephyr code tree. This patch was generated via a
script run over the master branch.
Also updated doc/porting/application.rst that had a dependency on
line numbers in a literal include.
Manually updated subsys/logging/sys_log.c that had a malformed
header in the original file. Also cleanup several cases that already
had a SPDX tag and we either got a duplicate or missed updating.
Jira: ZEP-1457
Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This framework makes testing in most parts a lot easier, since it gives
an unified base to work with, removing a lot of unnecessary code from
tests. This framework currently features simple assertions and basic
mocking support. The framework works both with and without Zephyr
running, so it can be used for real unit testing.
Origin: Original
Change-Id: I8c5bf2e6b8d6656b6197ee91699b61e730c1cfe3
Signed-off-by: Jaakko Hannikainen <jaakko.hannikainen@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>