Commit graph

14120 commits

Author SHA1 Message Date
Anas Nashif
84221f5219 tests: display: fix test identifier
Fixed test identifiers and places in correct area.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-18 06:47:57 -04:00
Anas Nashif
366ddac79e tests: sensing: fix identifier
Fix identifier of test and add to MAINTAINERS file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-18 06:47:57 -04:00
Yannis Damigos
d2a4522250 tests: uart_elementary: Correct typos
Correct typos in uart_elementary test

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2024-07-15 15:15:36 -04:00
Tomi Fontanilles
50c03e9bbe modules: mbedtls: fix MBEDTLS_PSA_P256M_DRIVER_RAW Kconfig option
Make it depend on MBEDTLS_PSA_P256M_DRIVER_ENABLED instead of
selecting it.

This fixes the build of
tests/crypto/secp256r1/crypto.secp256r1.p256-m_raw on filtered-out
platforms since PR #75441 (83cd9f5a01).

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-07-15 10:36:58 -04:00
Krzysztof Chruściński
60911a6d5e tests: drivers: spi: spi_controller_peripheral: Fix nrf54h20_cpurad
Add more memory to dma region for cpurad as otherwise it fails
during initialization due to not enough memory for dmm heap.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-12 09:12:35 -04:00
Evgeniy Paltsev
b4f49bf5fc tests: posix: env: fix failure in case toolchain with minimal libc
In case of minimal libc we have CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE = 0
by default. Some toolchains uses minimal libc by default (for example
ARC MWDT toolchain). Let's set CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE
explicitly so we can allocate memory for environment variables.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-11 13:24:02 -04:00
Rubin Gerritsen
85eadcfddc Bluetooth: Mark bt_<type>_err_to_str() APIs experimental
It was pointed out in a future PR that they should have
a corresponding experimental Kconfig entry.

See PR #73795.

This updates the APIs added in PR #73826 and PR #74295.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-11 13:11:59 -04:00
Anas Nashif
83bd3658c3 tests: do not get ZEPHYR_BASE from ENV
find_package() already deals with finding ZEPHYR_BASE, so do not rely on
it being set in ENV, use the variable directly adter find_package() was
called.

Fixes #75387

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-11 13:09:53 -04:00
Brett Witherspoon
c76818d949 dts: bindings: dac: ad569x: Remove unused properties
These properties are not used by the driver at all, but are
inconveniently marked as required. Lets just remove them.

Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
2024-07-11 16:15:28 +02:00
alperen sener
8382fea5b3 test: bluetooth: Correct profile names MBT and DFU
Profile names MBT and DFU are updated as MBTM and DFUM respectively,
according to TCRL 2024-1.

Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
2024-07-11 16:15:10 +02:00
Jonathan Rico
4afe745a1d Bluetooth: host: Add lower bound for CONFIG_BT_BUF_ACL_RX_COUNT
See comment above assert for more.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-10 11:47:26 -04:00
Jonathan Rico
ff5c577aa8 tests: Bluetooth: Add ACL re-assembly test
This tests shows that there is a problematic buffer configuration.

The host locks up when `CONFIG_BT_BUF_ACL_RX_COUNT` is smaller or equal
to the number of connected peers, and all those peers send an L2CAP PDU
that needs re-assembly at the same time.

Although this seems far-fetched, this bug has been observed in a
real-life situation on actual hardware.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-10 11:47:26 -04:00
Théo Battrel
96d8682a5b Bluetooth: Shell: Fix native shell build
Following changes in HCI drivers
(https://github.com/zephyrproject-rtos/zephyr/pull/72323) the build for
the snippet allowing to have the Bluetooth shell run with BabbleSim was
broken.

Fix the snippet by disabling the HCI UART driver.

Add a twister test case that will build the snippet in CI to avoid
silent breaking.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-07-10 11:47:07 -04:00
Nikodem Kastelik
c0d508a142 soc: nordic: common: dmm: fix region alignment getter
Getting the required alignment size for memory region node
and device node needs to be handled by a separate macro.
Otherwise alignment of single byte is reported for any region.
Add a test that checks for this particular issue.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-07-10 08:42:40 -04:00
Krzysztof Chruściński
a575d9bc31 tests: drivers: counter: nrf: fixed_top: Rework nrf54h20 cpuppr config
Rework configuration so that it does not require special treatment
in testcase.yaml.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-10 08:42:03 -04:00
Krzysztof Chruściński
407aa5cc79 tests: drivers: counter: basic_api: Rework nrf54h20 cpuppr config
Rework configuration so that it does not require special treatment
in testcase.yaml.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-10 08:42:03 -04:00
Declan Snyder
6eaadc312f tests: i2s_speed: Fix RT1170_EVK overlay files
Remove an overlay with a wrong name not being picked up,
and change the "A" revision overlay to be used by all revisions.

Also fix the "clocks" property in the overlay causing a fault with sai4.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-10 11:38:39 +02:00
Jukka Rissanen
794d7cf3c5 net: sockets: Remove async service support
As found in PR #75525, we should not modify the polled fd array
in multiple places. Because of this fix, the async version of
the socket service could start to trigger while it is being handled
by the async handler. This basically means that the async version
cannot work as intended so remove its support.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-07-10 11:36:59 +02:00
Yong Cong Sin
49e8c98996 tests: arch: common: stack_unwind: fix symtab test
The symtab test should have the
`CONFIG_EXCEPTION_STACK_TRACE_SYMTAB` enabled. This was not
caught in the CI previously as the regex was also wrong, '['
and ']' are regex syntax and should be escaped.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-09 19:44:08 -04:00
Daniel Leung
0b76fd92fc tests: logging/dictionary: pytest only looks at last output
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>
2024-07-09 17:25:22 -04:00
Daniel Leung
ea109ce39b tests: logging/dictionary: filter for backend
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>
2024-07-09 17:24:02 -04:00
Mathieu Choplain
1fd9dc85b2 tests: drivers: adc_api: use proper printf format
This commit changes the adc_api test to use the proper printf
format specifier when printing the ADC samplings. This ensures
that all values are printed on 16-bit. Without this specifier,
negative values are sign-extended and printed on full integer
size (e.g., 0x8000 -> "0xFFFF8000").

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-07-09 17:23:30 -04:00
Luis Ubieda
5686ac48cc tests: rtio: workq: Add testsuite to exercise RTIO work-queues
Basic tests demonstrating ability to decouple, batch-submit, preempt
and keep track of used items.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Luis Ubieda
1f3a0910d7 tests: sensor: generic: Set thread priorities for back-to-back readings
In order to support back-to-back readings, it's required that the
RTIO workq threads priority is higher than the caller issuing the
back-to-back requests, otherwise the requests will fail as P4WQ won't
have the opportunity to clear the is_done semaphore, and the subsequent
request will be rejected.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Robert Lubos
b4cfee090d net: lib: http_server: Implement proper CONTINUATION frame processing
CONTINUATION frames are tricky, because individual header fields can be
split between HEADERS frame and CONTINUATION frame, or two CONTINUATION
frames. Therefore, some extra logic is needed when header parsing
returns -EAGAIN, as we may need to remove the CONTINUATION frame header
from the stream before proceeding with headers parsing.

This commit implements the above logic and additionally adds more checks
to detect when CONTINUATION frame is expected. Not receiving a
CONTINUATION frame when expect should be treated as a protocol error.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
adfdc54434 net: lib: http_server: Update HTTP2-specific structs/enums naming
For HTTP2-specific structures and enums, use "http2_" prefix to clearly
indicate the distinction from the generic HTTP stuff.

Additionally, some structures/enums describing HTTP2 protocol details
had "server" in the name, while in reality they describe nothing
server-specific. Hence, drop the "server" part where applicable.

Remove unused macros.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Bjarki Arge Andreasen
cdff2575a7 tests: rtc: time_incrementing: set nsec member
The rtc test suite uses timegm to convert a unix
timestamp to datetime, specifically struct tm which has no
nsec field, so the nsec field is not initialized properly.

Update tests to init nsec and isdst members of struct rtc_time.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-07-09 19:03:49 +02:00
Francois Ramu
f3c70b4ab8 tests: drivers: clock control testing on the stm32h7 serie
Disable the pll2 when clearing the clock config prior to
testing the clock_control driver for the stm32h7

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-07-09 19:03:10 +02:00
Krzysztof Chruściński
44c2b19d5e tests: kernel: timer: behavior: pytest: Adjust max stddev
Like in C test. If MAX STDDEV is lower than single clock cycle then
set it to a single clock cycle.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-09 19:02:51 +02:00
Krzysztof Chruściński
1968cdf556 tests: kernel: timer: timer_behavior: Tweak expected std deviation
If frequency of the system clock is lower then deviation may exceed
default value (10us). Instead of adjusting the default value, test is
rounding up expected standard deviation to a single clock cycle.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-09 19:02:51 +02:00
Mykyta Poturai
ddb3234884 json: test: Add test for array elements alignment
Add test to check that alignment and offsets of object array elements
are calculated correctly.

Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
2024-07-09 19:02:25 +02:00
Krzysztof Chruściński
4a53c69fa5 tests: logging: log_api: Fix logging.frontend.only.rt_filtering
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>
2024-07-09 14:01:56 +02:00
Pieter De Gendt
5e4e51de78 tests: zbus: unittests: Add CMAKE_LINKER_GENERATOR case
Add a test case where the CMAKE_LINKER_GENERATOR is used.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-09 12:02:51 +02:00
Evgeniy Paltsev
4b9828c2a8 tests: logging: fix build error
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>
2024-07-09 08:49:05 +02:00
Evgeniy Paltsev
edfb690587 test: logging: dictionary: fix build error
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>
2024-07-09 08:48:24 +02:00
Marc Herbert
65f63622e2 tests: cpp: add C++ coverage for pm/device.h
Note CONFIG_PM_* affects device.h too. Even if not compiled, the more
code the pre-processor sees the better.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-07-08 17:20:26 -04:00
Marc Herbert
c25b9b240e tests: cpp: add some C++ coverage for device.h / Device Tree
This provides C++ build test coverage for device.h (notably:
Z_DEVICE_INIT() fixed in the previous commit) and for some other Device
Tree macros.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-07-08 17:20:26 -04:00
Zhaoxiang Jin
5b8bac37d0 tests: adc: Add 'zephyr,vref-mv' property.
Add 'zephyr,vref-mv' property to frdm_mcxn947 overlay file.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Zhaoxiang Jin
599fddc867 tests: Add frdm_mcxn947 into regulator and adc test scope
Add frdm_mcxn947 into regulator and adc test scope

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Szymon Janc
7bfd6b6256 test: bluetooth: Update ICS to TCRL 2024-1
This ICS was generated with new Qualification Workspace tool.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-07-08 14:57:12 -04:00
Szymon Janc
8665117411 test: bluetooth: Remove qualification project BLS file
With new BT SIG Qualification Workspace it is no longer possible to
export/import full project. Only ICS export/import is possible.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-07-08 14:57:12 -04:00
Alberto Escolar Piedras
bf53b06a06 tests/drivers pwm_clock: Build fix sam_v71_xult
Fix build error due to cmake requiring a separate
overlay for each of this target's SOCs.

Error being fixed:
```
-- Board: sam_v71_xult, qualifiers: samv71q21
CMake Error at cmake/modules/extensions.cmake:2742 (message):
  Board sam_v71_xult defines multiple SoCs.

  Shortened file name (sam_v71_xult.overlay) not allowed, use
  '<board>_<soc>.overlay' naming
```

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-08 14:55:15 -04:00
Alberto Escolar Piedras
a912bb6f14 tests/subsys/ipc/pbuf: Filter out partial native/posix arch builds
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>
2024-07-06 17:03:26 +02:00
Emil Gydesen
d05f211289 tests: Bluetooth: tester: Re-add support for checksum
The bug should be fixed now, so it possible to have it enabled as
long as OTS is not registered with the feature flag.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-06 17:02:23 +02:00
Daniel Leung
4ffb813110 tests: logging/dictionary: wait longer for first output
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>
2024-07-04 18:00:47 -04:00
Daniel Leung
ddfc39bd63 tests: logging/dictionary: fix pytest log parsing regex
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>
2024-07-04 18:00:47 -04:00
Daniel Leung
04c9637db7 tests: logging/dictionary: fix pytest when built with sysbuild
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>
2024-07-04 18:00:47 -04:00
Jonathan Rico
3af358d6fd Bluetooth: remove host/adv/resume test
This test verifies a convoluted interaction between the scanner and the
resumable advertiser feature in the host.

That feature is going away, see #72567.

Prepare that work by removing this test that's in the way.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-04 18:01:03 +02:00
Aleksander Wasaznik
c33e721c01 Bluetooth: host: test: remove adv/resume2
I am the original author of the test that is being removed. The test was
added in https://github.com/zephyrproject-rtos/zephyr/pull/70670 to try
to specify the behavior of automatic advertiser resuming in the Host.

It turns out now that the behavior of this feature depends on which
Controller is in use and can fail incorrectly.

The test assumes the DUT will be able to create `CONFIG_BT_MAX_CONN`
peripheral connections. But this is not necessarily true. E.g. Some
Controllers, like the SoftDevice Controller, may reserve some Host
connection slots for central roles, making the max number of peripheral
connections smaller.

In conclusion, the test is not correct and should be removed.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-07-04 13:26:01 +02:00
Alberto Escolar Piedras
1df86af309 Revert "net: sockets: move poll implementation to zvfs"
This reverts commit 93973e2ead.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00