Today the thread analyzer depends on !ARCH_POSIX,
so this filter needs to filter any board for this architecture
not just native_sim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Packet buffer is designed to run writer and reader code on two CPUs.
The write function cannot be preempted by the read function in a CPU,
or the cache management could result in data corruption. In the tests,
the reader and the writer are executed on a single CPU. Disable data
cache management to prevent potential data corruption.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The test `storage.flash_map.mpu` for `nrf52840dk/nrf52840` fails
althought the output is correct. Time to test execution is not enough.
This change extend test execution timeout.
Signed-off-by: Katarzyna Giądła <katarzyna.giadla@nordicsemi.no>
Add z_test which uses new configs to capture multiple
threads in a core dump and with all of the context
necessary to debug the threads.
Signed-off-by: Mark Holden <mholden@meta.com>
Use an explicit callback name so that multiple instances of this do not
result in a:
redefinition of '_input_callback__longpress_cb'
error. This used to work when it was using unique generated wrappers,
but now it needs an index in the callback name.
Use it in one of the API tests as well, just in case.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add a void *user_data pointer to the input callback structure. This is
useful for driver to get back the driver data structure and avoid
defining wrapper functions.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add the missing timeout parameter to `modem_pipe_open()` and
`modem_pipe_close()` calls.
10 seconds is the default value used in the Zephyr tree.
Fixes a regression introduced in
https://github.com/zephyrproject-rtos/zephyr/pull/74325.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
The commit removes one-line overlay files, when copyrights excluded,
with direct Kconfig options selection inside testcase.yaml.
The overlays have been removed.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The modem pipe APIs include synchronous calls to open/close,
which internally use a fixed timeout of 10 seconds. The timeout
should be configurable through the APIs, anywhere from K_NO_WAIT
to K_FOREVER.
This commit adds timeout parameters to the open/close APIs, and
updates in-tree usage of the open/close APIs to explicitly
provide the previously implicit timeout of 10 seconds.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Raise the descriptor table span to 201 due to the inclusion of the USB
configuration descriptor.
Tested with:
$ west build -p -b it82xx2_evb tests/subsys/usb/desc_sections
-T usb.desc_sections
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Disable the flash disk driver in the RAM driver test to prevent the
test using the wrong disk in the tests.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Change USBD_CONFIGURATION_DEFINE macro to take the address of a string
descriptor node as an argument. This is a breaking change for macro
users, but quite convenient and easy to implement.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Change the `platform_allow` to multi-line format so that newly
supported archs/boards can be added as a new line.
Refactor the tags out to `common`, and add
`CONFIG_ARCH_HAS_GDBSTUB` filter
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
There are instances where on hardware tests would result in
multiple dictionary logging blocks. This is usually due to
flashing and running via twister in separate steps. Once
flashing is done, the device starts running and sending
logging string to output, but twister is not ready to read
them, thus leaving the strings in the host's UART buffer.
Then twister starts its testing run by resetting the device
which results in another dictionary logging block to show
up. So the pytest script has to be updated to only look at
the last dictionay logging block.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Since only the UART backend supports output in hexidecimal form
with dictionary logging, so filter for that or else the pytest
would fail due to none, or wrong captured output.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
When NO_BACKENDS was not defined then log backends were
initialized (even though not used). During the initialization
filters for that backends were configured and because of that
messages were not filtered out as expected.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Currently we get the build error when building
'tests/subsys/logging/log_backend_uart':
error: static_assert expression is not an integral constant expression
BUILD_ASSERT(strlen(TEST_DATA) < SAMPLE_DATA_SIZE);
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It can be easily workarounded by using sizeof instead of strlen
to calculate string size.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
In `tests/subsys/logging/dictionary` we don't include stdio.h
header but use standard stream definitions (i.e. `stdout`)
which cause build issues (if the minimal libc is used).
Fix that.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Some AMP native simulator targets (like the nrf5340bsim net core)
will not produce a final executable if only one of the core images
is built, when IPC is enabled, as those images require the other
core image to be able to link.
So this test cannot be run when targetting that core alone
(without using sysbuild to build the other).
Let's filter out these targets to avoid twister building
but finding itself with no executable and error out badly
as it cannot run the test.
The filter condition is effectively:
If building for a native target, there must be an .exe being
produced.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Some hardware takes longer to boot before any output is visible
from the app. So lengthen the initial timeout on waiting for
any output.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
When doing device testing, there may be some other characters
being printed before the dictionary logging header string.
Also the delay boot banner may also be there. So change
the regex to ignore those them.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
With sysbuild, the test app is actually built under another
layer of directory where the dictionary JSON file will reside.
Instead of simply using dut.device_config.build_dir, use
dut.devive_config.app_build_dir instead, which takes into
account of that.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add pytest to test the output of dictionary logging to make sure
the encoded logs can be decoded back into strings, and to also
make sure the decoded logs have the expected strings.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This is in preparation for introducing pytest to test the output
of dictionary logging. Code is the same, but the testcase.yaml
is trimmed to only those that can be tested.
Note that a copy is made instead of moving the whole sample over
is simply due to various documentation having references to
the sample. Since RST files under tests/ are not parsed for
zephyr:code-sample:<name>, the linking would have been vanished.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add test cases for testing basic CFB functions.
These tests cannot run in CI because the CI environment has no display.
Mark these tests as `build_only`.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
`checkpatch.pl` requires that dts sources are indented with tabs,
fix all the spaces that slipped in while checkpatch wasn't watching.
Signed-off-by: Jordan Yates <jordan@embeint.com>
When the CMUX is released from its pipe, it must stop transmitting
data to it, and prevent starting any work which requires
transmitting data like connecting CMUX or opening a DLCI pipe.
This commit extends the CMUX test suite to validate this behavior.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Add a new test case that verifies that llext_find_section() returns the
correct offset for a symbol in a loadable extension. This exploits the
fact that in the STORAGE_WRITABLE cases, the symbol addresses will be
inside the ELF file buffer, so they can be easily compared.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This patch reworks the testcase.yaml and sample.yaml files for the llext
subsystem to further reduce the number of tests performed by CI while
improving overall coverage.
The following changes are introduced by this commit:
- Remove the arch_allow field from the common section to allow any arch
to be tested in the build_only test. All other tests explicitly narrow
down the arches they are applicable to.
- In addition to platforms with active issues, also exclude a number of
platforms that are always skipped by the runtime filter due to
RAM/Flash limitations.
- Add integration_platforms to limit the test count to a few selected
platforms which are representative of the different arches.
- Remove a number of duplicate SLID tests and group them into a single
test that covers both ARM and Xtensa architectures.
- Test the relocatable case on ARM as well.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The ELF files should be aligned to at least sizeof(elf_word) to avoid
issues. Use a larger value to ease debugging, since it reduces the
differences in addresses between similar runs.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
- Increase the test coverage of supported platforms.
- Fix test_flash_area_check_int_sha256 for platforms with
flash program size >32. Increase the supported flash program size
to 512 (maximum supported by Zephyr platforms now).
- Fix test_flash_area_get_sectors test for platforms
with maximum number of sectors per image slot >256.
Increase the support value to 1024.
- Fix possible stack size overflow.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Running the tests/subsys/lorawan/clock_sync/ requires a long timeout
to pass. Set a timeout: 500 to cover most of the usecase
Signed-off-by: Francois Ramu <francois.ramu@st.com>
These Kconfigs should have been deprecated for more than 2
releases, remove them:
- `CONFIG_CPP_MAIN`
- `CONFIG_CPLUSPLUS`
- `CONFIG_LIB_CPLUSPLUS`
- `CONFIG_EXCEPTIONS`
- `CONFIG_RTTI`
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
`CONFIG_LOG_DOMAIN_ID` has been deprecated for years and
shouldn't be used according to its documentation, remove it.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
In 0be0d2175b (cmake: modules: extensions: Revert using common
board files), the overlay for `native_sim/native/64` in the settings
functional file test was not recreated. Duplicate the overlay used for
the `native_sim` target to support this test correctly.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
As part of ongoing work to move away from TinyCrypt and towards PSA
(#43712), introduce a PSA option and remove the TinyCrypt one for the
SHA-256 implementation.
The Mbed TLS implementation is modified to use `mbedtls_sha256`
directly for smaller code size.
As of now the implementation defaults to PSA only if TF-M is enabled
because a dependency loop happens if using `PSA_CRYPTO_CLIENT` as a
condition in `FLASH_AREA_CHECK_INTEGRITY_BACKEND`.
A test case is added for the PSA implementation, and an NS platform is
added to the base test case to verify the compilation on a TF-M-enabled
platform.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
This patch file updates the use of assertion macros
comparing strings.
Command line used:
```
./scripts/coccicheck --mode=patch \
--cocci=scripts/coccinelle/ztest_strcmp.cocci tests/
```
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
These tests are simple copies of the existing tests with the addition of
the CONFIG_MODULES=y option. This different Kconfig setting has no
practical effect on the code, and the tests are therefore redundant.
Remove them to halve the number of tests.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Fix offset read for verification and comparison of read to
erased value, where type mismatch has been causing fails in
comparisons.
Fixes#74066
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>