Commit Graph

14862 Commits

Author SHA1 Message Date
Furkan Akkiz ee1d4da864 tests: Add MAX78002EVKIT test overlay files
Enable following tests for MAX78002EVKIT:
 - tests/drivers/adc/adc_api
 - tests/drivers/counter/counter_basic_api
 - tests/drivers/dma/chan_blen_transfer
 - tests/drivers/dma/loop_transfer
 - tests/drivers/flash/common
 - tests/drivers/gpio/gpio_basic_api
 - tests/drivers/i2c/i2c_target_api
 - tests/drivers/pwm/pwm_api
 - tests/drivers/spi/spi_loopback
 - tests/drivers/w1/w1_api

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-11-16 15:09:57 -05:00
Troels Nilsson fa3bfa5453 Bluetooth: Controller: Add margin to ISOALs time offset
To ensure payloads are delivered in time for the first subevent
in framed BIS, ISOAL now enforces a (configurable) margin of
the calculated time offset

Without this margin, it has been observed that a broadcaster
can end up consistently missing the first subevent in every third
event in a 7.5 ms ISO with a 10 ms SDU interval

The margin is a conservative 2 ms by default, but can likely be
set a lot lower for most implementations and HWs

Signed-off-by: Troels Nilsson <trnn@demant.com>
2024-11-16 15:08:59 -05:00
Lauren Murphy 99a5236b40 llext: add support for arc
Adds compiler flag(s) and some architecture-specific relocations
for ARC. No userspace support, doesn't support all relocations.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-11-16 15:08:51 -05:00
Sadik Ozer 18853d026a tests: drivers: counter: Enable counter RTC test for MAX32 MCUs
This commit enables counter RTC test for MAX32 MCUs.

Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-11-16 15:08:43 -05:00
Kenneth Witham cc33fd685f net: mqtt-sn: Update MQTT-SN Unit Tests
Fixes: #78010
This commit adds tests for the "Gateway Advertisement and Discovery"
process. This includes tests for handling SEARCHGW, GWINFO, and ADVERTISE
as well as manually adding a Gateway for use. Gateway pruning when
missing ADVERTISE messages is also tested.

Signed-off-by: Kenneth Witham <kennywitham4@gmail.com>
2024-11-16 15:08:27 -05:00
Jakub Wasilewski cfdaa91ff6 drivers: eeprom: add mb85rsm1t fram support
Add a driver for the MB85RSM1T FRAM chip.

Signed-off-by: Jakub Wasilewski <jwasilewski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-11-16 15:08:01 -05:00
Anas Nashif dfa170e909 tests: cmsis_nn: reduce architecture scope
Filters already only allow arm and native, so exclude everything else
very early and reduce churn and build time.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-16 15:01:55 -05:00
Anas Nashif a505078c60 tests: cmsis_dsp: reduce architecture scope
Filters already only allow arm and native, so exclude everything else
very early and reduce churn and build time.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-16 15:01:55 -05:00
Timothy Keys e976a01bed Bluetooth: Host: Unit test for bt_le_cs_set_valid_chmap_bits
Add coverage of the bt_le_cs_set_valid_chmap_bits function to unit tests

Signed-off-by: Timothy Keys <timothy.keys@nordicsemi.no>
2024-11-16 14:58:14 -05:00
Timothy Keys 97399d4027 Bluetooth: Host: Remove code causing build error
This code is redundant and causes a build error if called more than
once.

Signed-off-by: Timothy Keys <timothy.keys@nordicsemi.no>
2024-11-16 14:58:14 -05:00
Benedikt Schmidt 5aa835c66b drivers: fpga: simplify load mode selection of iCE40
Replace the enum for load modes for the iCE40 with a boolean flag,
as there are only two options:
- SPI: default, which should be used whenever possible
- GPIO bitbang: workarorund, in case a low-end microcontroller is used

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-11-16 14:57:36 -05:00
Lars-Ove Karlsson e7c74e8f30 tests: kernel: fpu_sharing Fixed missing struct defs for ARM
Added empty fp register structs for ARM combinations not handled,
i.e. any ARM without a fpu.

Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
2024-11-16 14:57:17 -05:00
Emil Gydesen 8386929944 tests: Bluetooth: Tester: Log conn changes
Log the address and the err/reason values in the connected
and disconnect callbacks.

Since these values are not part of the BTP events it is
difficult to follow the order and reason why disconnects
happen when debugging.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-16 14:56:51 -05:00
Alberto Escolar Piedras 6d53e376cb tests/bsim/bluetooth/ll: Increase EXECUTION_TIMEOUT where needed
Increase the EXECUTION_TIMEOUT (real time timeout at which the test
will be killed), so we have more margin for CI.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:56:43 -05:00
Alberto Escolar Piedras 5da8eb3e9f tests/bsim/bluetooth/host: Increase EXECUTION_TIMEOUT where needed
Increase the EXECUTION_TIMEOUT (real time timeout at which the test
will be killed), so we have more margin for CI.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:56:43 -05:00
Alberto Escolar Piedras 4c8ee78b76 tests/bsim/bluetooth/audio: Increase EXECUTION_TIMEOUT where needed
Increase the EXECUTION_TIMEOUT (real time timeout at which the test
will be killed), so we have more margin for CI.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:56:43 -05:00
Marvin Ouma 7e8ee25479 tests: posix: common: separate posix rwlocks tests into a standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves rwlocks into a singular
testsuite at tests/posix/rwlocks app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-11-16 14:56:16 -05:00
Marvin Ouma f7633a55aa tests: posix: common: separate posix semaphores tests into standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves semaphore into a singular
testsuite at tests/posix/semaphores app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-11-16 14:56:09 -05:00
Marvin Ouma ab601ae05c tests: posix: common: separate posix single process into a standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves confstr, sysconf and uname into
a singular testsuite at tests/posix/single_process app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-11-16 14:53:42 -05:00
Yong Cong Sin e0ce096b91 tests: benchmarks/sched: limit CPU to 1 for Intel ADSP ACE
Due to addition of busy threads running on other cores, and
the simulator runs in single thread bouncing through all cores,
we are wasting quite a bit of time just busy waiting. This makes
each simulator run too long for CI. So limit CPU number to 1.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-11-16 14:07:08 -05:00
Yong Cong Sin 927420a423 tests: sched: Add busy threads for SMP
The sched benchmark is designed for systems with a single
CPU. Otherwise, the timestamps would be wrong when the partner
thread is scheduled on another CPU, i.e. negative values:

```
unpend   63 ready   62 switch -16562 pend 18937 tot 2500 (avg  928)
```

When the system allows for multiple CPUs, spawn a non-preemptible
thread to keep the other CPUs busy.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-11-16 14:07:08 -05:00
Krzysztof Chruściński bedb7e16c3 tests: kernel: timer: timer_behavior: Adjust TIMER_TEST_SAMPLES
Adjust default number of test samples which is based on SRAM size.
Test is using 8*TIMER_TEST_SAMPLES and with previous defaults for
the device with 64k RAM it was using 56k of test data leaving only
8k RAM and that was easily not enough. Adjust conditions to
take less samples when SRAM_SIZE is equal to the threshold.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-16 14:06:28 -05:00
Emil Gydesen 8703381764 Bluetooth: Host: Add conversion macros from ms to various units
Add conversion macros from milliseconds to various units.
The purpose of these macros is to make it more clear/easier
for users to set and read values using milliseconds rather
than the various BT units which may be in 0.625, 1.25 or 10ms
units.

This is especially useful when comparing related values using
different units, such as advertising interval (0.625ms units)
and periodic advertising interval units (1.25ms units).

Users will have to be aware that these macros can provide slightly
different values than what is provided, if the provided values
do not match the units.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-16 14:06:03 -05:00
Alberto Escolar Piedras 0d249ecd23 tests/bsim: Also runtime test the UART drivers for the nrf5340
To increase coverage.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras 5321941a5d tests uart_pm: Enable for nrf5340bsim
Enable this test in the simulated nrf5340 and provide
an appropriate overlay.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras 51053cce11 tests uart_mix_fifo_poll: Enable for nrf5340bsim
Enable this test in the simulated nrf5340 and provide
an appropriate overlay.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras dd13fa0c47 tests uart_async_api: Enable in nrf5340bsim//cpuapp
Enable this test in the simulated nrf5340 by providing
an appropriate overlay.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras da01758908 tests gpio_get_direction: Enable for nrf5340bsim
Enable this test by providing an overlay for the nrf5340bsim
Both for the app and net core.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras 14c096ff38 tests gpio_basic_api: Enable for nrf5340bsim
Enable this test, and provide overlays, in the nrf5340bsim

Note this test specs 2 GPIO pins to be shorted. This can be done
for the simulation target by calling zephyr.exe with the option
`-gpio_conf_file=shorts_config.txt`
Where  that file would contain this one line (for the provided overlay),
for the cpunet:
---- shorts_config.txt
short 1.1 1.2
----
And this for the cpuapp:
---- shorts_config.txt
short 3.1 3.2
----

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras 8bd0a2525c tests gpio_hogs: Enable for nrf5340bsim
Enable this test, and provide overlays, for the nrf5340bsim.
Both for the app and net core.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras 990fc4c130 tests gpio_get_direction: Enable for nrf54l15bsim
Enable this test by providing an overlay for the nrf54l15bsim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras fb5ee609a0 tests gpio_hogs: Enable for nrf54l15bsim
Enable this test, and provide overlays, in the nrf54l15bsim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras 1b1d3ca5d5 tests gpio_basic_api: Enable for nrf54l15bsim
Enable this test, and provide overlays, in the nrf54l15bsim

Note this test specs 2 GPIO pins to be shorted. This can be done
for the simulation target by calling zephyr.exe with the option
`-gpio_conf_file=shorts_config.txt`
Where  that file would contain this one line (for the provided overlay)
---- shorts_config.txt
short 1.1 1.2
----

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Jan Faeh 22945254ef drivers: sensor: STS4x Add driver
This adds support for Sensirion's STS4x temperature sensor.

Signed-off-by: Jan Faeh <jan.faeh@sensirion.com>
2024-11-16 14:02:15 -05:00
Meir Komet 5595f66851 multi_heap: introduce support for realloc()
Add support for realloc (and realloc_aligned) into the multi heap lib,
where the buffer sent in will either be reused (maybe shrinked),
or enlarged by allocating on any of the matching heaps of the multi heap.

Signed-off-by: Meir Komet <mskomet1@gmail.com>
2024-11-16 14:02:07 -05:00
Adrien Leravat 1d6a89d26e tests: drivers: sensor: add hc-sr04 tests
Add automated build and functional tests for the HC-SR04.

Signed-off-by: Adrien Leravat <adrien.leravat@gmail.com>
2024-11-16 14:00:34 -05:00
Andries Kruithof 6d187ba882 Bluetooth: Audio: Bablesim tests for CAP broadcast reception stop
Implement a babblesim test for the CAP broadcast reception stop
procedure

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-11-16 14:00:25 -05:00
Jukka Rissanen 5f3e6212af net: utils: Port parsing failure in net_ipaddr_parse()
If trying to parse a string like 192.0.2.2:80/foobar and
setting the length to 12 which means to parse the IP address
and port, the parsing failed because it used one extra character
from the string. This issue was not present if the input string
was terminated after the port number.

Add a test case to catch this problem.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:51:27 -05:00
Dominik Ermel 06c0b764cc tests: flash_map: Move SHA test to separate test scenario
The commit moves SHA calculation to separate test scenario, so that
it can be run separately from other flash map tests.
This reduces flash wear by not running basic flash map tests each
time different SHA backend is tested.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-16 13:51:18 -05:00
Dominik Ermel dd93bce0b9 tests: flash_map: Reduce flash wear in test_flash_area_get_sectors
Remove needless writes/read and erase in flash_area_get_sectors test
scenario, by replacing it with comparison with layout directly obtained
from device.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-16 13:51:18 -05:00
Piotr Kosycarz e4b830fe7a tests: drivers: sensor: temp_sensor: enable for nrf54l15dk
Incorrectly removed during transfer pdk->dk.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-11-16 13:44:48 -05:00
Piotr Kosycarz 51c5bc7667 tests: drivers: gpio: gpio_basic_api: enable for nrf54l15dk
Incorrectly removed during transfer pdk->dk.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-11-16 13:44:48 -05:00
Jukka Rissanen 5b007183d0 tests: posix: headers: net: Convert to use zexpect
Use zexpect instead of zassert so that the failed tests do not
stop the test execution but we run all the tests.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:44:35 -05:00
Jukka Rissanen d1e42fc147 tests: posix: headers: net: Add test for ipv6_mreq
The "struct ipv6_mreq" is supported so enable the tests for it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:44:35 -05:00
Jukka Rissanen 8f49925a0f tests: posix: headers: net: Add various IPv6 address check macros
Add these Posix specified IPv6 address checking macros

IN6_IS_ADDR_UNSPECIFIED
IN6_IS_ADDR_LOOPBACK
IN6_IS_ADDR_MULTICAST
IN6_IS_ADDR_LINKLOCAL
IN6_IS_ADDR_SITELOCAL
IN6_IS_ADDR_V4MAPPED
IN6_IS_ADDR_MC_NODELOCAL
IN6_IS_ADDR_MC_LINKLOCAL
IN6_IS_ADDR_MC_SITELOCAL
IN6_IS_ADDR_MC_ORGLOCAL
IN6_IS_ADDR_MC_GLOBAL

and tests for them.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:44:35 -05:00
Jukka Rissanen 606eeed8c9 tests: posix: headers: net: Add INADDR_BROADCAST definition
Add INADDR_BROADCAST definition and a test for it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:44:35 -05:00
Jukka Rissanen f2d58c4e18 tests: posix: headers: net: Mark unicast/multicast hops supported
Both the IPV6_UNICAST_HOPS and IPV6_MULTICAST_HOPS are supported
so add tests for them.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:44:35 -05:00
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