Commit graph

19 commits

Author SHA1 Message Date
Alberto Escolar Piedras b39d7c2c3d tests/subsys/pm/*: Switch to native_sim
Enable all these tests which run in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform
And switch native_posix overlays to native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-22 09:53:54 +01:00
Arkadiusz Cholewinski 6304e9a302 PM: add device_on_power_domian testcase.
Add test case to increase code coverage of device.c file.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2023-10-31 08:58:21 +01:00
Anas Nashif 345735d0a8 tests: remove CONFIG_ZTEST_NEW_API in all tests
Remove all usage of CONFIG_ZTEST_NEW_API from tests and sample as this
is now enabled by default.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
Gerard Marull-Paretas 724274247a tests: pm: move all devices to POST_KERNEL
There's no need to use APPLICATION level.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-15 16:04:19 +02:00
Daniel Leung a206764878 tests: pm: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Gerard Marull-Paretas 48b201cc53 device: make device dependencies optional
Device dependencies are not always required, so make them optional via
CONFIG_DEVICE_DEPS. When enabled, the gen_device_deps script will run so
that dependencies are collected and part of the final image. Related
APIs will be also made available. Since device dependencies are used in
just a few places (power domains), disable the feature by default. When
not enabled, a second linking pass will not be required.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-06-21 09:32:05 +02:00
Gerard Marull-Paretas 1ebd76ed51 pm: add prompt to DEVICE_DEPS_DYNAMIC
The option can now be set by projects. This change will also allow to
make it dependent on a future CONFIG_DEVICE_DEPS option.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-06-21 09:32:05 +02:00
Gerard Marull-Paretas 1eb683a514 device: remove redundant init functions
Remove all init functions that do nothing, and provide a `NULL` to
*DEVICE*DEFINE* macros.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-19 10:00:25 +02:00
Jordan Yates 11b5bdeff6 tests: pm: power_domain: test balanced operations
Test that power domain operations don't result in unbalanced requests
to the power domain when the original device has PM disabled.

Needed to resolve issues raised in #53979.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-03-28 17:36:16 -04:00
Kumar Gala 4f0166088c tests: move to using CONFIG_MP_MAX_NUM_CPUS
For tests that set CONFIG_MP_NUM_CPUS, switch to using
CONFIG_MP_MAX_NUM_CPUS instead as we work to phase out
CONFIG_MP_NUM_CPUS.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-20 22:04:10 +09:00
Michał Barnaś dae8efa692 ztest: remove the obsolete NULL appended to zassert macros
This commit removes the usage of NULL parameter as message in
zassert_* macros after making it optional

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2022-09-09 07:05:38 -04:00
Gerard Marull-Paretas d520029900 tests: pm: initialize devices at compile time and fix ready checks
Initialize tests devices a,c at compile time. Also fix ready check (was
wrongly checking for NULL).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Yinfang Wang 42cbbaba7c tests: subsys: pm: move power_domain to new ztest API
move power_domain to new ztest API.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-08-15 18:40:17 +00: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
Gerard Marull-Paretas ade7ccb918 tests: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all tests to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 20:02:14 +02:00
Flavio Ceolin 8ddb21e230 tests: pm: Add a power domain test
Add simple test to exercise power domain behavior
with device runtime.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-04-18 17:25:01 -07:00
Jordan Yates 6d1a08b3a8 pm: device: move pm_device_runtime_init_* funcs
Move the `pm_device_runtime_init_*` functions from <pm/device_runtime.h>
to <pm/device.h>. The initial device state should be settable
independently of whether `CONFIG_PM_DEVICE_RUNTIME` is enabled.

This also resolves a compilation error when attempting to use these
functions without also including <pm/device.h>.

Function documentation is also updated to be more general than only
referencing runtime PM, as this also applies to system PM and manually
run actions.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-03-25 10:39:55 +01:00
Anas Nashif 97af0c8c33 tests: remove subsys prefix from test identifier
No need for subsys, the subsystem is expected to be the first component
of the identifier.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-03-18 10:50:57 -04:00
Flavio Ceolin 5a7040f4ba tests: pm: Add a power domain test
Add simple test to exercise power domain behavior
with device runtime.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-01-19 13:35:32 -05:00