Commit graph

13219 commits

Author SHA1 Message Date
Fabio Baltieri 3574050ed2 tests: shell: add a test for shell_device_filter
Add a test for shell_device_filter and shell_device_lookup.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-04-30 19:30:15 -05:00
Fredrik Gihl be25e34a7c drivers: sensor: Add TI TMP114 temperature sensors
Add device driver for TI TMP114 I2C temperature sensor.
The driver only support basic functionality, i.e. fetch temperature
using default values.

Datasheet:
	https://www.ti.com/lit/ds/symlink/tmp114.pdf

Signed-off-by: Fredrik Gihl <fgihl@hotmail.com>
2024-04-30 14:31:07 -04:00
Emil Gydesen 353a05b116 Bluetooth: BAP: Unicast server depend on PACS
When in the BAP unicast server role, at least PAC sink
or PAC source shall be set.

In order to fulfill this new requirement, a few other Kconfig
options had to be changed to a `depends on` from `select` to
avoid recursive Kconfig requirements. This change may require
some applications to update their configurations according
to the migration guide.

The change from `select` to `depends on` is ideal anyhow
as that is the recommended way to add dependencies.

This can checked via the combined BT_PACS Kconfig value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-04-30 14:30:45 -04:00
Sylvio Alves b12dac739f tests: boards: add esp32s2_devkitc overlay files
As this module supports ADC, this test needs conf/overlay files
to meet its requirements.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-04-30 14:29:37 -04:00
Jonathan Rico bc5d531165 Bluetooth: tests: fix buf tests
Delete tests that did not end up bringing any value.

What ended up happening is busy-work to "make the test pass" without
understanding what's their original purpose.

Worse, the CI change-based testing is broken and doesn't pick them up,
even by PRs modifying the tests themeselves.
See #68008

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-04-30 16:20:23 +02:00
Francois Ramu 391da6f8f5 boards: arm: stm32f756 with all mpu regions when testing in userspace
Disable the  quadspi mpu region of the nucleo_f756zg (like done on
nucleo_f746zg) when testing the samples/userspace/shared_mem
or tests/kernel/mem_protect/userspace
The stm32f7 cortex M7 has 8 MPU regions and the one for quadspi prevents
the testcase to PASS.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-04-30 15:11:57 +02:00
Jukka Rissanen 87f45d153f tests: net: http_server: Add tests for the HTTP server
Tests for HTTP server support.

Signed-off-by: Emna Rekik <emna.rekik007@gmail.com>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-04-30 13:25:22 +02:00
Rubin Gerritsen ebae4b8cf7 Bluetooth: Controller: Default stream count based upon app configs
When building ISO applications on a device that has the host
and controller on the same core, the application developer
shouldn't have to set controller specific configurations.

Without this change the samples iso_receive and iso_broadcast
will fail to run on NRF52 series devices as the samples
try to set up two streams but the controller is configured
to support only one.

Controller unit tests that were previously only enabling the
controller specific ISO configurations now also enable the
top-level ISO configurations to ensure that the default
stream count is properly configured.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-04-30 11:45:47 +02:00
Jiafei Pan bd699d0d50 tests: counter_basic_api: add imx93 evk support
Add i.MX 93 EVK support for counter_basic_api test application.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-04-30 08:53:59 +02:00
Luis Ubieda 262af5645c doc: tests: i2c_ram: Specify required Hardware Setup
This testsuite requires an external I2C RAM connected to the I2C bus.
Adding details to provide guidance to users interested in running the
suite.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-04-29 22:32:28 +01:00
Andrej Butok ca4993ddb2 test: mcuboot: enable test for rd_rw612_bga
Enable mcuboot test for rd_rw612_bga

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-04-29 22:31:33 +01:00
Jamie McCrae da3007e559 tests: cmake: overlays: Add soc_folder_overlay test
Adds a testcase for the new ``socs`` folder, with overlays

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-29 15:08:35 +01:00
Jamie McCrae 1ed6d89d13 tests: cmake: overlays: Add soc_folder_kconfig test
Adds a testcase for the new ``socs`` folder using Kconfig fragments

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-29 15:08:35 +01:00
Troels Nilsson 9b7d176b70 Bluetooth: Controller: Minor cleanup of struct proc_ctx
Remove unused collision field

Change type of done to uint8_t and move it to avoid padding bytes

Signed-off-by: Troels Nilsson <trnn@demant.com>
2024-04-29 15:55:13 +02:00
Patryk Duda ef258166ba posix: Introduce getentropy() function
The function writes random data to the provided buffer. Maximum
permitted buffer size is 256 bytes. On success the function returns 0,
otherwise it returns -1 and sets errno to appropriate value.

Signed-off-by: Patryk Duda <patrykd@google.com>
2024-04-29 11:46:06 +01:00
Emil Gydesen 65e787be58 Bluetooth: BAP: Shell: Add USB out support for the BAP shell
Add USB out support for the BAP shell, so that decoded LC3
data can be sent to the host (e.g. a PC).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-04-29 11:04:09 +02:00
Chris Friedt 6e7be16118 tests: posix: add tests for functions and structs in aio.h
Add tests to ensure that the aio.h header exists, the
structures are declared, and that the functions are present.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-04-29 11:02:11 +02:00
Théo Battrel 83f090a710 Bluetooth: Test: Update hci_prop_evt
Accept LE Read Max Advertising Data Length command during HCI
initialization.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-04-29 11:02:02 +02:00
Théo Battrel 8ba0ebab12 Bluetooth: Test: Add long AD test
Test that the Host give back the correct error when we try to set too
big advertising data. And ensure that long advertising data are
correctly transmitted.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-04-29 11:02:02 +02:00
Johan Hedberg d590bcb5e0 Bluetooth: Remove BT_HCI_RESERVE and BT_HCI_RAW_RESERVE
In most cases these were defined as 1. Saving one byte for the rest
doesn't really justify the added complexity that comes with these
options. Removing them also simplifies the interface between HCI
transports/drivers and the host stack, which in turn helps pave the way
for having HCI as a proper Zephyr driver API.

Fixes #71907

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-04-29 11:01:27 +02:00
Aleksandr Khromykh dad7c31e7f Bluetooth: Mesh: use bt_rand instead of sys_rand
Commit adds using host\controller based random number
generator instead of zephyr driver.
No mesh dependency anymore on zephyr system
random driver.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2024-04-29 11:00:00 +02:00
Benedikt Schmidt 4104012123 tests: drivers: build_all: sensor: add NCT75
Add the temperature sensor NCT75 to the build_all tests.

Signed-off-by: Benedikt Schmidt <benediktibk@gmail.com>
2024-04-26 19:22:09 -04:00
Jonathan Rico 6435262284 Bluetooth: L2CAP: Handle REJECT_RSP for ECRED
We can (and do) open multiple channels with a single L2CAP command. If the
remote doesn't support dynamic channels at all, then it sends back a
REJECT_RSP.

We only destroyed the first channel that matched the command PDU
identifier. Fix that and remove all channels that match.

Also add a test that verifies the patch.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-04-26 19:21:46 -04:00
Yong Cong Sin 9b7638f049 devicetree: implement DT_INST_NODE_HAS_COMPAT
Implement `DT_INST_NODE_HAS_COMPAT` to check if a node has a
compatible. This is helpful when a node has more than one
compatible, which can be used to enable additional features
in the driver.

Updated the devicetree test to play with the new API.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-04-26 20:04:38 +01:00
Chaitanya Tata 2ec243df55 tests: spi: Add a test with large transfer
To simulate Wi-Fi, add a test with larget transfer over SPI.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-04-26 19:46:05 +01:00
Aleksandr Khromykh dbc6017947 tests: Bluetooth: Mesh: optimization of blob and dfu bsim tests
Commit adds optimization of blob and dfu models bsim tests.
1. Makes general transfer size and block size smaller for blob.
2. Makes waiting time shorter for some blob bsim tests.
3. Splits long dfu srv persistence test suite into two.
4. Reduces retransmission for unicast messages till zero
   for blob and dfu tests.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2024-04-26 16:11:20 +02:00
Vinayak Kariappa Chettimada 6b27cb2b83 tests: bsim: Bluetooth: Testing BIG create and sync using LL interface
Update the bsim BIS tests to check BIG create and sync using
LL interface.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-04-26 15:30:26 +02:00
Alberto Escolar Piedras 008efecf5d Revert "tests/kernel: Bump kobj thread bitmask size for a few tests"
This reverts commit 9b43fed10a.

This PR introduced 2 regressions in main CI:
71977 & 71978
Let's revert it by now to get main's CI passing again.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-26 10:10:24 +00:00
Alberto Escolar Piedras ab41d3ab99 Revert "tests/kernel/threads: Augment abort_from_isr test to detect FMW"
This reverts commit 3ef282be6c.

This PR introduced 2 regressions in main CI:
71977 & 71978
Let's revert it by now to get main's CI passing again.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-26 10:10:24 +00:00
Alberto Escolar Piedras 17b4e6cc98 Revert "tests: thread abort deadlock scenario"
This reverts commit 9f4d9989c6.

This PR introduced 2 regressions in main CI:
71977 & 71978
Let's revert it by now to get main's CI passing again.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-26 10:10:24 +00:00
Bartosz Miller aa67e5872a tests: drivers: Extend test coverage for NRF GPIO driver
Add more test cases for NRF specific GPIO features
Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-04-26 09:32:35 +00:00
Hardeep Sharma 792fd57d96 tests: drivers: build_all: Build Altera FPGA driver
Altera FPGA driver should be built on a regular basis to ensure
that there are no regressions

Signed-off-by: Hardeep Sharma <hardeep.sharma@intel.com>
2024-04-26 09:30:24 +02:00
Théo Battrel 27e8bc65c7 Bluetooth: Tester: Device name in AD instead of SD
With the deprecation of `BT_LE_ADV_OPT_USE_NAME` and
`BT_LE_ADV_OPT_FORCE_NAME_IN_AD` the tester has been updated to not use
the macro adding the device name in the advertising/scan response data
anymore. Instead the name was explicitly added to the scan response
data. But because that part of the tester was using an extended
advertiser and was already adding data in the AD, the name should have
been put in the advertising data and not the scan response data.

The same issue apply to both `btp_cap.c` and `btp_bap_broadcast.c`,
update them to add the device name in the advertising data.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-04-26 09:30:02 +02:00
Nikodem Kastelik 539a428032 tests: drivers: pwm: boards: nrf54h20dk: add memory-region property
This property will ensure that PWM driver allocates data buffer
in appropriate location.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-04-25 17:59:27 -04:00
Anas Nashif 23d08590dd tests: sbs_charger: fix filter
Use platform key for filtering to avoid cmake issues with unsupported
platforms.

Fixes #71870

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-04-25 17:57:30 -04:00
Peter Mitsis 9f4d9989c6 tests: thread abort deadlock scenario
Adds a test to verify that a series of k_thread_abort() issued from
ISRs do not cause a deadlock.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-04-25 15:12:02 +02:00
Andy Ross 3ef282be6c tests/kernel/threads: Augment abort_from_isr test to detect FMW
There's a easily-tripped-upon free memory write condition in the arch
layers where they will write to a cached _current pointer after that
thread has been aborted.  Detect this by clobbering the thread data
after the return from k_thread_abort() and validating that it's still
clear after the ISR returns.

Note that the clobbering of the thread struct requires the removal of
a k_thread_join() that (obviously) requires that it see a DEAD flag
set.  Joining aborted threads isn't actually legal, but does still
work as long as app code doesn't reuse the memory.  Basically we can't
test both cases here, and we have join coverage elsewhere already.

Signed-off-by: Andy Ross <andyross@google.com>
2024-04-25 15:12:02 +02:00
Andy Ross 9b43fed10a tests/kernel: Bump kobj thread bitmask size for a few tests
A scheduler fix for free memory usage on aborted threads is now using
a per-CPU dummy thread instead of a single stack-based one at startup.
These static thread objects need spots in the kobj bitmasks, and a few
tests are sitting right at the default limit (16 threads).

Signed-off-by: Andy Ross <andyross@google.com>
2024-04-25 15:12:02 +02:00
Jakub Zymelka c572614b8b tests: drivers: gpio: Add nRF54L15 FLPR core targets to test
Add overlays for nrf54l15_cpuflpr and nrf54l15_cpuflpr/xip

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-04-25 12:43:58 +00:00
Ren Chen bfd24c4e4d tests: timer_behavior: increase stdev tolerance for ite platform
There might be a deviation of 30.5 microseconds (1 cycle) due to the
calculation deviation between free run and event timers. This commit
increases stdev to 33 for ite platform.

Fix #67833

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-04-25 07:22:47 -04:00
Jukka Rissanen 07599e3a53 net: vlan: Add a function to check if interface is VLAN one
We were missing a helper function that can be used to check
whether the given function is the virtual VLAN interface.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-25 11:06:23 +00:00
Damian Nikodem 2455436337 driver: ssp: update Intel SSP DAI driver to support dynamic SSP management
This commit refactors the Intel SSP DAI driver to support dynamic
management of SSP IP. This change additionally separates the management
of the DAI part from the management part of the SSP IP.

Key changes:
- Add new static functions to manage SSP IP power.
- Update the DAI SSP configuration functions to use the new management
  approach.
- Update device tree bindings and instances to reflect the new SSP IP
  management mechanism.

Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
2024-04-25 12:14:50 +02:00
Anas Nashif aa2b72d32a tests: logging: remove userspace testing
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>
2024-04-25 09:55:08 +00:00
Anas Nashif f23224f040 tests: kernel: remove pm from profiling test
PM should be tested on its own. This test has been adding PM hooks and
tests without a good reason.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-04-25 09:55:08 +00:00
Anas Nashif ebaeccbded tests: tickless: do not enable PM
This is a kernel tickless test, we should not able PM here. PM should be
tested in own environment only or we get unexecpted behavior.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-04-25 09:55:08 +00:00
Anas Nashif bafdbe8906 tests: kernel: remove tickless scenario
Tickless kernel is default and has been for some time. This test is
actually testing PM and without proper setup it is doomed to fail on
various platforms where PM needs special considerations and hooks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-04-25 09:55:08 +00:00
Pieter De Gendt 4d1ae8ce59 tests: bindesc: Replace CSTD definition with Kconfig symbols
Replace the bindesc testcase CSTD definitions with the newly introduced
kconfig symbols.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-04-25 09:54:39 +00:00
Al Semjonovs 023248a1f3 shell: Add test for custom shell macros
Verify customized shell macro APIs

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2024-04-24 16:04:03 -04:00
Jeff Daly 7e0a334060 drivers: sensor: ntc_thermistor: Add Murata NCP15XH103
Murata NCP15XH103 compensation table added.

Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
2024-04-24 15:56:23 -04:00
Anas Nashif 571d7b4ca7 tests: fuel_gauge: fixed filtering
Use platform key to filter out non emulation platforms before running
cmake.

Fixes #71870

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-04-24 15:55:29 -04:00