The ASCS unit tests had various errors after adding support for
dynamic registration.
Several tests did not properly clean up after failure, causing other
tests to fail when they shouldn't.
Moved the register tests to their own file as they should not
do the register in the "before" function.
The test_ascs_unregister_with_ases_in_config_state test was also
removed, as it had both issues and the state that it wants to test
cannot be reached with the current API - It is not possible to
put an ASE in the configured state without callbacks,
and registered callbacks prevents us from calling
bt_bap_unicast_server_unregister to trigger the case as that can
only be done if callbacks are unregistered. Since unregistering
callbacks also puts all ASEs to the idle state, it is not possible
to call bt_bap_unicast_server_unregister for a non-idle ASE.
The testcase.yaml was also missing some Kconfig options to
properly enable the client tests.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add collector parameter to metric creation macros so that it
is possible to bind the metric to collector already at built
time.
Also add optional user_data to metric macro calls so that user
can add optional data there. This will be used by network statistics
Prometheus support in subsequent commits.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Embed "struct prometheus_metric" to individual metric like
counter, gauge, histogram and summary. This way we avoid having
a separate base pointer in specific metrict struct. We also do
not need to search the specific metric from base metric as
we can simply use CONTAINER_OF() macro to get the base metric.
This embedding means that the counter, gauge, histogram and summary
metric define macros are changed as user does not need to create a
separate "struct prometheus_metric".
Convert the tests and sample to use the new macros.
Remove also the static from metric creation macros so that user
can decide whether it needs collector to be static or not.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Benchmarks are not tests, we run them to verify they still work and do
not bitrot. Running them on each architecture should be sufficient.
This reduces amount of churn in CI and still allows them to be run
individually on platforms.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Don't duplicate the test's output running it on `native_sim` after
`LOG_BACKEND_NATIVE_POSIX` was enabled by default (bd9836be8c)
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Don't duplicate the test's output running it on `native_sim` after
`LOG_BACKEND_NATIVE_POSIX` was enabled by default (bd9836be8c)
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Some code that automatically gets embedded on some platforms relies
on having `CONFIG_TIMEOUT_64BIT` enabled.
Do not force disabling that Kconfig option in the test configuration,
as that will make the test fail to compile on those platforms.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves syslog into a singular
testsuite at tests/posix/xsi_system_logging app directory.
Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
Adding new CONFIG_MBEDTLS_PSA_KEY_SLOT_COUNT to select the number
of key slots in PSA Crypto core. The default value is 16. Be aware
that key slots consume RAM memory even if unused, so the proper value
should be a compromise between the number of slots required by
the application and the available RAM in the system.
This commit also:
- updates tests/crypto/secp256r1/mbedtls.conf to showcase how to
use this new symbol to reduce RAM footprint.
- tests/bsim/bluetooth/mesh/overlay_psa.conf to support all the
keys used in the test.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Adding the Kconfig symbol CONFIG_MBEDTLS_PSA_STATIC_KEY_SLOTS
to allow Mbed TLS's PSA Crypto core to use static key buffers
to store key's material. This helps reducing heap memory
usage and, potentially, it also discard code implementing
heap memory management if there's no other module in the build
that makes use of it.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Reducing the heap requirement for the hci_ipc sample from
8KiB to 4KiB. It has been tested in various configurations to
work with 2300, but 4KiB was used to provide some leeway for
future updates.
The heap requirement is not documented, and it is unclear why
values lower than 2300 (not exact number) won't boot, and should
be investigated further.
Memory has become a very scarce resource for especially the ISO
builds for the nRF5340, which is why this is getting reduced.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The SSP driver has odd dependency to outside definition of
CONFIG_INTEL_NM. This is in practise tied to SSP hardware
version and always enabled for SSP block version 1.0.
Use the new SSP_IP_VER define to replace the CONFIG_INTEL_MN
preprocssor checks. Also modify the board test case to
remove the obsolete config setting.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Use Kconfig to configure watchdog instead of using expensive filters.
Also disable CONFIG_TEST_HW_STACK_PROTECTION for this test so we do not
have to create special cases.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This fixes memory corruption of delayable work when
tests executes unsupported function.
When test (e.g. only_rx_in_chunks) is executed it starts
delayed work for master functionality (with 10 ms delay).
Later when slave function is tried and reports that
function is unsupported, test is terminated (task ends)
but work is still scheduled.
When next test starts it clears work that is already
scheduled:
static void before(void *not_used)
{
ARG_UNUSED(not_used);
memset(&tdata, 0, sizeof(tdata));
this leads to memory corruption and system work queue
tries to remove work but it never does since head/next
pointers are zeroed at that time.
This just adds after function that cancels work
regardless if it was scheduled or not.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
This is a follow-up to 21475774fc,
extending the number of tests and samples that use the new L05 and L10.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit adds test to assert that thread specific data is deallocated
on thread termination.
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
`_current` is now functionally equals to `arch_curr_thread()`, remove
its usage in-tree and deprecate it instead of removing it outright,
as it has been with us since forever.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
As the test uses reentrant time functions like asctime_r or ctime_r,
it should select POSIX_C_LANG_SUPPORT_R. Otherwise there are build
failures observed with the default test configuration if these
functions are not provided by the toolchain.
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
Use a string for the mipi-mode property over an integer value, as this
significantly improves the readability of the MIPI DBI device binding.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
flash_copy() is performed on a page.size span but following flash_read()
verification step is performed on EXPECTED_SIZE length (512).
This doesn't work on devices where page.size is lower than EXPECTED_SIZE,
such as STM32L1 where page size is 256.
To fix this, perform verification on the smalest value between page.size
and EXPECTED_SIZE.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Fix some test simulation length be greater than wait time.
These tests completed within 12 seconds, 15 second wait
time is a good value with included margin and a 20 second
simulation time.
These tests failed on this PR CI.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This addresses the following warning building with `CONFIG_64BIT=y`:
error: field precision specifier '.*' expects argument of type 'int',
but argument X has type 'size_t' {aka 'long unsigned int'}
Signed-off-by: Chen Xingyu <hi@xingrz.me>
What looks to be a copy-paste typo was not caught in
code review.
Change .rwlocks to nothing and move the filter to the
common area.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>