Commit graph

63 commits

Author SHA1 Message Date
Jamie McCrae 36b179c43b tests: subsys: mgmt: mcumgr: Add all options test
Adds a test which enables all Kconfig options for MCUmgr (that are
not deprecated and can be supported on the nrf52840dk board) to
ensure that if a breaking change is introduced in CI then it can
be caught.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-23 12:24:59 +01:00
Dominik Ermel b3833cf2bc tests/mgmt/mcumgr: Apply rework in MCUMgr subsystem
Code changes required by rework in MCUMgr souce code structure.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-17 15:31:17 +01:00
Dominik Ermel 4328f165a8 mgmt/mcumgr: Reworking source code tree and API interface
The commit reworks mgmt/mcumgr subsystem source code to remove
lib subdirectory and make it a little bit more flat.
It also moves all API interface files, which are supposed to be
visible by applications using MCUMgr, to interface sub-directories,
and exposes them with full paths; for example to include general
MCUMgr support, group registration and so on, user would now include:
 <mgmt/mcumgr/mgmt/mgmt.h>
to additionally have control on File System group management
registration user would need:
 <mgmt/mcumgr/mgmt/grp/fs_mgmt.h>

All internal headers have been removed from interface.

CMAkeLists.txt get significant rework and various MCUMgr subsystems
have been divided into separate sub-libraries.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-17 15:31:17 +01:00
Dominik Ermel 7c2924f4bc mgmt/mcumgr: Move transport headers to transport subdir
The MCUmgr transport headers have been moved to
zephyr/mgmt/mcumgr/transport/

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-17 15:31:17 +01:00
Anas Nashif 61b56cae44 tests: mgmt: fix tags and identifiers
Fix tags and identifiers for all mgmt subsys tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-15 05:32:28 -05:00
Jamie McCrae 379d23001f tests: mgmt: mcumgr: Add fs_mgmt_hash_supported test
Adds a test which checks that the fs_mgmt supported hash/checksum
functionality is working and returns the expected response.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-10 11:10:03 +01:00
Dominik Ermel 542b1f86ba tests/mgmt/mcumgr/smp_reassembly: Rename mgmt_hdr to smp_hdr
SMP reassembly is the only non-protocol code in MCUmgr that
directly accesses SMP header; this tests has been accessing
mgmt_hdr structure and now it is named smp_hdr and visible
via smp_internal.h.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-03 13:04:45 +01:00
Dominik Ermel 9331591ab1 mgmt/mcumgr: Remove buf.c
buf.c have been providing net_buf pool allocator and dealocator
for SMP packets: mcumgr_buf_alloc and mcumgr_buf_free.
The functions have been moved to smp.c and renamed
smp_packet_alloc and smp_packet_free, respectively.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-10-26 12:42:40 +02:00
Dominik Ermel 12b1528df9 mgmt/mcumgr: Remove mgmt/mcumgr/buf.h
SMP buffer allocation functions have been moved to smp/smp.h,
and buf.h has been removed.
Definitions of cbor_nb_reader and cbor_nb_writer have also been moved.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-10-26 12:42:40 +02:00
Dominik Ermel 77fc3563ae tests/mgmt/mcumgr/smp_reassembly: Drop zephyr_ prefix
The mcumgr transport API drops zephyr_ prefixes.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-10-18 12:05:42 +02:00
Jamie McCrae 50738819f4 mgmt: mcumgr: Move wrongly placed header file
Moves a .h file added outside of the zephyr include folder to be
within the zephyr include folder.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-20 15:01:47 +02:00
Dominik Ermel c45dbb01eb tests/subsys/mgmt/mcumgr: Move tests
Move smp_reassembly and zcbor_bulk tests under
tests/subsys/mgmt/mcumgr.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-12 14:15:06 +00:00
Jamie McCrae d834768da7 tests: mgmt: mcumgr: os_mgmt_echo: Add mcumgr echo test
Adds a simple mcumgr test which checks that the os_mgmt echo commmand
works and responds with the correct data.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-08 15:29:21 +00:00