Add an option that excludes generation of a given path of `.gcda` files
when running coverage testing. This can be useful when running testing
coverage on downstream repos, which would otherwise result in large
`.gcda` files for paths we don't care about filling up the disk.
One example of using this is to exclude coverage outputs from
mbedtls files with the following:
`CONFIG_COVERAGE_DUMP_PATH_EXCLUDE="*modules/crypto/mbedtls*"`
Signed-off-by: Jordan Yates <jordan@embeint.com>
With the UART transport test (sample.tracing.transport.uart),
it would fail on qemu_x86_64 complaining about missing
k_event tracing functions. So add them to fix the compilation
error.
Fixes#96818
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Rename these three macros to an unprefixed lower-case variant. This is
normally not done for Zephyr macros (see container_of) but in this case
it seems like a good idea to adopt the lowercase names to:
1. have the same convention as the equivalent Linux macros, helping devs
working cross project recognizing (mis)use patterns.
2. make it somewhat intuitive that the lowercase ones are meant to be
used in functions while the uppercase ones are to be used for static
evaluation.
Add few c++ guards to avoid colliding with std::min and std::max.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
only switch to 4 bit mode, if it is supported
by the host. for MMC it is already checked,
but not for the sd card.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Adds assert for bt_bap_iso_bind_ep to ensure that endpoints
from different connection don't share a CIS (a bt_bap_iso).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a check that verifies that 2 endpoints from different
connection don't share a CIS, which would be invalid.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
We can actually already when we bind the endpoint to the stream
perform the call to bt_bap_iso_bind_ep, if the stream has been
added to a group.
If the stream has not yet been added to a group, then when
the stream is added to a group, then bt_bap_iso_bind_ep will
be done there (existing behavior).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
commands should not have spaces around hyphens:
version - extended --> version-extended
build - version --> build-version
Fixes: zephyrproject-rtos/zephyr#96591
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
If the process does an exec() (or fork, or..) all descriptors are kept
open by default, unless O_CLOEXEC is set when opening them.
This is usefull for stdin/out/err so that new process is connected to
them, but it is very rare for it to be usefull for any other descriptor.
In general this leads to descriptors being kept open unnecessarily,
which either will block other process from getting them (for example
if the child survives the parent but it does something else).
Or for a "leak" which unnecessarily uses descriptors and memory in the
child process.
Let's ensure we do not leak it for this component as we do not need it.
Note glibc fopen supports the "e" modifier as an extension to pass
O_CLOEXEC to the open syscall.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
REQUEST_QUEUE was passed as queue_num to virtio_init_virtqueues
where REQUEST_QUEUE+1 was required
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
Zephyr crashes when a new websocket connection is refused by the
user supplied callback function. This is caused by multiple calls
of close_client_connection(). After the first call the file handle
and the client->service pointer are invalid.
This fix checks if the file handle is valid.
Signed-off-by: Andreas Schweigstill <andreas@schweigstill.de>
DSA switch performs L2 switching on hardware on DSA user ports.
The promisc mode requirement doesn't apply to DSA user ports.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reason for this extension are CRC mismatches happening due to RX data
loss when using the interrupt driven API at higher speeds and/or high
CPU load. It is recommended to use the ASYNC API along with hardware
byte counting requiring a timer instance and one PPI channel to achieve
a robust communication at high baudrates on nRF platforms.
Signed-off-by: Anouar Raddaoui <a.raddaoui@smight.com>
Add __printf_like attribute to ztest assertion functions
zassert, zassume, zexpect to validate format strings and arguments
at compile time.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Since the protocol doesn't have message IDs in the responses to these
update messages, there's no reliable way to know, if an update succeeded or
not. I use that fact to simplify the implementation by:
- Not providing success/failure callbacks.
- Not handling updating the variables in the client struct while
an update is in progess.
In addition to adding some tests, I tested this with the emqx server.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
Do not read extra byte when we decide to drop a frame.
Instead go directly to MODEM_CMUX_RECEIVE_STATE_SOF, so the next
flag character will start a new frame.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Add a default heap reservation for gettaddrinfo(), enough for a single
function call in a default configuration on 64-bit platform.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
There are some poorly compliant mdns responders on the network
that will respond with zero counts on the answers and the additional
records (in addition to the qdcount). So, this removes the checks
in the unpack method since this is a "valid" DNS packet but the
logic is already partially handled in the dns_read code already.
An example packet can be seen in this decode
0000 33 33 00 00 00 fb 9a f8 c3 0c 07 0b 86 dd 60 07 33............`.
0010 c4 e4 00 14 11 ff fe 80 00 00 00 00 00 00 98 f8 ................
0020 c3 ff fe 0c 07 0b ff 02 00 00 00 00 00 00 00 00 ................
0030 00 00 00 00 00 fb 14 e9 14 e9 00 14 f1 64 00 00 .............d..
0040 84 00 00 00 00 00 00 00 00 00 ..........
User Datagram Protocol, Src Port: 5353, Dst Port: 5353
Source Port: 5353
Destination Port: 5353
Length: 20
Checksum: 0xf164 [unverified]
[Checksum Status: Unverified]
[Stream index: 2]
[Stream Packet Number: 1]
[Timestamps]
UDP payload (12 bytes)
Multicast Domain Name System (response)
Transaction ID: 0x0000
Flags: 0x8400 Standard query response, No error
1... .... .... .... = Response: Message is a response
.000 0... .... .... = Opcode: Standard query (0)
.... .1.. .... .... = Authoritative: Server is an authority
for domain
.... ..0. .... .... = Truncated: Message is not truncated
.... ...0 .... .... = Recursion desired: Don't do query recursively
.... .... 0... .... = Recursion available: Server can't do
recursive queries
.... .... .0.. .... = Z: reserved (0)
.... .... ..0. .... = Answer authenticated: Answer/authority
portion was not authenticated by the server
.... .... ...0 .... = Non-authenticated data: Unacceptable
.... .... .... 0000 = Reply code: No error (0)
Questions: 0
Answer RRs: 0
Authority RRs: 0
Additional RRs: 0
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
Full CMUX frames are way too much to fill the debug log
so disable those by default.
Sometimes it is enough to see the CMD and response types, without
hexdump.
Added also debug messages for opening and closing events.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
This reverts commit 77f19eb1b5.
This dependency was misplaced. See the parent commit.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
The ZMS backend for Settings uses the `flash_area` API, which means it
requires CONFIG_FLASH_MAP to be enabled, so update Kconfig accordingly.
Note that ZMS itself does not depend on this.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
It is essential for the overwrite mode to allow confirming the secondary
slot to provide the permanent update.
This types of updates is the only mode in which the application may be
upgraded.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Fix the incorrect usage of Kconfig symbols and revert back the default
behavior to allow for non-active slot confirmation.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Fix the issue reported by Coverity CID 487708. The LL_ASSERT was
performed on lll->ptc, which is a 4-bit bitfield and therefore always
succeeds. Instead, the computation (lll->nse - nse) should be checked
to ensure it falls within the 4-bit value range before assigning it
to lll->ptc.
Signed-off-by: Loic Domaigne <tech@domaigne.com>
Initialize the UART configuration from the default line coding
when the CDC ACM device is started. This ensures that the UART
configuration matches the default line coding until the host sets
the line coding for the first time.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Use default_unicast_group everywhere in the CAP shell, and mark
all creation of it as default_unicast_group.is_cap = true.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Move the function bap_ac_create_unicast_group to the CAP
shell, as that was the only user of it, and rename it to
cap_ac_create_unicast_group, and make it use the CAP API.
Also rename bap_unicast_ac_param to cap_unicast_ac_param
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a common unicast_group struct for both the BAP and
CAP shell, similar to the broadcast_source.
The purpose of this is to be able to use the appropriate type
for both the CAP and BAP shells, instead of using the BAP
unicast group for the CAP shell.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When running just the test mqtt_sn_client::test_mqtt_sn_wait_suback on
native_sim, the current timestamp is still 0. That caused the test to fail,
because 0 is used as an indicator, that the message has never been sent,
thus sending it every time process_work is executed.
Instead of adding additional variables and complexity, the code now simply
treats now==0 special and waits 1ms until doing anything.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
- The paho client does that, too.
- This allows running single tests, because they don't rely on previous
ones having incremented the msg_id a certain number of times.
- The variable already existed in the client struct, but wasn't used. I
guess it was intended that way but never implemented.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
Making the assumption, that mqtt_sn_connect does not process any incoming
data allows for this to be a very simple, additional API function instead
of adding more complexity to the connect function. This also means that the
user has to re-add predefined topics upon reconnects which don't reuse the
old session though.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
This reworks the Intel audio DSP host IPC driver as a backend of
the IPC service. This is the first step to rework IPC in SOF
(Sound Open Firmware) into using a more generic IPC API instead
of a SoC specific one.
For now, it keeps the old interface to maintain usability
as it is going to be a multiple process to rework IPC
over there.
Also, the structure of the new IPC backend resembles
the SoC specific driver to make it easier to compare
between them at this first iteration. Future optimizations
will probably be needed once we start modifying the SOF
side to utilize the IPC interface.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Adds support for the user defining their own channels within the
fixed L2CAP channel range. To make this possible, the
`bt_l2cap_fixed_chan` struct and `BT_L2CAP_CHANNEL_DEFINE` macro
needed to converted to public API. In the process of doing so, the
`_destroy` parameter was removed from the `BT_L2CAP_CHANNEL_DEFINE`
macro as it was never used (fixed channels will not be destroyed over
the lifetime of the connection). `BT_L2CAP_CHANNEL_DEFINE` is renamed
`BT_L2CAP_FIXED_CHANNEL_DEFINE` to avoid confusion
The `bt_l2cap_chan_send` function is updated to be able to send data
on fixed l2cap channels.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Rename the bt_bap_is_x_ep functions to better match the
modules where they are implemented.
Additionally modify the check to use IS_ARRAY_ELEMENT
in the broadcast sink and source for a stricter check.
IS_ARRAY_ELEMENT cannot easily be used in the unicast
client and server, as the endpoints are part of another
structure.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
We check for all other roles when checking whether
an endpoint can send or receive, except for the unicast server.
It is technically implied, but if the ep is not a valid pointer,
then we may access invalid memory.
Add check for bt_bap_ep_is_unicast_server (which uses the new
bt_ascs_has_ep function).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Implement the broadcast to unicast handover procedure,
as per the Bluetooth CAP specificiation.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Extend the gen_isr_table test to support the Hazard3 cores on the
RP2350A. This allows some testing when building and running using flash,
but it seems like Twister builds with different flags. It's unclear if
this is intended or not.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
Commit 48897a9090 fixed the address
mapping for dual-stack sockets when sendmsg() was used, however the same
similar issue appears (cannot check for AF_INET family for mapped
addresses as those are AF_INET6) for regular sendto() calls.
Therefore, for the sendto() case, where dst_addr is specified, check if
the address is mapped with net_ipv6_addr_is_v4_mapped() function as
well.
This also fixes another bug in sendmsg() case, where msghdr->msg_name
could've been dereferenced even if it was NULL (for example in case
of a connected socket).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Don't enable `ZTEST_NO_YIELD` when `COVERAGE_DUMP` is enabled, since
this option spins forever at the end of `main`, while `COVERAGE_DUMP`
occurs after `main` returns into `bg_thread_main`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The subsystem has been out for a year.
It has been taken into use by various parties and has gone through
additional downstream testing.
It is considered stable and mature enough to not be experimental
anymore.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>