Commit graph

8421 commits

Author SHA1 Message Date
Henrik Brix Andersen b0c4b399f9 tests: drivers: gpio: gpio_basic_api: remove rv32m1 pinmux calls
Remove the calls to configure the pinmux for GPIO for the RV32M1. These are
no longer needed after 9ba953d13a.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-08-11 18:39:17 -05:00
Tom Burdick 88de59043f tests: boards: frdm_k64f i2c test against fxos8700
Adds a simple test case against the FXOS8700 sensor and its
built in FIFO using i2c. Pulls data from the sensor using both
synchronous and asynchronous transfers.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-08-11 14:12:13 -04:00
Johann Fischer 9a1b990006 modbus: remove label property from devicetree overlays
Remove label property from devicetree overlays.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-08-11 09:39:24 -07:00
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
Kumar Gala 1679c650a7 tests: build_all: led: Enable various LED devices
Add I2C based LED devices to led/app.overlay to get those associated
drivers enabled as part of the build test.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-11 17:46:43 +02:00
Kumar Gala 0e1a7e0241 drivers: led: Remove unnecessary Kconfig settings
Having the LED device enabled in devicetree will now get the driver
enabled by default when CONFIG_LED=y is set.  So we can remove
setting driver enabling Kconfig values in various .conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-11 17:46:43 +02: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
Ming Shao 77e1e39cff ztest: add test summary after all suites finish running
Add test summary after all test suites finish running.
The summary can be one-line or verbose, which is configured
with CONFIG_ZTEST_VERBOSE_SUMMARY. The one-line summary covers
overall suite stats. The verbose summary covers each test
function within the suite besides the one-line summary.

The new ztest output ultimately go through the printk. If
printk go through the logging subsystem, there may be log
messages dropped. And if log_panic is invoked, log messages
can be flushed in a mess. So several explicit log flush
are used when printing summary to ensure no content is lost
and content is in good shape.

Some macros are shared between old and new ztests. Such as
TC_START_PRINT and TC_END_PRINT. The are defined accordingly.

Signed-off-by: Ming Shao <ming.shao@intel.com>
2022-08-11 09:01:12 -04: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
Enjia Mai fd1cd21aff tests: kernel: move the multiprocessing test to new ztest
Migrate the testsuite tests/kernel/mp to the new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-11 12:19:59 +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 4b1103547c tests: arch: arm: arm_interrupt: Increase stack size
Increase stack size for test thread. With no optimization
default stack size may not be enough.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-08-11 12:15:11 +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
Kumar Gala 00ab44d6b0 tests: build_all: ieee802154: Remove label properties
The label property isn't needed so remove it.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-10 14:37:38 -05:00
Kumar Gala 717be967ee tests: regulator: fixed: Remove devicetree label property
The label property isn't needed so remove it.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-10 14:37:38 -05:00
NingX Zhao 5f681dea38 kernel: heap: move heap testcase to new ztest
Move heap testcases to new ztest.

Signed-off-by: NingX Zhao <ningx.zhao@intel.com>
2022-08-10 12:57:36 -04:00
Xiao Song c35f1f977d tests: net: lib: move dns_addremove to new ztest API
Move tests/net/lib/dns_addremove/ to use new ztest API.

Signed-off-by: Xiao Song <songx.xiao@intel.com>
2022-08-10 16:11:46 +02:00
Andrzej Głąbek 65976137dc boards: nrf: Activate pull-up on QSPI CSN line in "sleep" state
When there is no external pull-up on the CSN line and the line
is put into the low-power mode (input direction and disconnected
buffer), after some time its level falls to low and some flash
chips, like for example MX25R64, exit the Deep Power-down mode
when that happens. To prevent this, activate the GPIO internal
pull-up for this line in boards that do not have the external
pull-up on it.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-08-10 16:08:23 +02:00
Stephanos Ioannidis 5ceda9fe7d tests: arch: arm_hardfault_validation: Enable assert test mode
This commit enables the assert test mode (`CONFIG_ASSERT_TEST`) for the
ARM interrupt test because it relies on the assert function to return
without aborting in the "Assert occurring inside kernel panic" test.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-08-10 14:32:36 +02:00
Stephanos Ioannidis b1fe54d9f0 tests: arch: arm_interrupt: Enable assert test mode
This commit enables the assert test mode (`CONFIG_ASSERT_TEST`) for the
ARM interrupt test because it relies on the assert function to return
without aborting in the in-ISR "Intentional assert" test.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-08-10 14:32:36 +02:00
Stephanos Ioannidis 162f5f7ab2 tests: ztests: error_hook: Enable assert test mode
This commit enables the assert test mode (`CONFIG_ASSERT_TEST`) for the
ztest error hook test because it implements a custom post assert fail
hook (`ztest_post_assert_fail_hook`) that returns without aborting to
faciliate the testing of the assert functions.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-08-10 14:32:36 +02:00
Francois Ramu 8401644416 tests: drivers: clock_control rename stm32 ahb test configuration
rename to pll_msis_ahb_2_40

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-10 14:32:14 +02:00
Andries Kruithof d2d241ac9a Bluetooth: llcp: test: fix bsim test for eatt
The Babblesim test for eatt for reconfiguration of MTU is not
foolproof. Central actually generates two mtu update events.
This is fixed by only setting the reconfigured flag when the MTU actually
changes to the new values

In the Babblesim test for eatt for collision the peripheral
needs to sync with central to ensure collisions occur.

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2022-08-10 12:39:16 +02:00
Stephanos Ioannidis 8355341c66 tests: lib: cmsis_nn: Initialise bias dimensions for depthwise convolve
This commit adds an initialisation for the `bias_dims` variable, which
is given as an input to the `arm_depthwise_conv_s8` function.

Note that the `bias_dims` parameter is currently unused by the function
implementation.

This fixes the following warning reported by the GCC 12:

  error: 'bias_dims' may be used uninitialized
  Werror=maybe-uninitialized]

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-08-10 12:00:18 +02:00
Gerard Marull-Paretas b74a22924e net: lib: config: remove NET_CONFIG_IEEE802154_DEV_NAME
Remove NET_CONFIG_IEEE802154_DEV_NAME in favor of DT based choice using
zephyr,ieee802154.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +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
Gerard Marull-Paretas f1e059a3e5 tests: net: ieee802154: use native_posix
All IEEE 802.15.4 tests use internal fake devices, so use native_posix
platform to run them as they are not meant to test IEEE 802.15.4 on
hardware.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Gerard Marull-Paretas 88a72ac699 tests: drivers: build_all: ieee802154: refactor test config
- Use a native_posix specific overlay for non-SoC devices
- Remove redundant per-driver Kconfig selections

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Gerard Marull-Paretas 80e6c944b5 tests: drivers: build_all: ieee802154: fix test case name
CC13XX/CC26XX test case had wrong name, fix it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Yuval Peress 84dfb8edf8 ztest: allow asserts anywhere
Updates the ztest_test_fail() function to allow failures in setup.
When executed, a failed assert will fail every test in the suite owning
the setup function. This was verified by adding a suite which asserts
in the setup function and has a test that should pass. During
exeuction, ztest marks the test as failing.

In order to verify exection I also added 2 new APIs:
- ZTEST_EXPECT_FAIL(suite_name, test_name)
- ZTEST_EXPECT_SKIP(suite_name, test_name)

Signed-off-by: Yuval Peress <peress@google.com>
2022-08-09 13:30:15 -04:00
Gerard Marull-Paretas a7c3e7e84a doxygen: remove redundant usages of def
The def command Indicates that a comment block contains documentation
for a #define macro. This is useful if the comment block documents a
macro not adjacent to it, e.g.

```c
/**
 * @def MAX(x,y)
 * @brief Computes the maximum of @a x and @a y.
 */
 #ifdef XXX
 #define MAX(x,y) ...
 #endif
```

However, it is not necessary if the comment is adjacent to the
definition, e.g.

```c
/**
 * @brief Computes the maximum of @a x and @a y.
 */
 #define MAX(x,y) ...
```

This patch removes all unnecessary def entries in-tree.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-09 12:29:28 +02:00
Glauber Maroto Ferreira 350b57c346 esp32: counter: tests: remove deprecated conf file
Remove unused/deprecated conf file from counter API
test.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-08-08 13:00:38 -05:00
Joakim Andersson fcb9813128 tests: arm: Increase main stack size with no optimizations
If the test is run with the config NO_OPTIMIZATIONS enabled then the
stack size usage increases by around 80% for ARM platforms.
Increase the stack size used in test cases that enables building with no
optimizations for ARM.

Update description on TEST_ARM_CORTEX_M since it was outdated and said
it was only used for a single purpose.

Fixes: #47930
Fixes: #47929
Fixes: #47855

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-08-08 11:17:01 -04:00
Robert Lubos 3eaf55a364 tests: net: socket: Disable unstable tests for mps2_an385
Disable unstable tests cases for mps2_an385, which fail sporadically
due to timer stability issues on that platform (see #48608).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-08 22:18:23 +09:00
Erwan Gouriou 1ef9e9eb9b include: drivers: stm32 clock_control: Replace OPT by DOMAIN
In the continuation of the previous commit, replace _OPT_ by _DOMAIN_
in macros relating to this feature.
hen, adapt drivers and tests to this new wording.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-08 14:17:07 +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
Kumar Gala ac50f8a99e tests: spi_loopback: Rework test
* Move test to using devicetree for various "device" params.
* Move test to using spi_dt_spec to simplify code

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-08 10:45:14 +02:00
Martí Bolívar d5b0bd55e0 tests: kernel: common: adjust fudge factors
Loosen some timing constraints in order to hack arond spurious
failures in upstream Zephyr's CI while working on an unrelated task.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-08-08 10:44:41 +02:00
Martí Bolívar 4583ebe50d tests: net: socket: adjust fudge factors
Loosen some timing constraints in order to hack arond spurious
failures in upstream Zephyr's CI while working on an unrelated task.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-08-08 10:44:41 +02:00
Martí Bolívar 2520747f6b devicetree.h: DT_FOREACH_NODE, DT_FOREACH_STATUS_OKAY_NODE
Add two new utility macros for iterating over the entire tree, along
with tests.

I have a use case for DT_FOREACH_STATUS_OKAY_NODE() right now, but I
think it makes sense to define both of them right away for
completeness.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-08-08 10:44:41 +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
Krzysztof Kopyściński f71741cea0 tests: bluetooth: tester: add support for testing Multiple Notifications
Enabled Multiple Notifications and added command for
bt_gatt_notify_multiple().

Increased possible number of connections to execute GATT/SR/GAN/BV-02-C

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2022-08-05 13:01:46 +02:00
Gerard Marull-Paretas 54ebcf7318 tests: drivers: build_all: ieee802154: remove mcr20a from spi.dtsi
This driver can't be compiled on all platforms as it's a NXP specific
driver (requires NXP HAL). Because spi.dtsi file is used by app.overlay
(and so enabled in multiple configs, including native_posix) it needs to
be removed. Note that MCR20A driver is already covered by the
ieee802154.build.mcr20a test case, which runs specifically on a NXP
board.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-05 12:56:47 +02:00
NingX Zhao 9ba764bbf0 kernel: queue: move queue testcase to new ztest
Move queue testcases to new ztest.

Signed-off-by: NingX Zhao <ningx.zhao@intel.com>
2022-08-05 11:46:59 +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
Jay Vasanth 82d4521c5c tests: eeprom: Add mec172x board overlay
Add mec172xevb_assy6906 board overlay for eeprom test.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-08-04 18:36:18 +02:00