Commit graph

13345 commits

Author SHA1 Message Date
Jordan Yates 2bb2dd6e82 tests: flash_simulator: fix devicetree indentation
Fix the mix of spaces and tabs in the `nucleo_f411re.overlay` file.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-13 14:22:37 +02:00
Pieter De Gendt ff58bd0204 tests: misc: iterable_sections: Add CMake linker test case
Add a test with CONFIG_CMAKE_LINKER_GENERATOR enabled.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-13 10:41:47 +02:00
Pieter De Gendt e791e7637f tests: kernel: device: Add CMAKE_LINKER_GENERATOR test case
Add a test case entry with CONFIG_CMAKE_LINKER_GENERATOR enabled.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-13 09:46:13 +02:00
Abderrahmane Jarmouni 30c471ca1d tests: drivers: rtc_api: test_alarm: add alarm id in logs
Add alarm ID in debug & error logs.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Abderrahmane Jarmouni 16ea3a4f79 tests: drivers: rtc: rtc_api: support STM32 boards
Add RTC config for a large selection of STM32 boards.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Robert Lubos 8d221a91d0 tests: net: ipv6: Fix RA test
Due to recent changes, as simple k_yield() is not enough on some
platforms (nRF platforms for example), as the entropy subsystem is now
used because of PE, which may block, causing context switch before
entire RA message is processed.

Fix this by adding small delay before checking if RA was processed
properly.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-13 09:37:32 +02:00
Hake Huang 497423cd7a tests: test_mcuboot: update test pattern for upgrade mode
NXP LPC series flash only supoort upgrade mode, so change the
pattern to match this mode

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-05-12 11:03:26 -04:00
Tomi Fontanilles 73da457dca tests: mgmt: mcumgr: fs_mgmt_hash_supported: make CI green
Exclude some more platforms from the tests.
They provoke devicetree-related build errors which weren't introduced
by the changes in this PR (#71947).

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-10 18:24:38 -04:00
Tomi Fontanilles 6002abe519 mgmt: mcumgr: replace Tinycrypt by PSA
As part of ongoing work to move away from TinyCrypt and towards PSA
(#43712), make fs_mgmt use either PSA (when available) or MbedTLS
(as a fallback) for SHA-256.

The use of PSA is guarded by CONFIG_MBEDTLS_PSA_CRYPTO_CLIENT
which requires a locally-built PSA core for devices without TF-M.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-10 18:24:38 -04:00
Hake Huang 16d709e54f test: pwm: add mimxrt1060_evk support for pwm
add missing board and overlay support

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-05-10 18:07:55 -04:00
Reto Schneider bcbe713620 tests: dma: loop transfer: Modernize zassert usage
zassert_ok() is a more descriptive way to check for errors.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-05-10 14:40:54 -05:00
Théo Battrel 76559f27fd Bluetooth: Host: Map HCI cmd disallowed to errno
Make `bt_hci_cmd_send_sync` return `-EACCES` when receiving
`BT_HCI_ERR_CMD_DISALLOWED`.

Update some tests that were expecting `-EIO` when
getting `BT_HCI_ERR_CMD_DISALLOWED`.

Add a warning in `set_random_address` when getting that new error. This
is done in case someone try to set a new random address while legacy
advertising, scanning or initiating is enabled. This is illegal behavior
according to the Core Spec (see Vol 4, Part E 7.8.4).

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-05-10 17:38:06 +03:00
Vinayak Kariappa Chettimada 2c6306d099 Bluetooth: Controller: BT_CTLR_ISO_TX_BUFFER_SIZE from BT_ISO_TX_MTU
Derive BT_CTLR_ISO_TX_BUFFER_SIZE from BT_ISO_TX_MTU to have
optimal Controller memory allocations.
BT_CTLR_ISO_TX_BUFFER_SIZE can be set lower than
BT_ISO_TX_MTU in which case upper layer can send fragmented
SDU to the Controller.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-05-10 15:02:10 +02:00
Krzysztof Chruściński b1020b0bc8 tests: drivers: counter: counter_nrf_rtc: Add nrf54h20dk support
Add overlays for nrf54h20dk in fixed_top test.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-10 11:50:28 +02:00
Krzysztof Chruściński 8c5c6dad44 tests: drivers: counter: counter_basic_api: Add nrf54h20 support
Add overlays for nrf54h20dk cpuapp and cpurad.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-10 11:50:28 +02:00
Konrad Derda d397aae027 tests: net: mld: update MLDv2 tests after changes
This commit changes the expectations to checking for state transitions
in MLDv2 reports.

Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
2024-05-10 11:44:50 +02:00
Luis Ubieda cdc7693383 tests: i2c_ram: rtio: Fix sequence to prepare ops to avoid overwriting
`rtio_sqe_prep_write()` and `rtio_sqe_prep_read()` memset the sqe
struct to zeroes, clearing any configuration previously set. This
commit changes this sequence in the test, such that the sqe's are
prepared, then additional flags/configs applied.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-05-10 11:44:43 +02:00
Nicolas Pitre c81d95b9ae riscv: FPU trap: test case thread typo fix
Need to wait for both threads.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-05-10 11:38:57 +03:00
Mayank Mahajan d1687a557c ADD: Driver for Sensor INA226
INA226 - Bidirectional Current and Power Monitor w/ I2C
Boards Tested: mr_canhubk3

Signed-off-by: Mayank Mahajan <mayankmahajan.x@nxp.com>
2024-05-09 15:46:31 +02:00
Bjarki Arge Andreasen 2d0b24bff2 tests: drivers: gnss: gnss_api: Add overlay for emulated boards
Add overlay and conf for emulated boards allowing the test suite
along with the emulated GNSS driver to be built and tested by CI.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-09 15:45:34 +02:00
Bjarki Arge Andreasen fdda93fd99 tests: drivers: gnss: Add GNSS API test suite
Add GNSS API test suite validating the behavior of a GNSS
device adheres to the GNSS API.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-09 15:45:34 +02:00
Sebastian Głąb 48ee6fcae0 tests: drivers: watchdog: wdt_error_cases: Run test on nRF54H20
Add overaly files for Application and Radio cores.

Configure test according to watchdog features
available on nRF54H20.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-05-09 15:44:40 +02:00
Guennadi Liakhovetski 8704a23cd7 llext: add a multi-file test case
Add a case, testing building an llext from multiple files, calling
functions and accessing data across files.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-05-09 10:28:50 +02:00
Valerio Setti a58f8eb3ed tests: mbedtls: add missing CONFIGS
CONFIG_MINIMAL_LIBC was required for:
- CONFIG_MINIMAL_LIBC_NON_REENTRANT_FUNCTIONS
- CONFIG_MINIMAL_LIBC_RAND

while CONFIG_ENTROPY_GENERATOR and CONFIG_MBEDTLS_ZEPHYR_ENTROPY
are required for CRYPTO_C.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-09 10:27:30 +02:00
Valerio Setti 2e2484b9df test: tls_credentials: relax requirements for test execution
Remove dependency on netif for net.tls_credentials.trusted_tfm
in order to have the test fully built and executed in at least
1 platform (i.e. mps2/an521/cpu0/ns)

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-08 22:14:19 -07:00
Robert Lubos f003087e38 tests: net: all: Make sure gratuitous ARP transmission is enabled
Add you config to the build-all net tests, to make sure everything build
properly.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-08 16:09:31 -04:00
Aleksander Wasaznik 35fc91c080 Bluetooth: bsim/att/pipeline: add rx tx priority inverted prj
Resolves: https://github.com/zephyrproject-rtos/zephyr/issues/71444

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-05-08 09:30:25 -04:00
Rubin Gerritsen e4ea597a77 Bluetooth: Controller: BIG/CIG 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.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-05-08 09:25:29 -04:00
Tim Sørensen 98b996f6ec tests: drivers: adc: adc_api: added nRF5340 Audio DK overlay
The adc_api test was missing an overlay file for the nRF5340
Audio Dk board.

Signed-off-by: Tim Sørensen <tims@demant.com>
2024-05-08 12:08:04 +02:00
Johann Fischer 69e3e3a90d tests: usb: add usb_set_config() call to desc_sections test
With the previous changes, usb_set_config() is no longer called by
default at boot time, causing the test to fail.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-08 12:00:46 +02:00
Pieter De Gendt db8bb9ef56 cmake: linker: Use kconfig for iterable section subalign
Replace the hard-coded 4 with the Kconfig symbol
CONFIG_LINKER_ITERABLE_SECTION_SUBALIGN .

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-07 18:01:37 -04:00
Alberto Escolar Piedras 22c83f0f97 tests/kernel/context: Detect spurious wakes during timeout check
In 972a4d9f6f
the test was relaxed to allow a possible parallel thread
waking the CPU during the idle timeout checks.

How this was done though, a system timer driver
which wakes the kernel spuriously a bit before the
correct deadline would not be detected, even
though it should.

Let's fix this, ensuring the timer has been
called when we check the wake time in inside the
expected range.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-07 17:56:50 -04:00
Bram Vlerick e087d1b438 tests: i2c: i2c_target_api: fix b_u585i_iot02a test
The b_u585i_iot02a platform already has an 'eeprom0' node in the default
devicetree. Delete the default node so that the overlay can define the
nodes needed for the test.

Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org>
2024-05-07 15:13:15 -05:00
Bjarki Arge Andreasen 330b23bd8b tests: modem_chat: Add test for timeout script chat command
Adds test for timeout script chat command, which is a script
chat command where only the timeout parameter is set. The
script will simply wait for the timeout duration, then move
on to the next script chat.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-07 15:09:21 -05:00
Fin Maaß 7d83a8a68a lib: smf: constant number of arguments for SMF_CREATE_STATE()
This sets the number of arguments for SMF_CREATE_STATE() to always
be the same, independent of the selected Kconfig options.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-07 17:46:21 +02:00
Théo Battrel b2e235d530 Bluetooth: Remove legacy debug symbols
The `BT_DEBUG_*` Kconfig symbols have been deprecated for more than 2
versions, remove them.

Update code that was still using them.

Remove the Bluetooth specific `Kconfig.template.log_config_bt` and use
`Kconfig.template.log_config_inherit` from the logging subsystem
instead, now that the legacy symbols can be removed.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-05-07 09:49:27 +02:00
Andries Kruithof 6a0cdb4eaa Bluetooth: CAP: Commander Reception start procedure
Add the CAP commander reception start procedure which starts reception
on one or more CAP acceptors

With the implementation of broadcast reception start procedure we also need
some mockups for unit testing

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-05-07 09:34:01 +02:00
Thibo Verheyde e726dc6403 tests: build_all: modem: Add Sequans GM02S Modem test
Added test definition for Sequans GM02S Modem to build_all test.

Signed-off-by: Thibo Verheyde <thibo@dptechnics.com>
2024-05-06 22:51:28 +01:00
Jukka Rissanen c0b7d8f252 tests: net: coap: Enable loopback interface
There needs to be at least one network interface in order
to avoid this error.

E: There is no network interface to work with!

So enable loopback support which creates a loopback interface.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 22:50:18 +01:00
Jukka Rissanen d9c985ec67 tests: net: ipv6: Add address selection tests
Make sure the IPv6 source address selection works as expected
when using the IPV6_ADDR_PREFERENCES socket option.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 22:50:18 +01:00
Jukka Rissanen 06e9832f63 tests: net: udp: Add address reference counting tests
Make sure that address reference counting works as expected.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 22:50:18 +01:00
Jukka Rissanen f95c62803f tests: net: ipv6: Add privacy extension tests
Add tests that will make sure IPv6 privacy extension code works
as expected.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 22:50:18 +01:00
Konrad Derda d60ea3efee tests: net: mld: add tests for multicast routes in MLDv2 reports
This commit introduces a new test case for veryfing that addition and
deletion of multicast routing entries emit MLDv2 reports when needed
and if multicast routing entries are appended to MLDv2 records properly.

Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
2024-05-06 22:50:01 +01:00
Marcin Szymczyk 8742e24760 tests: kernel: interrupt: nested_irq: support nRF54L15 FLPR CLIC
Add support for VPR CLIC to `nested_irq` kernel test.
Verified on nRF54L15 FLPR for now.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-05-06 19:06:19 +02:00
Marcin Szymczyk fd79676c16 tests: kernel: interrupt: account for custom RISCV IRQ offset
`CONFIG_RISCV_RESERVED_IRQ_ISR_TABLES_OFFSET` offsets IRQ in
vector table, align test to this functionality.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-05-06 19:06:19 +02:00
Jukka Rissanen 24284601d9 tests: net: reuseaddr_reuseport: Fix zassert statements
One should not call a function directly from within zassert()
as it can cause the value of errno to be lost as seen by this
failed test output

Assertion failed at tests/net/socket/reuseaddr_reuseport/src/main.c:151:
  test_bind_success: (zsock_bind(sock, addr, addrlen) not equal to 0)
  bind() failed with error 0
FAIL - test_ipv4_udp_bad_both_not_set in 0.000 seconds

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 17:30:45 +01:00
Ping Wang 6a027634cd Bluetooth: Audio: Shell: adds support for BIS index parameter
When calling bap_broadcast_assistant add_pa_sync, it should only
set the BIS index field as optional parameters and not to whatever
is in the BASE.

If setting BIS index which the BASE does not support, then the
command should be rejected.

This PR fixes https://github.com/zephyrproject-rtos/zephyr/issues/70835

Signed-off-by: Ping Wang <pinw@demant.com>
2024-05-06 17:30:04 +01:00
Ping Wang 291b81bc38 Bluetooth: Audio: Shell: adds support for LESC in the host
The commit adds support for LESC in the host if the controller
does not support the public key generation for ECDH.

Signed-off-by: Ping Wang <pinw@demant.com>
2024-05-06 17:30:04 +01:00
Hess Nathan a5b1b3045b coding guidelines: comply with MISRA Rule 20.9
- avoid to use undefined macros in #if expressions

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-05-06 14:59:03 +01:00
Pieter De Gendt f147a5fec2 spelling: Replace occurrences of "iff" with "if and only if"
Spell checking tools do not recognize "iff", replace with "if and only if".
See https://en.wikipedia.org/wiki/If_and_only_if

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-06 14:58:08 +01:00
Alberto Escolar Piedras ba4bbe91b4 Revert "tests: kernel: update test case with sys_clock_hw_cycles_per_sec"
This reverts commit fd8ca83e9a.

https://github.com/zephyrproject-rtos/zephyr/pull/69705
Introduced a regression in main in which
tests/subsys/logging/log_timestamp
started failing. (See
https://github.com/zephyrproject-rtos/zephyr/issues/72344
for more info).
Let's revert the PR. It can be submitted after with the issue
fixed.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-06 14:52:29 +03:00
Emil Gydesen 33c253c813 Tests: Bluetooth: CAP: Refactor some CAP commander functions
Refactor som CAP commander test functions to perform operations
in parallel, rather than sequential.

The CAP initiator functions are kept sequential so that we are
testing both versions.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-06 11:48:31 +02:00
Tomi Fontanilles e141640b82 tests: net: tls: fix failures
Fix the failures introduced in #72078 by manually enabling all the
hash algorithms as they used to be.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-06 11:09:49 +02:00
Sebastian Głąb fa7c05cf47 tests: drivers: watchdog: Add negative test cases for Watchdog
Extend test coverage by adding tests that check invalid use
of the Watchdog API.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-05-06 09:21:46 +02:00
Najumon B.A fd8ca83e9a tests: kernel: update test case with sys_clock_hw_cycles_per_sec
update test case with sys_clock_hw_cycles_per_sec() api to retrieve
system clock frequency (HW cycle per sec) at runtime or statically

Signed-off-by: Najumon B.A <najumon.ba@intel.com>
2024-05-04 13:24:12 +03:00
Tom Burdick b781144438 i2c: Fix filtering on alias for i2c-ram
Was previously looking for i2c_ram which is incorrect, the alias was
always i2c-ram.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-05-04 13:23:22 +03:00
Tom Burdick 7fc153c760 i2c: RAM test updates to support power management
It's important we test the power management flows when testing i2c

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-05-04 13:23:22 +03:00
Rubin Gerritsen 13699dc660 tests: Bluetooth: per_adv_syncer -> per_adv_sync
This ensures the naming convention matches the APIs that
are tested.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-05-03 14:44:31 +01:00
Rubin Gerritsen 7fdc99a4cb tests: Bluetooth: Add coverage for Coded PHY sync establishment
Adds test coverage for the case where the host starts the
scanner automatically upon sync creation.
This test covers there bug where we previously did not start
scanning on Coded PHY.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-05-03 14:44:31 +01:00
Rubin Gerritsen 4095b790ee tests: Bluetooth: Increase coverage for sync establishment
We didn't have test coverage for the scenario where the host
starts scanning automatically.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-05-03 14:44:31 +01:00
Swift Tian 74ddfbc8a2 tests: devicetree: Add a test test_child_nodes_number
The test uses DT_CHILD_NUM and DT_INST_CHILD_NUM to get the number of
child nodes of a given node from generated macro.
The test uses DT_CHILD_NUM_STATUS_OKAY and DT_INST_CHILD_NUM_STATUS_OKAY
to get the number of child nodes of a given node which children's status
are "okay" from generated macro.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-05-03 11:18:43 +02:00
Jeferson Fernando 4810914d00 tests: subsys: lorawan: add channels mask configuration tests
Checks the behavior of configuration of channels mask for LoRaWAN.
Are passed wrong masks sizes as argument, NULL pointer instead channels
mask buffer and the right case to validate the expected returns.

Signed-off-by: Jeferson Fernando <jeferson.santos@edge.ufal.br>
2024-05-03 09:51:46 +02:00
Peter Mitsis 283d4133fa 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.

Filtered on x86 as the x86_64 irq_offload() implementation isn't
SMP-safe.  See #72172

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-05-02 13:55:03 -04:00
Andy Ross 727996acdc 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-05-02 13:55:03 -04:00
Andy Ross cef2ac5583 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-05-02 13:55:03 -04:00
Martin Jäger 9e341b49c8 tests: subsys: lorawan: add frag_decoder unit-test
The unit test allows to test the frag decoder algorithms using random
binary data.

The coded fragments are created on the fly using the encoder algorithm
described by Semtech in the LoRaWAN TS004-1.0.0 document.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-05-02 16:54:43 +02:00
Szymon Janc 37f9cb75cc bluetooth: tester: Add support for OTS
This implemnets OTS service and provides OTS instance with two objects
for behavior valid and invalid test cases. Service implementation is
inspired by peripheral_ots sample.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-05-02 16:51:42 +02:00
Vinayak Kariappa Chettimada 0c5b4f383d tests: bsim: Bluetooth: Fix sim_length for central_hr_peripheral_hr
Fix sim_length value for central_hr_peripheral_hr so that
the simulation does not end while the test is still in
progress.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-05-02 12:18:49 +01:00
cyliang tw 15c4d24c83 tests: drivers: adc_api: support numaker_m2l31ki
Add support for Nuvoton numaker board numaker_m2l31ki.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-05-02 09:58:43 +01:00
Yong Cong Sin f98fd62c73 include: sys: util: add note and test for NUM_VA_ARGS_LESS_1
Notes that `NUM_VA_ARGS_LESS_1` support up to 64 arguments,
and added test for it in `tests/lib/sys_util`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-01 22:56:00 +01:00
Yong Cong Sin ae2cb14381 include: sys: util: implement NUM_VA_ARGS
This macro count the number of arguments in the variable
arguments list.

Added test for it in `tests/lib/sys_util`.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-05-01 22:56:00 +01:00
Mykola Kvach 5019f93258 tests: add h3ulcb and salvator xs m3configs to perf disk tests
Add MMC related cfgs/overlays of arm64 gen3 rcar boards to perf and
susys/sd/mmc tests.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2024-05-01 10:55:11 -04:00
Omkar Kulkarni 11eed84775 Bluetooth: Mesh: Update models metadata API
This commit updates models metadata API to simplify the usage and
removes the metadata pointer in health server model context.

Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
2024-05-01 10:54:50 -04:00
Krzysztof Chruściński 435f32d191 tests: drivers: spi: spi_slave: Add nrf54h20dk
Add configuration for nrf54h20dk to the test.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-01 10:53:58 -04:00
Vinayak Kariappa Chettimada 5258b528f7 tests: bsim: Bluetooth: Reduce multiple id test execution iterations
Reduce the iterations in multiple id multiple simultaneous
connections test, and tune the buffer counts to catch any
buffer leak related regressions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-05-01 10:53:06 -04:00
Fabio Baltieri 02114bf822 tests: shell: add tests for "device list"
Add tests for the "device list" output with the various configuration of
device power management.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-05-01 10:31:03 +02:00
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