Add z_test which uses new configs to capture multiple
threads in a core dump and with all of the context
necessary to debug the threads.
Signed-off-by: Mark Holden <mholden@meta.com>
Add uart configuration for UART driver, add frdm_ke17z512_uart.overlay
and update testcase.yml to support UART testing.
There are LPUART and UART IPs in frdm_ke17z512 platforms, so add
additional shell tests as UART, the shell instructions can be entered
on the UART console window.
Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
Add tests for removing and adding nodes to a list under
`SYS_SLIST_FOR_EACH_NODE_SAFE` and `SYS_SLIST_FOR_EACH_CONTAINER_SAFE`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Fix failed test for platforms with flash program size > 128 bytes.
Update supported program size to 512 bytes, the highest supported
program size by Zephyr platforms.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Tweak some Kconfig variables to reduce the overall memory footprint of
the test application. For some reason x86 MMu throws errors when
accessing iterable section entries when the image size is too large.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This test's purpose is to verify we (as a peripheral) don't leak resources
when communicating with multiple centrals that connect and disconnect
intermittently.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Adafruit feather is a generic name that could match many
boards. Renamed to reflect actual board name:
- Adafruit Feather nrf52840 Express
There are two boards based on the nrf52840, so keeping directory
generic to support additional board defs with mostly shared dts.
Signed-off-by: Jacob Winther <jacob@9.nz>
Add broadcast support to the CAP initiator sample.
This adds new sample-specific Kconfig options to help
select the right Kconfig options based on whether
unicast, broadcast or both is being used.
This also moves common TX functionality
to cap_initiator_tx to reuse the same TX thread
and functionality.
Finally there is a babblesim implemented for
the broadcast. There is not broadcast support for the
CAP acceptor sample yet, so this test only verifies that we
get the TX complete events from the controller.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Use an explicit callback name so that multiple instances of this do not
result in a:
redefinition of '_input_callback__longpress_cb'
error. This used to work when it was using unique generated wrappers,
but now it needs an index in the callback name.
Use it in one of the API tests as well, just in case.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add a void *user_data pointer to the input callback structure. This is
useful for driver to get back the driver data structure and avoid
defining wrapper functions.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The .bls files are no longer useful after the BT SIG switched
qualification tool. This will still remain in the git history
and can safely be removed.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Beacon frames can be received with association permit bit set or not,
but the correct information should be in the data given to the
application.
Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
When trying to implement a testcase for the previous commit, an error
occoured, that stopped the test from executing.
As the tests require a full IPv6 stack, the usual router solicitation
(RS) messages will be scheduled by the net stack. To avoid conflict
with RS messages the active scan test must be kept shorter than one
second, otherwise a race condition with additional packages being
reported by the fake driver might occur.
Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
The HTTP server tests are self-contained, they do not require network
environment to execute, hence should not specify "harness: net".
The consequence of specifying the harness was that HTTP server tests in
the CI were only built, and not executed, which doesn't make much sense.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The test expects this feature to be enabled.
We should therefore enable explicitly instead of relying on
default values.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Add frdm_ke17z_fgpio.overlay to add fgpio configuration, and
add update testcase.yml to add FGPIO driver test for frdm_ke17z
and frdm_ke17z512 platforms.
Updated ke17z512 gpio test pins to avoid conflicts with I2C pin.
Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
Add an emulated UART device test case. Demonstrate using the
zephyr,uart-emul bus for passing data to an emulated implementation for a
UART device driver.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
When developing Bluetooth applications, you typically run into
some errors. If you are an experienced Bluetooth developer,
you would typically have an HCI error lookup table in your memory.
Others might not.
This commit utilizes defines CONFIG_BT_DEBUG_HCI_ERR_TO_STR
and utilizes bt_hci_err_to_str() to print out HCI error strings
when enabled to improve the user experience.
Several alternatives where considered. This approach was chosen
as it had the best balance between readability, code size, and
implementation complexity.
The alternatives are listed below as a reference.
1. Macro defined format specifier:
```c
#define HCI_ERR_FMT "%s"
#define BT_HCI_ERR_TO_STR(err) (err)
#define HCI_ERR_FMT "%d"
#define BT_HCI_ERR_TO_STR(err) bt_hci_err_to_str((err))
LOG_INF("The event contained " HCI_ERR_FMT " as status",
BT_HCI_ERR_TO_STR(err));
```
Advantage: Space efficient: Code size does not increase
Disadvantage: Code becomes hard to read
2. Format specifier to always include both integer and string:
```c
static inline const char bt_hci_err_to_str(err)
{
return "";
}
LOG_INF("The event contained %s(0x%02x) as status",
bt_hci_err_to_str(err), err);
```
Advantage: Simple to use, implement, and read,
Disadvantage: Increases code size when CONFIG_BT_DEBUG_HCI_ERR_TO_STR
is disabled. The compiler seems unable to optimize away the unused
format specifier. Note: The size increase is only present when
logging is enabled.
3. Always print as string, allocate a stack variable when printing:
```c
const char *bt_hci_err_to_str(char *dst, size_t dst_size, uint8_t err)
{
snprintf(dst, dst_size, 0x%02x, err);
return dst;
}
LOG_INF("The event contained %s as status", BT_HCI_ERR_TO_STR(err));
```
Advantage: Very easy to read.
Disadvantage: Printing error codes becomes slow as it involves calling
snprint.
4. Implement a custom printf specifier, for example E.
This requires a global CONFIG_ERR_AS_STR as I assume we cannot have
one specifier for each type of error code.
Also, I assume we cannot start adding specifiers for each subsystem.
```c
#define BT_HCI_ERR_TO_STR(err) (err)
#define BT_HCI_ERR_TO_STR(err) bt_hci_err_to_str((err))
LOG_INF("The event contained %E as status", BT_HCI_ERR_TO_STR(err));
```
Advantage: Both efficient code and readable code.
Disadvantage: This requires a global CONFIG_ERR_AS_STR as I assume
we cannot have one specifier for each type of error code.
Also, I assume we cannot start adding specifiers for each subsystem.
That is, this approach is hard to implement correctly in a scalable
way.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
For the LE Audio unittests there exists a few mock files
that implement mock versions, or callbacks, for some of the
roles and features tested.
These have been moved to where they are actually used,
reducing the scope of these files.
This both allows the individual tests to implement their own
versions of it, but more importantly it prevents issues when
adding tests for these roles. For example, due to the
bap_unicast_client.c mock file, it is impossible to implement
unit tests for the unicast client, as the functions are already
defined.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add the missing timeout parameter to `modem_pipe_open()` and
`modem_pipe_close()` calls.
10 seconds is the default value used in the Zephyr tree.
Fixes a regression introduced in
https://github.com/zephyrproject-rtos/zephyr/pull/74325.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
The commit removes one-line overlay files, when copyrights excluded,
with direct Kconfig options selection inside testcase.yaml.
The overlays have been removed.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The LSM9DS1 is a system-in-package featuring
a 3D digital linear acceleration sensor, a 3D digital angular rate
sensor and a 3D digital magnetic sensor.
This driver implements only the linear acceleration sensor and the
angular rate sensor, on the I2C bus.
This driver is without trigger support.
The driver is based on the stmemsc HAL.
link: https://www.st.com/resource/en/datasheet/lsm9ds1.pdf
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
The modem pipe APIs include synchronous calls to open/close,
which internally use a fixed timeout of 10 seconds. The timeout
should be configurable through the APIs, anywhere from K_NO_WAIT
to K_FOREVER.
This commit adds timeout parameters to the open/close APIs, and
updates in-tree usage of the open/close APIs to explicitly
provide the previously implicit timeout of 10 seconds.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
There is problem with running this test in validation,
because of DBGR mode watchdog can't reset board by itself,
and it needs cold reset. This proves that test is not automated,
and should be exluded on this board.
Signed-off-by: Patryk Kuniecki <patryk.kuniecki@intel.com>
Expand testing for QDEC at nrf platforms.
It uses general sensor API,
however there are also nrf driver specific assumptions.
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
Modify the bt_bap_scan_delegator_add_src to take an address and
a sid instead of a PA sync object, so that the scan delegator
can add a source without syncing to the PA.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Raise the descriptor table span to 201 due to the inclusion of the USB
configuration descriptor.
Tested with:
$ west build -p -b it82xx2_evb tests/subsys/usb/desc_sections
-T usb.desc_sections
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Zero length arrays are only allowed at the end of the structure. Here
those were used as placeholders for BTP response creation and can be
easily replaced with common member.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Enable sysbuild for nRF5340 app core.
This automatically builds the image for the network core, making a
better user experience.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
The driver right now only allows inverting the input value, which can be
useful for differential channels but is quite confusing for single ended
ones. Implement a simple output inversion flag instead to make up for
that.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>