Commit graph

15 commits

Author SHA1 Message Date
Peter Mitsis 4e37071f57 tests: disable timeslicing on app_kernel
Updates the app_kernel benchmark so that its default configuration
does not enable timeslicing. As it is still valuable to know what
kind of performance overhead is incurred by enabling timeslicing,
new test configurations have been added.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2023-12-18 09:28:08 +01:00
Peter Mitsis fa33147bf9 tests: app_kernel: Add user support
Add user thread support to message queue, semaphore, mutex and
pipe tests. Mailbox and memory map tests are restricted from
executing from user threads.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2023-10-31 08:58:45 +01:00
Peter Mitsis f9cf48313b tests: app_kernel: Add custom syscalls
Adds two custom syscalls. The first allows a user thread to
change its priority to a higher priority level. The second
is used to obtain a timestamp from a user thread.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2023-10-31 08:58:45 +01:00
Kumar Gala 4f0166088c tests: move to using CONFIG_MP_MAX_NUM_CPUS
For tests that set CONFIG_MP_NUM_CPUS, switch to using
CONFIG_MP_MAX_NUM_CPUS instead as we work to phase out
CONFIG_MP_NUM_CPUS.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-20 22:04:10 +09:00
Peter Mitsis 029035cbea tests: Add CONFIG_PIPES to tests that use pipes
Use of pipes is now configurable. All tests that use pipes must enable
that feature. (Note: no sample projects currently use pipes.)

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2022-08-17 19:31:25 +02:00
Martin Åberg 9e463d023f benchmarks: app_kernel: limits to 1 CPU
The app_kernel test hangs or crashes on qemu_x86_64 when more than
one CPU is enabled. So limits the number of CPUs to 1 even when SMP
is enabled.

This issue has probably been masked for some time because the test
was previously marked as being "slow".

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2021-01-15 13:06:33 -05:00
Peter Bigot 1d048df553 tests: add FP formatting to all tests that require it
Tests that include floating-point format specifications may need
cbprintf FP support.  Make sure it's available.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-11-17 14:44:59 -06:00
Ioannis Glaropoulos 8ef34566ed tests: explicitly disable HW Stack Protection when needed
Some ARM platforms, now, enable HW Stack Protection by
default in the Board definition. So if some tests
need to run without stack protection, it is not
sufficient to disable TEST_HW_STACK_PROTECTION;
we need to explicitly disable HW_STACK_PROTECTION.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-09-24 15:42:09 -05:00
Alberto Escolar Piedras 0ecfdf1070 tests: kernel benchmark: Avoid timeout in nrf52_bsim
This test was configuring the system tick period to 1 second.
The test also constantly aligns to system tick boundaries,
in between each test part, which means the test runs for very long
(it is holding for longer than 1 minute just on those waits between
tests alone).
The nrf sys tick driver configures the RTC to produce still
all RTC interrupts at 32KHz intervals, which cause lots of
interrupts which slow down simulation quite bit.
Overall the test could take longer than 30 seconds in the
nrf52_bsim in CI even that this platform simulated time is decoupled
from real time.

=> Add a new config overlay for the nrf52_bsim board so
we configure there a much higher system tick frequency
It does not affect the test in any way more than shortening
the wait periods between in test part.

Also increment the sys tick to twice per second to speed up
the test in other platforms.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2020-06-08 17:13:10 +02:00
Andrew Boie 7b1ee5cf13 tests: CONFIG_TEST_USERSPACE now off by default
Unlike CONFIG_HW_STACK_PROTECTION, which greatly helps
expose stack overflows in test code, activating
userspace without putting threads in user mode is of
very limited value.

Now CONFIG_TEST_USERSPACE is off by default. Any test
which puts threads in user mode will need to set
CONFIG_TEST_USERSPACE.

This should greatly increase sanitycheck build times
as there is non-trivial build time overhead to
enabling this feature. This also allows some tests
which failed the build on RAM-constrained platforms
to compile properly.

tests/drivers/build_all is a special case; it doesn't
put threads in user mode, but we want to ensure all
the syscall handlers compile properly.

Fixes: #15103 (and probably others)

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-04-06 14:30:42 -04:00
Andy Ross 46891f0213 tests/kernel/benchmarks: Disable TICKLESS_KERNEL for "no tick" tests
These tests was written to try to eliminate timer interrupts, but the
mechanism chosen (setting TICKS_PER_SECOND to 1) is dangerously
susceptible to overflow conditions on systems with fast cycle counters
and high timeout durations.

Actually the tests pass just fine if you use a conventional tick rate
and use a tickless-capable driver (which eliminates interrupts too,
which is the whole point), but there's no easy way in kconfig to do an
"if" to select that condition for capable systems only.  Just disable
tickless to keep the same behavior.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-11-13 17:10:07 -05:00
Adithya Baglody 6663286fd8 benchmarks: app_kernel: Disable userspace for benchmarks
Disable userspace for benchmarks because it changes the KPI
numbers. It will be re-enabled once the required code is
in place.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-05-31 08:48:07 -04:00
Andrew Boie dda7befdba tests: benchmarks: force assertions off
These would interfere with size/footprint data.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-05-24 15:12:56 -07:00
Anas Nashif 829598be2b tests: add CONFIG_TEST for marking tests
Mark tests with CONFIG_TEST to allow for test specific setup and
configuration.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-08 10:03:57 -05:00
Anas Nashif 7bdf166bdb tests: benchmark: rename default .conf file
Have the default config be prj.conf

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Renamed from tests/benchmarks/app_kernel/prj_no_fp.conf (Browse further)