Updated the tests to use info from the devicetree or Kconfig as
ground truth and compare that with the output from the
functions under test.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Assert that the `local_irq` of each levels should only ranges
from `0` to `CONFIG_MAX_IRQ_PER_AGGREGATOR`, so that it doesn't
overflow the other aggregators.
Also, assert that the output of `z_get_sw_isr_table_idx` shouldn't
overflow the ISR table.
Update the `sw_isr_table` tests to test the range of
`CONFIG_MAX_IRQ_PER_AGGREGATOR` instead of the entire range of
level bits.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Split the `sw_isr_irq_parent_table` test into one that tests
the IRQ table index function which is generic and should
always be tested, and one that tests multi-instance -related
functions which only work in interrupt controller drivers that
has multi-instance implementation.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Modify the VCP volume controller callbacks to support
multiple registers by making it into a linked list.
This allow for multiple applications to get the information
from procedures or notifications.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Enable code coverage for debug.coredump.drivers.api.* test suite
adding custom fatal error handler to dump code coverage data
when the test halts as expected.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Add const prefix for service uuid and char uuid.
Since Service UUID and Char UUID should not change in the service
definition, they are most reasonably defined as rodata, also for
save some ram footprint.
The field `attr->user_data` type is `void *`, as this PR change
all Service UUID to rodata, so there must add (void *) to avoid warning.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
The CAP Initiator and the CAP Commendar share quite a lot of
functionality in terms of discovery and performing set-based
procedures.
The code for handling most of this has been moved to
cap_common.c to avoid duplicating code.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Updates both the app_kernel and latency_measure testcase scripts
to include a scenario involving object core statistics. This can
then be used to estimate the performance cost of using this feature
post-execution by comparing its results to the scenario where it is
not enabled.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
The default ztest stack size was too small to run new UDP tests on
certain platforms (nrf52840 in this particular case), therefore increase
teh stack size in prj.conf.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Replace combination of printk() to LOG_DBG() to fix the order of the
test execution logs. The printk() is printed immediately, while logs are
buffered, thus the messages from test are printed out before the stack
logs.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This adds the function that sets the available contexts value per
connection object so that API user can set different available contexts
per connection.
The lifetime of such overriden value is the same as connection lifetime,
so on reconnection or device reboot all devices return to having the
same available contexts value again.
Fixes: #64968
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This verifies the zephyr host can tolerate a spec violating peer sending
ATT requests without waiting for responses.
It also tests the opposite, that is that the Zephyr host does not
pipeline requests over the air.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Adding support for one missing MCP testcase - verifying characteristic
handles during service discovery.
Signed-off-by: Piotr Narajowski <piotr.narajowski@codecoup.pl>
When the test runs with code coverage, make sure the coverage dump
completes its output under pytest execution before the test debug
session ends in both cases: for Zephyr gdbstub feature and for
Qemu internal GDB stub.
Add few more test operations with breakpoints.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
This removes the fixed size bt_bap_base, which provides
2 improvements:
1) The RAM usage of the broadcast sink has been reduced.
For the Broadcast Sink sample it is a reduction of 120
octets, but with much better scaling for supporting
more or larger BASEs.
2) The functions to parse BASEs now support arbitrary sized
BASEs, where they were previously restricted by our
local Kconfig options. This allow us to parse any BASE
from a remote device, without encounting memory issues.
We are still memory restricted on the devices we
actually want to sync to.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This option (CONFIG_HEAP_MEM_POOL_SIZE) is not used for the tests.
Moreover it overrides the option, specified in the board's Kconfigs.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add an optional actual-key-mask property to filter out key combinations
that are not implemented in the actual keyboard matrix.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Test claiming a device multiple times before releasing it, and validate
that the power domain returns to off.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
In fallback refactoring to the LwM2M engine, some changes
to the server object are visible in hard-coded test
values.
Also, add Endpoint wrapper class that ensures the registration
state of the returned endpoint.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
If server registration fails, allow fallback to secondary server,
or fallback to bootstrap.
Also allow fallback to different bootstrap server.
Add API to tell RD client when server have been disabled by
executable command.
Changes to RD state machine:
* All retry logic should be handled in NETWORK_ERROR state.
* New state SERVER_DISABLED.
* Internally disable servers that reject registration
* Temporary disable server on network error.
* Clean up all "disable timers" on start.
* Select server first, then find security object for it.
* State functions return void, error handling is done using states.
* DISCONNECT event will only come when client is requested to stop.
* NETWORK_ERROR will stop engine. This is generic error for all kinds
of registration or network failures.
* BOOTSTRAP_REG_FAILURE also stops engine. This is fatal, and we cannot
recover.
Refactoring:
* Server selection logic is inside server object.
* sm_handle_timeout_state() does not require msg parameter. Unused.
* When bootstrap fail, we should NOT back off to registration.
This is a fatal error, and it stops the engine and informs application.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Test consistently fails with timeout for board `hifive1`, so exclude
this board until fixed.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
This board have an NXP MPU with 8 configurable regions, of which five
of them are already used by the static MPU configuration. Many of
these tests are failing due to lack of MPU regions or free partition
slots available, even when HW stack protection is disabled when
building with userspace support.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
This enables the sqrt() and sqrtf() tests also in case of soft-float
configurations. It is expected that the tests will link, run and pass
also in such configuration.
Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
The lib was refactored, but CI didn't run the tests that used it for
some reason.
A parameter was forgotten.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This patch just adds some comments and asserts to clarify the testlibs
att read code.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
This reformats some code on main branch that was not clang formated. The
syntax is changed from initializer list to multiple statements because
there is a conflict in formating requirements between clang format and
checkpatch.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
When testing k_busy_wait(100), don't require that at least 100µs of CPU
time be consumed by the thread itself; some of that time may be used
elsewhere in the system. Instead, just make sure that at least 80µs is
accounted to the thread and allow 20µs to get used elsewhere.
Signed-off-by: Keith Packard <keithp@keithp.com>
MIN() has been defined in sys/util.h for a long time. It doesn't
make sense to separately define a lowercase version.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
The driver has some non trivial macro setup, add another two test cases
so those gets build tested as well.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Implements sync established and sync lost BTP events.
This was affecting GAP/PADV/PASE/BV-01-C test case.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>