Add tests for the "device list" output with the various configuration of
device power management.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This test is disabled upstream for a while and only run on zephyr
toolchains. Logging is missing the support needed for userspace, see
releated issue.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
testing_device_lock is no longer used and the logic
using it is never used / needed. Just remove it.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
There are several esp32-based boards that its conf and overlay
files are missing proper renaming to match cpu cluster.
This also removes all _SOC_ name from files.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This is an API test and it was not designed to run in a real target.
Some attempts to run this test in devices cause the device to hang
after the test execution because the device sleeps and no wake up
source is set.
Fixes#68453
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
USB High-Speed devices must be able to operate at both High-Speed and
Full-Speed. The USB specification allows the device to have different
configurations depending on connection speed. Modify the API to reflect
USB Specification requirements on what can (e.g. configurations) and
what cannot (e.g. VID, PID) be speed dependent.
While the class configurations for different speeds are completely
independent, the actual class instances are shared between operating
speeds (because only one speed can be active at a time). Classes are
free to provide different number of interfaces and/or endpoints for
different speeds. The endpoints are assigned for all operating speeds
during initialization.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Add necessary macros and convert UAC2 descriptor test from descriptor
blob to descriptor set. Currently there is only Full-Speed descriptor
set.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
This commit adds test for the situation when all blocks
referenced from the top-level indirect block are removed.
Signed-off-by: Franciszek Pindel <fpindel@antmicro.com>
This particular test was ignored in CI because, when using
platform_key, Twister picks the specific platform very early in
the process and it is possible that the chosen one is later
filtered out. To fix this, use the `integration_platforms` key
instead to specify the platforms where the test is expected to
complete successfully.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The latest commits allow llexts to be built on any architecture, even on
those where llext loading is still unsupported, which is very useful for
testing purposes. This means that the LOADER_BUILD_ONLY logic that was
added for this purpose in 1408d1e5b8 is no longer needed.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
During the hwmv1->v2 transition, overlays from a base
board were made to be shared with the variants.
So at that time all overlays for variants which were
just copies of the base overlay were removed.
After that in
https://github.com/zephyrproject-rtos/zephyr/pull/71149
this shared/merged overlay behaviour was reverted,
but not all tests were fixed.
This is one of those. Let's fix it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
During the hwmv1->v2 transition, overlays from a base
board were made to be shared with the variants.
So at that time all overlays for variants which were
just copies of the base overlay were removed.
After that in
https://github.com/zephyrproject-rtos/zephyr/pull/71149
this shared/merged overlay behaviour was reverted,
but not all tests were fixed.
This is one of those. Let's fix it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
During the hwmv1->v2 transition, overlays from a base
board were made to be shared with the variants.
So at that time all overlays for variants which were
just copies were removed.
After that in
https://github.com/zephyrproject-rtos/zephyr/pull/71149
this shared/merged overlay behaviour was reverted,
but not all tests were fixed.
This is one of those. Let's fix it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
LLEXT on Xtensa now supports both shared and relocatable (partially
linked) extensions. This commit adds a copy of the LLEXT test for the
relocatable case.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
First sector starts at CONFIG_EXT2_DISK_STARTING_SECTOR.
This commit fixes calculating free space, based on that value.
Signed-off-by: Franciszek Pindel <fpindel@antmicro.com>
The commit adds dependency on Kconfig FLASH_PAGE_LAYOUT to subsystems
that really require it:
FCB, NVS, LittleFS
and removes direct selection from '*.conf' files where no longer
needed.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Adjustments of overlay and conf files to adjust for the MERGE removal.
The revert of MERGE requires specific overlay and conf files for boards
which relied on the MERGE feature.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This API is not widely used and it is actually broken since device
runtime power management is not checking it when suspending and
resuming.
On top of that, this API is very close to pm_device_busy* API,
close enough to consolidate in only one API.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This patch adds support for custom commands to be executed during the
build of an llext target. The commands can be executed at different
points in the build process:
- PRE_BUILD: Before the llext code is linked.
- POST_BUILD: After the llext code is built, but before packaging
it in an .llext file.
- POST_PKG: After the llext file has been created.
Note that PRE_BUILD is not supported for ARM targets, as in that case
object files are used directly and there is no actual linking step.
The commands can be added using the new add_llext_command() function.
An example usage of it, along with some target properties, is added to
the hello_world test case.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The reserved flash space for coredump is 4KB. However,
the dump_stack itself is larger than 4KB due to kernel stack
size adjustment. So enlarge the space for another page.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Check if syscalls can be accessed from both kernel and userspace, and if
optimised away ones indeed point to NULL.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
debug.coredump.logging_backend is currently failing for most of the targets
I have tried when building with clang. Depending on the target, func_3
invokes undefined behavior by dereferencing addr (which is NULL) which
can lead to the compiler optimizing out significant portions of the code,
resulting in unexpected/incorrect failures.
Here, clang seems to inline func_3 into main then marks the inlined
implementation as unreachable (due to the UB) and removes it and everything
after it in main. So, we fall through to whatever code lies past main,
resulting in a test failure (timeout) from what I've seen. GCC seems to do
similar things, but creates an invalid opcode instruction so the test still
succeeds.
clang is correct in both optimizing this behavior out and leaving
buggy code behind, so disable optimizations for func_3 to keep things under
control and prevent the incorrect failures.
Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
The riscv_virtual, hifive_unleashed, and hifive_unmatched boards all
timeout on this test if they actually perform the null dereference when
they are simulated. Whether the null dereference happens seems to depend
on the compiler used as well as whether optimizations are enabled though.
To make this more consistent, handle these boards in the same way as others
which use Renode simulation and have them directly call k_panic().
Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
Fix conflict between commit ce24394437 ("llext: add object test case")
and commit 1408d1e5b8 ("tests: llext: compile architectures not
supported yet") which were tested separately but merged at the same
time.
Github "Merge Queues" can avoid this (and save resources) but:
- they're not used by Zephyr CI
- they provide confusing feedback
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
For now llext supports a very limited number of architectures. This
restriction is enforced by add_llext_target() in CMake at configuration
time.
Add a new `LOADER_BUILD_ONLY` conditional in tests/subsys/llext/simple/
and a new `llext.simple.loader_build`, `build_only` test that does not
invoke `add_llext_target()` and only compiles the llext framework code.
This helps find and fix bugs in `subsys/llext/*.c` and make it ready to
be used when add_llext_target() limitations are lifted.
Note this is pure `tests/` change without any change in the actual llext
framework code. The existing test is only modified to conditionally
invoke add_llext_target().
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Change the filter from CPU_HAS_MPU to ARCH_HAS_USERSPACE to
when filtering boards which support userspace.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Validate the new relocations for BL and BLX instructions by
creating a new test extension which contains a chain of global
functions in a pseudo random order to (hopefully) generate
relative jumps in both positive and negative directions.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Fix for test that was failing due to incorrectly testing of
stream_flash_erase_page.
The stream_flash_erase_page would never be able to erase a page
it has been requested to erase.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The simple test is there to test the API and simple extensions in
unison. Hello world was intended to be the first not the only extension
being tested.
Also refactors the entry thread to allow for usermode potentially by
passing the pointer to the function symbol rather than having it look it
up directly.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Set the minimal RAM requirement for the test variant, so that it does
not get built for platforms it won't fit anyway.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>