Restore userspace testing that was removed with commit 'aa2b72d32a
(tests: logging: remove userspace testing, 2024-04-10)' and reported in
the issue #49213.
For the tests running with threads in user space (with ZTEST_USER),
the memory partitions are configured in the test-suite setup.
Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
The nullpointer address (0x0) is mapped to the debug module in cva6,
making it a valid address.
Thus, in the coredump test, trigger an exception using k_panic()
instead.
Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
Use power state pointers instead of copies which improves performance.
Align power_mgmt_multicore test which was creating pm states in
runtime.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Remove the dependency on the system heap existing when enabling
`ZBUS_RUNTIME_OBSERVERS`. Instead the previously allocated memory is
required to be provided to `zbus_chan_add_obs` (which can still be
allocated through malloc).
Signed-off-by: Jordan Yates <jordan@embeint.com>
The osFlagsWaitAny option is not handled correctly. It returns once any
flag at all is set, whereas it is supposed to only return once one of
the flags specified in flags is set.
Signed-off-by: Utsav Munendra <utsavm@meta.com>
Allow compiler optimizations to remove High-Speed handling code. Knowing
that maximum operating speed is Full-Speed allows to reduce bulk buffers
from 512 to 64 bytes. More RAM optimizations are possible but this
commit only gets the low hanging fruits.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Fixes a large partition mounting error
for flashes with erase size > 32KB
(e.g. s26ks512s0 has 256KB erase size).
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Fixes failed test_lfs_basic for medium partition > 960KB
and for large partition > 3MB.
Flashes with large erase size require larger test partition sizes
(e.g. s26ks512s0 has 256KB erase size).
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
When building with clang it reports:
tests/subsys/mgmt/mcumgr/settings_mgmt/src/main.c:69:22: error: variable
'test_response_read_data_start' is not needed and will not be emitted
[-Werror,-Wunneeded-internal-declaration]
static const uint8_t test_response_read_data_start[5] = {
^
tests/subsys/mgmt/mcumgr/settings_mgmt/src/main.c:73:22: error: variable
'test_response_read_data_end' is not needed and will not be emitted
[-Werror,-Wunneeded-internal-declaration]
static const uint8_t test_response_read_data_end[1] = {
^
The values of test_response_read_data_start and
test_response_read_data_end are not actually used anywhere in the tests.
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Add missed line feed chars at the test's output to fix Ztest's
following status messages corrupted.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Flush test log messages before waiting for the processing
thread to avoid delayed log output messing with the Ztest's
log output on the test complete.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Fix race condition in tests/subsys/logging/log_core_additional
logging.thread test configuration released semaphore before
log message output.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
- Allows to build and run NVS tests on real platforms.
- Enables NVS tests designed for a flash-simulator only when
built for qemu_x86, mps2_an385 or native_sim targets.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Fixes the littleFS test_fs_mkfs_custom test fail
in littlefs_init_cfg(): "erase size must be multiple of write size".
It happens for platforms with erase size < 2*write size (e.g. lpc55s).
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Fixes the false negative littlefs.test_lfs_basic test that can occur
if the small_partition size > 64KB, and for
platforms with CONFIG_FS_LITTLEFS_PROG_SIZE > 64 (e.g. lpc55s, mcxn).
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
When building with clang, it warns:
tests/subsys/usb/bos/src/test_bos.c:24:22: error: variable
'dummy_descriptor' is not needed and will not be emitted
[-Werror,-Wunneeded-internal-declaration]
static const uint8_t dummy_descriptor[] = {
^
Only the size of dummy_descriptor is used, not the contents. Replace the
struct with a constant for the size.
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
- Reduces the ram disc sector count from 400 to 220.
- Saves about 90KB of RAM. All tests still passed.
- Allows platforms with less RAM to run
the ramdisc_small.overlay test.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
As above, the test verify the ability to wake up CPU
from the lowest power state. The test has been
prepared for stm32l562e_dk board.
Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
This test evaluates the residency time of different power states
on the stm32l562e_dk board and calculates the
RMS (Root Mean Square) current for every detected state.
Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
During the test, pytest detects each step and calculates
the RMS (Root Mean Square) current for every detected state.
The test then compares the calculated RMS values
against the expected values.
Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
Providing the right config options and a new test scenario,
coredump_backends test will run under the in-memory backend.
Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
This test is being skipped for the last 3 years, had lots of issues when
it was introduced. No need to keep it in the tree.
If fixed and made to work again, we can always add it back.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
- Fixes the main stack overflow for the fat_fs_api
RAM disk configuration on real platforms.
- Sets CONFIG_MAIN_STACK_SIZE=3072. By default it is 1KB,
but the stack usage is about 2KB.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Allow configuring MTU for CMUX.
Some AT manual and specification define this as a
frame size. Linux ldattach default to 127 bytes,
3GPP TS 27.010 defaults to 31.
We should limit our CMUX frames to a size that
remote end is capable of handling.
Linux silently drops oversized frames.
Also, remove MODEM_CELLULAR_CMUX_MAX_FRAME_SIZE as
this was only limiting a buffer sizes, and resulted
CMUX frames to be capped to same value.
Use MODEM_CMUX_WORK_BUFFER_SIZE and MODEM_CMUX_MTU instead.
Also rename CONFIG_MODEM_CELLULAR_CHAT_BUFFER_SIZES to
CONFIG_MODEM_CELLULAR_CHAT_BUFFER_SIZE as it is now
only used as a Chat module. DLCI pipes use
CONFIG_MODEM_CMUX_WORK_BUFFER_SIZE.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Add some overlay files for the silabs xg29_rb4412a board to enable tests
on the board. Also add the platform to some testcase.yaml files.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Add a test case for the alignment support in loadable extensions. This
test case creates a set of constants with specific alignment requirements
and verifies that they are placed in memory as expected.
Fix the detached section test to use a more standard syntax for the
section attribute, avoiding issues with different toolchains.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Previously the net_linkaddr struct had pointers to the link address.
This is error prone and difficult to handle if cloning the packet as
those pointers can point to wrong place. Mitigate this issue by
allocating the space for link address in net_linkaddr struct. This will
increase the size of the net_pkt by 4 octets for IEEE 802.15.4 where the
link address length is 8, but there no increase in size if link address
is 6 bytes like in Ethernet/Wi-Fi.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Clarify that all max limit on RTOS objects set by Kconfig only apply
to objects whose control blocks were dynamically allocated. The
CMSIS-RTOSv2 impl layer itself does not restrict the number of
statically created RTOS objects.
Signed-off-by: Utsav Munendra <utsavm@meta.com>
Clarify thread Kconfigs to denote the maximum number of dynamically
allocated control blocks and stacks for threads. Allow application to
create any number of threads with statically allocated control block
and stack.
Signed-off-by: Utsav Munendra <utsavm@meta.com>
The zbus hlp_priority_boost test requires thread priority
boosting. If it is running SMP, it is possible that
the message has already been processed before the check
for priority boosting is done, thus failing the test.
So change the test to use 1 CPU only.
Fixes#79197
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
On top of enabling and allowing test entropy sources, enable
CONFIG_ENTROPY_GENERATOR so that a real driver and entropy source gets
used if available.
This is needed for some PSA Crypto implementations that have random number
generation conditionally compiled in.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Some implementations require more stack than others.
Increase the Ztest and main stack sizes to accommodate them.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Use dynamic allocation for key material for
better compatibility as a fully static key store is a new
feature that not all PSA Crypto implementations support.
Explicitly enable CONFIG_MBEDTLS_ENABLE_HEAP to ensure that Mbed TLS uses
heap for the PSA keys' data (instead of failing at runtime).
This will turn off CONFIG_MBEDTLS_PSA_STATIC_KEY_SLOTS, making the
implementation default to dynamic key slots.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Explicitly enable CONFIG_ENTROPY_GENERATOR instead of relying on the
build system's defaults.
This:
- Makes sure the filtering works properly between entropy_driver and
entropy_not_secure test scenarios for the samples.
- Helps with TF-M builds in certain scenarios where key generation (via
`psa_generate_key()`) would fail due to the RNG functionality being
disabled.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
The psa_key_attributes_t type is implementation-defined according to
the PSA Crypto spec.
Compare its fields individually instead of doing a memcmp() over the
entire struct.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Explicitly set the TF-M profile to not rely on the build system defaults
which might differ.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
We want to be able to run tests and get results in CI, not just build
for platforms we do not have access to.
Where possible, use a simulator instead of hw platforms.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>