Commit Graph

12 Commits

Author SHA1 Message Date
NingX Zhao 5f681dea38 kernel: heap: move heap testcase to new ztest
Move heap testcases to new ztest.

Signed-off-by: NingX Zhao <ningx.zhao@intel.com>
2022-08-10 12:57:36 -04:00
Fabio Baltieri def230187b test: fix more legacy #include paths
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-02 16:41:41 +01:00
Gerard Marull-Paretas ade7ccb918 tests: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all tests to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 20:02:14 +02:00
Carles Cufi e83a13aabf kconfig: Rename the TEST_EXTRA stack size option to align with the rest
All stack sizes should end with STACK_SIZE.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-02-22 08:23:05 -05:00
Daniel Leung 771c177909 tests: k_heap_api: make alloc pending tests a bit more robust
Both alloc_pending tests requires the main thread to utilize
the heap so that child threads must pend on memory allocations.
However, the previous implementation was not SMP friendly where
the child threads could run and succeeded in memory allocation
on other CPUs while the main thread continued to allocate
memory. The main thread would fail to allocate memory if
the child thread (on other CPU) has not freed the memory yet.
Not to mention that, in this scenario, the child thread was not
pending on memory allocation which defeated the purpose of
the test. So to fix this, make sure the main thread allocates
enough memory so future allocations must go into pending.
Also, check that the child thread cannot allocation memory
when first entered so it is actually going into pending.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-02-08 07:34:48 -05:00
Lixin Guo 72dba936cb tests: heap: add test case for coverage
Add a test case for k_heap_aligned_alloc API.

Signed-off-by: Lixin Guo <lixinx.guo@intel.com>
2021-11-07 05:39:10 -05:00
Torsten Rasmussen 2760fb9eda tests: added kernel tests for arm arch with linker script generator
This commit adds an additional test case for several kernel test suites
to ensure that the linker script generator is working correctly for a
subset of the Zephyr test suites.

The ensures that the basic functionality of the linker script generator
is working while still keep the performance impact on CI at a minimal
level.

Using the kernel tests is a trade-off between testing coverage of the
linker script generator and the time it takes to complete CI.

The kernel tests is considered to have the broadest coverage of various
features important for the generated linker script.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-08-30 08:54:23 -04:00
Torsten Rasmussen 1cccc8a8fe cmake: increase minimal required version to 3.20.0
Move to CMake 3.20.0.

At the Toolchain WG it was decided to move to CMake 3.20.0.

The main reason for increasing CMake version is better toolchain
support.

Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-08-20 09:47:34 +02:00
Andy Ross 3953e07822 tests/kernel/mem_heap: Add minimum-size heap test
Add test to statically allocate a minimum-size heap, verify that it
works to allocate a single byte and that it doesn't overrun its memory
bounds.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-05-20 17:52:21 -04:00
Ying ming a941b6a8a7 test: kheap: add testcase to improve coverage
Add a testcase to prove the thread can be waited on waitq when
there isn't enough space on heap.

Signed-off-by: Ying ming <mingx.ying@intel.com>
2021-03-01 15:39:34 -06:00
Ying ming 812914ff5d test: kheap: add testcase
Add testcase when use kheap api in isr context.

Signed-off-by: Ying ming <mingx.ying@intel.com>
2021-01-18 23:19:33 -05:00
iva kik 10fdf95b94 tests: k_heap api: add tests for k_heap_api
Add test cases to test k_heap_alloc() and k_heap_free() APIs

Fixes #29654

Signed-off-by: iva kik <megatheriumiva@gmail.com>
2020-11-12 15:51:45 -05:00