Commit graph

11177 commits

Author SHA1 Message Date
Georgij Cernysiov 986fb1e85d tests: net: lib: coap: test coap_packet_set_path
Adds testing of 'coap_packet_set_path'.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2023-08-25 13:15:12 +02:00
Jamie McCrae 28e94dca06 tests: mgmt: mcumgr: all_options: Add settings_mgmt
Enables building the test application with settings management
group enabled to ensure it builds successfully.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-08-25 10:54:06 +01:00
Jamie McCrae a21a80ceb5 tests: mgmt: mcumgr: Add settings_mgmt test
Adds a test which checks settings_mgmt functionality.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-08-25 10:54:06 +01:00
Robert Lubos e8a00b7ef6 tests: net: socket: udp: Add test to verify connected socket behavior
Add test cases which verify that when UDP socket is connected, it only
accepts datagrams from a remote peer it was connected to, and not
others.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-08-25 10:31:19 +02:00
Fabio Baltieri 7ca4eeaaf9 emul: change stub driver priority to kernel device default
Change the emulator stub driver priority to
CONFIG_KERNEL_INIT_PRIORITY_DEVICE. Makes this play well with build time
priority checking.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-25 10:31:02 +02:00
Seppo Takalo e977fde7ee tests: lwm2m: Add more tests to LwM2M registry
Add module tests for all data types and most of deprecated
functions as well.

Refactor event wainting to expect_lwm2m_rd_client_event() which
does not care about the index, just the order.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-08-24 22:07:32 +01:00
Seppo Takalo 0da806736e tests: lwm2m: Add engine tests on security and socket opts
Add tests regarding socket options and various security
options.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-08-24 22:07:32 +01:00
Seppo Takalo 40dd0c1fa0 tests: lwm2m: Add bootstrap tests into RD client tests
Add bootstrap and few corner cases into RD client tests
to improve code coverage.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-08-24 22:07:32 +01:00
Kim Bøndergaard 95ca082e64 test: drivers: rtc: shell: Unittest of rtc_shell
The test mocks an rtc using the rtc_fake driver

Signed-off-by: Kim Bøndergaard <kim.bondergaard@prevas.dk>
2023-08-24 22:06:51 +01:00
Anas Nashif 71eee6da4b tests: fs: add more tags
Add module names as tags, to trigger CI on those tests when module has
changed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-08-24 13:41:26 -04:00
Anas Nashif 7f201f4ccc samples/tests: littlefs: tag littlefs samples/tests
Tag with required module name to make the tests run when the module has
changed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-08-24 13:41:26 -04:00
Manuel Argüelles f9fb4fe234 tests: gpio: nxp_s32: enable get config/direction tests
Enable tests using pin_get_config() and port_get_direction()
GPIO APIs for NXP S32 boards.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-08-24 17:21:18 +02:00
Alberto Escolar Piedras 9eeb78d86d COVERAGE: Fix COVERAGE_GCOV dependencies
CONFIG_COVERAGE has been incorrectly used to
change other kconfig options (stack sizes, etc)
code defaults, as well as some samples behaviour,
which should not have dependend on it.

Instead those should have depended on COVERAGE_GCOV,
which, being the one which adds special code and
temporary RAM storage for embedded targets,
require changes to many features.

When building for the native targets, all this was
unnecessary.

=> Fix the dependency.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-08-24 15:36:31 +02:00
Daniel Gaston Ochoa 818aa2d0c7 drivers: stm32: SPI: SPI nocache buffers can be in CONFIG_NOCACHE_MEMORY
CONFIG_NOCACHE_MEMORY is a valid way of declaring buffers in
nocache regions. Consider them valid in the stm32 SPI driver
nocache check. Also, don't check NULL buffers as the SPI
interface states that such buffers will result in sending
zeroes.

Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
2023-08-24 15:35:50 +02:00
Fabio Baltieri 058f256ea1 Kconfig.zephyr: check priorities by default
Enable build time initialization priority check by default.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-24 15:35:37 +02:00
Gerard Marull-Paretas 9c961571a2 modules: cmsis: move glue code to modules/cmsis
The CMSIS module glue code was part of arch/ directory. Move it to
modules/cmsis, and provide a single entry point for it: cmsis_core.h.
This entry header will include the right CMSIS header (M or A/R).

To make this change possible, CMSIS module Kconfig/CMake are declared as
external, allowing us to add a new Zephyr include directory.

All files including CMSIS have been updated.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-08-24 13:20:21 +02:00
Mariusz Skamra 2b27b4ebe0 Bluetooth: audio: tbs_client: Subscribe to all required notifications
This removes odd `subscribe` parameter from bt_tbs_client_discover
function parameters list. As the API user enables specific
CONFIG_BT_TBS_CLIENT_* option, the client implementation should
subscribe to the characteristic notifications so that the user receives
the value updates.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-08-23 15:44:07 +02:00
Morten Priess 83fcbfd0be Bluetooth: controller: Fixes for CIS Central error handling
- Fix masking for no coded phy
- Allow ISO_Interval < SDU_Interval for framed mode
- Change BT_HCI_ERR_INSUFFICIENT_RESOURCES to
  BT_HCI_ERR_CONN_LIMIT_EXCEEDED.
- Prevent starting same CIS twice
- Cancel an initiated CIS creation procedure if terminated before
  sending CIS_IND.
- Implement canceling of local CC procedure. Respond to CIS_RSP with
  REJECT, if canceled after CIS_REQ was sent.
- Introduce state CIG_STATE_INITIATING for central, to keep track of
  initiating CIS connection, in transition between CONFIGURABLE and
  ACTIVE.

Fixes EBQ test /HCI/CIS/BC-03-C.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2023-08-23 14:45:24 +02:00
Mariusz Skamra 043c1d8d4e tests: Bluetooth: tester: Add native_posix board to test build targets
This extends the list of build variants with native_posix variant to
build the tester application by CI.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-08-23 14:44:48 +02:00
Mariusz Skamra 7700c27dfc tests: Bluetooth: tester: Move DT overlays to boards directory
This moves the board DT overlays and configurations to /board
directory so that it can be automatically applied in compilation
pipeline.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-08-23 14:44:48 +02:00
Keith Packard 8a86733cfd tests/kernel/interrupt: Enable 'icount' for qemu_cortex_m0
This test fails when icount is disabled, so enable it

See 7bdc621ba9 which disabled icount by
default for this platform.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-08-23 10:09:44 +01:00
Aleksandr Khromykh b7141005f1 tests: Bluetooth: Mesh: opposite slot order for bsim settings backend
DFU slot sequence depends on the settings backend.
Commit adapts test after changing bsim settings backend.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-08-23 10:06:26 +02:00
Aleksandr Khromykh 695010fad0 tests: Bluetooth: Mesh: use bsim settings backend
Commit adds using BabbleSim's settings backend instead of
proprietary one that is based on POSIX files.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-08-23 10:06:26 +02:00
Aleksandr Khromykh 8a51176877 tests: Bluetooth: Mesh: move psa its emulator out of bt subtree
PSA ITS settings area does not belong to Bluetooth.
It should be restored before Bluetooth persistent data.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-08-23 10:06:26 +02:00
Marc Desvaux 2580728033 tests: drivers: uart: uart_async_api change pin nucleo_l152re
change pins for the test uart_async_api loopback because the old pins
pb10/pb11 are now used for the I2C loopback test.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-08-22 18:11:32 +02:00
Marc Desvaux 927617a774 tests: drivers: i2c: i2c_target_api add nucleo_l152re
Adds necessary overlay nucleo_l152re in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-08-22 18:11:32 +02:00
Marc Desvaux 1cdcca13fe tests: drivers: i2c: i2c_target_api add nucleo_l152re
Adds nucleo_l152re in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-08-22 18:11:32 +02:00
Martin Kiepfer 74db02bad1 drivers: gpio: AXP192 GPIO driver
AXP192 is a small power management IC, that also
features 5 GPIOS.
Besides GPIO driver this commit also includes needed modifications
in axp192 regulator and mfd driver as LDOIO0 functioanlity
is multiplexed with GPIO0 pin.

Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
2023-08-22 18:08:51 +02:00
Martin Jäger f7134c488e tests: canbus: isotp: conformance: remove shadow variables
Remove shadow variables found by -Wshadow by using the global recv_ctx
consistently throughout all the internal test helper functions.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-08-22 18:06:27 +02:00
Martin Jäger 387fdc9528 Revert "tests: canbus: rename shadow variables"
This reverts commit 505c17ed7b.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-08-22 18:06:27 +02:00
Aaron Massey 82bfb26446 fuel_gauge: Add battery cutoff support
Many fuel gauge ICs offer a battery cutoff/shipping mode functionality that
cutoff charge from the battery. This is often useful for preserving battery
charge on devices while in storage.

Add battery cutoff support to the fuel gauge API with a generic default SBS
driver showing an example of support in tests.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-08-22 18:05:50 +02:00
Eric Holmberg 526ff047cc soc: xtensa: espressif_esp32: add SPIRAM heap offset and size
The existing heap starts at the beginning of SPIRAM which is also occupied
by the WiFi stack if CONFIG_ESP32_WIFI_NET_ALLOC_SPIRAM is enabled.  This
results in memory corruption.

Update the linker description to add a _spiram_heap_start symbol and add a
KConfig size option to allow the SPIRAM stack to be correctly located and
sized.  Requires matching commit in hal_espressif.

Fixes: 61359

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2023-08-22 14:44:16 +02:00
Daniel Leung 1f7e0de004 tests: storage: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung 8eb73aa5e2 tests: rtc: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung 19939dc7de tests: portability: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung a206764878 tests: pm: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung 59d859eb37 tests: mgmt: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung 04820d38d8 tests: logging: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung 505c17ed7b tests: canbus: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Thomas Ebert Hansen 32b1c575fe tests: Bluetooth: Test invalid enc. pause
Add test to verify that
1) A peripheral role cannot initiate an encryption pause
2) A peripheral role rejects a LL_PAUSE_ENC_REQ while a CIS is
   established

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2023-08-22 10:53:47 +02:00
Thomas Ebert Hansen ff861304c3 tests: Bluetooth: Use FFF in ctrl_encrypt
Replace Ztest Mock with FFF.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2023-08-22 10:53:47 +02:00
Thomas Ebert Hansen 34fc97b2a0 tests: Bluetooth: Mock ISO streams with FFF
Update test_cc_create_periph_rem_host_accept to use mocked
ll_conn_iso_stream_get()

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2023-08-22 10:53:47 +02:00
Marc Desvaux e8c9508b10 tests: drivers: i2c: i2c_target_api add nucleo_g474re
Adds necessary overlay nucleo_g474re in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-08-22 10:00:38 +02:00
Marc Desvaux 8606ab5df6 tests: drivers: i2c: i2c_target_api add nucleo_g474re
Adds nucleo_g474re in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-08-22 10:00:38 +02:00
Sjors Hettinga 2adc95ae7a tests: net: tcp: Add testcase for validating retransmitted FIN seq
Implemented testcase to check if the retransmitted FIN packet
from the FIN1 state has the correct sequence number.
Also fix the endianness conversion of sequence numbers in the
tests to use 32-bit as it should instead of 16-bit.

Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
2023-08-22 10:00:14 +02:00
Sjors Hettinga 330561e47a tests: net: tcp: Add a testcase for data beyond TCP socket closure
After the TCP socket has been closed, it should not accept any new data
and send a RST packet if it does receive some.

Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
2023-08-22 10:00:14 +02:00
Mariusz Skamra 8540682f18 tests: Bluetooth: tester: Fix missing metadata validation on Enable
This fixes missing metadata validation on Enable operation callback.

Fixes: BAP/USR/SPE/BI-04-C
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-08-22 09:59:53 +02:00
Mariusz Skamra 02f399dc1d tests: Bluetooth: ascs: Add prohibited audio context metadata test
This adds for receiving and handling Enable operation with
prohibited audio context value.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-08-22 09:59:53 +02:00
Mariusz Skamra d28f180473 Bluetooth: audio: ascs: Move metadata validation to stack
As the metadata has to be validated anyway, let the initial vaidation of
metadata to be done in ASCS. The application can still reject the
metadata, but the length validation and supported type validation can be
performed by the stack.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-08-22 09:59:53 +02:00
Mariusz Skamra 914dc408fd tests: Bluetooth: ascs: Fix improperly formatted metadata
This fixes improperly formatted metadata. The Stream Context value is 2
bytes in size.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-08-22 09:59:53 +02:00