Set CONFIG_BT_MAX_PAIRED with same value as in host.
This is needed for CSIP tests with three lower testers:
CSIP/CL/SP/BV-07-C, CSIP/CL/SP/BV-03-C, CSIP/CL/SP/BV-04-C,
CSIP/CL/SPE/BI-01-C
Signed-off-by: Piotr Narajowski <piotr.narajowski@codecoup.pl>
Rename ad5592 files in dts, driver and include to ad559x and add support
for I2C bus which is required for AD5593.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
This commit adds CSIS command to change type of SIRK.
This is needed for CSIS/SR/SP/BV-05-C test case.
Signed-off-by: Piotr Narajowski <piotr.narajowski@codecoup.pl>
Instead of having a single config specifying the memory pool size for
variable-sized net buffers, have a separate one for TX and RX for better
configuration granularity when optimizing memory usage of the
application.
Deprecate the old configuration but use its value as a default (for now)
for the new configs. This will need to change when the config is
deleted.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
There was a make-shift mutex implementation added to thrift
while waiting for C++11 thread support in the SDK. This was
fairly racey and would cause issues in CI regularly.
Make the tests build-only for now until C++11 thread, mutex,
etc support is stabilized.
Signed-off-by: Chris Friedt <chrisfriedt@gmail.com>
Based on the iis2dlpc driver, with some significant differences in
interrupt handling.
Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
Remove explicit timeouts which are either the same as the
default one or smaller.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Let's increase the timeout for a few tests whose
timeout is less than 3x a typical execution time in CI.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This test keeps its own partial way of running tests.
Let's have it kill stuck processes in the same way as
the rest (sending another kill 5 seconds after, and printing
a message about what happened)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Outgoing block-transfers now set the socket hint
to ONGOING as long as the BLOCK1/BLOCK2 header has
MORE flag set to true.
This means as only the last packet in the block-transfer
set the socket hint to LAST or ONE_RESPONSE.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
To give an idea of which tests are taking
too long either on CI or locally.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Create the folder for the results if it does not exist.
Fixes these warnings in CI:
```
touch: cannot touch '/__w/zephyr/zephyr/./bsim_bt/
53_bsim_results.xml': No such file or directory
realpath: /__w/zephyr/zephyr/./bsim_bt/
53_bsim_results.xml: No such file or directory
```
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable DMIC on RW612 BGA board. The DMIC is enabled for both onboard
MEMS microphones for this board, and the board is enabled with the DMIC
sample and test
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add necessary overlay and stm32h573i_dk in i2c_target_api test case
to enable the board.
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
The gPTP is not suppose to be run on top of VLAN and the
earlier support was just for testing purposes. Remove VLAN
support now after the VLAN overhaul.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
When thread stack is defined as an array, K_THREAD_STACK_LEN()
is used to calculate the size for each stack in the array.
However, standalone thread stack has its size calculated by
Z_THREAD_STACK_SIZE_ADJUST() instead. Depending on the arch
alignment requirement, they may not be the same... which
could cause some confusions. So align them both to use
K_THREAD_STACK_LEN().
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
When kernel stack is defined as an array, K_KERNEL_STACK_LEN()
is used to calculate the size for each stack in the array.
However, standalone kernel stack has its size calculated by
Z_KERNEL_STACK_SIZE_ADJUST() instead. Depending on the arch
alignment requirement, they may not be the same... which
could cause some confusions. So align them both to use
K_KERNEL_STACK_LEN().
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The reserved flash space for coredump is 4KB. However,
the dump_stack itself is larger than 4KB due to kernel stack
size adjustment. So enlarge the space for another page.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Simple rename to align the kernel naming scheme. This is being
used throughout the tree, especially in the architecture code.
As this is not a private API internal to kernel, prefix it
appropriately with K_.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Simple rename to align the kernel naming scheme. This is being
used throughout the tree, especially in the architecture code.
As this is not a private API internal to kernel, prefix it
appropriately with K_.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Since there is a K_THREAD_STACK_LEN, its kernel counterpart
should also be prefixed with K_ for consistency.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Changing remaining users of fcntl.h to use the include from our own
POSIX file so that the values in there are consistent in all parts
of the sources.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The syscall name has _impl postfix so adjusting the stub
name.
zephyr-sdk-0.16.5-1/x86_64-zephyr-elf/bin/../lib/gcc/
x86_64-zephyr-elf/12.2.0/../../../../x86_64-zephyr-elf/bin/ld.bfd:
app/libapp.a(lwm2m_engine.c.obj): in function `zsock_fcntl_impl':
.../syscalls/socket.h:363: undefined reference to `z_impl_zsock_fcntl_impl'
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The setting is deprecated so change the code to either use the
native zsock_* API or enable POSIX_API to use the BSD socket API.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The test expects to use various POSIX APIs so enable the config.
Enabling POSIX_API requires also increase of max file descriptors.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This test is an attempt at formalizing at least part of the behavior
described in commit 6a79c3deae.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
When setting a name to a network interface, verify that no other
interface has the same name as that would make very difficult to
select an interface by a name.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The DHT20 sensor is a temperature and humidity sensor that uses I2C to
communicate with a microcontroller. The DHT20 sensor is Aosong.
use standard crc
update description to add reference to AHT20 and AM2301B
clean code, use defines and bit manipulation
add dht20 to i2c test suite for build tests
update bit manipulation
use more defines instead of raw numbers
add bindings to allow aht20 or am2301b to be used in devicetree
in all 3 cases, the same dht20.c driver is compiled
Signed-off-by: Nathan Olff <nathan@kickmaker.net>
Uncomment the check for sockatmark() to ensure that the function
is declared in sys/socket.h, as a stub implementation was added
in the previous commit.
Signed-off-by: Chris Friedt <chrisfriedt@gmail.com>
Uncomment netdb.h tests now that we have an implementation and
can check for the existence of e.g. hostent, netent, protoent,
and servent structure fields, as well as associated accessor
functions.
Signed-off-by: Chris Friedt <chrisfriedt@gmail.com>
Uncomment net/if.h tests in tests/posix/headers since we now
have an implementation and can check for the existence of
structures, functions, etc.
Signed-off-by: Chris Friedt <chrisfriedt@gmail.com>
The log subsystem defines LOG_ERR as a macro, which conflicts
with the standard POSIX LOG_ERR log level (3).
Reorder includes to avoid errors.
Signed-off-by: Chris Friedt <chrisfriedt@gmail.com>
Check if syscalls can be accessed from both kernel and userspace, and if
optimised away ones indeed point to NULL.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Maximum charging current is selected with an external resistor in
the MAX20335 charger. Therefore it is not possible to configure it
with software directly. There is only a capability to limit current
set with hardware but configuration of the limiter is not
straight-forward.
To reflect real functionality, drop usage of
`constant-charge-current-max-microamp` property as an required one and
use custom `chgin-to-sys-current-limit-microamp` instead.
Use enum in binding file to signalize improper values at compile time.
Drop support for `CHARGER_PROP_CONSTANT_CHARGE_CURRENT_UA` API property
since this cannot be handled.
The `max20335_get_constant_charge_current()` function become useless so
remove it.
Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
This config selects a variant of the HCI driver interface that spills
out host internals unto the drivers and even the Zephyr controller. It
will now be removed in favor of driver interfaces that hide the
internals of the host.
The new default is `CONFIG_BT_RECV_WORKQ_BT`.
Any references to the removed kconfig are refactored out.
Any out-of-tree driver using the removed interface can be easily adapted
by copying the following implementations into the driver as private
functions:
- `hci_driver.h:BT_HCI_EVT_FLAG_RECV_PRIO`
- `hci_driver.h:BT_HCI_EVT_FLAG_RECV`
- `hci_driver.h:bt_hci_evt_get_flags`
- `hci_raw.c:bt_recv_prio`
In combination these symbols function as a interface adapter. These
symbols will be removed in this PR in subsequent commits.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
The host refuses to connect to a peer with an address that is also used
by a connection object in disconnected state.
Add a guard to prevent `-EINVAL` from `bt_conn_le_create`.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
These tests, that expects boards to be properly setup, allow one to
measure ADC value and compare to expected values.
Two tests are added. For one, a reference voltage is expected on the ADC
- and this value can be informed to the test via devicetree. The other
uses DAC to generate a value that is then read from ADC. This assumes
DAC is accurate. Naturally, one could make this a DAC test if ADC is
assumed to be accurate.
As the board setup involve connecting physical pins, they are behind
twister fixtures.
Signed-off-by: Yusuf Ahmed <muhammed.ahmed@intel.com>
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Using the old hwmv1 board names is not supported anymore.
So we don't need to handle them specially in the sysbuild
files.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Give each SPI node a unique address to fix warnings.
Add missing test_gpio to fix compile error for last node.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Rework the data scaling algorithm for the "deadzone" mode so that the
deadzone is subtracted from the input rather than from the output. This
makes the whole output range usable rather than making the output jump
from the center value to the minimum deadzone range.
This changes the calibration data structure as well so now all values
refer to the input data, which is more coherent.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Return availability of free buffers after data is consumed. This
information may be important for the module using uart_async_rx to
schedule next reception if there is a new buffer available.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The unittest for cap commander is refactored, so that tests
for volumecontrol is in its own module.
This avoids the problem of having all tests in one huge file.
Due to their small size the tests for registering callbacks and
discovery haven't been put into their own module.
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
The STTS22H is an ultralow-power, high-accuracy, digital temperature
sensor offering high performance over the entire operating temperature
range. This driver is based on stmemsc HAL i/f v2.3
https://www.st.com/resource/en/datasheet/stts22h.pdf
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The tests are now working as expected after the virtual interface
refactoring which required changes to IP tunneling.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Remove the boilerplate which is not necessary beacuse
it is already provided by the common scripts
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Provide a common check for BSIM_COMPONENTS_PATH
and a default WORK_DIR
So we avoid boilerplate in other scripts
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In all scripts, where we were using the BOARD variable
let's use BOARD_TS which is the full BOARD target string
with "/" replaced with "_"
This is neccessary to support hwmv2 board names
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use the common functions instead of
replicating functionality and do a minor cleanup
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use the common functions instead of
replicating functionality and do a minor cleanup
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use the common scripts to perform common functions
and do a cleanup.
Do not set variables to their defaults, set things
closer to were they are needed;
Do not perform unnecesary checks;
And in general avoid unnecessary complexity.
Some of the _compile scripts were rotten => Fix them.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Ensure we call the common source script before using
the BOARD variable;
Use the common scripts to perform common functions
and do a cleanup.
Do not set variables to their defaults, set things
closer to were they are needed;
Do not perform unnecesary checks;
And in general avoid unnecessary complexity.
And for the 2 parts of the peripheral rpa sharing
test, use different sim_ids, so the traces for each
part can be checked.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Ensure we call the common source script before using
the BOARD variable;
Use the common scripts to perform common functions
and do a cleanup.
Do not set variables to their defaults, set things
closer to were they are needed;
Do not perform unnecesary checks;
And in general avoid unnecessary complexity.
And return !=0 on error.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use the common scripts to perform common functions
and do a cleanup.
Do not set variables to their defaults, set things
closer to were they are needed;
Do not perform unnecesary checks;
And in general avoid unnecessary complexity.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Ensure we call the common source script before using
the BOARD variable, and let's not set things
which are already set to the same by default
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use the common scripts so we have a consitent way of
running the tests, report failures in the same way,
can stop them with ctrl+C, properly wait for
all processes to exit..
Let's also place the test scripts in the test_scripts/
folder as it is convention.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
(f) ests/bsim bt att: Use common s
Ensure we call the common source script before using
the BOARD variable;
Use the common scripts to perform common functions
and do a cleanup.
Do not set variables to their defaults, set things
closer to were they are needed;
Do not perform unnecesary checks;
And in general avoid unnecessary complexity.
Also, remove all timeouts which were unnecessarily too short
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Some developers want to programmatically get the
test name instead of hardcoding it.
So let's have a common function for this.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
As now, with hwmv2, boards can have "/" in their name,
and the board name is not anymore the complete target
name, let's set a new variable with the
whole board target name, but converted into the format
which can be used in paths.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This test was way too verbose (produced a log over 65000 lines
long).
Let's mute it a bit. If the test fails, developers
can raise the log level as needed.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
arch_interface.h is for architecture and should not be
under sys/. So move it under include/zephyr/arch/.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This functionality is useful on the following scenario:
1) The first buffer in a net_pkt contains user data which is relevant
for the (whole) net_pkt.
2) When inserting a new buffer in front of the net_pkt, the (previously)
first buffer (and its user data) are no longer accessible via
net_pkt->buffer.
3) net_buf_user_data_copy() allows to simply copy the user data from the
old to the new first buffer.
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
debug.coredump.logging_backend is currently failing for most of the targets
I have tried when building with clang. Depending on the target, func_3
invokes undefined behavior by dereferencing addr (which is NULL) which
can lead to the compiler optimizing out significant portions of the code,
resulting in unexpected/incorrect failures.
Here, clang seems to inline func_3 into main then marks the inlined
implementation as unreachable (due to the UB) and removes it and everything
after it in main. So, we fall through to whatever code lies past main,
resulting in a test failure (timeout) from what I've seen. GCC seems to do
similar things, but creates an invalid opcode instruction so the test still
succeeds.
clang is correct in both optimizing this behavior out and leaving
buggy code behind, so disable optimizations for func_3 to keep things under
control and prevent the incorrect failures.
Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
The riscv_virtual, hifive_unleashed, and hifive_unmatched boards all
timeout on this test if they actually perform the null dereference when
they are simulated. Whether the null dereference happens seems to depend
on the compiler used as well as whether optimizations are enabled though.
To make this more consistent, handle these boards in the same way as others
which use Renode simulation and have them directly call k_panic().
Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
Before this commit, cloning a buffer was tested only for a buffer
belonging to a reference counted pool.
By using a buffer from a pool that does not support reference counting,
the added test ensures that the non-ref-counting code path also works.
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
Trying to enable LTO when CODE_DATA_RELOCATION is already enabled
produces a warning.
This commit prevents twister from building such combinations for
arch.shared_interrupt.lto.
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
Trying to enable LTO when CODE_DATA_RELOCATION is already enabled
produces a warning.
This commit prevents twister from building such combinations for
kernel.common.lto.
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
The native_{posix,sim}_64 boards are not anymore twister
targets, native_{posix,sim}/native/64 are, and those
default to just use the overlays for the non variant
version.
These 2 overlays were not used by anything.
Remove them.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This test is an attempt at formalizing at least part of the behavior
described in commit 6a79c3deae.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
This function waits for a free connection slot. It should be used to
slow down a busy loop trying to obtains a connection slot.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Client ID option is now expected in Request/Ack responses so tests need
to be updated accordingly.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add a test for confstr(), which is required by the
POSIX_SINGLE_PROCESS Option Group, as per IEEE
1003.1-2017.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
After https://github.com/zephyrproject-rtos/zephyr/pull/70438
got merged simultaneously with
https://github.com/zephyrproject-rtos/zephyr/pull/70564
all these tests stopped building properly due to the
change of avaliable variables in Kconfig & cmake.
Let's fix them.
As a bonus, as for kconfig the BOARD_TARGET_STRING is the
same for the hwmv1 backwards compatible name, let's
just remove the check for the old names.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The PBP bsim tests had several issues that was not uncovered
until the PA sync timeout was increased. This commit fixes these,
as well as increase some timeout values due to recently
increased PA sync timeout.
Among the issues were lack of support for the alternating PBA
features, missing reset of values and specific time sleeps.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Increase the timeouts to be 60 instead of 6.
The reason for this is that some controllers (like the Zephyr
controller) will reserve some of these to ensure stability,
and in fact with skip = 5 and retry = 6, it would still
send the PA reports at every interval.
To accomodate a higher timeout value, the functions used to
convert PA intervals to PA timeouts have been updated.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Replace all instances of
nrf5340bsim_nrf5340_cpunet & nrf5340bsim_nrf5340_cpuapp
with
nrf5340bsim/nrf5340/cpunet & nrf5340bsim/nrf5340/cpuapp
In these samples/tests twister yamls definitions.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For all samples which handle the nrf5340bsim in some special way
(for example in sysbuild files, or by checking what samples are
supported) handle also building with the hwmv2 names.
Also, let's fix the cmake info message in these respective
samples which tells the user which board target is used for which
part of the app.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Mesh v1.1, DFU v1.0 and MBT v1.0 are supported by default in the stack.
In this regard, this commit updates the ICS file and Launch Studio
Project file to reflect supported features.
Signed-off-by: Alperen Şener <alperen.sener@nordicsemi.no>
This deduplicates a copy of testlib from before testlib was a globally
available cmake library.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Enable CTimer0 and MRT0 channel 0 by default on the board,
and add more of the device instances in the counter api test overlay.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The macro is searching for all instances of specific device
that contain specific property and evaluates to true (1) if
any device does.
The macro used to do that by generating, using
DT_ANY_INST_HAS_PROP_STATUS_OKAY, a logical expression
like (0 || 1 || 0), where each digit represented existence of
property (1) or lack of it (0).
Unfortunately other util macros, like IS_ENABLED, were
not able to evaluate such expression, as they often simply
expect something they can evaluate to 0 or 1.
The commit here changes DT_ANY_INST_HAS_PROP_STATUS_OKAY
to generate a list of tokens (1) where token is added to list
only for instance of a device that has the property;
then such list is processed using IS_EMPTY() macro and
in the end 0 or 1 is generated, depending on whether
any enabled instance of a device has the property or not.
This change allows result of DT_ANY_INST_HAS_PROP_STATUS_OKAY
to be used with macros like IS_ENABLED, IF_ENABLED or
COND_CODE_x.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
* As we are replacing native_posix with native_sim, let's
refer to native_sim instead of native_posix in the comments
of why we have 1 extra interface.
* scripts/net/run-sample-tests.sh builds for native_sim now,
not native_posix => let's fix it
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Limit the number of files built when building ethernet device drivers.
Use the ETH_DRIVER_RAW_MODE to provide weak funtions for upper layer
handling.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
rpa expired bsim is refactored so that every rpa rotation, one of
the adv set belong to an adv_id returns false based on adv_index.
In turn all adv sets under the same adv_Id continues with old rpa.
Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
Split up the driver for the PWM controller MAX31790
into a multi function device driver.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Move ADC DMA tests directly into adc_api test for Kinetis and STM32 boards.
Needs to disable CONFIG_TEST_USERSPACE for this subtest because of caching
issue for STM32H7 (as it was done dor adc_dma test).
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
With memory domain enabled, all threads within the same domain
have access to each other threads' stacks, especially with
CONFIG_ARCH_MEM_DOMAIN_SYNCHRONOUS_API enabled (as it is
expected behavior). So update the conditions to skip both
tests to read and write to other threads' stacks.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Changes to logging:
- Don't log "Connected" if there was an error.
- Identify the relevant bt_conn object in log messages by its index.
- Special case non-fatal errors:
- Failure due to out of free conn object is INF.
- Improve transparancy of error messages:
- For errno, include the name of the API.
- For HCI errors, include the common prefix of the symbols
'BT_HCI_ERR_' so they are easier to look up.
This change includes some light refactoring to make the code more
understandable, but does not change any behavior.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
native_posix is being replaced with native_sim, let's
have this tests be run on native_sim instead.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This test was way too verbose (produced a log over 65000 lines
long).
Let's mute it a bit. If the test fails, developers
can raise the log level as needed.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This test has been seen failing in the new runners
due to a (realtime) timeout.
Let's double the timeout so it does not.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix conflict between commit ce24394437 ("llext: add object test case")
and commit 1408d1e5b8 ("tests: llext: compile architectures not
supported yet") which were tested separately but merged at the same
time.
Github "Merge Queues" can avoid this (and save resources) but:
- they're not used by Zephyr CI
- they provide confusing feedback
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Enable testing of all CiA recommended bitrates on the following
simulated/emulated boards:
- native_sim
- native_sim_64
- native_posix
- native_posix_64
- qemu_x86
- qemu_x86_64
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Use the CAN clock and configuration ranges recommended by CAN in Automation
(CiA). Adjust the CAN shell test, which makes use of the fake CAN
controller driver, to match the new timing limits.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Some CAN controllers may be unable to meet all bitrates due to timing
restrictions, but assert that at least one of the tested bitrates was
supported.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add tests for all CAN bitrates recommended by CAN in Automation (CiA). The
newly added bitrate tests are guarded by new, local Kconfig option
(CONFIG_TEST_ALL_BITRATES) to avoid breaking existing board tests.
Some boards may need adjustments to their CAN core clock in order to pass
the newly added tests. Once a board is confirmed to meet these additional
checks, this Kconfig can be enabled for that board to avoid future
regressions.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Remove tests for additional sample points as this does not provide any real
value.
The purpose of this test suite is to see if the selected CAN clock allows
meeting the standard bitrates and sample points used by Zephyr. Any
tweaking needed for a specific board or system design is left up to the
user and not something that can be covered by testing a few additional
sample point locations.
Change a few comments and remove an unneeded conditional while here.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Move the tests for using invalid sample points from the CAN timing tests to
the CAN API tests as these are validating basic API behavior.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Move the tests for setting a too high bitrate from the CAN timing tests to
the CAN API tests as these are validating basic API behavior.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Move the test for setting the minimum/maximum supported timing parameters
from the CAN timing tests to the CAN API tests as these are validating
basic API behavior.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
For now llext supports a very limited number of architectures. This
restriction is enforced by add_llext_target() in CMake at configuration
time.
Add a new `LOADER_BUILD_ONLY` conditional in tests/subsys/llext/simple/
and a new `llext.simple.loader_build`, `build_only` test that does not
invoke `add_llext_target()` and only compiles the llext framework code.
This helps find and fix bugs in `subsys/llext/*.c` and make it ready to
be used when add_llext_target() limitations are lifted.
Note this is pure `tests/` change without any change in the actual llext
framework code. The existing test is only modified to conditionally
invoke add_llext_target().
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
native_posix is being replaced with native_sim, let's
have these tests be run on native_sim instead.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
GATT/SR/GAS/BV-01-C has just broken due to what appears
like a minor timing change.
This indicates the test may be too time sensitive.
Just reordering the tests, it passes again.
So let's reorder the test list, and we get the minor
benefit of havign them move alphabetically ordered.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable support for dma controller on RD RW612 BGA board, and add overlay
to enable board in dma loop transfer test
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Remove all optional, initial CAN sample point properties and rely on the
CAN timing calculations to automatically pick the preferred sample point
location based on the initial bitrate.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This driver enables CONFIG_GPIO, so if we try
to target a board which does not support it it
will fail.
Let's add the required tag in the testcase yaml.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix board identifier in overlays for the lpcxpresso55s69_cpu0 target.
Board identifiers were renamed with the following command:
for file in $(find . -name "lpcxpresso55s69_cpu0.*"); do;
mv $file ${file/_cpu0/_lpc55s69_cpu0};
done
Additionally, remove lpcxpresso55s69_ns overlay targets where they are
no longer needed (or rename them where they are)
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
fwrite parameters are "size_t size" and "size_t nmemb",
when writing a string we should set sizeof(char) and len(string).
The test is doing it wrongly and making the function read more
memory than it should.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix CIS accepted by Host being failed in the Controller with
reason 0x20 Unsupported LL Parameter Value, by relaxing the
check that the ACL connection is sufficiently placed such
that the time reservation using in the Controller
implementation does not overlap with the CIG event.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Split up the driver for the low side switch BD8LB600FS into a GPIO
and MFD part.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
It is often desired to maximize the chances of receiving advertising
when scanning. To achieve this, the scanner should be enabled all the time.
Some controller implementations (like Nordic's SoftDevice Controller)
handle scheduling differently when scan_window = scan_interval.
Having a macro that defines this scanning configuration simplifies
writing applications.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Change the filter from CPU_HAS_MPU to ARCH_HAS_USERSPACE to
when filtering boards which support userspace.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Validate the new relocations for BL and BLX instructions by
creating a new test extension which contains a chain of global
functions in a pseudo random order to (hopefully) generate
relative jumps in both positive and negative directions.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Add new commands to manage the Encrypted Advertising Data feature.
Overview of those new commands:
- `bt encrypted-ad set-keys`: set key materials (session key and
initialisation vector) used for encrypted and decryption of EAD;
- `bt encrypted-ad add-ad`: store a given advertising data structure;
- `bt encrypted-ad add-ead`: encrypt the given advertising data
structres and store the generated AD structure;
- `bt encrypted-ad commit-ad`: set the AD of the selected advertiser
with the stored AD;
- `bt encrypted-ad clear-ad`: remove all stored AD;
- `bt encrypted-ad decrypt-scan`: decrypt data using the previously set
key materials when receiving AD with type `0x31`.
The documentation of the Bluetooth Shell has been updated to include
those new commands.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
Spawns n instances of the bt-shell in separate xterm windows.
Assumes in-tree build of the shell, can optionally specify another .exe
image.
Also add snippet for that use-case (`-S xterm-native-shell`).
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Set total priorities to 71.
This setting already exceeds original limit(32) and exceeds 64 to test
secondary bitmap.
Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
The commit disables QSPI in SoC configurations, as QSPI got enabled
by default and test never really run on SoC.
In QSPI configuration erase page size is set to 4096
There is not TC_PRINT showing name of device that the test will
run on, in test setup.
The nrf52840dk configuration files have been renamed to reflect
dk name and SoC.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Allow all tests which run in the real nrf52840 to also
run in the simulated nrf52_bsim.
That way we will have runtime tests in CI.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add a DT overlay so this test can also be run in the nrf52_bsim
simulated board.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable i2c1 on nucleo_h563zi (arduino_i2c).
Additionally provide a test configuration for i2c_target_api.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
One of these tests has been seen failing in older slower
computers due to timeouts, let's increase the timeout so
we don't break in those cases.
Note this timeout is just a safety to eventually kill
hung simulations even if nobody presses Ctrl+C.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This test has been seen failing in older slower computers
due to timeouts, let's increase the timeout so we don't
break in those cases.
Note this timeout is just a safety to eventually kill
hung simulations even if nobody presses Ctrl+C.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This test has been seen failing in older slower computers
due to timeouts, let's increase the timeout so we don't
break in those cases.
Note this timeout is just a safety to eventually kill
hung simulations even if nobody presses Ctrl+C.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
On nRF54H20, we need to configure RAM with execution permissions in
order to execute code from it. This patch adds overlays for the nRF54H20
PDK cpuapp cores so that RAM0X region is given execution permissions and
so the test runs successfully.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Enable testing of all bitrates for all drivers and report which bitrates
are not supported by the CAN controller under test.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
It turns out the deadline scheduling and the scalable scheduling
backend didn't work right together (for almost six years!) because we
never had coverage of that combination. Add it explicitly given the
known issue in #69935.
We might want to consider adding a whole CI target with SCALABLE=y,
which we've done for other common tunables to get coverage.
Signed-off-by: Andy Ross <andyross@google.com>
Adds i2c3 on the dts of nucleo_f401re.
Adds necessary overlay and nucleo_f401re in i2c_target_api test case
to enable the board.
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Fix for test that was failing due to incorrectly testing of
stream_flash_erase_page.
The stream_flash_erase_page would never be able to erase a page
it has been requested to erase.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The fix is to check if any of the adv set's rpa expired
callback returns false, then all adv sets continues with
the old RPA.
Note: Fix is applicable only to adv sets which shares the
same id.
Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
Skip the "test_can_dtiming" test case if CONFIG_CAN_FD_MODE is not enabled,
not the "test_can_timing_missing_value" test case.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Commit adds const qualifier to models metadata.
Specification claims: Composition Metadata Page 0
shall not change during a term of a node on the network.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
The simple test is there to test the API and simple extensions in
unison. Hello world was intended to be the first not the only extension
being tested.
Also refactors the entry thread to allow for usermode potentially by
passing the pointer to the function symbol rather than having it look it
up directly.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Add build_only for the st,stm32-ethernet driver to the build_all
ethernet tests and add an entry for ethernet support to make sure
ethernet driver is built.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Use the native_sim board to build ethernet drivers for spi devices and
add an entry for the default testcase.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This will help to detect any issues with duplicate handlers, currently,
it causes an infinite loop in the handler that processes the single
linked list.
Also, increase the stack size to pass the synchronous test case.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Set the minimal RAM requirement for the test variant, so that it does
not get built for platforms it won't fit anyway.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Enabled the PIT and Multi channel support
for some of the rtXXXX devices.
- rt1010
- rt1060
- rt1160
- rt1170
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Updating the nxp,pit driver to support mutliple
channels. Updating the dts and board overlays
to account for the changes.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Replaces the use of z_pend_curr_irqlock() with z_pend_curr()
as the former is not used anywhere else anymore.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Update all usages of the MBOX API to the latest API changes (to be
squashed for bisectability).
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Some pieces of code were missing proper guards for Kconfig
values, which could cause compile issues
The massive amount of #if in bap.c clearly indicates that the
file should be split, as it contains many things that are specific
for various roles.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add support for vendor specific Set Scan Request Reports command and
Scan Request Received Event, available for legacy advertising.
Signed-off-by: Giancarlo Stasi <giancarlo.stasi.co@gmail.com>
This function is only being used by a test, so instead of reimplementing
a syscall in the test, provide a Kconfig option to provide the
functionality that only works with tests and remove some of the
duplication and extra code.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The functions to manipulate the essential flag indeed operate on
threads, but they are misplaced in the thread implementation file. Put
them alongside other routines setting other thread flags and cleanup
headers a bit.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit relaxes the idle event statistics test precision requirement
for emulated QEMU targets because the cycle counts may be inaccurate when
the host CPU is overloaded (e.g. when running tests with twister) and a
high failure rate is observed for this test in the CI.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>