zephyr/tests
Andy Ross fe04adf99b lib/os: Conditionally eliminate alloca/VLA usage
MISRA rules (see #9892) forbid alloca() and family, even though those
features can be valuable performance and memory size optimizations
useful to Zephyr.

Introduce a MISRA_SANE kconfig, which when true enables a gcc error
condition whenever a variable length array is used.

When enabled, the mempool code will use a theoretical-maximum array
size on the stack instead of one tailored to the current pool
configuration.

The rbtree code will do similarly, but because the theoretical maximum
is quite a bit larger (236 bytes on 32 bit platforms) the array is
placed into struct rbtree instead so it can live in static data (and
also so I don't have to go and retune all the test stack sizes!).
Current code only uses at most two of these (one in the scheduler when
SCHED_SCALABLE is selected, and one for dynamic kernel objects when
USERSPACE and DYNAMIC_OBJECTS are set).

This tunable is false by default, but is selected in a single test (a
subcase of tests/kernel/common) for coverage.  Note that the I2C and
SPI subsystems contain uncorrected VLAs, so a few platforms need to be
blacklisted with a filter.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-02-28 10:06:35 -08:00
..
application_development cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
benchmarks include: misc: util.h: Rename min/max to MIN/MAX 2019-02-14 22:16:03 -05:00
bluetooth Bluetooth: Mesh: Use BT_GATT_CCC_MANAGED 2019-02-27 10:30:50 +01:00
boards tests/boards/intel_s1000_crb: fix potential uninit variables 2019-02-26 01:44:42 +01:00
booting/stub cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
cmsis_rtos_v1 tests: set CONFIG_MAX_THREAD_BYTES for a few tests 2019-02-08 07:04:30 -05:00
cmsis_rtos_v2 tests: cmsis_rtos_v2: Join and detach tests 2019-02-08 11:59:38 -05:00
compliance
coverage tests: coverage: GCOV counter value changed in GCC8. 2019-01-28 08:39:06 -05:00
crypto libc: fix CONFIG_STDOUT_CONSOLE semantics 2019-02-26 08:00:33 -06:00
drivers tests: counter: Adapt test for the qmsi rtc driver 2019-02-27 12:33:53 -08:00
kernel lib/os: Conditionally eliminate alloca/VLA usage 2019-02-28 10:06:35 -08:00
lib lib/os: Conditionally eliminate alloca/VLA usage 2019-02-28 10:06:35 -08:00
misc tests: util: Add UTIL_LISTIFY tests 2019-02-11 09:28:14 -05:00
net net: tests: Migrate DHCPv4 tests 2019-02-26 02:25:14 +01:00
posix tests: Mass SMP disablement on non-SMP-safe tests 2019-02-27 14:22:06 -08:00
shell shell: Deprecate macros for subcommands creation 2019-02-20 07:31:35 -05:00
subsys can: Rename can_msg and can_msg_filter structs 2019-02-22 08:07:03 -05:00
unit tests: move testsuite and configs into subsys/ 2019-02-22 08:58:40 -05:00
ztest tests: move testsuite and configs into subsys/ 2019-02-22 08:58:40 -05:00