Add test for cbprintf_package_convert function which checks if
it correctly handles array that holds string lengths. When convert
function is used twice, at first to calculate size of the output
package and then to actually convert the package, array of string
lengths can be used to optimize operation by not calculating
string lengths twice. However, array may not be able to hold all
string lengths that are needed for that package. In that case,
string lengths that did not fit into the array will be calculated
twice, in both conversions.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Hide the main table of contents so that it doesn't show up in the actual
documentation index, only in the side bar. This helps keep the index
less cluttered and to the point.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Help make sure the most important documentation entry points are visible
without scrolling by moving less important information "under the fold".
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The current implementation casts the user data to the attribute value,
which makes an assumption about the user data. This commit changes the
implementation to use the attribute value read function when extracting
the characteristic properties.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Remove deprecated _ENUM_TOKEN and _ENUM_UPPER_TOKEN. These are
deprecated for over three years by now.
Signed-off-by: Joel Hirsbrunner <jhirsbrunner@baumer.com>
This commit fixes configuring pin drive strength in pinctrl driver.
Previously, there was a mismatch while filling pincfg and checking
pincfg drive strength field. This fix simplifies the operation and
avoids gpio driver header dependency.
Signed-off-by: Mert Ekren <mert.ekren@analog.com>
Co-Authored-By: Sadik Ozer <sadik.ozer@analog.com>
When using the --build-only into --test-only
Twister setup, NOTRUN statuses were not properly rerun.
Now they are properly run again if runnable.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
In receiving thread, continuing the loops is based on
has_ongoing_exchanges() so it does not need atomic
coap_client_recv_active variable.
When idling, it wakes from semaphore. But there was potential
deadlock when coap_client_schedule_poll() would not signal the
semaphore, if atomic variable was already showing that it runs.
Removing the atomic variable removes this deadlock.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
If we receive poll() error during a request, it must
be forwarded to application.
If instead receive poll() error later, it should not be
forwarded as it might be result of application closing the
socket.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
It is error prone to flag separate booleans, so try to use
reset_internal_request() every time we release the internal request
structure.
Also refactor the reset_internal_request() so that we reset the
timeout value so it does not trigger again.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
If send() fails, we have not technically send the CoAP retry yet, so
restore the same pending structure, so our timeouts and retry counters
stay the same.
This will trigger a retry next time the poll() return POLLOUT, so we
know that we can send.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Refactor the CoAP retry handling into the handle_poll() function,
so that we only try to send retries if the socket reports POLLOUT.
Also move the receiving into same loop, so when poll() reports POLLIN
we recv() the message and handle it before proceeding to other sockets.
Also fix tests to handle POLLOUT flag and add support for testing
multiple clients.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
When transmission of first request fails, reset the internal request
buffer as there is no ongoing CoAP transaction.
Application can deal with the failure.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
This causes a build error as nRF70 driver running on CPU APP needs this
when SR co-existence is enabled.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
This commit adjusts the sizes of the two PLIC nodes AE350 defines:
* `plic0` size is changed from `0x04000000` to `0x02000000`
* `plic_sw` size is changed from `0x04000000` to `0x00400000`
Without these change, `plic0` address space would overlap with `plic_sw`,
and with other memory-mapped peripherals.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
Add "memory" to the clobber list"
From GCC 14 the compiler optimizes away memory accesses that do not
impact the asm block. Adding the memory to the clobber list lets the
compiler know that the memory state is to be preserved.
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Move the _main argument to the input list rather than the output one on
the asm block and change the spec to "r". The ASM block does not return,
so it does not make sense for it to expect any output.
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
To use Xtensa toolchain, various environment variables must be
set so the executables can find necessary files and what core
to compile for. This becomes an annoyance when you have to
test multiple boards with different cores. You have to use
one set of environment variables per core. Twister cannot test
them all in one setting, and it is especially annoying doing
west builds. So enhance the environment variables handling so
that TOOLCHAIN_VER and XTENSA_CORE can be replaced by
TOOLCHAIN_VAR_<board> and XTENSA_CORE_<board> where <board>
is the normalized board target (think <board>.yaml). CMake
will then figure out the core ID for the toolchain to use.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
xt-clang uses GNU Assembler (xt-as) based on binutils. However,
CMake doesn't recognize it when invoking through xt-clang. This
results in CMake going through all possible combinations of
command line arguments while invoking xt-clang to determine
assembler vendor. This multiple invocation of xt-clang
unnecessarily lengthens the CMake phase of build, especially
when xt-clang needs to obtain license information from remote
licensing servers. So here forces the assembler ID to be GNU to
speed things up a bit.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
ExecutionCounter has been expanded and now hold i.a.
more information on the statuses of TestCases.
This information is now incorporated in relevant summaries
- runner.py and reports.py.
Layout of those was changed to present that
and previous information in a clear and concise way.
TestInstance execution counter now is more intuitive.
Instances filtered out before running are no longer included there.
Retries now properly reset the counter.
TestCases with None and other incorrect final statuses
are logged as errors, but do not
exit Twister with a nonzero exit code.
This is because None statuses, although incorrect,
are currently common.
Inconsistent spacing in ERROR and FAILED fixed.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
scripts: Dmitri fix
Fix of a problem noticed by Dmitri
Removed unnecessary additional spaces when
printing FAILED and ERROR status.
Now TwisterStatus.get_color is used more.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
If the invalid short address (0xfffe) is specified,
configure the Enhanced Ack just for the extended address.
This is needed because Header IEs for Enhanced Ack must be
configured before the short address has been assigned to
the child.
Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
Coverage for cmsis rtos APIS should is provided using simulation, we
should not build those on every platform we have. Avoid failures due to
incompatiblities in requirements coming from various boards and also
reduce churn and noise during testing and CI.
Fixes#80215
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The CAP tests used u_group->cig->index but the u_group->cig may
have been deleted when the stream is released, which meant
that u_group->cig == NULL when e.g. unicast_stop_complete_cb
was called and that could cause failing tests as the index
would just be a uninitialized value.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Change pins that are used for qdec nrf54h20dk to align with shield
(loopbacks) used in internal CI. This change is needed to start
qdec driver power management testing.
Signed-off-by: Piotr Krzyzanowski <piotr.krzyzanowski@nordicsemi.no>
If POSIX_API is not configured the close function is not available.
Use zsock_close instead.
Signed-off-by: Andreas Huber <andreas.huber@ch.sauter-bc.com>
Missed a few keys while moving to the new style twister.yaml file for
the intel_adsp platform. Add those back.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The default frame rate is printed as a floating point number. Without
enabling CONFIG_REQUIRES_FLOAT_PRINTF, it is not printed at all. Fix it.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
The documentation of "Kernel/Data Structures" incorrectly
states that 'all provided structures are uniformly unsynchronized;
access to them is not threadsafe by default'.
In reality, some of them are threadsafe and some are not.
This might discourage users from using threadsafe data structures
where applicable, or mislead users into adding unnecessary locks.
This proposal addresses the issue by specifying thread safety
for each provided data structure.
My assessment of thread safety is based purely on source code analysis;
hence an expert verification would be appreciated.
Signed-off-by: Vukan Turkulov <vukant@gmail.com>
Add myself "rghaddab" as maintainer to the ZMS storage system as I am
the author of this new storage solution
Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
As per its creators, CMake is written with a capital "M".
The initial reason for this change is that I want Twister to print
"ERROR : CMake build failure" instead of "ERROR : Cmake build failure".
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
The initial note about the install guide for different distributions
can be easily overlooked. Add a second note to make it more prominent
in the first step.
Signed-off-by: Timon Skerutsch <zephyr@diodes-delight.com>
SOCs using ECC require the SEGGER RTT control block address to be
provided to the tooling, as the SEGGER tools will not scan the memory
range of ECC ram. Add documentation making this clear to boards with
these SOCs.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add myself to the collaborator list of flash to contribute to the work
of enhancement of flash API
Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
sqrtf() is used for floats but the argument and resulting
variable are both doubles. LLVM would complain about
implicit conversion from float to double. So use sqrt()
instead as it is used with doubles.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
the script shows an incorrect file name, I check the wrong file first, then
I find the script did not print the current reading file name.
Fix this to prevent others from wasting their time on this.
The new error message:
```
[1/179] Generating syscalls.json, struct_tags.json
Error decoding zmk/.../altera_msgdma.c (included in zephyr/.../ethernet.c)
```
Signed-off-by: Sa Sasu <i@sasa.su>
The minimal libc is currently built as a zephyr_library and will be
included in the final link line as such. However, the c_library property
will still be set as "-lc" (for most linkers) and will be added to the
link line. This effectively requires that a separate libc implementation
be available in the toolchain and makes it possible to accidentally pull
from the non-minimal libc.
This doesn't seem desirable, so try to prevent this by clearing the
c_library property if we are using the minimal libc.
Signed-off-by: Jonathon Penix <jpenix@quicinc.com>