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>
It wasn't saving adjusted stack size at either the private stack or the
k_object, thus failing subsequent checks.
Test added to check for this case and prevent regressions.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
AXP192 features an EXTEN pin that is on output only.
This commit appends control of EXTEN pin to gpio functionality
of AXP192.
Port-Mapping is as follows:
- [0..4]: GPIO0..4
- [5]: EXTEN
Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
RTC drivers should validate the `struct rtc_time`'s contents against the
provided `mask`. Promote this common code to a new rtc_utils file and
modify existing drivers to use this functionality. Extend the test
coverage to include verifying this behaviour.
This is groundwork ahead of adding support for the RP2040's (as used in
the Raspberry Pi Pico) RTC and alarm.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
Add tests that verify that sendmsg() for DTLS works fine if provided
with multiple buffers.
Modify existing sendmsg() tests, so that we still tests the old
behavior if the feature is disabled.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Utilization of chip interrupt line is mandatory to assure proper
charger state control. Handle interrupt to prepare the driver for
implementation of such functionality.
Modify charger status update so the current state is fetched in the
interrupt handler.
Use level based interrupts combined with interrupt disabling for a
period of time after interrupt handling to reduce number of interrupts
triggered by the charger. There may be a case where the charger
produces burst of interrupts for a several seconds and if the code
attempts to handle every single interrupt separatery then the system
might be significantly overloaded.
Co-authored-by: Bartosz Bilas <b.bilas@grinn-global.com>
Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
Updates the latency_measure test to add support for benchmarking
k_stack_push() and k_stack_pop().
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Add some assert statements meant to check if L2 interrupts
are encoded right when dealing with nodes that consume interrupts
from multiple aggregators. For this to work, also add another
interrupt controller node which extends a different L1 interrupt
from `test_intc`.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
To make the content of the sample packets more more
understandable, comments describing it are added.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add tests for the encapsulated vendor specific option callback API.
These test cases are focused on correct parsing of encapsulated
vendor specific options.
The sample DHCP messages have been extended accordingly.
Signed-off-by: Matthias Breithaupt <m.breithaupt@vogl-electronic.com>
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Co-authored-by: Fin Maaß <f.mass@vogl-electronic.com>
RAM allows for very fast reads and writes and lets us explore most of
the I2C controller APIs including RTIO. Theoretically supports any form
of i2c connected RAM but requires some tweaking to work with specific
parts potentially. Tested with Fujitsu's MB85 FeRAM part using an
arduino breakout.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
- Added a test to the CoAP testsuite for age wrap around
- Added test for `coap_age_is_newer`
Signed-off-by: Sibert Declercq <sibert.declercq@basalte.be>
Adds a test to verify the saving and restoration of the HiFi
AudioEngine registers. Twice as many threads as there are CPUs
are created and each thread sets its HiFi registers with a
unique set of values. If after a context switch, the HiFi AE
registers contain any unexpected data, we then know that the
registers were either not saved or restored properly.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Brings SMF framework closer into alignment with accepted Hierarchical State
Machine operation by:
1. Allowing 'programming by difference' by having some child states handle
events and prevent propagation up to the parent run actions while others
propagate events up to a common handler in a parent state.
2. Optionally allow initial transitions within a parent state to determine
the most nested child state to transition to.
3. Adding a test case for `CONFIG_SMF_INITIAL_TRANSITION` and
`smf_set_handled()`
4. Updating documentation for the new API (and fixing some references)
There was discussion in https://github.com/zephyrproject-rtos/zephyr/issues/55344
about not making the initial transition a Kconfig option, but I'm not sure
of any way else of doing it without permanently adding a pointer to each
`smf_state` entry, which is a problem for resource-constrained devices.
This does not fix https://github.com/zephyrproject-rtos/zephyr/issues/66341
but documentation has been updated to warn users of the issue.
Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
Add devicetree based settings for resolution, axis inversion and sleep
mode enable. Keep the resolution setting in its own function so it can
be called by the application again in runtime if needed.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The broadcast sink and broadcast source will now use and verify
the info returned by bt_bap_ep_get_info.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Extended test to validate that RO string locations are appended to
the cbprintf package for a log message if Kconfig option is enabled.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The FICR is also modelled in simulation, but changing this
conditional compile was forgotten, so it was only being
built for real HW.
A test had provided its own version of this function so it would
avoid a runtime warning due to the lack of static address. But
this needs to be removed as it conflicts with the function
provided now always by the nordic controller SW.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The nRF91 series devices, when running the Serial LTE Modem (SLM)
application starting with nRF Connect SDK 2.6.0, can now be used as
standalone modems via the generic modem_cellular driver.
A configuration to run the cellular_modem sample on the nRF9160 DK
(plugged in to another nRF91 series device running SLM) is provided.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Make sure that the tests work properly when each IPv4 address
in the network interface gets its own netmask.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Since all CAN controllers drivers seem to support automatic recovery (for
any future drivers for hardware without this hardware capability this can
easily be implemented in the driver), change the Zephyr CAN controller API
policy to:
- Always enable automatic bus recovery upon driver initialization,
regardless of Kconfig options. Since CAN controllers are initialized in
"stopped" state, no unwanted bus-off recovery will be started at this
point.
- Invert and rename the Kconfig CONFIG_CAN_AUTO_BUS_OFF_RECOVERY, which is
enabled by default, to CONFIG_CAN_MANUAL_RECOVERY_MODE, which is disabled
by default. Enabling CONFIG_CAN_MANUAL_RECOVERY_MODE=y enables support
for the can_recover() API function and a new manual recovery mode (see
next bullet). Keeping this guarded by Kconfig allows keeping the flash
footprint down for applications not using manual bus-off recovery.
- Introduce a new CAN controller operational mode
CAN_MODE_MANUAL_RECOVERY. Support for this is only enabled if
CONFIG_CAN_MANUAL_RECOVERY_MODE=y. Having this as a mode allows
applications to inquire whether the CAN controller supports manual
recovery mode via the can_get_capabilities() API function and either fail
or rely on automatic recovery - and it allows CAN controller drivers not
supporting manual recovery mode to fail early in can_set_mode() during
application startup instead of failing when can_recover() is called at a
later point in time.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add additional validation of the config data in the broadcast
sink test, both ensuring that the BASE is properly parsed,
that the BASE contains mandatory information and that the
stream get the right values copied.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When using the LC3 codec, all codec configuration are LTV encoded.
The broadcast source did not properly validate this, and it also
uncovered a bug in the bsim test for broadcast sources.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This is not used by anyone, and is unlikely to be useful actually.
Helps to save 4 bytes for each instance of struct net_nbr also (removing
a 2 bytes attributes, which was anyway generating a 4bytes loss due to
structure misalignment).
Removing relevant useless functions related to it as well.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Add an initial input driver for the PixArt PAT9125EL, just core
functionalities for now, will add more configuration properties at a
later stage.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add test cases for IPv4/IPv6 foreach functions that iterate all
multicast addresses assigned to an interface.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Use TC_END_REPORT() to report "PROJECT EXECUTION FAILED"
instead of a call to printk() for ZTEST enabled tests. as
this prints the failed message as well as the RunID (and
whatever will be added in future).
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add test case verifying that send() returns an error when called after
TLS session has been closed.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Iterate through I2C addresses in devicetree overlay
for build_all/gpio to avoid conflicts.
Fixes#69551
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
The default 512 bytes stack size is a bit tight for some architecture
and leads to samples running out of stack. Let's default to 1024 and let
the user tweak it down if necessary.
Suggested-by: Benjamin Cabé <benjamin@zephyrproject.org>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add bt_bap_base_subgroup_get_bis_indexes that gets the BIS indexes
of a subgroup. This work very similar to
bt_bap_base_get_bis_indexes, except that it works for subgroups
rather than BASEs.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Previously, the mutex attribute was not initialized prior to its
first use or subsequently destroyed.
Ensure that it is initialized by calling
pthread_mutexattr_init() and destroyed by calling
pthread_mutexattr_destroy().
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
The stack manages to suspend the advertiser before it finishes
transmitting the Outbound PDU Report message to confirm the transmission
of a Provisioning PDU. The test requires the server to become
unresponsive when the Provisioning PDU is sent to the unprovisioned
device to test timeout of the provisioning protocol.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Now, when the deadlock is removed from `bt_mesh_adv_disable` function,
the advertiser can be disabled from the `bt_mesh_send_cb`
callbacks.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
When the Bluetooth central samples in an open air environment
it is very likely that there are multiple devices nearby with
a received signal strength stronger than -70 dBm.
To avoid connecting to the wrong device, make the check stricter.
For tests using those samples, the NtNcable attenuation is changed
from the default 60 dBm to 40 dBm to satisfy the new requirement.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Verify that declined addresses are not permanently blocked - i. e.
expire after configured timeout and in case of free address shortage,
can be reused.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Rename uart and uart_async bsim test to reflect
testing of hci_uart sample using UART driver
variants under bsim simulations.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The tests `hci_prop_evt` and `host_long_adv_recv` used `bt_recv_prio`,
and so relied on an extra config option `CONFIG_BT_RECV_BLOCKING`. This
patch replaces the use of `bt_recv_prio` with `bt_recv` and restores the
use of the default option for `BT_RECV_CONTEXT`.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Verifies that there is no host RX buffer leak due to disconnections.
That is, not actual host buffer objects but rather the number of buffers
that the controller thinks the host has.
If there is a desynchronization between those two, the result would be that
the controller stops forwarding ACL data to the host, leading to an
eventual application timeout.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
There are quite many BT host test images being built.
Today these are all built in parallel, causing a quite
high load.
Let's split them in their separate sub-scripts,
so we don't parallelize too many builds,
and users have more granularity if they only
want to build a subset.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The CIS tests are building quite many
apps on their own.
Let's split them in their separate sub-script,
so we don't parallelize too many builds,
and users have more granularity if they only
want to build a subset.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The test_mqueue_notify_thread testcase had a relatively high
failure rate because sleeping only 10ms was in some cases not
sufficiently long enough for the spawned thread to update
notification_executed.
Sleep 100 ms instead of 10 ms to reduce the failure rate.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>