Previously we always used the board identifier (via CONFIG_BOARD) as
identifier, however this causes troubles in case of tests with multiple
boards of the same kind on the same server. The device_id addresses that
problem nicely if enabled and supported by the architecture.
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
Renames the "Blueooth Controller Assertion Handler" to "Application
Defined Assertion Handler" to better fit the purpose of the Kconfig
option.
Signed-off-by: Thomas Stenersen <thomas.stenersen@nordicsemi.no>
Start es-wifi TCP server on accept.
An asynchronous (spi) message is received on client connection.
Only one connection is supported at a time.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
In order to prevent potential deadlock in various callbacks such as
accept, recv, etc... Add support for nested eswifi locking, allowing
callee to safely access back to the eswifi methods.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
The eswifi controller can generate events via asynchronous messages
which can be polled via the 'MR\r' command. The messages will have a
Start Of Message Asynchronous [SOMA] and End Of Message Asynchronous
[EOMA] delimiters.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
This mechanism had multiple problems:
- Missing parameter documentation strings.
- Multiple calls to k_thread_name_set() from user
mode would leak memory, since the copied string was never
freed
- k_thread_name_get() returns memory to user mode
with no guarantees on whether user mode can actually
read it; in the case where the string was in thread
resource pool memory (which happens when k_thread_name_set()
is called from user mode) it would never be readable.
- There was no test case coverage for these functions
from user mode.
To properly fix this, thread objects now have a buffer region
reserved specifically for the thread name. Setting the thread
name copies the string into the buffer. Getting the thread name
with k_thread_name_get() still returns a pointer, but the
system call has been removed. A new API k_thread_name_copy()
is introduced to copy the thread name into a destination buffer,
and a system call has been provided for that instead.
We now have full test case coverge for these APIs in both user
and supervisor mode.
Some of the code has been cleaned up to place system call
handler functions in proximity with their implementations.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
If the offset within the thread struct to the
ARC arch-specific 'relinquish_cause' member is too
large, ld_s instructions referencing it will not
compile. This happens easily if CONFIG_THREAD_NAME
reserves a name buffer within the thread struct, since
all the arch-specific members come last.
Use the regular 'ld' instruction instead.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
On some STM32 series, I2C HAL defines I2C_SPEED_STANDARD and
I2C_SPEED_FAST. These definitions conflict with Zephyr I2C API.
Since Zephyr I2C STM32 driver uses LL API, we can disable I2C HAL.
Disable I2C HAL for L1 and F2 series. Deactivation is already done
2 other impacted series F1 and F4.
Additionally, on F1 series, add the commented definition line to
make the change more visible.
Requires https://github.com/zephyrproject-rtos/hal_stm32/pull/16
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This test uses ztest, there is no need to set this and it
was breaking builds with CONFIG_COVERAGE=y
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Test AF_NET_MGMT API getsockopt() and setsockopt() functions that
they work properly when called from kernel or from userspace.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Currently only setting and getting of Ethernet Qav options are
supported via this interface.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Print IP address for added or removed IP address. This helps
to understand what IP address is being removed or added.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add unit tests to net_addr_ntop() and net_addr_pton() in order to
verify that the functions can be called from userspace.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If the net_mgmt event has some info, like IP address, that
could be sent, then send it the same time. This is very useful
for the receiver of the event in order to know that is happening
in the system.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Allow application to listen network management events using
BSD socket API. Application needs to create the socket using
AF_NET_MGMT address family. At this point we only support
receiving network management events that the network subsystem
is sending.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The info parameter is difficult to use if the caller does not
get information how long the info struct is. So add info_length
parameter to net_mgmt_event_wait_on_iface() and
net_mgmt_event_wait() APIs.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
HW stack protection in ARMv8-M is implemented by default
with the built-in stack guard mechanism. Therefore, by
default all tests for ARMv8-M will use the built-in stack
overflow mechanism (CONFIG_BUILTIN_STACK_GUARD is set in
tests). However, we would like have some coverage on the
MPU stack guard mechanism for ARMv8-M. The added test case
manually disables BUILTIN_STACK_GUARD and enables the
MPU_STACK_GUARD option, to provide that test coverage.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
ARMv8-M architecture supports the built-in stack overflow
detection mechanisms via the SPLIM registers. However, the
user might still wish to use the traditional MPU-based stack
overflow detection mechanism (for testing or other reasons).
We now allow the user to enable HW stack protection, but
manually turn off BUILTIN_STACK_GUARD option. This will force
the MPU_STACK_GUARD option to be selected.
It is still not allowed for the user to not select any stack
guard mechanisms, if HW_STACK_PROTECTION is selected.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
CONFIG_TEST_HW_STACK_PROTECTION is set by default in tests,
and that one selects HW_STACK_PROTECTION option. Therefore,
we do not need to set that one explicitly in the test project
configuration files. We clean up some redundant occurrences of
CONFIG_HW_STACK_PROTECTION=y from the tree.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Add support for the FXOS8700CQ present on the NXP TWR-KE18F
development board. The FXOS8700CQ IRQ lines are not connected by
default on the TWR-KE18F, so only polling (no trigger) is supported.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add support for polling the sensor values of the FXOS8700 device when
no trigger (interrupt) is enabled.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
sflists have a couple APIs related to sfnodes that aren't
present for slists. There were uncovered, write some tests
for them.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We were testing all the slist APIs, but not the sflist
variant. Make a copy of the slist tests for sflist,
with the names properly changed.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Some of the slist APIs were only being indirectly exercised;
add to the slist test case to cover everything explicitly.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
There's no need for a system call for this; futexes live in
user memory and the initialization bit is ignored.
It's sufficient to just do an atomic_set().
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Introduce a separate buffer pool for events which the HCI driver
considers discardable. Examples of such events could be e.g.
Advertising Reports. The benefit of having such a pool means that the
if there is a heavy inflow of such events it will not cause the
allocation for other critical events to block and may even eliminate
deadlocks in some cases.
Also update all mesh samples not to specify explicit RX buffer counts
anymore. Instead, create appropriate defaults in Kconfig so that we
only need to override this in the app for cases like the bbc:microbit
with limited memory.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This event is a priority one, so it's not safe to have it use the RX
buffer pool which may be depleted due to non-priority events (e.g.
advertising events). Since the event is consumed synchronously it's
safe to have a single-buffer pool for it. Also introduce a new
bt_buf_get_evt() API for HCI drivers to simplify the driver-side code,
this effectively also deprecates bt_buf_get_cmd_complete() which now
has no in-tree HCI driver users anymore.
Fixes#16864
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Allow application to call net_if_ipv4_set_gw_by_index()
and set the gateway if enabled by configuration.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Allow application to call net_if_ipv4_set_netmask_by_index()
and set the netmask if enabled by configuration.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Make IPv4 and IPv6 address addition and removal possible from
userspace app. But allow this only if CONFIG_NET_IF_USERSPACE_ACCESS
By default these operations are not allowed from userspace app.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We use the following commands to rename any
SW._GPIO_{CONTROLLER,PIN,FLAGS} to
DT_ALIAS_SW._GPIOS_{CONTROLLER,PIN,FLAGS}
git grep -l SW._GPIO_CONTROLLER | xargs sed -i 's/SW\(.\)_GPIO_CONTROLLER/DT_ALIAS_SW\1_GPIOS_CONTROLLER/g'
git grep -l SW._GPIO_PIN | xargs sed -i 's/SW\(.\)_GPIO_PIN/DT_ALIAS_SW\1_GPIOS_PIN/g'
git grep -l SW._GPIO_FLAGS | xargs sed -i 's/SW\(.\)_GPIO_FLAGS/DT_ALIAS_SW\1_GPIOS_FLAGS/g'
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This fixes the issue where observations are automatically reported using
the minimum period instead of the maximum. This causes notifications to
be sent more frequently than configured when the resource does not
change.
Signed-off-by: Pieterjan Camerlynck <pieterjan.camerlynck@gmail.com>
Current socket connect call implementation always takes
K_FOREVER timeout value, which blocks TCP connections
in case failure. TCP connections waits until it receives
SYN ACK. If there is no SYC ACK means, connect call is
blocked forever.
Added a Kconfig option to define timeout value. Default
value is 3000 milliseconds. User can modify it.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>