To build for the nrf5340bsim//cpunet with the IPC service, one
needs to build also with the cpuapp image.
Without it no workable final executable/image is produced.
Let's just platform_exclude it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
(cherry picked from commit b5e39d57cd)
Run address sanitizer to catch any undefined behavior issues
in the code.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit d5ced71a8c)
Use memcmp() to compare values instead of direct comparison.
Without this, some of the tests were failing because this
comparison "" != "" was true when ASAN was enabled.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 007a274258)
The test code accessed buffer outside of limits. Fix it by
setting the string length properly in the test.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 2df51049e4)
Make sure that IPv6 address parsing works as expected.
Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 1c79d0c467)
Make sure that IPv4 address parsing works as expected.
Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit d1b52d078f)
Enable CONFIG_DAC as this test references the driver DT spec structure
and therefore needs the driver built as it is the one instantiating it.
The test builds in typical platforms because the use of the structure is
being optimized out at build time.
But when this is not the case, the test fails to link.
The issue can be reproduced with for ex.
```
cmake -GNinja -DBOARD=native_sim/native ../tests/lib/devicetree/api_ext/ \
-DCONFIG_NO_OPTIMIZATIONS=y
ninja
```
But will fail for other boards with the default configuration intree.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
(cherry picked from commit 8d9859e2e9)
Fixes wrongly having an extra map entry for this response
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
(cherry picked from commit a64883ef5d)
Add a few new tests covering the bug discovered in ND packet
headers validation on input. Packets with invalid hop limit
should be dropped instead of silently being passed through only
if the ICMPv6 code is correct.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 137d08f879)
Enable RTC_ALARM and RTC_CALIBRATION in rtc_api tests for stm32h7s*
based ST boards: stm32h7s78_dk and nucleo_h7s3l8.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
(cherry picked from commit 0b3b601e75)
Add missing SoC overlay with UART1 loopback pin
configuration and add esp32c5_devkitc to the
platform_allow list.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
(cherry picked from commit 401b45abee)
nSIM simulates the full address space, so dereferencing a NULL
pointer (writing to address 0) does not generate a fault. This
caused the coredump test to hang and timeout on nsim_arc_v/rmx100.
Add CONFIG_SOC_FAMILY_NSIM_ARC_V to the list of platforms that use
k_panic() instead of a NULL pointer dereference to trigger the
fatal error.
Signed-off-by: Mohamed Moawad <moawad@synopsys.com>
Add a test case which verifies that if a client socket is closed during
an async handshake, the TCP context is properly cleaned up on close,
i.e. it no longer tries to establish the connection.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
body_frag_len was computed using a raw buffer offset formula:
body_frag_len = data_len - (body_frag_start - recv_buf)
This is correct for Content-Length responses: the recv buffer contains
only decoded body bytes after the headers, so the offset arithmetic
gives the exact body byte count.
It is broken for Transfer-Encoding: chunked. RFC 7230 §3.3.2 makes
the two mutually exclusive, so chunked TE never comes with a
Content-Length. With chunked TE, the recv buffer contains both the
decoded body bytes and the chunk framing bytes (chunk-size line, CRLF
body-terminator, terminal chunk "0\r\n\r\n") side by side. The
formula counts everything from body_frag_start to the end of the
buffer fill, so it includes the framing bytes that follow the body,
causing body_frag_len to overcount.
http_parser already knows the exact decoded body byte count: it passes
it as the length argument to on_body(). Use that instead.
Add a regression test that sends a single chunked 206 response from a
raw loopback TCP server in one write, so the chunk terminator and
terminal chunk land in the same recv buffer as the body. The test
asserts body_frag_len equals the decoded body size, not body size + 7
framing bytes.
Signed-off-by: Vytautas Virvičius <vytautas@virvicius.dev>
The root cause of the build failure in this test on kit_psc3m5_evk has
been addressed. The platform_exclude for this board is no longer
necessary.
Signed-off-by: John Batch <john.batch@infineon.com>
Fixes the logic in detecting which partition is being executed
from, also fixes a test for this feature
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
`net_calc_chksum` is designed to return uint16_t checksum.
Its current behavior is to return 0 checksum on error
(or on an empty payload) and a valid non zero checksum for non empty
payloads. 0 could be a valid checksum for empty payload.
So update the `net_calc_chksum` and its wrapper's definition to
return error codes.
Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com>
Add an initialisation time check for stream flash that the requested
offset and size does not overflow `size_t`. This in turn ensures that
`inspect_device` doesn't erroneously return `0` if the addition would
have overflowed.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Second clock_control_on() may return 0 or -EALREADY when the clock is
already on; assert it stays ON. Prepares for ESP32 clock_control
returning success when already enabled.
Signed-off-by: Anand Kumar <anandvtu16158@gmail.com>
Test was skipped if baudrate was too high. Test can actually
reconfigure the DUT device to use lower baudrate and run the test.
Initial baudrate is restored once test is completed.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Extend the most basic test (single read) to check supported data
bits sizes (5-8 bits). If driver does not support given configuration
then test is skipped.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add test suite for the zbus multidomain proxy agent
implementation.
adds a mock backend to enable isolated testing without requiring
actual hardware.
Signed-off-by: Trond F. Christiansen <trond.christiansen@nordicsemi.no>
Remove unused code related to zbus_proxy_agent_backend_desc and run-time
backend registration left over from early development.
Signed-off-by: Trond F. Christiansen <trond.christiansen@nordicsemi.no>
Configure the GPT (General Purpose Timer) instances to use "free-run"
mode in the counter basic API test overlays for NXP i.MX RT and i.MX 8
boards. This ensures consistent timer behavior across the test suite.
Changes apply to:
- mimxrt1170_evk (GPT2-6)
- mimxrt1180_evk cm33 and cm7 (GPT2)
- imx8mp_evk, imx8mn_evk, imx8mm_evk (GPT1)
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
This commit adds EXTRAVERSION to code through version.h.
This aligns the symbols available in code with those available
in the VERSION file.
Signed-off-by: Adrian Bieri <adrian.bieri@loepfe.com>
This test ensures that the MCTP I3C binding can handle big messages,
that are split into several MCTP packets.
Assisted-by: GitHub Copilot:claude-sonnet-4.6
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
This test ensures that the MCTP I2C+GPIO binding can handle big messages,
that are split into several MCTP packets.
Assisted-by: GitHub Copilot:claude-sonnet-4.6
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
This test ensures that the MCTP UART binding can handle big messages,
that are split into several MCTP packets.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Avoid initialization failure by Updating channel information
to match the <dac1 1> configuration.
Also reduce ADC resolution to 10 bits to prevents the test from failing
due to ADC sampling value being outside the valid range.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Increase main stack size because when TF-PSA-Crypto is initialized through
psa_crypto_init() the stack being used is the main one not the test one.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
For GAP/CONN/DCON/BV-05-C PTS expects IUT to fail operation
if the peer does not support Central Address Resolution.
In Test Set there is ALT to start undirected advertising instead
but PTS interpretation is that IUT shall reject directed request
regardless and may then later on follow up with underected
advertising (which PTS doesn't validate). To keep this simple
just reject here.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Necessary setup for doing SPI loopback testing on MAX32690EVKIT RV32 core,
to verify that peripheral on the secondary core.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
The exthdr_len was previously validated against the total
packet length, which did not account for the header's offset.
This could allow a crafted packet to cause an out-of-bounds
read by claiming a length that exceeds the remaining buffer.
Fixes https://github.com/zephyrproject-rtos/zephyr/issues/106331
This commit:
1. Validates exthdr_len against (pkt_len - start_offset).
2. Adds strict bounds checking for sub-options (PADN/others)
to ensure they do not exceed the extension header boundary.
3. Validates the return value of net_pkt_skip().
Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com>
We fixed oversight that did not update the compatible in the
SPI loopback driver test for Microchip MEC174x/5x boards when
the SPI driver was last updated.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
This PR removes duplicate properties in the same closure. The last
instance is the one the is keept.
This PR only cleans up current instances a separate PR will be done to
update the dts-linter to enforce this in the compliance check.
Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
coredump_thread have a limitation and can only work if
CONFIG_MP_MAX_NUM_CPUS == 1.
This cause build issue of the test harness otherwise.
Signed-off-by: Pierre-Henry Moussay <pierre-henry.moussay@microchip.com>
Implement a new test case to verify that a single tap does not trigger
a double tap event and that the event count resets after the timeout
period.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
ARC hardware boards set CONFIG_SYS_CLOCK_TICKS_PER_SEC=100 in their
defconfig, giving a 10 ms tick period. The timer_behavior test uses a
1 ms timer period by default, which is smaller than the tick period,
so the kernel rounds up to the next tick boundary and the test fails.
Signed-off-by: Mohamed Moawad <moawad@synopsys.com>
Just enable Kconfigs for MLDSA-87. This is not tested because it's still
an internal driver for TF-PSA-Crypto and it's not exported yet through
PSA API.
This is necessary to validate "mldsa-native" module integration in Zephyr.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Enabling D-cache in test setup without a prior flush can corrupt the
active stack when executing from cacheable memory.
Use a safe sequence (disable ->flush ->enable) for D-cache in
test setup.
Signed-off-by: Shreyas Shankar <shreyas.shankar2018@gmail.com>
Add flash to the supported feature list for versalnet_rpu and introduce
a board overlay to enable running flash common tests.
Signed-off-by: Srikanth Boyapally <srikanth.boyapally@amd.com>