The condition 'iv_index != bt_mesh.iv_index + 1' is already caught by
the earlier conditions in this branch.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
If the network is in IV Update In Progress state when we get
provisioned we should set a timer so we eventually transition back to
Normal mode (otherwise we may end up in IVU In Progress indefinitely).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
When we get provisioned we can't know how long the network has been in
the current IV Update state. Introduce a special value for
bt_mesh.last_update to indicate that we don't know the duration.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Update the LwM2M client sample documentation with usage examples
of the newly introduced overlay-*.conf fragments. Remove the
references to prj_dtls.conf.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
The file overlay-bt.conf contains only the needed CONFIG items to
support Bluetooth networking.
For example, DTLS-enabled BLENano2 HW can be supported with the
following build:
cmake -GNinja -DBOARD=nrf52_blenano2 \
-DCONF_FILE="prj.conf overlay-bt.conf overlay-dtls.conf" ..
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
Instead of maintaining a nearly identical copy of prj.conf to support
DTLS, let's replace it with an overlay-dtls.conf file containing only
the CONFIG settings needed to support DTLS. This can be used via the
-DCONF_FILE command line argument when configuring the sample:
Non-DTLS-enabled build:
cmake -GNinja -DBOARD=qemu_x86 ..
DTLS-enabled build:
cmake -GNinja -DBOARD=qemu_x86 \
-DCONF_FILE="prj.conf overlay-dtls.conf" ..
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
This commit fixes crash caused by double free from message sequence
fragmentation. When double free happens the call stack is:
0 reassembly_cancel
1 handle_fragment_hdr
2 net_ipv6_process_pkt
3 process_data
4 processing_data
5 net_rx
6 process_rx_packet
7 work_q_main
8 _thread_entry
So at first packet is unrefed in reassembly_cancel and then also in
processing_data.
Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
After successful send, the packet is automatically cleared, so
trying to call print_send_info() on it leads to errors:
[net/pkt] [ERR] net_pkt_tcp_data: NULL fragment data!
[net/tcp] [ERR] net_tcp_get_hdr: NULL TCP header!
(if error logging enabled).
This change is similar to how print_send_info() is called in
existing send_reset() function of this source file.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
When MMU is enabled and the SOC we are running doesn't have
execute in-place(XIP) the final image will be a monolith which
sits in RAM. In such situations we need to maintain the alignment
for application memory. If not maintained the MMU boot tables
will not be configured properly.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
The testcases presented here will test the following functionality
1. Inheritance of permission from parent thread to child.
2. Memory domain implementation.
3. Access permission for k objects.
The combinations of these test cases will cover some of the basic
usecases of the userspace mode.
These test cases are meant to be executed by any board with has
CONFIG_USERSPACE enabled.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Adding a new kernel object type or driver subsystem requires changes
in various different places. This patch makes it easier to create
those devices by generating as much as possible in compile time.
No behavior change.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Driver APIs might not implement all operations, making it possible for
a user thread to get the kernel to execute a function at 0x00000000.
Perform runtime checks in all the driver handlers, checking if they're
capable of performing the requested operation.
Fixes#6907.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
There was a ton of junk in this header. Pare it down to just the
stuff actually used by code outside of sched.c, move the needed
internal stuff into sched.c itself, and drop everything else.
Note that (other than the tiny inlines that remain here in the header)
the scheduler interface exposed to the rest of the system is now
composed of just 12 functions.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
In f. settings_init_fcb the storage area was implemented badly:
- storage was always erased
- the only source of settings fcb instance was pointed twice.
This patch fix both issues.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
API settings_subsys_init call was changed so that it returns
error (so returns int instead of void).
Prototype of storage helper function export_func for
settings_handler::h_export was changed so that it returns error
(so returns int instead of void).
Fixed few other error handling issues by ignoring return
values.
Tests were aligned to above patches.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This addresses issue #7146.
The current helptext does not state that the directory
will be deleted.
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Fixes issue #7184.
Use $BOARD_ROOT to find correct list of supported boards.
This is needed since the user can set this variable to any directory.
Pass $BOARD_ROOT to usage.cmake where it is called.
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Parse all yaml file and create a list of declared testcases. This does
list the individual tests inside test projects, not only the projects
containing the tests, for example:
$ sanitycheck --list-tests -T tests/net/socket/
- net.socket.udp.send_recv_2_sock
- net.socket.udp.v4_sendto_recvfrom
- net.socket.udp.v6_sendto_recvfrom
- net.socket.udp.v4_bind_sendto
- net.socket.udp.v6_bind_sendto
- net.socket.getaddrinfo_ok
- net.socket.getaddrinfo_no_host
- net.socket.tcp.v4_send_recv
- net.socket.tcp.v6_send_recv
- net.socket.tcp.v4_sendto_recvfrom
- net.socket.tcp.v6_sendto_recvfrom
- net.socket.tcp.v4_sendto_recvfrom_null_dest
- net.socket.tcp.v6_sendto_recvfrom_null_dest
13 total.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Instead of completely excluding those tests, mark them as skipped and
provide an noop function that marks the test as skipped where test is
not supported.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This parses the tests that run within a test project/application from
the source code and gives us a view of what was run, skipped and what
was blocked due to early termination of the test.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Some tests cant run everywhere, instead of completely dropping them, we
should report them as being skipped.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Minor change to make test names consistent with other tests using ztest.
All test functions need to start with test_.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Close test sockets in test_send_recv_2_sock() to avoid Coverity
warnings.
Coverity-Id: 182764
Fixes: #6107
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Add a reboot command for requesting a warm or cold system reboot
through the kernel shell.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
All the mesages are checked with _SYSCALL_MEMORY() prior to calling the
actual implementation function. However, a race condition might happen
between the check and the call to _impl_i2c_transfer() itself.
Copy the msgs vector to a locally allocated array and pass it to the
transfer implementation.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>