Guo Lixin
d6995cb050
tests: fpu_sharing/generic: workaround crash on qemu_leon3
...
When running tests/kernel/fpu_sharing/generic on qemu_leon3 with the
new ztest API, a fatal error is raised while test is reported success.
So workaround this by changing the main stack size to 2048.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-18 12:20:39 -04:00
Guo Lixin
948cb6a8d9
tests: kernel: generic: move to new ztest API
...
Move tests/kernel/fpu_sharing/generic/ to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-18 12:20:39 -04:00
Guo Lixin
4f37c99601
tests: kernel: float_disable: move to new ztest API
...
Move tests/kernel/fpu_sharing/float_disable/ to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-18 12:20:39 -04:00
Tomislav Milkovic
0fe2c1fe90
everywhere: Fix legacy include paths
...
Any project with Kconfig option CONFIG_LEGACY_INCLUDE_PATH set to n
couldn't be built because some files were missing zephyr/ prefix in
includes
Re-run the migrate_includes.py script to fix all legacy include paths
Signed-off-by: Tomislav Milkovic <milkovic@byte-lab.com>
2022-07-18 16:16:47 +00:00
Guo Lixin
6433cfb2ec
tests: kernel: profiling: move to new ztest API
...
Move tests/kernel/profiling/ to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-18 13:23:49 +00:00
Guo Lixin
94936ca202
tests: kernel: common: move to new ztest API
...
Move tests/kernel/common/ to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-14 22:09:57 -04:00
Johann Fischer
d66e047e5b
tests: use unsigned int for irq_lock()
...
irq_lock() returns an unsigned integer key.
Generated by spatch using semantic patch
scripts/coccinelle/irq_lock.cocci
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-07-14 14:37:13 -05:00
Enjia Mai
4a3184441c
tests: kernel: mem_protect: move the obj validation test to new ztest
...
Migrate the testsuite tests/kernel/mem_protect/obj_validation
to the new ztest API.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-14 10:29:33 +02:00
Enjia Mai
a3d834ed2b
tests: kernel: mem_protect: move the syscalls test to new ztest
...
Migrate the testsuite tests/kernel/mem_protect/syscalls to
the new ztest API.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-14 10:29:33 +02:00
Enjia Mai
72d4ac27ad
tests: kernel: mem_protect: move the protection test to new ztest
...
Migrate the testsuite tests/kernel/mem_protect/protection to
the new ztest API.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-14 10:29:33 +02:00
Enjia Mai
4df4646aa1
tests: kernel: mem_protect: move the stack random test to new ztest
...
Migrate the testsuite tests/kernel/mem_protect/stack_random to the new
ztest API.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-14 10:29:33 +02:00
Enjia Mai
b479838e0a
tests: kernel: mem_protect: move the stack protection test to new ztest
...
Migrate the testsuite tests/kernel/mem_protect/stackprot to the new
ztest API.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-14 10:29:33 +02:00
Enjia Mai
87f0b58efe
tests: kernel: mem_protect: move the mem map test to new ztest API
...
Migrate the testsuite tests/kernel/mem_protect/mem_map to the new
ztest API.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-14 10:29:33 +02:00
Enjia Mai
b7f1e98724
tests: kernel: move the interrupt tests to new ztest API
...
Migrate the testsuite tests/kernel/interrupt to the new ztest API.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-12 13:21:47 -04:00
Enjia Mai
b3d442ec87
tests: kernel: move the direct interrupt test to arch testing
...
Move the direct interrupt test to tests/arch/x86/direct_isr. Two
reasons:
1. The direct interrupt is only for x86. It's arch-specific.
2. And it need extra gcc option to pass the build, that will
include testsuite number. Although it seems like we add a
extra testsuite for it, actually we can reduce whole tests
configuration in tests/kernel/interrupt. And also make this
test more generic as it used to be.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-12 13:21:47 -04:00
Guo Lixin
b2532e3fb7
tests: kernel: stack: move to new ztest API
...
Move tests/kernel/stack/ to use new ztest API.
And make test case a little more independent.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-12 10:02:58 -04:00
Guo Lixin
800253aeea
tests: kernel: lifo_usage: move to new ztest API
...
Move tests/kernel/lifo/lifo_usage/ to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-12 10:02:33 -04:00
Guo Lixin
9ebc1b0954
tests: kernel: lifo_api: move to new ztest API
...
Move tests/kernel/lifo/lifo_api/ to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-12 10:02:33 -04:00
Peter Mitsis
4c1d33a436
tests: Add mslab_stats test
...
This test case verifies that the mem slab runtime stats routines
behave as expected.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2022-07-12 13:59:26 +00:00
Guo Lixin
dada9ea54b
tests: kernel: gen_isr_table: move to new ztest API
...
Move tests/kernel/gen_isr_table/ to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-11 13:23:27 +02:00
Manuel Arguelles
f2ae4b67b2
tests: samples: bump timeout for FVP BaseR board
...
Timeout must be increased for fvp_baser_aemv8r_aarch32 board. Enabling
MPU on this board makes simulation slower.
Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2022-07-11 11:17:02 +02:00
Carlo Caione
3f8c119357
tests: shared_multi_heap: Move to new ztest API
...
Migrate the test to the new ztest API.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-08 20:13:04 +00:00
Guo Lixin
dd5463a5ed
tests: kernel: xip: move to new ztest API
...
Move test to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-08 20:10:59 +00:00
Guo Lixin
ce56056c30
tests: kernel: fifo_usage: move to new ztest API
...
Move tests/kernel/fifo/fifo_usage/ to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-08 12:04:21 +02:00
Guo Lixin
f95bae9962
tests: kernel: fifo_timeout: move to new ztest API
...
Move tests/kernel/fifo/fifo_timeout/ to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-08 12:04:21 +02:00
Guo Lixin
0f9050544a
tests: kernel: fifo_api: move to new ztest API
...
Move tests/kernel/fifo/fifo_api/ to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-08 12:04:21 +02:00
Guo Lixin
94078d3d8f
tests: kernel: sleep: move to new ztest API
...
Move tests/kernel/sleep/ to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-08 12:02:18 +02:00
Carlo Caione
e3f3aba989
arch: Use a common place for z_irq_spurious
...
Every architecture must export the z_irq_spurious definition. Just unify
that in one single header file.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-07 15:24:39 -04:00
Guo Lixin
ddfde93436
tests: kernel: usage: move to new ztest API
...
Move tests/kernel/usage/ to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-07 10:13:23 +02:00
Guo Lixin
c40afb7059
tests: kernel: tickless: move to new ztest API
...
Move tests/kernel/tickless/ to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-07 10:07:58 +02:00
Carlo Caione
3a5e54d602
gen_isr_table: Exclude m2gl025_miv from test
...
Apparently m2gl025_miv does not support vectored mode. Exclude from
test.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-07 10:00:20 +02:00
Carlo Caione
fe19420f93
test: gen_isr_table: Fix test for RISCV
...
Fix this test adding a proper support for RISCV when in vectored mode
with IRQ vector table generation.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-07 10:00:20 +02:00
Guo Lixin
9588ecdba8
tests: no-multithreading: move to new ztest API
...
Move tests/kernel/fatal/no-multithreading/ to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-06 21:09:55 -04:00
Guo Lixin
6a254c7fb6
tests: kernel: exception: move to new ztest API
...
Move tests/kernel/fatal/exception/ to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-06 21:09:55 -04:00
Anas Nashif
02f2896586
tests: add mising braces to single line if statements
...
Following zephyr's style guideline, all if statements, including single
line statements shall have braces.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-06 11:00:45 -04:00
Jordan Yates
201902bda1
tests: device: validate SYS_INIT_NAMED
...
Check that `SYS_INIT_NAMED` allows multiple instances of the same
initialisation function, as long as names are unique.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-07-06 10:44:35 +02:00
Guo Lixin
05c13ac094
tests: kernel: pipe_api: move to new ztest API
...
Move tests/kernel/pipe/pipe_api/ to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-05 11:13:00 -04:00
Guo Lixin
af1e0c5a00
tests: pipe: move to new ztest API
...
Move tests/kernel/pipe/pipe/ to use new ztest API.
And make test case a little more independent.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-05 11:13:00 -04:00
Guo Lixin
4c3b7f3785
tests: kernel: sys_event: move to new ztest API
...
Move tests/kernel/events/sys_event/ to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-05 09:52:49 -04:00
Guo Lixin
31cc0a20af
tests: kernel: event_api: move to new ztest API
...
Move tests/kernel/events/event_api/ to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-05 09:52:49 -04:00
Guo Lixin
213eaeee79
tests: kernel: spinlock: move to new ztest API
...
Move test to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-04 06:54:31 -04:00
Guo Lixin
f137e24e3b
tests: kernel: smp: move to new ztest API
...
Move tests/kernel/smp/ to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-01 14:04:22 -04:00
Guo Lixin
c015277730
tests: kernel: device: move to new ztest API
...
Move tests/kernel/device to new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-01 18:00:40 +00:00
Guo Lixin
e9ae9dd622
tests: kernel: smp_boot_delay: move to new ztest API
...
Move tests/kernel/smp_boot_delay to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-01 16:37:17 +00:00
Guo Lixin
0a53b0b4a2
tests: kernel: obj_tracking: move to new ztest API
...
Move test to use new ztest API.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-01 16:37:04 +00:00
Andy Ross
b65277990a
tests/kernel/context: Fixup slop in cpu_idle test case
...
This test was written to idle for exactly 1ms and wake up with zero
error, which is just too tight for some platforms (and worked on
emulators where the tick rate is 10x coarser only because 0 == 0!).
And it's not clear that it's testing anything we promise in
documentation, regardless. Early wakeups are not an error and
absolutely not disallowed, yet the test is treating the wakeup like a
sleep.
Clean it up a bit and relax the tolerance to what we can compute
reliably: do all the math in ticks, idle for 10ms (i.e. longer than a
host quantum for emulators), and allow 1 tick of slop on either side to
permit slightly early wakeups while still verifying that "yes, the idle
did idle".
Fixes #46641
Signed-off-by: Andy Ross <andyross@google.com>
2022-07-01 11:37:54 +02:00
Andrei Emeltchenko
66cfe4f430
tests: mem_protect: Fix checking wrong variable
...
At the moment zassert_is_null() is checking value which is always NULL.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-30 12:37:14 -05:00
Andrei Emeltchenko
9ea701e930
tests: threads: Remove unused variable
...
Clean up dead code.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-30 12:37:14 -05:00
Keith Packard
394a0485fb
tests/kernel/common: Let picolibc pick a malloc heap size
...
Now that picolibc's malloc arena configuration always allocates
some space, we don't need explicit allocations for tests.
Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-30 10:33:24 +02:00
Keith Packard
2263708c73
tests/mem_protect: Increase MPU sizes for qemu_cortex_a53
...
When running with picolibc, we need more MPU resources for these
tests. Get rid of picolibc malloc arena too.
Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-30 10:33:24 +02:00