zms is not something to be used with depends_on, it is a software
feature. looks like it was a copy/paste from an nvs test. This test was
always fitlered out and never built or ran on anything....
Use filter instead.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Rename this driver to eth_native_tap, including renaming all its
options.
The old options remain until v4.4, but as deprecated.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
- Allows to build and run ZMS tests on real platforms.
- Enables ZMS tests designed for a flash-simulator only when
built for qemu_x86 or native_sim targets.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Bugfix previous `osThreadJoin()` implementation where a thread which
exited with `osThreadExit()` could not be joined upon by other threads.
Signed-off-by: Utsav Munendra <utsavm@meta.com>
Tests an edge case in the RISC-V PSABI: In the medany and the medlow code
models, the compiler emits auipc/lui (U-type) and ld/sw (I-type/S-type)
instruction pairs for accessing a non-local symbol.
The U-type instruction sets the upper 20 bits, the I/S-type the lower 12.
The U-type and I-type/S-type instruction pairs are often adjacent in code.
This is also what the current llext architecture-specific relocations
expect.
However, this need not be the case - compilers can re-use the upper 20
bits set by the U-type instruction with multiple I/S-type instructions,
which is a useful optimization for multiple loads/stores of or within
the same symbol.
This commit adds a unit test for this behavior, which currently fails
for RISC-V.
Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
native_posix is being removed as it has reached its end of life in 4.2,
after being deprecated since 4.0.
So this overlay will not serve any purpose anymore.
Note native_sim did not have an overlay of its own.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
native_posix is being removed as it has reached its end of life in 4.2,
after being deprecated since 4.0.
Remove the twister support for native_posix[//64] and therefore all
references to them from the testcases and samples yamls, so twister
does not error out.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add missing Copyright from derived files and fix the Copyright year for
some files to keep the original Copyright notice
Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
This test has been seen failing at random (though not often).
A valgrind check showed the nvs_ate structures were being
CRC'ed with not-initialized data, and checked later (assuming
the CRC would be different than a constant).
This maybe have been the cause of the test failures, so let's
initialize the whole structure to prevent the CRC value
from depending on random memory/stack content.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Now that `SECURE_STORAGE` does not `select` dependencies, they need to
be enabled explicitly by the tests.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Filtering on something we set in the prj..conf does not do anything. We
have filter on platforms already.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
MMU is enabled via the arch specific MMU option and by the platform.
i.e. X86_MMU or ARM_MMU selects MMU.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit adds a test that checks if disconnecting
and restarting the IPC session works correctly. The
test is also focused on the "unbound" callback.
Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
Co-authored-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
We need to make sure that within Zephyr different users of the PSA APIs
don't interfere with each other because of using the same numerical IDs
for persistent assets.
This takes care of the PSA key IDs when using persistent keys through
the PSA Crypto API.
See the comments in `<zephyr/psa/key_ids.h>` for more information.
This removes the recently-introduced Kconfig options that allowed changing
the base IDs subsystems were using for their persistent keys.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
This patch adds a test suite for the inspection API. The test checks
that the symbols exported by the 'inspect_ext' extension are correctly
mapped inside their corresponding regions and sections.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This adds a on target performance test for Settings SS. Using this test
performance of the Setting SS + NVS/ZMS backend can be benchmarked.
The test repeatedly write 128 settings entries. Each setting entry
has a size of 4 bytes, and path length of 16 bytes (excluding the
null-terminator).
The test has two variants, with and without Bluetooth scan running.
This is useful to benchmark performance along with some component
of BT subsystem activated.
The test could be enhanced in future to include or create combinations
of different functionalities running, when agreesive store operations
are happening.
Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
The SoC State Change Power Domain driver issues TURN_ON/
TURN_OFF actions to all devices registered with it for
certain power states that can be specified via device tree.
This test exercises the functionality of this driver.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Prior to this change a wrap of the completion count (without SUBMIT_SEM)
would result in looping indefinitely waiting for completions.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Add a test for the behaviour of `rtio_submit` with
`CONFIG_RTIO_SUBMIT_SEM=n` when the `cq_count` variable overflows.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Developer reports build error when he uses LOG_RAW in his code
and disables logging in prj.conf using CONFIG_LOG=n.
Add test case for above described scenario.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Include explicitly `logging/log_backend.h` header so that non POSIX
boards can build this test. For POSIX boards, this headers was indirectly
included through `ztest.h`->`ztest_assert.h`->`tc_util.h`->`log_ctrl.h`.
Fixes#85441
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Allow dynamic allocation of USB devices on connected event.
Add very basic USB device validation and configuration.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Fix test_flash_area_get_sectors test for platforms
with maximum number of sectors per image slot > 1024.
Increase the support value to 2048.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
The previous behavior was to call `fs_sync` on the file after every log
item written. In many cases, log messages come in bursts, and `log_core`
already operates in batches, configurable using
`CONFIG_LOG_PROCESS_THREAD_SLEEP_MS` and
`CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD`. Once the batch is done, the
backends get notified with `LOG_BACKEND_EVT_PROCESS_THREAD_DONE` if any
logs were processed. This is a nice time to `fs_sync` the written changes.
This change both speeds up the time spent writing logs and reduces the
amount of block erases done on the flash, as the previous implementation
erased blocks after each individual log message.
Signed-off-by: Kamil Krzyzanowski <kamnxt@kamnxt.com>
Convert testing of the logging backend for file-system to include the
full implementation.
Need to disable logging and just include the unit under test to make
this simpler.
The API functions for the backend can then be called on the backend
object.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
The LLEXT test suites are quite large, and should not be built
for "small" SoCs. Filter the tests based on RAM and ROM/flash
size. The following test sizes built for nrf52840 where used
to determine min sizes:
Name: Flash: RAM:
llext.loader_build 105 80
llext.readonly 105 79
llext.readonly_mpu 140 95
llext.readonly_mmu 106 145
llext.writable 123 125
llext.writable_relocatable 117 129
llext.writable_slid_linking 108 125
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Enforces bitness match of ARC compilers and linkers invoked
building LLEXT apps by inheriting -mcpu flag from Zephyr.
The ARC toolchain becomes confused without the -mcpu flag.
On qemu_hs5x we see GCC select elf32-littlearc64 for
linking an object previously compiled as elf64-littlearc64.
Fixes#80949
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
In the usbd_register_all_classes(), we may need to skip some instances
as they may have very specific function like USB DFU "DFU mode" which
should not be available by default.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Keep on testing the function but fix logic where applicable
and remove last_erased_page_start_offset which has been replaced
with erased_up_to in stream_flash_ctx.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
As SD partition tables, GPT or MBT, is positioned at
the beginning of a device, it is enough to wipe first 64 sectors,
of 512 bytes. Wipe of entire SD card is very slow and unnecessary.
fixes: #84428
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
TF-M small profile does not support secure storage (know as Protected
storage), this commit add filter for tfm test case to pass it
incase of small profile been set, see tf-m profiles in below link
https://tf-m-user-guide.trustedfirmware.org/configuration/profiles/index.html
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
LLEXT-related files are currently scattered in multiple locations in the
build directory. For easier access, this patch groups the outputs in a
subdirectory named 'llext' at the root of the build binaries, alongside
the 'zephyr' directory. This directory will thus contain the generated
debug ELF and the final .llext file for each compiled extension.
Note that this does not affect out-of-tree projects that use LLEXT,
since they already pass the full LLEXT file path to add_llext_target().
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Test `tracing.transport.uart.async.test` was working only due sheer
serendipity: one of the tracing strings checked,
sys_trace_k_mutex_lock_exit, was never being registered on the tracing
buffer. However, the check never got to check this string, so the test
was passing.
Why wasn't it being registered? Tracing buffer size was a bit small for the
flurry of messages - increasing it solves the problem, and is what this
patch does.
Why did the check never got to the missing string? Tracing thread has a
lower priority, so when the k_sleep of test thread expired, it was
preempted. Indeed, if the sleep was changed by any number of ticks, the
test would fail. Even changing order - and thus number - of instructions
executed could make this test fail.
While at it, fixed some typos and an imprecise commentary on code.
Fixes: #84169
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Z_GENERIC_SECTION() uses STRINGIFY() to convert its argument to a
string, therefore the argument shouldn't contain additional quotes.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This new option allows to export devices using identifiers generated
from the hash of the devicetree node path, instead of the device's
ordinal number. Identifiers generated this way are stable across
rebuilds.
Add new test cases to test this new option.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Currently various zbus functions silently change the timeout
to zero when inside an ISR. If a developer is not aware
of this it could lead to unexpected behaviour or a
publish/read failing.
Also in the zbus docs it states to only use a timeout of
zero when inside a ISR multiple times.
Signed-off-by: Brandon Allen <brandon.allen@exacttechnology.com>
Add a test validating that Zephyr can compile with the 3 underlying
filesystems enabled with only `CONFIG_FILE_SYSTEM_LIB_LINK` enabled.
Signed-off-by: Jordan Yates <jordan@embeint.com>
These tests are quite sensitive to the exact random sequence.
After a change of the native_sim entropy generation 2 of them
started failing. Let's set a random seed which avoids the failure.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
All immediates in RISC-V are encoded as two's complement. This commit
adds a test for relocating jumps that utilize the full range of the
immediate, in both positive and negative direction.
To this end, the test uses the compressed b-type (CB) instruction to
branch to its maximum negative (-256) and maximum positive (+254)
targets.
In case of test failure, expect relocating the corresponding llext to
fail.
Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
Mostly a revert of commit b1def7145f ("arch: deprecate `_current`").
This commit was part of PR #80716 whose initial purpose was about providing
an architecture specific optimization for _current. The actual deprecation
was sneaked in later on without proper discussion.
The Zephyr core always used _current before and that was fine. It is quite
prevalent as well and the alternative is proving rather verbose.
Furthermore, as a concept, the "current thread" is not something that is
necessarily architecture specific. Therefore the primary abstraction
should not carry the arch_ prefix.
Hence this revert.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>