Commit Graph

912 Commits

Author SHA1 Message Date
Johann Fischer
46a0e5347d modbus: remove the use of DT_INST_LABEL and DT_PROP(inst, label)
Although it is possible to simply use the interface number,
it has proven convenient to use the names for the interfaces
in the samples.

Migrate to DEVICE_DT_NAME().

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-08-11 09:39:24 -07:00
Shaoan Li
e408c45546 test: subsys: logging move log_benchmark to new ztest API
Move test subsys/logging/log_benchmark to use new ztest API.

Signed-off-by: Shaoan Li <shaoanx.li@intel.com>
2022-08-11 17:46:24 +02:00
li biao
97adecd713 tests: subsys: logging: move log_switch_format to new ztest API
Move test subsys/logging/log_switch_format to use new ztest API.

Signed-off-by: li biao <biao1x.li@intel.com>
2022-08-11 12:20:26 +02:00
Shaoan Li
414d98f767 tests: subsys: logging: move log_backend_fs to new ztest API
Move test subsys/logging/log_backend_fs to use new ztest API.

Signed-off-by: Shaoan Li <shaoanx.li@intel.com>
2022-08-11 12:17:19 +02:00
li biao
8bc0b2263f tests: subsys: logging: move log_immediate to new ztest API
Move test subsys/logging/log_immediate to use new ztest API.

Signed-off-by: li biao <biao1x.li@intel.com>
2022-08-11 12:17:14 +02:00
li biao
0ee00080d9 tests: subsys: logging: move log_msg to new ztest API
Move test subsys/logging/log_msg to use new ztest API.

Signed-off-by: li biao <biao1x.li@intel.com>
2022-08-11 12:17:08 +02:00
Krzysztof Chruscinski
7da83618c3 tests: portability: cmsis_rtos_v2: Inrease timeout
Increase timer timeout. 5ms timeout was too short for some
devices (e.g. with slow and blocking uart output).

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-08-11 12:15:11 +02:00
Gerard Marull-Paretas
8f887b6f8a tests: subsys: openthread: refactor test
Use a test compatible so that test can create a DT-based device and
provide a valid choice when building the test.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
NingX Zhao
cadb0802bf tests: subsys: modbus cases move to new ztest API
Move test to use new ztest API.

Signed-off-by: NingX Zhao <ningx.zhao@intel.com>
2022-08-08 10:51:17 +02:00
Yuval Peress
722b2418cb ztest: mock: migrate openthread tests to FFF and new ztest API
Update all the tests for openthread to the new ztest API and the
FFF framework. Splitting this into 2 commits was proving very
difficult so it's a single commit instead.

Signed-off-by: Yuval Peress <peress@google.com>
2022-08-08 06:56:43 +01:00
Yuval Peress
0e5f033a49 test: openthread: run clang-format on radio_test.c
Run clang-format on the file prior to making changes. This should
make reviewing a bit easier.

Signed-off-by: Yuval Peress <peress@google.com>
2022-08-08 06:56:43 +01:00
Erwan Gouriou
1e25763f57 tests: pm: device_wakeup_api: Fix comment on wakeup capable assert
If assert triggers, display the current state in order not
to confuse assert message reader.
Same logic is used for following asserts.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-05 06:27:35 +01:00
Kumar Gala
6c67239bc9 tests: subsys: pm: Remove unneccessary devicetree label prop
Remove "label" properties that are not used from devicetree
overlay files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-04 16:46:20 -05:00
Kumar Gala
418d601d6d tests: fs: fat_fs_api: Fix device name for native_posix flash
Update CONFIG_DISK_FLASH_DEV_NAME to devicetree node name as
we have removed the "label" property.  This gets the associated
tests to pass again.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-04 13:47:22 +02:00
Daniel DeGrasse
5671c7749a tests: sdmmc: fix SDMMC test order
SDMMC test requires that initialization test run first. Fix test name
to ensure it runs before other tests in suite.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-03 12:06:02 +02:00
Gerard Marull-Paretas
a650c6c554 pm: policy: allow multiple subscribers to latency changes
Current API allowed to get notified when the maximum system latency
changes, however, a single callback was allowed. The design was intended
for SoC specific actions when latency changes. However, in some cases
drivers may also want to know the current maximum latency to perform
local actions if other parts of the system modify it.

This patch updates the API with a pair of subscribe/unsubscribe calls to
achieve such goal. Tests have been updated to show how the API can be
used.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 11:19:17 +02:00
Yinfang Wang
0e1cc6977f tests: subsys: shell: move shell to new ztest API
Move test shell to use new ztest API.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-08-03 11:19:08 +02:00
Yinfang Wang
5ac55c18d9 tests: subsys: shell: move shell_history to new ztest API
Move test shell_history to use new ztest API.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-08-03 11:19:08 +02:00
Yinfang Wang
dba6bbb727 tests: subsys: shell: move shell_flash to new ztest API
Move test shell_flash to use new ztest API.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-08-03 11:19:08 +02:00
Dominik Ermel
d7c2a97fc5 tests/settings/fcb: Pick flash parameters from flash area device
The commit fixes code to pick flash parameters from flash area
device rather than chosen 'zephyr,flash'.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-08-03 05:01:30 +01:00
Gerard Marull-Paretas
5a44f2e33f include: add missing zephyr/ prefixes
Some files were missed during the migration. This patch adds the prefix
where missing.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-02 18:03:58 +01:00
Fabio Baltieri
def230187b test: fix more legacy #include paths
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-02 16:41:41 +01:00
Dominik Ermel
99279c06da tests/fs/nvs: Fix test to pick flash controller from area
The test has been accessing flash area parameters by flash
area label, but flash controller by chosen 'zephyr,flash-controller',
instead of picking device that the area is really on.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-08-02 15:18:05 +02:00
Andrzej Puzdrowski
ccf8c547d0 settings: API for get storage instance used
Added API function +int settings_storage_get(void **storage)
which allows to get storage instance used by the
settings backed to store its records.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-08-02 15:15:10 +02:00
Zhao Shuai
1c70522734 tests: subsys: dfu: move mcuboot_multi to new ztest API
Move test mcuboot_multi to use new ztest API.

Signed-off-by: Zhao Shuai <shuai1x.zhao@intel.com>
2022-08-01 18:05:51 +02:00
Zhao Shuai
f13ef35d75 tests: subsys: dfu: move mcuboot to new ztest API
Move test mcuboot to use new ztest API.

Signed-off-by: Zhao Shuai <shuai1x.zhao@intel.com>
2022-08-01 18:05:51 +02:00
Zhao Shuai
014628a7e0 tests: subsys: dfu: move img_util to new ztest API
Move test img_util to use new ztest API.

Signed-off-by: Zhao Shuai <shuai1x.zhao@intel.com>
2022-08-01 18:05:51 +02:00
Andrzej Puzdrowski
18b44746aa tests/subsys/settings: cleanup raw subdirectory usage
./raw directories for each testsuite were remains after having
base64 encoding test variant beside which raw variant was existing.

This patch flatten the directories structures.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-08-01 18:02:41 +02:00
Andrzej Puzdrowski
bcd4d0f2d8 tests/subsys/settings/littlefs: remove base64 variant
These tests are identical as RAW variant,
since the base64 settings encoding was removed (#26053)
from the settings.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-08-01 18:02:41 +02:00
Kumar Gala
2c990384d6 tests: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from tests.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-28 20:52:20 +02:00
Zhao Shuai
88c53a4beb tests: subsys: usb: move os_desc to new ztest API
Move test os_desc to use new ztest API.

Signed-off-by: Zhao Shuai <shuai1x.zhao@intel.com>
2022-07-27 18:45:16 +02:00
Zhao Shuai
610a657017 tests: subsys: usb: move device to new ztest API
Move test device to use new ztest API.

Signed-off-by: Zhao Shuai <shuai1x.zhao@intel.com>
2022-07-27 18:45:16 +02:00
Zhao Shuai
8659267f41 tests: subsys: usb: move desc_sections to new ztest API
Move test desc_sections to use new ztest API.

Signed-off-by: Zhao Shuai <shuai1x.zhao@intel.com>
2022-07-27 18:45:16 +02:00
Zhao Shuai
813158feb5 tests: subsys: usb: move bos to new ztest API
Move test bos to use new ztest API.

Signed-off-by: Zhao Shuai <shuai1x.zhao@intel.com>
2022-07-27 18:45:16 +02:00
Krzysztof Chruscinski
7dfe995aa0 tests: logging: log_switch_format: Disable standard backends
In order to avoid impacting test configuration and execution
disable default logging backends.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-07-26 16:07:37 -04:00
Fabio Baltieri
702b684366 tests: log_api: increase stack size for the test
CONFIG_MAIN_STACK_SIZE was increased for qemu_leon3, but after

15fdee04e3 logging: log_output: Add function for processing input arguments

this test started to fail on other platforms as well. Moving the stack
size override on the test wide prj.conf seems to make it work correctly
again.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-07-22 10:33:56 +02:00
Andrei Emeltchenko
b234ddc748 tests: ibecc: Fix IBECC tests
Fix IBECC tests moving common part to setup function.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-07-21 13:57:25 +00:00
Yinfang Wang
8a5bf765bc tests: subsys: edac: move ibecc to new ztest API
move ibecc to new ztest API.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-07-21 13:57:25 +00:00
Yinfang Wang
6087bac296 tests: subsys: edac: move ibecc_cov to new ztest API
move ibecc_cov to new ztest API.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-07-21 13:57:25 +00:00
Krzysztof Chruscinski
75c6a9050a tests: logging: log_stack: Adjust thresholds
Adjust thresholds after updates in log_output.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-07-21 09:04:37 -04:00
Krzysztof Chruscinski
a0e79710a0 tests: logging: log_output: Improve test coverage
Improve test coverage for log_output module.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-07-21 09:04:37 -04:00
Krzysztof Chruscinski
63c071a713 tests: logging: log_stack: Adjust thresholds
Adjust threshold.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-07-21 09:04:37 -04:00
Kumar Gala
dcfcd05ed3 tracing: Move to DTS for uart device
Move from using Kconfig TRACING_BACKEND_UART_NAME to a devicetree
chosen property ("zephyr,tracing-uart").  This is similar to a number
of other functions like "zephyr,shell-uart" or "zephyr,bt-uart".

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 16:00:47 -07:00
Tomislav Milkovic
0fe2c1fe90 everywhere: Fix legacy include paths
Any project with Kconfig option CONFIG_LEGACY_INCLUDE_PATH set to n
couldn't be built because some files were missing zephyr/ prefix in
includes
Re-run the migrate_includes.py script to fix all legacy include paths

Signed-off-by: Tomislav Milkovic <milkovic@byte-lab.com>
2022-07-18 16:16:47 +00:00
Yinfang Wang
0a89c07e1d tests: subsys/edac: Remove test_trigger_nmi_handler testing.
Remove the unrelated testing test_trigger_nmi_handler of edac.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-07-18 13:30:37 +00:00
Yinfang Wang
1ce5b4c037 tests: subsys: storage: move stream to new ztest API
Move test stream to use new ztest API.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-07-14 22:10:29 -04:00
Yinfang Wang
28608d158e tests: subsys: storage: move flash_map to new ztest API
Move test flash_map to use new ztest API.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-07-14 22:10:29 -04:00
Kumar Gala
02d0d20d59 tests: subsys: sd: sdmmc: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Move to using alias 'sdhc0' for SDHC controller.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-14 10:29:14 +02:00
Anas Nashif
d0be1de99e tests: logging: disable logging stack test
This test keeps breaking whenever something in kernel or
architecture code changes. If we are to track footprint and stack, it
should be done in some other way.
The value of the test deminished if we have to change the boundaries
every second day.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-12 22:46:05 -04:00
NingX Zhao
553a4de3c9 tests: subsys: sd cases move to new ztest API
Move test to use new ztest API.

Signed-off-by: NingX Zhao <ningx.zhao@intel.com>
2022-07-12 10:16:22 +02:00