First sector starts at CONFIG_EXT2_DISK_STARTING_SECTOR.
This commit fixes calculating free space, based on that value.
Signed-off-by: Franciszek Pindel <fpindel@antmicro.com>
This extends the test for memory mapped stack, as the address of
memory mapped stack object would be different than the actual
stack object.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This extends the test for memory mapped stack, as the address of
memory mapped stack object would be different than the actual
stack object.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This test is intended to teach the conventions and best practices to a
potential contributor that wants to add a test, for say a new feature.
It is liberally commented on purpose, so new contributors don't have to
spend two weeks understanding the intricacies of the simulator, the bsim
test framework, the native builds, backchannels, etc..
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This code can be found (kinda) duplicated all over
`tests/bsim/bluetooth`.
Put it in a common place.
Refactoring the current tests will be done in a future commit.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Improve function which guesses the test name so the calling
script can be invoked from any folder, not just Zephyr's
base.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fixes some missed renames for overlays with the recent change
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The commit adds dependency on Kconfig FLASH_PAGE_LAYOUT to subsystems
that really require it:
FCB, NVS, LittleFS
and removes direct selection from '*.conf' files where no longer
needed.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Adjustments of overlay and conf files to adjust for the MERGE removal.
The revert of MERGE requires specific overlay and conf files for boards
which relied on the MERGE feature.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This API is not widely used and it is actually broken since device
runtime power management is not checking it when suspending and
resuming.
On top of that, this API is very close to pm_device_busy* API,
close enough to consolidate in only one API.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
EATT is not properly used by LE audio nor is the
Zephyr implementation very good, so disable for now
or at least until the BSIM tests are passing with it
enabled.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add an instance of the output diagnostics sensor for the
power train switch TLE9104 to the build all tests.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Increase the supported receive state count to 4, as
several on-market device have at least 2 and sometimes
more.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This patch adds support for custom commands to be executed during the
build of an llext target. The commands can be executed at different
points in the build process:
- PRE_BUILD: Before the llext code is linked.
- POST_BUILD: After the llext code is built, but before packaging
it in an .llext file.
- POST_PKG: After the llext file has been created.
Note that PRE_BUILD is not supported for ARM targets, as in that case
object files are used directly and there is no actual linking step.
The commands can be added using the new add_llext_command() function.
An example usage of it, along with some target properties, is added to
the hello_world test case.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Add entry for st7796s to display build_all test, so that the controller
driver will be built by CI.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Tests which were using the new nordic UART shim where failing
on the bsim targets. They are now fixed and tests can be
re-enabled.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The initial version of an input driver for Cirque Pinnacle ASIC supports:
* Setting sensitivity
* Choosing between relative and absolute modes
* Relative mode
* Primary tap
* Swapping X and Y
* Absolute mode
* Setting number of idle packets
* Clipping coordinates outside of active range
* Scaling coordinates
* Inverting X and Y coordinates
Signed-off-by: Ilia Kharin <akscram@gmail.com>
This commit fixes 'test_verify_send_report()' function as it was
not properly waiting for a MLDv2 report after sending a query. The
asserted value was set for the previous report sent after joining a
group.
Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
Deprecate CONFIG_NET_TCP_ACK_TIMEOUT as it is redundant with the
combination of CONFIG_NET_TCP_INIT_RETRANSMISSION_TIMEOUT and
CONFIG_NET_TCP_RETRY_COUNT. The total retransmission timeout (i. e.
waiting for ACK) should depend on the individual retransmission timeout
and retry count, having separate config is simply ambiguous and
confusing for users.
Moreover, the config was currently only used during TCP handshake, and
for that purpose we could use the very same timeout that is used for the
FIN timeout. Therefore, repurpose the fin_timeout_ms to be a generic,
maximum timeout at the TCP stack.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
imxrt6xx are dual core devices featuring an ARM Cortex-M33
core and an Cadence Xtensa HIFI4 Audio DSP.
Currently only m33 core is supported. In order to support
the Cadence DSP we need first to do some code-reorganization
for m33.
We start by moving all cm33 related code to its own directory
and introduce the cpuclusters property in soc.yml file.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Update prj.conf so that
subsys/net/lib/sockets/socketpair.c
is pulled into the build and zsock_socketpair() is
properly defined.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Check for the existence of
pthread_rwlockattr_getpshared()
and
pthread_rwlockattr_setpshared().
Signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
This adds a board name that got missed in commit
8dc3f85622 (hwmv2: Introduce Hardware
model version 2 and convert devices)
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
This commit sets `CONFIG_NEWLIB_LIBC_MIN_REQUIRED_HEAP_SIZE=2048` for the
SiFive HiFive1 board. Otherwise, the test fails on the following assert
from Newlib:
memory space available for newlib heap is less than the minimum required
size specified by CONFIG_NEWLIB_LIBC_MIN_REQUIRED_HEAP_SIZE
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
This commit sets `CONFIG_NEWLIB_LIBC_MIN_REQUIRED_HEAP_SIZE=2048` for the
SiFive HiFive1 board. Otherwise, the test fails on the following assert
from Newlib:
memory space available for newlib heap is less than the minimum required
size specified by CONFIG_NEWLIB_LIBC_MIN_REQUIRED_HEAP_SIZE
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
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>