Commit Graph

14815 Commits

Author SHA1 Message Date
Jukka Rissanen 96795f0b6c tests: posix: headers: net: Add IPv6 join/leave group
The IPV6_JOIN/LEAVE_GROUP corresponds to IPV6_ADD/DROP_MEMBERSHIP
definitions so define the former and add tests for them.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:44:35 -05:00
Jukka Rissanen 5216b52477 tests: posix: headers: net: Add check for in6addr_any variable
The in6addr_any is a global symbol that can be used when any
address (all zero bits) is being referenced.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:44:35 -05:00
Jukka Rissanen 8776ae316c tests: posix: headers: net: sin6_scope_id is supported
The Posix documentation uses sin6_scope_id for scope id and
we support that already.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:44:35 -05:00
Yong Cong Sin 70abb6077d tests/benchmarks: latency_measure: add qemu_riscv_64_smp board
Add `qemu_riscv64/qemu_virt_riscv64/smp` to the list of
integration_platforms.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-16 13:38:37 -05:00
Jordan Yates 8b69b79279 tests: fuel_gauge: test negative current
Validate that the SBS fuel gauge driver returns the expected values for
negative currents (discharging).

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-11-16 13:35:03 -05:00
Seppo Takalo b3f3bce23e net: lib: coap_client: Add API to cancel specific request
Add a new API to cancel just one, or mathing requests,
instead of cancelling all ongoing requests.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo 107dc9b96d tests: coap_client: Add testcase for receiving RST
When server responds with CoAP RESET, we should inform the
client and stop the request.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo 05a6ba678e tests: coap_client: Add testcase for observation
Add test for ongoing observation and cancellation.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo 237b26c44a tests: coap_client: Test for operating on socket while another fails
CoAP client should be able to push data through functioning socket
while another sockets is failing or reporting poll() errors.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo fc51fa491f tests: coap_client: Add testcase for Ack failure
Add testcase where sending Ack to incomming Confirmable message fails.
This should be reported to application as now the server is unaware
that transmission have succeeded, so we cannot thread it as success.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo 5559a520c9 tests: coap_client: Improve retry testcases
Add testcases for testing client's retry behaviour.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo 120aabbb8f tests: coap_client: Add test when separate response is lost
Test a scenario where Ack is received but the actual response
is not coming.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo 83bc1fcb46 tests: coap_client: Add test for duplicate response
Add test where we receive same UDP packet twice.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo ca67f51170 tests: coap_client: Improve socket stubs
* Use sys_rand_get() and seed the CoAP library, so our MIDs are
  random.
* Set socket events per socket, so we don't accidentally receive
  on wrong socket
* Reply with correct tokens

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Pieter De Gendt 175bfb4bc9 tests: net: lib: lwm2m: interop: Fix strip-with-multi-characters (B005)
All strip functions remove any of the provided characters instead of a
prefix/suffix. This is likely a bug.

See https://docs.astral.sh/ruff/rules/strip-with-multi-characters/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-16 13:32:02 -05:00
Marvin Ouma 05196e38a9 tests: posix: common: separate posix barriers to standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves barrier into a singular
testsuite at tests/posix/barriers app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-11-16 13:30:36 -05:00
Nidhal BEN OTHMEN a199f7f9d3 tests: bluetooth: tester: Fix bluetooth tester for nucleo_wba55cg
Fix compilation error by specifying usart1 to be used for uart-pipe.
Add a board-specific configuration file to disable the console,
so, the usart1 will be used only for bluetooth and to specify
the BT_HCI_TX_STACK_SIZE.

Signed-off-by: Nidhal BEN OTHMEN <nidhal.benothmen@st.com>
2024-11-16 13:29:39 -05:00
Yong Cong Sin 408c151282 tests: arch: riscv: make sure that `gp` reg can't be corrupted
Add a test to make sure that the `gp` global pointer register used for
relative addressing when `CONFIG_RISCV_GP` is enabled can't be
corrupted by a rogue user thread.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-13 19:08:54 -08:00
Jimmy Zheng d267402404 tests: drivers: build_all: eeprom: fix label name conflict
Renamed the label of 'ti_tmp116_eeprom@0' node because 'eeprom' label name
already exists in some boards, such as adp_xc7k/ae350, bytesensi_l,
same54_xpro.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-11-13 19:08:41 -08:00
Dong Wang 431c34039a tests: debug/coredump: Change to call k_panic() for ISH SoCs
ISH SoCs have zero-address memory mapped to I2C0 controller.
Coredump cannot be triggered by zero-address access.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-11-08 15:55:36 -06:00
Peter Mitsis aeaddd70b7 tests: Fix IRQ locking in sched benchmark
Corrects an issue that was introduced when the interrupt
locking/unlocking was added to the 'sched' benchmark by
unlocking the interrupts before the context switch done by
k_yield(), but after the call to z_unpend_first_thread().

Fixes PR #81050

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-11-08 15:55:23 -06:00
Raffael Rostagno 38a70cc1fd tests: drivers: spi: esp32c6: Fix overlay configuration for loopback
Fixes overlay configuration to allow running the test on CI without
externally connecting two pins.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-11-08 11:36:21 -06:00
Dmitrii Golovanov d7fe3d1a75 tests: crypto: tinycrypt: Fix premature Ztest end
Don't use TC_END_RESULT() to report Ztest's result prematurely.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-11-08 11:35:22 -06:00
Dmitrii Golovanov e3ec702196 tests: drivers: ipm: Fix drivers.ipc.mailbox
Fix 'drivers.ipc.mailbox' test suite to restore and improve
its testing functionality:

 * fix printf() redirection through IPM console.

 * fix and check the dummy driver initialization.

 * specify correct Twister harness type (Console)
   and use matching patterns to recognize the expected
   console output.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-11-08 09:28:50 -06:00
Vinayak Kariappa Chettimada 525ba389bc tests: Bluetooth: tester: Workaround Bus Fault in nRF53x using full RAM
Workaround failing autopts weekly run due to tester
application having Bus Fault in the nRF53 NET core hci_ipc
firmware at startup.

Having atleast 32 bytes free in nRF53x hci_ipc sample to
avoid Bus Fault when Zephyr Kernel does SYSINIT calls.

Reduce supported ISO Broadcaster instance and ISO TX buffer
counts in the Controller hci_ipc firmware.

Add sysbuild support for tester application so that the
build is CI verified.

sysbuild commandline for LE audio PTS testing:

  # west build --sysbuild -b nrf5340_audio_dk/nrf5340/cpuapp
    -d build/tester tests/bluetooth/tester
    -DEXTRA_CONF_FILE="overlay-le-audio.conf"

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-11-08 09:25:28 -06:00
Emilio Benavente 5c9d6f1dba tests: lib: cmsis_dsp: transform: Update Ram Size
Updating the minimum Ram Size for failing tests
that require more ram memory for heap allocations.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-11-08 09:25:04 -06:00
Anas Nashif 5776436136 tests: shell: limit build only config tests
Limit build_only config tests to one platform.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-08 09:24:31 -06:00
Peter Mitsis 41064c8e1d tests: Add objcore to latency_measure testcase.yaml
Adds the object core configuration to the latency_measure benchmark's
testcase.yaml file as there have been requests for it.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-11-07 18:42:03 -08:00
Robin Kastberg 580e93e9b4 arm: tests: kernel: fix bug in fatal_exception test
In ARM architectures the entry_cpu_exception_extend calls
svc #0 when trying to generate a `K_ERR_CPU_EXCEPTION`, however
z_arm_svc calls z_do_oops with a stack frame only, and gets the
reason from `r0`. This means that the test working was just lucky
and running it with another compiler (or setting the value of r0
before the svc #0 call, made the test fail).

Cortex-A/R 32-bit architectures was doing a BKPT, this works better
but will not be a hard exception when debugger is attached.

I switched all the Cortex 32-bits to the ARM specified undefined
instruction.

Also RISC-V has a designated unimp instruction that should be used to
guarantee trap.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2024-11-07 11:06:34 -08:00
Daniel Leung 0e9376ebff tests: thread_error_case: no ICOUNT for qemu/xtensa/dc233c/mmu
For some weird reasons, enabling ICOUNT would result in some
tests crashing QEMU. So disable ICOUNT.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-07 11:06:23 -08:00
Emil Gydesen 4331b5fe77 tests: Bluetooth: PBP: Fix adv data for PBP BSIM test
The test had a few off-by-ones in the code, which caused access
to invalid data.

Fixed by setting the right buffer sizes and the right AD length
fields.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-07 08:33:03 -06:00
Henrik Skreslet e254a7f3c8 modem: cmux: added validation of cmux frame length
Validates cmux frame length and drops it if its larger
than the receive buffer

Signed-off-by: Henrik Skreslet <henrik.skreslet@gmail.com>
2024-11-07 08:31:48 -06:00
Szymon Janc 2f6a65c8a4 test: bluetooth: Update ICS to TCRL 2024-2
GAP PAST (and BAP) tests were also enabled since controller support is
under review.

This also adds bqw file which is exported draft project from
Qualification Workspace.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-11-06 17:38:36 -05:00
Luca Burelli de1e76fa4e tests/subsys/llext: fix coverage for readonly_mmu test
The test was not being run on arm64 and riscv because the filter was
incorrect. Properly fix the filter to run the test on all platforms
that have any kind of MMU enabled.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-06 10:01:26 -08:00
Luca Burelli 7427d1c85b tests/subsys/llext: cleanup memory protection options
Most of the tests in the LLEXT subsystem test suite run with memory
protection hardware (MPU/MMU) disabled, to avoid including memory domain
issues while testing the core functionality. Only a few tests need to
run with MPU/MMU enabled.

This patch simplifies the testcase.yaml by setting the memory protection
as disabled in a shared config file that is included by most tests.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-06 10:01:26 -08:00
Luca Burelli 184a2a65a2 tests/subsys/llext: update filtering logic
Restore Apollo boards now that the issue has been fixed.
Also remove extra CONFIG_SOC_SERIES_S32ZE filters, as they are already
covered by the 'platform_exclude' common section.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-06 10:01:26 -08:00
Luca Burelli d33686fef7 tests/subsys/llext: Remove llext.simple.readonly_fs_loader
The fs_loader test is always executed in the main test source when
CONFIG_FILE_SYSTEM is set, and this is in turn enabled by per-board
config overlays. So there is no point in having a separate test case:
it is simply a duplicate of the "readonly" test.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-06 10:01:26 -08:00
Andrzej Głąbek 9bdb71fe55 tests: subsys: dfu: img_util: Increase stack size
Fix a problem with the test that manifested itself with a surprising
assertion failure at lib/utils/onoff.c:283. Apparently, due to the
stack being too small, some memory got accidentally overwritten.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-11-06 09:57:41 -08:00
Robert Lubos a597feafb8 test: net: lib: prometheus: formatter: Fix test flakiness
If a string is already present in the provided buffer,
prometheus_format_exposition() appends it instead of overwriting,
hence the buffer needs to be cleared on the test start, otherwise it
works by chance.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-11-06 09:53:29 -08:00
Maureen Helm 130c5c0002 tests: zbus: publish_stats: Fix for non-zero boot delay
Fixes the zbus publishing statistics test to account for a non-zero boot
delay, which is often used in hardware testing environments. This fixes
an assertion failure observed on multiple max32 boards in the adi board
farm.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-11-06 09:52:58 -08:00
Alberto Escolar Piedras d4b7bf986c tests bsim bt audio: Increase execution timeout
These tests have been seen failing in CI due to the
real time execution timeout. Let's increase it so it does
not happen.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-06 09:40:16 +01:00
Daniel DeGrasse 07a8e3253a drivers: disk: mmc_subsys: remove CONFIG_MMC_VOLUME_NAME
Remove CONFIG_MMC_VOLUME_NAME, and set the disk name based on the
``disk-name`` property. This aligns with other disk drivers, and allows
for multiple instances of the mmc_subsys disk driver to be registered.

Add disk-name properties for all in tree definitions for the
mmc-subsys disk driver, and change all in tree usage of the disk name

Fixes #75004

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-05 15:25:10 -06:00
Daniel DeGrasse a1dc0b8b3e drivers: disk: sdmmc_subsys: remove CONFIG_SDMMC_VOLUME_NAME
Remove CONFIG_SDMMC_VOLUME_NAME, and set the disk name based on the
``disk-name`` property. This aligns with other disk drivers, and allows
for multiple instances of the sdmmc_subsys disk driver to be registered.

Add disk-name properties for all in tree definitions for the
sdmmc-subsys disk driver, and change all in tree usage of the disk name

Fixes #75004

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-05 15:25:10 -06:00
Lingao Meng b9fbfc9a23 Bluetooth: Mesh: Introduce separate workq for ADV EXT
this PR is to make the host always send packets.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-11-05 15:24:31 -06:00
Pavel Vasilyev 457a20c4a2 test: bsim: bluetooth: mesh: Wait until adv is actually sent
k_sleep may not be enough to let advertiser send the message. Instead we
should rely on the bt_mesh_send_cb.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-11-05 13:44:51 -06:00
Valerio Setti 7f5574817f jwt: remove TinyCrypt usage
As part of TinyCrypt deprecation process (#79566) this commit
removes usage of this library from the JWT subsystem and its
related tests.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-05 13:44:20 -06:00
Anas Nashif 9cabb89969 tests: drivers: display: fix filtering
Test was marked build only with filters in each scenario looking for
sdl-dc which is only available on native_sim, so cut the chase and use
platform_only to narrow things down to native_sim directly instead of
building the world to get information we already know.

reduces build/run time from 78s to 17s on invocation of twister with
default options, saves a ton more when running twister with --all.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-05 10:56:29 -06:00
David Leach 21f37c8bfd tests: counter: RW612 dts overlay support for basic_api tests
Remove memory spaces not needed for the counter_basic_api test.
Add frdm_rw612.overlay

Signed-off-by: David Leach <david.leach@nxp.com>
2024-11-05 10:56:00 -06:00
Krzysztof Chruściński f82ffc9213 tests: lib: cbprintf_package: Extend test coverage
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>
2024-11-01 09:56:03 -05:00
Mert Vatansever 9cfd185ab0 tests: drivers: flash: Fix MAX32666 flash error
This commit fixes flash error by correcting flash size.

Signed-off-by: Mert Vatansever <mert.vatansever@analog.com>
2024-11-01 09:55:52 -05:00