Currently spinlock internals are directly accessed from the tests.
This way the test becomes bound to the particular spinlock implementation.
To remove this unnecessary dependency the distinct API to check if spinlock
is locked is introduced.
k_spin_is_locked should be used for the spinlock testing only,
so the scope of this API is intentionally restricted.
Signed-off-by: Alexander Razinkov <alexander.razinkov@syntacore.com>
Add TCP test case which verifies that if RST+ACK packet is received
during TCP handshake, the connection is brought down and
net_context_connect() fails.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The previous design with dedicated bits in the structure required a
user to explicitly set each bit.
Using one flags variable allows to extend the features more easily
in the future and avoids breaking existing code.
This change is particularly useful for the FDF and BRS flags required
for CAN-FD support.
See also previous similar change for the CAN driver in
f8a88cdb27
Signed-off-by: Martin Jäger <martin@libre.solar>
At least one of this test cases in pwm_capture needs to verify
the working of four-channel-capture-support.
Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
After recent refactors some PACS characteristics have to be enabled
with CONFIG_ variables.
Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
Enable these tests only for H7 and if DMA is not enabled, as
running them with DMA would require modifying the dmamux
configuration in devicetree to move half-words instead of
bytes.
Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
This variable was originally provided for two indended purposes:
* Let users manually add a new image in a desired order in the list.
* Let users set build-only images, which are excluded from the list.
Given the recent additions of the `sysbuild_add_dependencies()` function
and the `BUILD_ONLY` parameter, `IMAGES` should be considered obsolete.
Furthermore, the list of images added to sysbuild should be updated
automatically when calling `ExternalZephyrProject_Add()`. This is now
possible by using a GLOBAL property internal to sysbuild.
With that, the `IMAGES` variable can be removed. Its existing usage for
image ordering is replaced with `sysbuild_add_dependencies()` treewide.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
All generic drivers, ie, emulators/SPI/I2C based devices, were defined
in app.overlay, meaning the overlay is picked by all builds. However,
what was defined in app.overlay was only used by the native_posix build.
This will save some CI time, as generic drivers were being built more
than strictly necessary.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
After adding the lvgl pointer device into the board dts the custom overlays
are not needed anymore.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
With picolibc being the default C library, we need to explicitly include
testing against the minimal C library for kernel components.
Signed-off-by: Keith Packard <keithp@keithp.com>
The ISO-TP tests were disabled for native_posix in the past because of
timing issues.
The implementation test is working well with native_posix now and
should also be run in CI.
Signed-off-by: Martin Jäger <martin@libre.solar>
Added a BabbleSim test to check the update of the destination address
of all active connections during the identity resolution operation.
All connection objects associated with the same private peer address
should convert it to the identity address.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
NVS lookup cache currently uses CRC8/16 as a hash function
to determine the cache position, which is not ideal choice.
For example, when NVS lookup cache size is 512 and 256
subsequent NVS IDs are written (that is, 0, 1.., 255), this
results in 128 cache collisions.
It is better to use a dedicated integer hash function. This
PR uses one of the 16-bit integer hash functions discovered
with https://github.com/skeeto/hash-prospector project. The
hash function was additionally tested in the context of NVS
lookup cache using simple NVS ID allocation patterns as well
as using real device NVS dump.
Also, add a test case to verify that the hash function is
not extremely bad.
Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
Modify the signature of the k_mem_slab_free() function with a new one,
replacing the old void **mem with void *mem as a parameter.
The following function:
void k_mem_slab_free(struct k_mem_slab *slab, void **mem);
has the wrong signature. mem is only used as a regular pointer, so there
is no need to use a double-pointer. The correct signature should be:
void k_mem_slab_free(struct k_mem_slab *slab, void *mem);
The issue with the current signature, although functional, is that it is
extremely confusing. I myself, a veteran Zephyr developer, was confused
by this parameter when looking at it recently.
All in-tree uses of the function have been adapted.
Fixes#61888.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add alignment parameter to FS_LITTLEFS_DECLARE_CUSTOM_CONFIG macro, it
speeds up read/write operation for SDMMC devices in case when we align
buffers on CONFIG_SDHC_BUFFER_ALIGNMENT, because we can avoid extra copy
of data from card bffer to read/prog buffer. See, how 'card_read_blocks'
function works.
Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Convert pointer to string literal to array of char so that sizeof()
can correctly calculate size. Currently sizeof(msg) is effectively
sizeof(char *).
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
qemu_x86 was listed as an integration platform but not in the
allow list causing twister to fail:
Error found:
tests/drivers/flash/common/drivers.flash.common.default
on qemu_x86 (Not in testsuite platform allow list but is one
of the integration platforms)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This test is too dependent on the exact order of events,
and known to fail in most platforms but native_posix.
To mitigate the issue and avoid blocking development
due to failed CI tests, let's only allow the test in
native_posix.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
remove mcux test scenario, which is overlapped with default
limit test to boards listed in the boards list
fixing: #62067
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Rename BT_AUDIO_CODEC_QOS_[UN]FRAMED to
BT_AUDIO_CODEC_QOS_FRAMING_[UN]FRAMED and give a name
to the enum, which is then used by the
struct bt_audio_codec_qos.
The rename was needed as we had a codec_qos initializer of the
same name, so the values were renamed to avoid duplicated
macro names.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Make sure we use the network interface name (if configured)
instead of device name when binding to certain network
interface.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add option to prefix log message with thread ID or thread name.
Align tests and add test case to the log_output test.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Adds error and lower bounds tests for the posix clock_nanosleep
function. Refactors common test functions to be shared by both
clock_nanosleep and nanosleep tests.
Signed-off-by: Tom Finet <tom.codeninja@gmail.com>
This fixes implicit declaration of function
‘bt_bap_unicast_server_disable’ compilation warning.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This fixes linker warning caused by invalid bonding of linker scripts
provided by multiple "-T" options.
mock-sections.ld contains output sections did you forget -T
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Allow use of multiple mb85rc frams at contiguous i2c addresses as a single
big fram module.
Tested on mb85rc1mt used as two 32K modules, where the first one was at
mb85rc1mt's first i2c address and the second one at mb85rc1mt's second i2c
address.
Signed-off-by: Jakub Michalski <jmichalski@internships.antmicro.com>
Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
Add modem_cellular driver to build_all. Since the driver
is generic, supporting 4 different modems, it builds an
instance for all 4 as they exist in the devicetree.
Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
The tests test each module independently using the mock pipe,
which implements the modem_pipe API, making it compatible
with the modem modules.
The modem_ppp module is slightly different from the others
since it also interacts with the network stack. To acheive
this, a mock implementation of the PPP L2 net iface has
been implemented in the test suite for the modem_ppp.
Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
bt_l2cap_chan_send returns the total bytes sent from the buf,
hence test should only fail when it returns a negative error code
and not a positive number of bytes sent.
Signed-off-by: Tom Finet <tom.codeninja@gmail.com>
Fix a bunch of mismatched CONTAINER_OF, few missing
k_work_delayable_from_work conversions but also many
bt_l2cap_le_chan/bt_l2cap_chan and few others.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
rp_enc_state_wait_ltk_reply() is executed in thread context, so
it is not allowed to move the encryption state machine forward.
Defer LTK reply handling to next prepare event by introducing a continue
state.
Update the unit test to reflect this, and remove the TODO that actually
said there was an issue in the first place.
Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>